Change module to write to the mmi_annotate space
instead of having a procfs entry to read.
Change-Id: I0931f7c1ef1305ebe23dfa2bb56fdb5a95948330
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1145135
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Write info to the mmi_annotate driver to save
information to be printed in the case of a
watchdog or panic.
Change-Id: I5681a1a2da18419e46d03b0dfe33b51a7f336019
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1144994
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Add a driver to replace the pstore annotated
region additions in the kernel.
Change-Id: If0fc6e46fe14562e846b8f356e6b75b71ae43307
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1132069
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
the old came from github site of cirrus driver v4.9-cs35l35 branch
Change-Id: I182e2bb0d1e041c72307c6b9541a7b2755e64ad2
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1160165
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
The defaults for Boost Coeff K1 and K2 values
are to be updated to give better performance
Change-Id: I1c8a757fc0358e9e7ad0a878307dbe192143adcb
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1140352
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Vladimir Karpovich <vkarp@motorola.com>
Submit-Approved: Jira Key
With the L37 now 12V we have to fix the boost based
off of that. Remove the default reg_patch call in
bus probe to utilize the newer method of handling
this case
Change-Id: I1f7db9c7c5335297b374be60e17693770739cfd3
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1140350
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Vladimir Karpovich <vkarp@motorola.com>
Submit-Approved: Jira Key
We should do the PAC OTP trim kickoff if
we are only B0, so place the call where
we determine it is in fact B0
Change-Id: Ida17815c68f8a5785b6cc1f802903c40659ead8f
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1140349
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Vladimir Karpovich <vkarp@motorola.com>
Submit-Approved: Jira Key
Decided it would be best to check in bus probe
and print out what the real part number is.
Also, eliminate function and just hit the
test space in codec_probe
Change-Id: I2d02c8b57c1651cc2656d7f2561aee338d602025
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1140348
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Vladimir Karpovich <vkarp@motorola.com>
Submit-Approved: Jira Key
CS35L36 comes in 2 flavors for B0
10V L36 and 12V L37
If L36, clamp down certain boost features
for safety purposes
Change-Id: I8bd69815dbf7097393c77216239d644547d4fc22
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1140347
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Vladimir Karpovich <vkarp@motorola.com>
Submit-Approved: Jira Key
Add a switch that enables boost and class h. By default they
are off.
Change-Id: I68efd2ac2fa0c6837415287a97d720d8776a9acd
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1140346
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
If supplying boost voltage externally you have to
put the device in specific setting or damage may occur
Add DAPM_POST events to setup the correct up/dn
Add DT boolean to specify external or internal boost
Change-Id: I449b18601757127d6570d6e5bca1db3f2c7938ae
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1140358
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Apply config work is done in workqueue now. Same thread is used to
schedule polling and irq works. Added sensor detection to support
PCB w/o inductive keys flex connected.
Change-Id: Ied612528513ea14aed15c2b8df0ae18ec7dcfd2e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1131383
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
The following drivers are included and modyfied to be run
as DLKM:
Core madera drivers,
extcon driver,
CS47L35 and CS47L90 codec drivers,
CS35l36 AMP driver,
CS40L20 haptic driver.
Change-Id: I7a285d434244e08635a2cfdcd3f21f45c3d8c0f6
Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1131231
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
DLKM was not properly unloading in response to rmmod command.
Change-Id: I23b958727cd245edccdf477adbb43183e927abff
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1128638
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Report keys only if buttons map is provided in DT. Otherwise IRQ
handler won't be registered and driver will only be responsible
for applying normal and LPM configuration.
Change-Id: I8444b50940635bbd6a6177b7abc356f461870e75
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1127687
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Following features have been added to LDC2114 kernel driver:
1) DT configurable settings with versioning support
2) control of LPWM pin
3) reboot notification callback
4) conditional polling and DT config debug messages
Change-Id: I828e73bc049961204f71fe5a41b40ab6af7a16cf
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1123709
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Functionality was previously in the tz_log.c driver
provided by qualcomm. Move to a module to avoid
tainting vendor kernel code.
Change-Id: I034bf341e781ecc0321df1b8871ce58daec9f379
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1108569
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
The maximum frequency to bit-bang at is 7 MHz. This
puts us right on the edge. Slow down writes by
changing writel_relaxed_no_log to writel_relaxed.
Additionally, DeviceAcquire is given a single retry.
It sometimes fails the first time, but I have not
seen it fail twice. The hssp protocol for the
cypress chip is a little iffy so this gives us a better
shot at being successful everytime.
Also includes various other fixes.
Change-Id: I94cc3496b74174ca14680299a5bd7020d5d88336
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1119584
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
Regulators requested with devm_regulator_get, regulator_put is done
automatically as part of resources release procedure.
Change-Id: I8940ca3adf5a3953b58d313edd95cc8a264bd37a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1116100
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Sometimes reading STATUS register once in IRQ handler is not enough
to clear interrupt source. Thus start reading status as part of IRQ
work.
Change-Id: Ia0652ceaf7ebf141075260fce768938a64676c54
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1108028
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
-Prevent the reset line from going into HiZ mode. HiZ
mode results in the chip getting stuck in reset on
this chipset.
-Disable interrupts when a device tries to flash.
-Fix system crash on removal of the module due to
the wrong IRQ getting freed.
Change-Id: I1a0bcd32b570507703d6847a7372251ec0272b5f
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1104822
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Switch to debug prints for some spammy errors.
Change-Id: I847d21fcaa4a66b0521e43c62fe7d7b6c1e140d7
Signed-off-by: Igor Kovalenko <c(CR)@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102185
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
This patch adds error check in case a defect exFAT SD cards is inserted.
Change-Id: I37f6b8716abd556908aad72b18fcc7ac5719766e
Signed-off-by: Min Shi <e13386@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102184
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
This patch fix the bug that exfat fs cannot write
continuous blocks in one bio.
This will cause every request submit in block layer
only contains one block, cause write speed slower.
Change-Id: Ia548a7d8051defc1498d2d11d39e069bf683fdff
Signed-off-by: haojl2 <haojl2@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102183
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
We can not send uevent directly because it might be called
from atomic context.
Change-Id: I384a7f197b22b1fcb8d068c98908e4fa5a1d3b82
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102182
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
when call utf16s_to_utf8s, last parmater 'maxout' will be reduced
with the returned value of utf32_to_utf8, the value reflects the
size of one utf character, it could be 1~max charset size(3), so
maxout should use MAX_NAME_LENGTH * MAX_CHARSET_SIZE
when call utf8s_to_utf16s, the inlen will be reduced with the
the returned value of utf8_to_utf32, so it should use
MAX_NAME_LENGTH * MAX_CHARSET_SIZE or the lenghth of p_cstring whose
max value is MAX_NAME_LENGTH * MAX_CHARSET_SIZE.
Change-Id: Icbea02ece4b1a5b015037a6a54178ee8e08d4325
Signed-off-by: Shengzhe Zhao <a18689@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102180
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
utf8s_to_utf16s could return -EINVAL(-22), then uniname[i] =
uniname[-22] = '\0' will corrupt other local variable.
uniname is a local variable having different address everytime
when call nls_cstring_to_uniname. so uniname[-22] could corrupt
some different addresses.
and also when filename reaches at maximum length, need to leave
last one space in buffer for '\0'
Change-Id: I44bbdd3249150ad5617c7cd13207cfa37b102a77
Signed-off-by: Shengzhe Zhao <a18689@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102179
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
The ->writepage should unlock its page before returning the results.
Otherwise, evict_inode can be hanged while truncating pages.
- Backtrace -
(__schedule+0x3dc/0x908) from [<c0b67854>] (io_schedule+0x6c/0x94)
(io_schedule+0x6c/0x94) from [<c01ce2dc>] (sleep_on_page+0x8/0x10)
(sleep_on_page+0x8/0x10) from [<c0b64e70>] (__wait_on_bit_lock+0x6c/0xb8)
(__wait_on_bit_lock+0x6c/0xb8) from [<c01ce418>] (__lock_page+0x90/0x98)
(__lock_page+0x90/0x98) from [<c01dcae8>] (truncate_inode_pages_range+0x360/0x37c)
(truncate_inode_pages_range+0x360/0x37c) from [<c01dcb1c>] (truncate_inode_pages+0x18/0x20)
(truncate_inode_pages+0x18/0x20) from [<c0304618>] (exfat_evict_inode+0x18/0xb0)
(exfat_evict_inode+0x18/0xb0) from [<c0228590>] (evict+0x94/0x178)
(evict+0x94/0x178) from [<c02286a4>] (dispose_list+0x30/0x40)
(dispose_list+0x30/0x40) from [<c022924c>] (evict_inodes+0xc8/0xd0)
(evict_inodes+0xc8/0xd0) from [<c0212964>] (generic_shutdown_super+0x44/0xc4)
(generic_shutdown_super+0x44/0xc4) from [<c0212bd4>] (kill_block_super+0x18/0x68)
(kill_block_super+0x18/0x68) from [<c0212f3c>] (deactivate_locked_super+0x48/0x64)
(deactivate_locked_super+0x48/0x64) from [<c022d660>] (SyS_umount+0x90/0x390)
Change-Id: I0a9caebeceda503c72e365957b1bf97d74f3de89
Signed-off-by: Jaegeuk Kim <jaegeuk@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102178
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Otherwise, we can get kernel panic when handling fs_error().
Change-Id: I288ece9bdc0182b0d4cf23f1bba920d341a8f540
Signed-off-by: Jaegeuk Kim <jaegeuk@motorola.com>
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102177
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
This patch implements errors=remount-ro for exfat.
Port of cf4fa60 and 58ec900 on 8996 with minor change for
updated submit_io() interface in kernel 4.9.
Change-Id: Iee791a99216ecf9f710adffa681706e761f97d8f
Signed-off-by: Shiyong Li <a22381@motorola.com>
Reviewed-on: https://gerrit.mot.com/1102176
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key