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
Pull the Sensors Class commits into the DLKM
directory structure.
This version is pulled from the bo-8998 branch
following the commits in (CR) and
(CR).
Orignal initial commit from QCOM is as follows
"sensors: add the sensors class support"
"Add a new sensors sysfs class and put all the sensors device driver"
"information in this class folder."
"Change-Id: I7c35ec4642e4dbd264945ad3839914935b301af0"
"Signed-off-by: Jie Cheng <rockiec@codeaurora.org>"
Change-Id: If9b0bd9f1ed1569a7f069781ddbe0bf02439e947
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1099024
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key