Commit graph

745 commits

Author SHA1 Message Date
haojl2
fa99fed1fe himax_v2_mmi: Add delay when palm leave.
TP:
Add 850ms delay when palm release found.

Change-Id: Ie7bde3057c2655e421d7ea0887d7c00cdcc133c6
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1406178
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-08-22 09:37:56 +00:00
haojl2
2a04696a64 himax_v2_mmi: Add palm detection function
TP:
If palm detection option is enabled
Create a virtual sensor for moto app.

Change-Id: I8065fccc5da638dde3f2ece9c41470d28cc5c7c3
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1405365
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-08-22 09:37:40 +00:00
haojl2
692eebb123 input: ets_fpc_mmi: prevent irq not been processed.
1. Remove irq timer handler which is used by outdated IC.
2. Skip irq close request send from HAL. For now, HAL open and close
irq in very high freq, and at last, irq will be set to open state.
When HW report IRQ, but HAL set irq state to close. This will cause
missing IRQ issue.

Change-Id: I5448ef89cfe988197d4204b17e4764b730ec1ad4
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1407246
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-08-22 07:48:32 +00:00
haojl2
0a20697470 focaltech_0flash_mmi: Fix flash recover issue
TP:
8719 use different boot_state when do recover check

Change-Id: I78d4d9f1a0632c7f5ef29ef4265d5aa00bb7161a
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1407800
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-08-22 07:48:27 +00:00
Konstantin Makariev
b4c2d1596c sec_mmi: enable panel mappings
Both panel suppliers: BOE and CSOT are changing Tx/Rx layout while
switching from EVT to DVT revision of HW. LSI provides no facility
in their firmware to distinguish HW variants. Thus driver will be
matching panel id and version in chosen node with id and version
for EVT provided as a mapping table in LSI device tree.

Change-Id: I265caced054f19ab2f985bf798dd169e09097fa0
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1406669
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-21 02:09:03 +00:00
zhouwl
e834c89ab5 ASoC: add tas25xx speaker protection for Rav
Enable CONFIG_TAS25XX_ALGO macro, add TI tas25xx speaker
protection algorithm for Rav.

Change-Id: I9205267a0705dc547c3b6537b139ad8cd8474cd1
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1406322
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-20 14:14:44 +00:00
liaohj
65875f2e75 audio:add macro for ti2558 spk protection code
add macro for ti2558 spk protection code
avoid android P projects compile fail.

Change-Id: I637cde4523f9d9d91d0b261cbbd24cec745a3471
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1406276
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-20 13:35:37 +00:00
chenlj2
8ad3d7f867 motorola alkm:optimise sx9325 driver
-solve build error according to kernel ver
-optimise sx9325 process

Change-Id: Ic14db2545e67686b974d02a1b9eed20a6dad0380
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1406073
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Nan Wu <wunan3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2019-08-20 09:46:21 +00:00
liaohj
636b9f2ed8 audio:add ti2558 speaker protection
add ti2558 speaker protection related code.
add ko in kbuild for sofiar

Change-Id: I6c7aa5c53bff4724a4fc3d2a6df07433c7ee71a6
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1405309
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-20 09:15:49 +00:00
Konstantin Makariev
1e2e9b8b64 sec_mmi: multiple suspend/resume scenarios
Added multiple suspend/resume scenarios to the driver. First option is
to perform HW reset on resume. It implies that touch IC will be put
to sleep mode when suspended. Device tree property sec,reset-on-resume
controls it. Second option is to turn power supplies off when suspended.
Device tree property sec,power-off-suspend controls it. Second option
takes precedence over first one when both enabled in device tree.

Change-Id: I93a99152397ea15f46a01c2f1a0ca8bd68c9f732
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1405038
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-17 00:11:11 +00:00
Konstantin Makariev
4833153a23 fixup! (CR) sec_mmi: usb detection support
Adding macro missing in the original commit

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: Ib52c7924a80e493f7a3a055a0e28a818e1feec35
Reviewed-on: https://gerrit.mot.com/1405185
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-16 22:22:55 +00:00
Konstantin Makariev
147e8b2136 sec_mmi: remove unused features
Clean up some unused macros. Fix charger mode set function

Change-Id: If80fc134db1a2132e30e4b12a1e565fffd0bc197
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1405014
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-16 20:35:52 +00:00
Konstantin Makariev
3903271cf3 sec_mmi: usb detection support
Added USB cable detection support to better handle charging noise.
This is optional feature controlled via device tree property
sec,usb-charger-detection. Fixed suspend mode current drain by
using sleep power mode instead LPM.

Change-Id: I53357cd578ec8412006dcf664558776c6cbadb7b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1403963
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-16 20:35:44 +00:00
chenlj2
122e0e1511 motorola alkm:modify irq pin process
-solve that sar sensor of olso-h didn't work
-Compatible with previous projects

Change-Id: I33a2cdd2065205491f78e4f7d111e3bb124fc0af
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1404580
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2019-08-16 08:57:56 +00:00
Ryan Lattrel
337e3fbc91 mmi_info: Update ram info for ddr5
Update ram info to handle ddr5, which uses a new
struct from the bootloader with an extra flag.

Also re-work error handling, previously it was possible
that if a wrong size is returned, the pointer to the
smem struct might not be null and we will still try
to access it, causing a panic. So, do not add the
sysfs entry if it is not correct.

Change-Id: Ib195543175528d0477266281080c4dc4a96abd3c
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1402645
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Dong-Hua Yan <a18317@motorola.com>
Reviewed-by: Curtis Porter <porterc@motorola.com>
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-15 21:10:17 +00:00
Ryan Lattrel
29dfe98601 mmi_annotate: Fix clang compile issues
Fix missing includes and warnings that show up when
building with the clang compiler.

Change-Id: I3eadc724df1598c4c2efe0ca1e18d6a6b7013367
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1401055
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Curtis Porter <porterc@motorola.com>
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-15 21:10:13 +00:00
chenlj2
1acd89dfb9 motorola alkm:optimise abov driver
-solve build error according to kernel ver
-optimise abov process

Change-Id: Iaae27c07aff3c8970440be4cb4329203d8d1c728
Signed-off-by: chenlj2 <chenlj2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1403061
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jiacheng Ou <oujc1@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2019-08-15 02:34:03 +00:00
huangjq9
5aeff3568a sar-sensor: update the driver for a96t346
Update the driver for sar-sensor:
- change the event report by virtual-sensor for capsensor

Change-Id: I8c0b1b7e5fe47f01e1c4a64cadc3821fc99772ba
Reviewed-on: https://gerrit.mot.com/1401810
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqiu Huang <huangjq9@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-08-14 09:09:24 +00:00
haojl2
c8a9793da4 focaltech_0flash: Remove debug log
TP:
use pr_debug to print debug log.

Change-Id: Ibbffa7a00a417d2a2e19eaa422422eb487570f47
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1401997
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-08-14 02:30:10 +00:00
Konstantin Makariev
091d9a6325 goodix_gtx8_mmi: ignore voltage set error
Set voltage might fail due to regulator constraints settings, which is
not fatal error and thus should not fail the probe.

Change-Id: I4e1c5dae7acb2fddd5eedbdbc1bab3a81ef4f961
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1400192
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
2019-08-12 14:03:58 +00:00
zhouwl
4ac97a9223 ASoC: tsa2558 customization for Rav
Rav uses single tas2558, TDM RX time slot need to set as stereo
downmix (L+R)/2.
Verify reset2 gpio before use it, otherwise, kernel log will
print error.

Change-Id: I9481301195b2f365c36d62cff86ea499e22673ca
Signed-off-by: zhouwl <zhouwl@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1400626
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-12 08:20:36 +00:00
huangjq9
0e980184a5 sar-sensor: fix the drivers loading abnormal
Since the device is detected by i2c communication after the device power on,
the probability that the drivers cannot be loaded normally.
Fix the a96t346 drivers loading abnormal.

Change-Id: I6eefa6fa718d39e67cac5087816ca99552223f1c
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1400568
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-08-10 11:20:55 +00:00
Konstantin Makariev
2b73724ae9 fixup! (CR) goodix_mmi: create goodix touch dlkm
Adding gesture support stuff missing in the original commit

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I6bdd3cb26082af965fc52b2521a7806d26819602
Reviewed-on: https://gerrit.mot.com/1400120
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-09 15:51:56 +00:00
huangjq9
b14e4bdafb sar-sensor: add sar-sensor drviers
vendor: Abov
device: a96t346

Change-Id: If31c6f873d51eb17fb7d285aa29d5c68d03f3731
Signed-off-by: huangjq9 <huangjq9@motorola.com>
Reviewed-on: https://gerrit.mot.com/1399966
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-08-09 09:47:56 +00:00
wangyq13
f8f54bfb51 focaltech_0flash_mmi: add support for ft8009
Difference between ft8756 and ft8009 is only CHIP_TYPE_MAPPING,
so use ft8756 configs firstly.

Change-Id: I79f3e04bf0a31c4a94091bd8f8525b2dd87af1d7
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1399541
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-08-09 04:42:41 +00:00
Ryan Lattrel
66c7358fca add clang build option
Add option to build using clang via
USE_CLANG_FOR_MODULES. Add to the appropriate
board file for the product that needs clang.

Change-Id: I05578ac49de38887b3f359276a3350d0bb5a18db
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1399094
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-08 22:17:12 +00:00
Konstantin Makariev
d423d7e6bd sec_mmi: debug interface enhancements
This commit includes the following enhancements:
1) debug interfaces moved from Samsung specific sysfs path to I2C
   device path
2) write register interface added
3) write register and erase firmware interfaces only available
   in factory mode

Change-Id: I12504e99506c1a1bc76b3c9622814dbeac249438
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1399692
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-08 19:20:46 +00:00
Konstantin Makariev
7000eb5411 goodix_mmi: create goodix touch dlkm
Goodix kernel driver moves to DLKM area

Change-Id: I052a5619781a177aea0ad0ce89048c7a6b1eed7f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1398108
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-08 16:11:45 +00:00
Konstantin Makariev
d98327444c sec_mmi: debug read registers interface
Adding debug interface to read arbitrary touch IC registers.

Change-Id: Id70d1d8d85608947c4c2663444471cac44cff212
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1398906
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-07 21:29:51 +00:00
Weilong Wu
fc1db9d9fe aw8624: fix wakelock build error
wakelock.h had been removed from Kernel-4.14.
We use wakeup source instead of the wakelock.

Change-Id: I9d1cd1e7d9f4a5040d409b245e77925d896a3fd2
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1397482
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lingyun Li <lily8@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-06 09:00:14 +00:00
yanyh2
ab22beed7e power: set charge done for battery supply
QG uses the battery supply charge done property for
capacity learning, but qcom battery may not be in
charge done state when mmi charger terminates the
charging as battery is full charged.
In that case, QG will not trigger the capacity learning
when it completes a full charge cycle.
As the FULL charge state is mantained by mmi charger, so
set the charge done state once mmi charger complete charging.

Change-Id: I574e6f3349949882bb38a759835cf85a67386fb5
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1396976
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-08-06 03:05:10 +00:00
Konstantin Makariev
c8e7268b1f sec_mmi: resume faster
Originally it was planned to do HW reset on resume. However, HW
reset was taking way to long and S.SLI suggested first to switch
to SW reset and then to simply set Normal power mode. Thus this
commit combines 2 things:

 * new parameter to reset function (hw or sw)
 * setting normal mode on resume

Change-Id: Ic52737f09cc7848377f91b274b47ee6dacee5204
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1397255
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-05 15:38:37 +00:00
liaohj
720af089a6 sound/codecs:add ti2558 driver
sofiar use smart pa ti2558,
add kernel drivers.

Change-Id: I02b490c17e96224d2fd9510d3e214900a4172b4a
Reviewed-on: https://gerrit.mot.com/1396120
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuesheng Huang <huangys@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2019-08-05 03:36:21 +00:00
Haijian Ma
5a28fcc34d charging: fixed logic error
When count =1 and charger also present, it will run count reset and
cancel charger check work, so add charger present condition.

Change-Id: I4a6b871cc23a18b8f9412d16f35949c610cc17e3
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1396760
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-08-05 03:25:33 +00:00
Konstantin Makariev
70a6f9ebd7 sec_mmi: expose panel supplier name
Adding sysfs entry to report panel supplier name retrieved from
mmi,panel_name property of chosen device tree node. That property
gets initialized in bootloader based of results of HW detection.

Change-Id: I1c0a4ac8dc008ab8a41ae3da77cdc7ec9b2d20e2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1396198
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-02 16:04:26 +00:00
Konstantin Makariev
7a8db6a200 Revert "(CR) sec_mmi: hack for input device name"
There is no need to assign synaptics name to input device for
primary touch.

Mot-CRs-fixed: (CR)

This reverts commit ca0acb312a01582663d3a485f85f7a67390cf088.

Change-Id: I4d787c44b343727c9917fe7eaf036ce63bd673ad
Reviewed-on: https://gerrit.mot.com/1396206
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-08-02 16:04:21 +00:00
Haijian Ma
f2ec26f212 charging: fixed multiple rerun apsd
1. sdp will config icl 100ma firstly and then config 500ma after usb
status is configuration, so normal sdp also will rerun apsd. so error sdp
can't use "icl <= 100ma" condition to check.
2. make sure charger check work call only once.
3. factory mode don't do charger check.

Change-Id: I162ca7c1ca4849a24eea3da9c38b2345b8c5f810
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/1395943
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
2019-08-02 10:21:18 +00:00
Yonghua Yan
6944182738 power: only override USB ICL for high current
Unset the High Current mode if usb type is SDP or the target
icl lower is than 500mA.

If the High Current mode is set for SDP, the settled ICL may
be over the target icl value.

Change-Id: I05bb76d418c74b910eeed358e59e4b0fb3f33600
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1394159
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Submit-Approved: Jira Key
2019-08-01 03:54:39 +00:00
Konstantin Makariev
1464201514 sec_mmi: hack for input device name
Samsung LSI touch driver creates input device with name
samsung_mmi.primary. Framework has primary touchscreen input
name hard coded as synaptics_mmi.primary and thus won't accept
touch events from new input. This is temporary hack to allow
functional touch until CR (CR) gets resolved.

MMI_STOPSHIP

Change-Id: Ia69683d25f5216c642d86bd62e6bd29839f5b9c8
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1394708
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-07-31 23:52:30 +00:00
Konstantin Makariev
48c03881f2 sec_mmi: move mmi interfaces under i2c device path
MMI interfaces expected to reside under I2C device path to ensure
successful firmware update.

Change-Id: I7335df7184b593b72462e6a310776ef08e6e0a54
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1395090
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-07-31 23:51:51 +00:00
Konstantin Makariev
9cdcea28d2 synaptics_mmi: optimize probe execution
Probe was taking long time to fail when HW not detected due to
various delays in detection work and I2C transactions. This allowed
for resources allocation errors in another driver started
concurrently.

Change-Id: I1cb5e9c206197c8a4af3be2902a6f7f6c8249c8d
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1395070
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2019-07-31 23:29:22 +00:00
Ryan Lattrel
4f2e232594 power: max17xx: Reset fuel gauge on diff
Reset the main and flip fuel gauges if there is a difference
of more than 15 percent between the two.  This could indicate
that there is an error with the capacity value, as it
should not be physically possible for this to happen.

Change-Id: I3b74d97c1892bf1dfe537f29818dbe735f0bfa01
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1390571
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Cesar Augusto Marcelino dos Santos <cmsantos@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-07-31 17:27:24 +00:00
Konstantin Makariev
20b1b03bf5 sec_mmi: restore internal access to sec device
Samsung LSI has tool accessing touch IC information via bunch
of function provided by sec device. This function was temporarily
unavailable to simplify bringup.

Change-Id: I9eb29f0ed8a52126df0a5dcfecf0d26dd5d7f5cc
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1393553
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-07-30 19:29:24 +00:00
liaohj
bf99337c22 modules:tfa98xx:delete time printk
cherrypick from (CR)
- fix compile fail.
  error: 'start_time' may be used uninitialized in this function
  [-Werror=maybe-uninitialized]
- just printk start time. delete it.

Change-Id: I846597f1227e958b1360d0cfd61756a67e56c9a1
Signed-off-by: liaohj <liaohj@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1260694
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Reviewed-by: Wanlong Zhou <zhouwl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit b9b7b207c4b80f8e99ecbd0dcf0573525dc88a66)
Reviewed-on: https://gerrit.mot.com/1393913
Reviewed-by: Hujun Liao <liaohj@motorola.com>
2019-07-30 08:31:46 +00:00
Yonghua Yan
7385bf598a power: override USB ICL
Override USB ICL using the targer ICL value, so that
the ICL settled value will not be limited to a lower
value than target value.
For example, when connect device using a CC floated
typec cable, the settled icl will be set to 100mA,
which will block the charging.

Change-Id: Icd2ea3e020437297642d790f4e1fa8ab25231504
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1393334
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-07-30 08:25:58 +00:00
liuyc20
26b854ce75 usbnet: Release skb if bulk_in do not enable completely
sometimes TCP/IP send data before usbnet port complete.
Free the skb in this case.

05-15 18:56:41.065 0 0 I Call trace:
05-15 18:56:41.065 0 0 I : usb_ep_queue+0x104/0x118
05-15 18:56:41.065 0 0 I : usb_ether_xmit+0xd0/0x200 [moto_f_usbnet]
05-15 18:56:41.065 0 0 I : dev_hard_start_xmit+0x148/0x298
05-15 18:56:41.065 0 0 I : sch_direct_xmit+0x160/0x1a8
05-15 18:56:41.065 0 0 I : __dev_queue_xmit+0x4c0/0x738
05-15 18:56:41.065 0 0 I : dev_queue_xmit+0x10/0x18
05-15 18:56:41.065 0 0 I : neigh_resolve_output+0x158/0x188
05-15 18:56:41.065 0 0 I : ip6_finish_output2+0x470/0x5f8
05-15 18:56:41.065 0 0 I : ip6_finish_output+0x190/0x210
05-15 18:56:41.065 0 0 I : ip6_output+0xc0/0x1a8
05-15 18:56:41.065 0 0 I : ndisc_send_skb+0x348/0x420
05-15 18:56:41.065 0 0 I : ndisc_send_ns+0x218/0x250
05-15 18:56:41.065 0 0 I : addrconf_dad_work+0x41c/0x708
05-15 18:56:41.065 0 0 I : process_one_work+0x1f4/0x458
05-15 18:56:41.065 0 0 I : worker_thread+0x2f0/0x458
05-15 18:56:41.065 0 0 I : kthread+0x110/0x120
05-15 18:56:41.065 0 0 I : ret_from_fork+0x10/0x18
05-15 18:56:41.065 0 0 W : --[ end trace 65a258926fd49736 ]--
05-15 18:56:41.065 0 0 I configfs-gadget gadget: usb_ether_xmit: could not queue tx request

Change-Id: I74edf5bfafd4a157760e118d71c68b794aea2591
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1360881
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 4c7eb1827278db5f6dffe352b1f6e53022429ffd)
Reviewed-on: https://gerrit.mot.com/1393235
Reviewed-by: Haichao Li <liuhc3@motorola.com>
2019-07-30 02:43:22 +00:00
wengjun1
713f4fb686 DLKM: touch: Support CQA test for ft8756
Since the firmware size of ft8756 will exceed 64K, so the CQA test
jar and ini need to be changed, at the same time have to change
touch driver to match this change.Now we need to increase size
when calling download firmware function.

Change-Id: Icea129ab53663006ebedce0af1ff0ba5b8a03f1d
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1391750
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yang Yang <yangy19@motorola.com>
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-07-29 03:17:16 +00:00
liuyc20
3a242c673c vl53l1: Update uevent after laser input entries created
Driver code create laser class->create virtual device->
add sys entries to this virtual device.

After laser class or virtual device create, kernel will
send add uevent to userspace.
Ueventd will received this add event and change sys entries
owner and permisions.

But ueventd thread have ran before sys entries created.
In this case, sys entries owner and permisions will not be set
correctly.

So After sys entries created, send a update uevent to userspace.
Make sure ueventd can fix sys entries permision.

Change-Id: I7b206cd99428252a8c2138083ea954211e655e6f
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1392489
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2019-07-29 03:10:09 +00:00
Yonghua Yan
940f3d27b1 add xtalk and offset sysfs for tof calibration
Add xtalk sysfs interface for tof xtalk calibration.
Update the offset sysfs for tof offset calibration.

Change-Id: I6cb6b9762fa3446829f4bb3f921615215f90a2f1
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1387848
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1390242
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
2019-07-29 03:04:57 +00:00
Yonghua Yan
886224b5ec power: add work for charger type correction
The charger type based on BC1.2 detection may be wrong
at the first time when charger is attached.

Add a delay work to check the usb icl and apsd result,
and check if the usb icl is less than 100mA or apsd
is FLOAT/OCP after 10s when the apsd result changes.

This patch can fix the slow charging or no charging issue
due to slow plugin or wrong apsd result.

Change-Id: I8d02edfe4617b23c0a9f8af7251c80f733df0f71
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1390378
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-07-24 09:27:03 +00:00