Commit graph

642 commits

Author SHA1 Message Date
haojl2
4e0522f3d0 himax_v2_mmi: Enlarge SPI transfer size.
Enlarge size, use DMA to translate.
This can speed up FW download.

Change-Id: I1aabea23ba8f64c7227d78525720b0e4e180bc12
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1372032
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-17 21:30:45 -05:00
haojl2
0f7489aa09 himax_v2_mmi: Clear SRAM after download firmware.
After fw download finished, SRAM data is not stable.
Send command to clear SRAM data after fw download.

Change-Id: I298c070c39cdb3c743a277e2276183b424cc9f94
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1372031
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-17 21:30:37 -05:00
Konstantin Makariev
93551370c6 synaptics_mmi: keep only one input
Re-creating input device on firmware upgrade is not necessary and
confuses the InputReader. Regardless whether firmware gets upgraded
or not, driver will keep the same input device (and thus associated
with it /dev/input/eventX file).

Change-Id: Ieafb2cecc934e74323081bfd97c33b990f7dea40
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1372155
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-06-17 16:58:02 -05:00
wengjun1
ed79ab6246 Sofia: Sofiap: Focaltech ft8756 touch bringup
- Initial bringup for ft8756
- Will need to compatible with ft8719

Change-Id: I6b5b2f68f219c44875d820b0450ecb41382f091d
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1370467
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit f8fdcedac1475f932c81ed8894fd4eb827f9649e)
Reviewed-on: https://gerrit.mot.com/1372040
2019-06-17 06:01:24 -05:00
haojl2
f3c7f1769e focaltech_0flash: Release events in suspend
TP:
Release all input event before detachedvice go to suspend.

Change-Id: I0f6513cb5075a7dc5afd9ff3a1e3fd104cebc582
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371914
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-17 01:59:58 -05:00
haojl2
a121ea51c3 defender: TP: Fix 8719 support in driver version to V3.1
TP:
fix FT8917 support in driver version v3.1

Change-Id: I76a05fb43d3f37c92b7a6bf368a3774359d003c5
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1370995
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1371913
2019-06-17 01:59:49 -05:00
haojl2
409f18bb04 defender: TP: Seperate focaltech_flash.c
TP:
Download function for different touch IC is different.
Seperate flash function info common part and IC unique part

Change-Id: I31637e889e2d0cb789d53d21418e1f3a1532ae12
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1369612
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1371168
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371912
2019-06-17 01:59:38 -05:00
haojl2
fd3d2b00a6 defender: TP: Update driver version to V3.1
TP:
Update driver version to support 8756.

Change-Id: I8dbcae57f1d0b95f7db9cb512d78cd04309182e9
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1369383
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1371167
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371911
2019-06-17 01:59:28 -05:00
haojl2
c8155b8f80 focaltech_0_flash_mmi: Add ft8756 support
Add FT8756 IC support for defender
Fix some build warning on Android Q test function.

Change-Id: I6514f149045e605d5fd5d0adde1c22b12f13824d
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1361859
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1369643
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371910
2019-06-17 01:59:17 -05:00
Yonghua Yan
359208a01a moto_f_usbnet: increase usbnet transport speed
Enlarge USB MTU and tx/rx bulk size to 10 times
of its original size.

The kernel version may not support member max_mtu
in net_device so remove the code to set the max_mtu
to avoid compile issue on some kernel version.

Change-Id: I2756a7153e9211e2560d0efa186466095a17d271
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371702
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianhong Wang <wangjhn@motorola.com>
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Submit-Approved: Jira Key
2019-06-17 00:17:34 -05:00
Yonghua Yan
133f27fb9f usbnet: fix compile issue caused by Kernel version
The kernel version may not support member max_mtu in net_device
so remove the code to set the max_mtu to avoid compile issue on
some kernel version.

Change-Id: I32f0f80b41f72ae4be2db207d37b5c1d135af9bc
Reviewed-on: https://gerrit.mot.com/1371694
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-15 10:02:30 -05:00
Yonghua Yan
8047521635 moto_f_usbnet: increase usbnet transport speed
Enlarge USB MTU and tx/rx bulk size to 10 times
of its original size.

Change-Id: I041ff0ce434fbc49e87352850cff57eb1d94e560
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1371106
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2019-06-15 05:53:58 -05:00
huangys
5fe048dccc ASoC: move cirrus playback driver to QC audio-kernel
This driver is hard to share on all QC platform. But this project
is hoped to common for as most as product. Move it to QC audio kernel.
It's seperated on different QC platform.

Change-Id: I37202e87bf6174be7aa015ae9566d34739ed7d87
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1370172
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-06-14 03:27:39 -05:00
haojl2
4d96a0bf80 himax_v2_mmi: Return error code when selftest failed
When selftest failed in some test case.
Return corresponding error number.

Change-Id: I429132e02f49a58b7ff11336ba24e22ae0f5c58c
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1369661
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-06-12 06:36:07 -05:00
haojl2
47cc662c86 himax_v2_mmi: Change self_test entry permission
Add write permission for self_test sys entry.
This entry is used by TCMD

Change-Id: I662d949d24918915b56e25fb19bb55f30e05dfd5
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1369369
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-06-11 21:29:03 -05:00
haojl2
cf1a1d78e9 himax_v2_mmi: Add touchscreen device class for himax driver
Add touchscreen sys class.
This class contains vendor and IC info.

Change-Id: Ifb671720b26131c5d7b0cf4355597fe8c6b0af32
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1369368
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2019-06-11 21:28:57 -05:00
Yonghua Yan
101f05d8b6 power: read the usbin suspend state from 0x110B
The usbin suspend may be triggered by sw command, AICL or
light flashing.
So it may cause auto power off for factory kill when test
the camera flash LED.

The bit6 of register 0x110B can indicate usbin suspend
state in all above cases.

Change-Id: I91d0412cc7bfcbb64e65711869e519a32740964a
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1368541
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-06-11 04:21:56 -05:00
daiss1
4254d42b21 doha: TP: FocalteckTP Update DAM
FocalteckTP Update DAM
Use drm_notifier_callback

Change-Id: Iafbf80cab6aea4041d0a782cfa4876729a3762a7
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1364929
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1367088
Reviewed-by: Jianqi Yang <yangj@motorola.com>
2019-06-10 21:31:30 -05:00
haojl2
8a19f9b376 input: ets_fpc_mmi: fix rmmod issue
When rmmod called,
Clear input device regisgered for navigation function.
Remove navigation sys entries.

Change-Id: I4f101c6f08a81f8c53206edfe5883480ed28cc42
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1339672
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1367087
2019-06-10 21:31:18 -05:00
haojl2
a376df2ff9 Fix navigation function build issue
Only enable FPS_NAVI function if CONFIG_INPUT_EGISTEC_FPS_NAVI defined.
if not defined, do not build ets_navi_input.c

Change-Id: Ibd57c719cb33ad7254cb77272e4ac5ee7b8b664a
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1339496
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1367086
2019-06-10 21:31:09 -05:00
haojl2
73e64a0078 Fix wakelock header file issue
<linux/wakelock.h> file is only avaliable if CONFIG_HAS_WAKELOCK is
defined.
If this is not defined, use pm_wakeup_source instead.

Change-Id: I1b70e1420caf1ecfed08016134b6b972ef178663
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1339495
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1367085
2019-06-10 21:30:56 -05:00
haojl2
1f32aed828 himax_v2_mmi: Add support to set csv file name
Add selftest sys entries for TCMD.
TCMD can process selftest and get resule though those entries.

Change-Id: I389601a1a3d3945b0c4b69a75763778b94d0b053
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366924
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-05 22:48:35 -05:00
haojl2
0c22d4ca18 himax_v2_mmi: Fix kernel dump issue.
Fix kernel dump issue after selftest excuted.
Use kzlloc area for DMA translation

Change-Id: Ibe7d32bd924d76481f72cce006f5c6bff5219f93
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366923
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-05 22:48:27 -05:00
haojl2
5b95e58597 himax_v2_mmi: Add edge Inhibition sys entry
Add an sys entry to enable different edge inhibition function.
echo 0,1,2,3 to edge_en.
0 turn_off
1 Vertical inhibition
2 Horizental clockwise inhibition
3 Horizental anticlockwise inhibition

Change-Id: I2f6b0645ecfbe042da537a2fab0f4102278fd5ef
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366922
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-05 22:48:22 -05:00
haojl2
735d3b40a1 himax_v2_mmi: Add DRM notification callback.
Qcom use DRM notification in sm6125 and new platform.
Use config to support both notification callback.

Change-Id: I77b9a72fa67c0f36b9bf9fb61b31a8c44ff11c3c
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366921
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-05 22:48:18 -05:00
haojl2
9b7c8f35b9 himax_v2_mmi: Add himax tp driver code.
Add Himax v2 driver code.
New driver structure for himax IC

Change-Id: Ia15dda49df907958803038c54ba99e314937c682
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366920
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-05 22:48:14 -05:00
haojl2
bb299fa0a5 himax_mmi: Fix wakelock compile issue
Wakelock is not supported by default.
If it is not supported, use wakeup_source instead.

Change-Id: Iae27c6fc6c8f3fd6c0129f0869ae734cec59c067
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366919
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-06-05 22:48:08 -05:00
Kenny Kessler
d69fdb2a67 power: qpnp-smbcharger-mmi: Also Add AICL Rerun to Dual
Dual Battery slgorithm also needs the same AICL rerun.
Otherwise the ICL can drop and stay too low to recharge.

Change-Id: I97236a1342f24c46d14047dd0c1f6cdacd994ddb
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1366736
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-06-05 14:38:45 -05:00
Weilong Wu
5ce18e2d3e aw8695: improve vibrator experience
1. Support to vibrate for 1s when boot up.
2. Change f0 calibrate voltage as 1.8v Vrms.

Change-Id: I4f3cbb863d619b6bec343c7db95fc655a8bf06c4
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1351275
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit d0c752bc3b9fdf37c2d86b091b114cbc09f9ad86)
Reviewed-on: https://gerrit.mot.com/1365557
Reviewed-by: Jianqi Yang <yangj@motorola.com>
2019-06-03 21:02:55 -05:00
Weilong Wu
be9b8f9f0c aw8695: make some default change
Change the default value as our requirement:
1.Disable HW trigger by default.
2.Change default activate mode as RAM mode.

Change-Id: I08cd468c282defb14c8ddef09f61aecde364c276
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1339124
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit e937090b6880d02e827386cce95a1a56afb624ad)
Reviewed-on: https://gerrit.mot.com/1365555
Reviewed-by: Jianqi Yang <yangj@motorola.com>
2019-06-03 21:02:51 -05:00
Weilong Wu
798a46b1c7 aw8695: support 205HZ vibrator
aw8695 can support f0 calibration, we need to
add 205HZ configuration to support more vibrator.

Change-Id: I7946bf24794c3b8e74bc909f0a6aebfe2c8454b3
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1333394
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit bd22a3e2235e05bb7434c11686f795bf8b6a8a4f)
Reviewed-on: https://gerrit.mot.com/1365544
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
2019-06-03 20:14:59 -05:00
Weilong Wu
96b9f04828 aw8695: support moto vibrator feature
Moto vibrator feature can make vibrations synchronize
with the rhythmn of the ringtone.
Optimize awinic vibrator driver to support it.

Change-Id: If03ad468cba963afef519dc23486cbe80b06f120
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1328934
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit fcf020fbd1c8a588e6c1e83df05751722bf94f17)
Reviewed-on: https://gerrit.mot.com/1365543
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
2019-06-03 20:14:52 -05:00
Weilong Wu
eaccb4e597 aw8695: add awinic haptic driver
Initial aw8695 DLKM code.
It is new awinic haptic driver IC.

Change-Id: I834e4cbcade93c6e8fd2e22bd7a8fa6b9d43131c
Signed-off-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1309272
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit d8615210fadad3fd9b9aae9b95ed2d0f7d6c3577)
Reviewed-on: https://gerrit.mot.com/1365541
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
2019-06-03 20:05:16 -05:00
Yonghua Yan
8b392dc3b8 power: add current_max to get effective fcc
Add current_max property in battery supply to get the
effective FCC value.

Change-Id: I2a9dd33a42bfc248518db7447c8bc5cd322be5e8
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1364670
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-31 23:12:41 -05:00
Yonghua Yan
9519f45eea power: Rerun AICL if charging disable/enable
It is found that the USB settled ICL drop down when battery
charging is disabled for full charge, but the ICL does not
adaptively increase for incremental system load or recharge.
In that case, it draws current from battery even a charger
is attached.
In order to recover from that situation, rerun AICL is an
effective way to recover the USB ICL.

Change-Id: Ic08691817bb51276187db558cdd5addd07fc85f0
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1364085
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-31 23:12:34 -05:00
Yonghua Yan
5889409334 power: Disable HW JEITA for PMI632
As the h/w JEITA is enable by default, which will impact
the thermal charge profile in qpnp-smbcharger-mmi driver,
so disable it.

Since the h/w JEITA is not used, and mmi thermal charge
profile is used, the battery health in qpnp-smbcharger-mmi
driver should be used as the battery health property.

Change-Id: I53b8a7739f6c94307e076aad6e9234a3149db494
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1362570
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-28 21:47:55 -05:00
haojl2
3399eeb923 fpc1020: Enable fpc class device only for multi fp.
Enable class fingerprint only when multi fingerprint sensor enabled.
Do not change if only has one fingerprint sensor.

Change-Id: I90c85ba3399241d7652f164603cf7f571ab98118
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1356399
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Tested-by: Jira Key
2019-05-23 22:18:46 -05:00
haojl2
53483bf12b fpc1020: Create sysfs before irq enabled.
IRQ handler will notify sys entry.
So must create sys entries before irq requested and enabled.

Change-Id: I6596866a19bMontana779536eb71147810cd13c9528f
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1354629
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356392
2019-05-23 22:17:54 -05:00
Qiuliang Cheng
cf3f5de761 FPS.FPC.driver: Make uevent for sysfs node creating
motorola/kernel/modules/drivers/input/misc/fpc_fps_mmi/fpc1020_tee.c:
Change device_create() calling to device_create_with_groups() calling.

To make KOBJ_ADD uevent to be aware of sysfs node creating,
device_create_with_groups() but not device_create() should be called.

Change-Id: Idc85caedc7ad770791b893f4c4d65753e2e9b1c6
Reviewed-on: https://gerrit.mot.com/1352027
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356391
Reviewed-by: Jianqi Yang <yangj@motorola.com>
2019-05-23 22:17:14 -05:00
haojl2
2bc6445321 fpc1020: Add vendor sys entry
This sys entry shows current fingerprint vendor.
This info is useful if multi fingerprint vendor exist in one product.

Change-Id: I77a97745802c30bb319ed3b62fc222101f6ac6ff
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1340583
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1322013
2019-05-23 22:15:05 -05:00
haojl2
195a31feef fpc1020: Move sys entries to class device.
As fingerprint HAL need read and write fpc1020 sys entries, so those
sys entries need change owner and group to system.

If DLKM is used, after rmmod and insmod fpc1020 kernel module again,
owner and group will be root again for those sys entries.

One way to fix this is set those sys entries owner and group in
uevent.rc.
uevent.rc need be triggered by a device add uevent. So create a
fingerprint class device and move original sys entries to a class device

Change-Id: I890eb93a616973e2a454be0fea494206c066cc25
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1340582
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1318460
2019-05-23 22:14:56 -05:00
haojl2
38493352f1 focaltech_0_flash_mmi:Fix TP Firmware Recovery Failure Issue
Update TP FW check value.
This is defined follow TP FW.

Change-Id: I29ae73a9a884bc6ee18caeecc08523075f925f51
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1354712
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356398
2019-05-23 21:52:35 -05:00
haojl2
e257b23ca8 focaltech_0_flash_mmi: Add sys entries for moto FW update
moto touch firmware update need some sys entries to accomplish this work
Add those entries.

Change-Id: Ib6789e04ba888f9ee53b7cbc00abe981b8f707c8
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1346254
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356397
2019-05-23 21:52:27 -05:00
haojl2
485e090b13 focaltech_0_flash_mmi: Update FW to 03
Update focaltech FW to 03 version.
To fix report location not accurate issue.

Change-Id: I6ae88cf0ca9f4cecf5b9e2a84735b021ad385a34
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1342385
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356396
2019-05-23 21:52:20 -05:00
haojl2
5eeb5c0464 focaltech_0_flash_mmi: Add touch class sys entries
Add touchscreen class sys entries.
Those entries contains IC info, which is used by FW upload
and CQA test.

Change-Id: Ie599eb3974ebc0e1ff8df1b14e25acc9b52172a6
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1342368
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356395
2019-05-23 21:52:11 -05:00
haojl2
dbeabe11a5 focaltech_0_flash_mmi: select IC based on device config.
If FOCALTECH_TOUCH_IC_NAME defined in device.mk, use this to select
different IC.
Default option is ft8719

Change-Id: I9ef108d26d1fc8aae8f63f7d2b65fff0680633e9
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1341266
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1356394
2019-05-23 21:52:04 -05:00
haojl2
7be10a9a86 focaltech_0_flash_mmi: Bringup focaltech 0 flash IC.
Focaltech 0 flash IC using SPI bus only.
This driver code can not compatible with focaltech_mmi.

Change-Id: I830f01869955f5335d65fbd8a56a5ffb4f4eeff0
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1338744
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit 1533298c042f32dbab364e55a044cd8bcaa76781)
Reviewed-on: https://gerrit.mot.com/1338939
Reviewed-on: https://gerrit.mot.com/1356393
Reviewed-by: Jianqi Yang <yangj@motorola.com>
2019-05-23 21:51:53 -05:00
Yonghua Yan
809a55ee88 power: battery wakelock prevents system suspending
This issue is due to the race between power_supply_changed()
and smb_mmi_power_supply_changed().

First, power_supply_changed() holds the battery wakelock and
releases the wakelock if battery supply change work is scheduled.

And then, qpnp-smbcharger-mmi driver set the supply changed flag
to be true, call smb_mmi_power_supply_changed() and wait for
battery supply change work completion, where it does not release
the wakelock as the supply changed flag becomes true.

Finally, the battery wakelock will not be released any more.

Change-Id: I57f4728cb6510acce004d5d84489695035c10eaf
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1357520
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Kenneth Kessler <kennykessler@motorola.com>
Submit-Approved: Jira Key
2019-05-21 20:43:58 -05:00
guoyf2
35ff849a25 NXP patch to fix earpiece no sound issue
NXP patch to fix (CR)

Issue description:
No sound issue has been found in handheld mode
in one of Moto Projects, SurfNa project(tfa9871,
driver code Ver6.5.0). About 1/600 chance

root cause:
If set SBSL=1, the AMPE usually can be AMPE=1 automatically.
But sometimes can’t be set AMPE=1 by itself.
So AMPE must be set to 1 manually in code.
Dependency on automatic AMPE setting is not a wise way.
In driver 6.5.0, there’s no code to set AMPE during profile switch,
but boot up sequence has already been added.

Solution:
Add AMPE=1 operation in profile switching


Change-Id: I3de27e826d39c93f2d011d0f9d8fe9877e8efc89
Signed-off-by: guoyf2 <guoyf2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1358094
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhengming Yao <yaozm1@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2019-05-21 04:28:12 -05:00
Yunfei Guo
af366d4dc6 Revert "(CR): SurfNA: Add NXP smartpa log"
This reverts commit 1e4c87d6ebc458a1f40a5b7dbff7d1fa9e1a1001.

Change-Id: I6fa7f78125fdc72cd41d4ba35d96a04ebbb37c8c
Reviewed-on: https://gerrit.mot.com/1357969
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Yunfei Guo <guoyf2@motorola.com>
Submit-Approved: Jira Key
2019-05-21 02:50:51 -05:00