Commit graph

1,543 commits

Author SHA1 Message Date
Tiago Ganselli
b959d792d4 Fix deprecated function call on ilitek_0flash_mmi
Qcom ported a patch to kernel 4.19 which removes the unused
function wakeup_source_init.
Fix ilitek_0flash_mmi module to use wakeup source macros instead.

Change-Id: I737205699d192e357f96ff5a95f8fb06401547fd
Signed-off-by: Tiago Ganselli <ganselli@motorola.com>
Reviewed-on: https://gerrit.mot.com/1859417
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2021-01-25 08:39:35 -06:00
liuwang2
84b34a32f6 regulator: modify wl2864c iovdd current limit
wl2864c default iovdd current limit is 220mA.
OV02b iovdd current can reach to 235mA.
This may cause cci issue as all camera shared iovdd, include cci pullup voltage.

Change-Id: If7828cd0b294cf2d362ec9001d39fceaceb9b734
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1859122
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2021-01-24 19:13:50 -06:00
wuwl10
9b7affca1d fpc1020: fix null pointer panic issue
For multi fps sensor, if there was some unexprect
INT signal comming during sensor being remove,
IRQ handle will panic becase the sysfs kobj had
ben free. Disable the irq to avoid this.

Change-Id: I2144c6f803547c281830058b29438b9d71cd5933
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1853153
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2021-01-20 00:16:03 -06:00
a17671
51eb207822 exfat:Fix panic of handlings of unhashed alias
Unhashed alias is allowed to exist
In the latest upstream kernel exfat driver
It does not have to generate panic in this case
Porting this handling to exfat-nofuse driver from url
https://git.kernel.org/pub/scm/linux/kernel/git/
stable/linux.git/tree/fs/exfat/namei.c?h=v5.10.8#n724

Panic stack trace:
kernel BUG at ../../motorola/kernel/modules/fs/exfat/exfat_super.c:874!
[  759.284483] pc : exfat_lookup+0x1dc/0x1e0 [exfat]
[  759.284496] lr : exfat_lookup+0x144/0x1e0 [exfat]
[  759.284502] sp : ffffff800ea2b9d0
[  759.284507] x29: ffffff800ea2ba20 x28: fffffff6f3cf8000
[  759.284515] x27: 0000000000000000 x26: 0000000000000000
[  759.284523] x25: 0000000056000000 x24: fffffff7b8742d88
[  759.284530] x23: 0000000000004000 x22: fffffff883b08390
[  759.284538] x21: fffffff7b874b228 x20: fffffff86d375000
[  759.284546] x19: fffffff883b08980 x18: 0000000007270df4
[  759.284553] x17: 0000000000000000 x16: ffffff9bebd5c9b8
[  759.284561] x15: fffffff6f976ba00 x14: 0000000000000041
[  759.284569] x13: ffffff9bede96590 x12: fffffff6f89f7b00
[  759.284576] x11: 2cf70e9f45774b00 x10: 0000000000000000
[  759.284584] x9 : 0000000000000000 x8 : 0000000000000000
[  759.284591] x7 : ffffff9bec02e394 x6 : 0000000000000000
[  759.284599] x5 : 0000000000000000 x4 : 0000000000000001
[  759.284606] x3 : 0000000000000000 x2 : ffffff9bebd5ca84
[  759.284614] x1 : 0000000000000001 x0 : fffffff883b08390
[  759.284622] Call trace:
[  759.284636]  exfat_lookup+0x1dc/0x1e0 [exfat]
[  759.284650]  __lookup_slow+0x9c/0x188
[  759.284658]  walk_component+0x1d0/0x868
[  759.284665]  path_lookupat+0xb8/0x210
[  759.284672]  filename_lookup+0x98/0x1c8
[  759.284679]  user_path_at_empty+0x54/0x68
[  759.284688]  vfs_statx+0x90/0x130
[  759.284695]  __arm64_sys_newfstatat+0x40/0x80
[  759.284704]  el0_svc_common+0xa0/0x170
[  759.284711]  el0_svc_handler+0x6c/0x88
[  759.284719]  el0_svc+0x8/0xc
[  759.284728] Code: 17ffffa7 92800176 17ffffec 940018f2 (d4210000)

Change-Id: I5fb26e2416f70733fe2010484740513dc9a8c5d0
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1853335
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-01-19 19:32:36 -06:00
hujing3
f0fd77ae31 ili9882_mmi: support ili7806s IC
Capri need support multiple ilitek ICs: ili9882 & ili7806s
Add ili7806s touch driver support
NO_PROP_NEEDED

Change-Id: Ia7db199294de6869dea94d899a24d8e515355b16
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1854131
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-01-19 00:48:33 -06:00
wengjun1
a700b64c3f dlkm: Improve novatek touch process when using GKI
- If display can't get the matched panel name, it will use dummy
panel, so we can re-probe touch driver until display api can be used.
This way we can get the right panel and don't need to care of when
display api is ready.
NO_PROP_NEEDED: needn't for shm2018

Change-Id: Ie0beec4ca4d59202e9ba087935d6052e92eef264
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1836793
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-01-14 03:34:32 -06:00
Ryan Lattrel
713c3dc200 uwb: sr100: make clocks optional
We do not need the turn on the clocks for banks,
so do not turn them on if the field is missing from the
dt.

Change-Id: I00ceffb3772b655bc08217759b962b3d1dd4b20d
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1850012
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2021-01-13 14:23:09 -06:00
Ryan Lattrel
d4eca3585c uwb: sr100: allow cansleep gpio funcs
Allow chip enable and spi handshake gpio get/set to sleep
so they will work with an i2c gpio expander.

Also make rtc gpio optional since that pin is not present
on banks.

Change-Id: Ibeb530de04d4f1a858193be80ea656b03bdd87a5
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1834059
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2021-01-13 14:23:04 -06:00
Ryan Lattrel
0858d1198e gpio: pcal6408: fix set output
Fix the set output function so that it will configure the
gpio to the specified state.

Change-Id: I265e53a83b64c6663eb52013087e1960de29f0d3
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1834058
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-01-13 14:22:58 -06:00
xuwt2
b3ca118609 qpnp-smbcharger-mmi: Add PD charging in DLKM
PD3.0 with PPS is a Mandatory requirement from VZW,
Add PD charging(include PPS/Fixed) policy in DLKM for single
charge path(only pmic charging)

Change-Id: Ic0f2fcf45f00dea214602846bdbe43b56805a114
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1847093
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-01-13 01:58:08 -06:00
wuwl10
5e0a0348c1 dlkm: sn1xx: fix tcmd ioctl error
Add compat ioctl to avoid ioctl error -19 when
Hal run i2c_reset.

Change-Id: Icd34ee04d291e68f28e6e6c5aa9312dc0f3bc735
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1850067
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ningkai Zhuang <zhuangnk1@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-01-12 23:38:13 -06:00
hujing3
fcab2f9dd8 DLKM: leds_aw99703: support update by panel config
leds_aw99703: support update reg value by panel config
Cebu: 3rd panel need update reg05 to fix RF issue
Add panel config to support this req
NO_PROP_NEEDED

Change-Id: Icb4bf864ae7d9779d5f0dcee97c8ea82c8b0b1af
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1840209
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-01-11 00:00:53 -06:00
weimh1
6b7cacdc77 sm4350/sensor: optimze sx937x log output
1.optimze sx937x log output about reference channels
  2.motorola/kernel/modules/drivers/misc/sx937x

Change-Id: I3df4954247e644369c8b33fd99704b9bdc7c9b21
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1844302
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-01-05 23:36:28 -06:00
dengwei1
e727dfa09c nio: input touch nova add delay for request fw retry
some time request firmware may fail
so add some delay when retry
NO_PROP_NEEDED

Change-Id: I3ea961952cb37df4c4e09d9d2055f8f078c857da
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1841824
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-01-04 02:31:43 -06:00
Lei Chen
0e9ba4e1fb dlkm: fix free irq warning for chipone sensor
__free_irq warning triggered after running command rmmod
fpsensor_tee_spi. Use the matched function devm_free_irq().

Change-Id: I07dc06ea0afbd69827977c76a709ddfc5b39b843
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1837444
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-12-29 20:07:56 -06:00
chailu1
37f9ca5379 Charge: report battery power supply change
Other modules monitor battery power supply change
So report battery power supply change.

Change-Id: I15f37e30c83d5acfa79bf4d942f3cce7e7077805
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1834361
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
2020-12-22 04:19:31 -06:00
zhuwg1
4cc7e3bbb4 vl53l5: Support 32bit compatible Kernel driver for vl53l5
Make the vl53l5 Kernel driver compatible for both 32bit and 64bit
applications from userspace, including L5 test program, factory TCMD
and camera app through L5 Sensor HAL.

Change-Id: Ia0ce2db08de83f7ab6ff487660ccd2bd21b48a14
Signed-off-by: zhuwg1 <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1831972
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-12-21 00:00:00 -06:00
wuwl10
d1f375b0ea dlkm: fpc1020: free gpio when remove
Improve the remove logic to make sure all
gpio be free when remove

Change-Id: Ica6d730b64202e2cdc49b99484682c19e18a4c81
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1831921
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2020-12-20 21:10:19 -06:00
litong
2e96d60d33 Correct the config_id and build_id errors of focaltech IC
TP:
Correct the config_id and build_id errors of focaltech IC

Change-Id: Ieedaf5a16cad86af33a2c248c42596b7358ee468
Reviewed-on: https://gerrit.mot.com/1828744
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-12-18 01:05:16 -06:00
Ryan Lattrel
c9d55c366a gpio: pcal6408: add initial module
Add gpio expander driver.  Supports both TCA6418E and
PCAL6408A chips.  Does not currently support interrupts.

Change-Id: I4c4e59dd2c392e1ec4296251cb26b9ec839144c6
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1810602
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-12-17 17:33:41 -06:00
litong
e78340eabb Modify compilation error of synaptics
TP:
(1) Modify compilation error of synaptics.
(2) When insmod the modules so that they can find the
Modules.symvers in the correct path.

Change-Id: I086cec560585a7e52eb350b036c70f35c23d1cba
Reviewed-on: https://gerrit.mot.com/1829612
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-12-17 06:40:52 -06:00
litong
2a5f15cbf1 Modify compilation error of sec_mmi
TP:
Modify compilation error of sec_mmi

Change-Id: I890ef01ad517b9bd02ecd8f02ba2ea37c42e7078
Reviewed-on: https://gerrit.mot.com/1829611
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-12-17 06:30:45 -06:00
litong
437457379d Modify compilation error of stmicro
TP:
  When insmod the modules so that they can find the
Modules.symvers in the correct path.

Change-Id: I36c7b0ac1a992ede402bce60f321054c01575c10
Reviewed-on: https://gerrit.mot.com/1829648
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-12-17 06:30:41 -06:00
xuwt2
da72e45eb2 qpnp-smbcharger-mmi: Add charge_full_design in battery psy
Add charge_full_design property to sysfs and uevent of battery power
supply so as to support access by userspace.

Change-Id: I672e3f7bd5cbfbfce87fd8338f94fa5043c082e0
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1829543
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-12-17 03:28:37 -06:00
jixj
e5d5b0953c mmi_sigprint: Fix CFI check failure
Kernel changes the signal callback function parameter
from "sigifno" to "kernel_siginfo" on kernel-5.4

change:
ae7795bc61 signal: Distinguish between kernel_siginfo and siginfo

Change-Id: If120a520bc949b354855f804fcfb3fca97224f47
Reviewed-on: https://gerrit.mot.com/1828677
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-17 01:44:58 -06:00
wangyq13
54c7234138 input: focaltech_v2_mmi: change some focal driver macros
- Disable debug message
- Enable POINT_REPORT_CHECK_EN for residual touch point
- Enable wait mechanism for I2C bus deep sleep
NO_PROP_NEEDED: <New IC for NPI>

Change-Id: Ie25cdb4a59e0deddc88ea6e2ed38807f32f8ba84
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1828448
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: litong <litong20@motorola.com>
Submit-Approved: Jira Key
2020-12-16 23:46:52 -06:00
Konstantin Makariev
4828b47192 synaptics_tcm_mmi: mmi status check
Added MMI status check to driver's probe. Kernel module will be loaded
only when MMI status check succeed. Driver node needs to have property
mmi,status in device tree for this to work.

Change-Id: I93a077aee70f45dde1aa6c760b7cd73ed7cf4b3e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1827965
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-12-16 15:42:25 -06:00
Konstantin Makariev
c06e44fe0f stmicro_mmi: mmi status check
Added MMI status check to driver's probe. Kernel module will be loaded
only when MMI status check succeed. Driver node needs to have property
mmi,status in device tree for this to work.

Change-Id: I5c904ed47ac382a758ff44b236a077038b8f1038
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1827964
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-12-16 15:42:20 -06:00
Konstantin Makariev
ca2c13ef09 sec_mmi: mmi status check
Added MMI status check to driver's probe. Kernel module will be loaded
only when MMI status check succeed. Driver node needs to have property
mmi,status in device tree for this to work.

Change-Id: Ie7dffc5e9bb4769492e5fd15f0da94908cf8ef79
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1827959
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-12-16 14:35:06 -06:00
Konstantin Makariev
24469e8156 stmicro_mmi: identify product by chip id
Use chip ID_0 reported in touch IC system information block
to represent the product. This will help distinguishing firmware
files for different ST chipsets

Change-Id: I250c6ae57411e6a3aca3f87c789379a048ccb0eb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1825923
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-12-14 12:45:15 -06:00
Konstantin Makariev
8250cd3d74 stmicro_mmi: update driver to version 5.2.19
Added support for multiple ST chipsets

Change-Id: Iaf54dc69f28eaf90f0308028bde20e3a3af1fb84
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1824927
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-12-14 12:45:06 -06:00
Konstantin Makariev
1cb72c3447 stmicro_mmi: use with touscreen class driver
Use config option CONFIG_INPUT_TOUCHSCREEN_MMI to allow
touchscreen class driver handling suspend/resume.
Use DRM_PANEL_NOTIFICATIONS enviroment variable to enable
notifications from DRM. Multiple adjustments made to deviate
from the original path when used with MMI touchscreen class driver

Change-Id: Ica625a836b820c45564d51a4dfad5ebf224f83bc
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1780211
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-12-14 12:45:00 -06:00
wangyq13
9f48ad0ebd input: touchscreen_mmi: add palm detection sensor class
touchscreen_mmi:
Add palm detection sensor class.
NO_PROP_NEEDED: <New function for NPI>

Change-Id: I3ef215b92eba592c8452f347f4fbcb5ab58aab84
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1824129
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-12-14 03:00:06 -06:00
wangyq13
f3ce156b78 input: focaltech_v2_mmi: add palm detection function
focaltech_v2_mmi:
Add palm detection function.
NO_PROP_NEEDED: <New IC for NPI>

Change-Id: Ic9f7766ad96ed39b7f652c44c3b9dc4b77389452
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1824128
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-12-14 03:00:00 -06:00
huangys
c04d3e20e2 aw869xx: keep using default device name
if we set the device name, It would block the firmware downloading.
the reason is that the expected path is not correct.

Change-Id: I71244fab069c779842d9d3e9883fa30d0da9647a
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1776191
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2020-12-13 20:31:29 -06:00
yanyh2
be4f6e6ce6 dlkm: add qti_glink_charger driver
A low level charger driver qti_glink_charger to support battery
charging functions over glink and satisfy the interfaces requirements by
common charger driver mmi_charger.

Motorola charger driver architecture:
----------------------------------------------------------------------
Userspace  Common Interfaces for Charging Features and Factory Test
----------------------------------------------------------------------
Kernel           mmi_charger  (Motorola demo, step, flash-fast charging,
                      |        factory and debugging interfaces)
                      |
            qti_glink_charger (basic charging functions HW
                      |        specific factory debugging interfaces)
                      |
--------------------glink---------------------------------------------
                      |
                      |
                     ADSP

Change-Id: I255413442f2137ebeb6200c2e82b8086cc846e54
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1800646
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-12-11 02:55:51 -06:00
yanyh2
6c2bbf2914 dlkm: charger driver for Moto common features
As a common charger driver mmi_charger inherits Motorola legacy battery
charging features, including Demo charging, Step charging, Flash Fast
charging, and common features for factory test support.

More importantly, it provides a cross-platform solution to support
various battery charging design, not only Qualcomm SoC but also Samsung,
MTK, even remote system over network, and especially suite multiple
battery packs and multiple charger ICs in one system.

To achieve this goal, besides mmi_charger driver, there need a low level
charger driver for each battery charging solution(a couple of charger IC
& battery pack) to register to mmi_charger driver with implementation of
required interfaces depending on their own HW design.

With mmi_charger driver, Motorola common features have been stripped
from the HW dependent charger drivers(older Motorola charger drivers),
in which all the common features have to be implemented by each driver
of its own. So a low level charger driver can focus on HW specific
features and function development.

Motorola charger driver architecture:
----------------------------------------------------------------------
Userspace  Common Interfaces for Charging Features and Factory Test
----------------------------------------------------------------------
Kernel           mmi_charger (Motorola demo, step, flash-fast charging,
                /     |      \ factory and debugging interfaces)
               /      |       \
    qti_glink_charger x_charger N_charger (basic charging functions HW
              |       |        | specific factory debugging interfaces)
              |       |        |
------------glink----i2c------spmi------------------------------------
              |       |        |
              |       |        |
            ADSP   i2c chip   PMIC

Benefit from this new Motorola charger driver design:
1. Easy upgrade, migration, and maintenance, as common driver is
   cross-platform and HW independent.
2. Reduce develop workload, as developers can pay more energy and
   efforts on HW or platform specific business logic.
3. Easy to support complex battery charging solution, as it can support
   N couples of charger IC & battery pack in one system at the same time
   theoretically.

Change-Id: Ie44a22a2c65ea01fd3930879aeb9aae1c44341e0
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1502333
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-12-11 02:54:54 -06:00
mahj8
03346de658 DLKM: mmi charging LKM must probe after qpnp smb5
The unit will crash if mmi charging prob before qpnp smb5.
Because chip->qcom_psy = NULL.
When mmi charging probe failed, return -EPROBE_DEFER
to retry.

Change-Id: I05294dd9bcb8de652314d7441c1b12fed1632100
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1825319
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-11 01:47:59 -06:00
mahj8
1d2d1f5f14 DLKM: use new api in mmi-pmic-voter.c
Because GKI, export api move from pmic-voter.c to
mmi-pmic-voter.c and for compatible, use kernel version
to compatible with old product.

Change-Id: Ia2c74ae4447d0621ac5bced0f3355d868712ac24
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1823126
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-11 01:47:38 -06:00
mahj8
2084a42fc9 Revert "(CR): DLKM: build error on user build"
This change can't work in gki

This reverts commit b73cf109e9542740a16d35ce93484e5547c27650.

Change-Id: I42b678fb693d67bb5c7a3d87d631bf3812df39b0
Reviewed-on: https://gerrit.mot.com/1823125
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-11 01:47:32 -06:00
mahj8
70c53f4fd2 module: remove useless code in charging LKM
Remove EB mod battery charge functions, they are no longer in used.
and these functions and global variables are not exported in GKI.
such as:
alarm_try_to_cancel
power_supply_class
power_supply_notifier

Change-Id: I1da88b149ee377cfffffad7af1fd3c7b6d2620fe
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1814959
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-11 01:47:12 -06:00
wangyq13
be42617041 input: focaltech_v2_mmi: enable single tap function
focaltech_v2_mmi:
Enable single tap function.
NO_PROP_NEEDED: <New IC for NPI>

Change-Id: I34f2dadcf2b9379a0516cec25d7f105b856e5e98
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1824127
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-12-10 02:30:47 -06:00
wangyq13
a587eada61 input: focaltech_v2_mmi: add usb charger detection
focaltech_v2_mmi:
Add usb charger detection function.
NO_PROP_NEEDED: <New IC for NPI>

Change-Id: Ia93898563a7247a0ab8ae7d1b1bdd83ad4dd912b
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1824123
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-12-10 02:30:39 -06:00
wangyq13
c533055001 input: focaltech_v2_mmi: add sys node to upgrade firmware
focaltech_v2_mmi:
Use touchscreen_mmi sys node to upgrade touch firmware.
NO_PROP_NEEDED: <New IC for NPI>

Change-Id: I2d2b462efe1777b3d45e0f7a9c40045fbf3d1cc7
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1824119
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-12-10 02:30:33 -06:00
jixj
6e9ed15514 mmi_sigprint: Use a new way to get kallsyms_lookup_name()
kallsyms_lookup_name() is not exported on kernel5.4,use register_kprobe()
to get kallsyms_lookup_name().
Also fix path incorrect issue on Android R.

Change-Id: I5e0fb8c3bd7a14c5bb8316635261f411c5952577
Reviewed-on: https://gerrit.mot.com/1820763
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-08 03:56:10 -06:00
xuwei9
c0c6a3a34f kernel:stop incresing vubs while charger plug out
Plug out charger when increasing vbus voltage
Stop the increasing algo otherwise phone can not charge
because of dp dm status remained at next charger plugged in.

Change-Id: I7f16054f5bef4996d629ddfe3b5fb05e21c92a88
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1816232
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2020-12-08 00:05:58 -06:00
liuyc20
3fd069ff0c usbnet: correct usb_ether_xmit return value
enum netdev_tx {
 NETDEV_TX_OK	 = 0x00,	/* driver took care of packet */
 NETDEV_TX_BUSY	 = 0x10,	/* driver tx path was busy*/
 };
typedef enum netdev_tx netdev_tx_t;

Change-Id: I8199a0c47b59149f679af5b77463d9e87885fc9c
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1820760
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-07 23:59:52 -06:00
chenglong1
50440059e7 aw8695: Add start/stop vibrating notification to actuator.
Vibrator on phone main board can disturb camera AF VCM when it's vibrating.
To avoid the camera lens str(CR) noise during vibrating, power on AF and
push lens to certain position (for Nio DAC 400) can greatly reduce the
noise.This change is for notifiying camera actuator that vibrator will start
or stop work, then camera can respond accordingly..



Change-Id: Ifa5dd445311867b581fa0498d67ebad31cb6b1fb
Reviewed-on: https://gerrit.mot.com/1817562
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2020-12-04 02:32:03 -06:00
yanyh2
70bbf3279e usbnet: fix CFI checking failure
Correct function usb_ether_xmit return value type to match
the prototype of the member ndo_start_xmit in struct net_device_ops
to avoid CFI checking failure.

Change-Id: I8439e967ee824bb5f0ac8447d79ae066379a6465
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1818255
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-12-04 00:44:57 -06:00
mahj8
8f7d8b9adb module: use orderly shutdown in factory mode
User an orderly shutdown for factory kill instead of a
kernel power off.  The orderly shutdown will attempt to
call the reboot binary from userspace first, and then
fallback to kernel power off if it fails.

Change-Id: Ie07e8786e34e1f9b38ca4b62085051bd89177054
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1817422
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2020-12-02 22:30:04 -06:00