Commit graph

1,793 commits

Author SHA1 Message Date
xizx
40ea1a04ff utags: reads bootdevice name from bootconfig
After 8450 rebased to qcom FC, the bootconfig feature begins enable.
So that androidboot.bootdevice cannot be found in the cmdline,
and cause utags module to load failure.

When bootdevice cannot be found in the cmdline, fallback to read
it from /proc/bootconfig file.

Change-Id: I4324fcbc0345b246308bae95af03e0d99eaff399
Signed-off-by: xizx <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/2008778
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2021-07-12 00:49:51 -05:00
xuwt2
cd073b1eef qpnp_adaptive_charge: Add adap_reinit
In 8350/7325 platform, batt_psy needs to wait for
Glink module to complete,
therefore, the qpnp_adaptive_charger module init will faile
due to batt_psy not ready.
Add adap_reinit_work to rerun module init when it failed by
batt_psy not ready.

Change-Id: Ib73aa4dcbe9e069c36ec4Montana415601ab6991e795
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2008716
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-07-10 20:13:16 -05:00
chailu1
dc475e8c19 charge: resolve sc85xx charge icon dont disappear
There are 2 cases
1.SC85XX reverse voltage from battery to VBUS through sc8551
mosfet parasitic diode. this case vbus voltage is less than battery
voltage

2. SC85XX reverse voltae from battery to VBUS through sc8551 working
mosfet. this case vbus is about 2:1 battery voltage

Refer to https://gerrit.mot.com/#/c/1852409/

Change-Id: Icc80bd63f20f27f294100aabeae3267544ba0fc5
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2007936
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-07-09 04:25:49 -05:00
chailu1
e15fbca94d cp: improve 8549 read status register
While update status register remove "if" judge. so the
relust could is true or false. otherwise only true.

Change-Id: Ie4961fd19c1eeaf10308a5b518020d3ee697d2d5
Reviewed-on: https://gerrit.mot.com/2007602
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
2021-07-09 04:25:47 -05:00
mahj8
58898c9e98 modules: add leds-indicator-pwm.c driver
add leds-indicator-pwm.c driver to control pm6375 gpio8
for charging leds

Change-Id: Ie14136d11016185eb4a0eb3e816f6e6f5a742f1a
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2007937
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-07-09 04:14:21 -05:00
xuwei9
76e4591f92 parallel:init thermal parameter at high temp
At high temp conditon. thermal level was 4 at begining.
the thermal parameter was not initialized.

Change-Id: I787cfeb6c2ab1695a90496ba0c08e0ce4c17fffc
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2006952
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-07-08 21:17:18 -05:00
zhuangnk1
7df3fd261b Rogue PRC ST54x driver
Add ST54x driver for Rogue PRC ese
bring up

Change-Id: I8b49bc09ce96eaf3fdb18bc8398629cba1b76d23
Signed-off-by: zhuangnk1 <zhuangnk1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1993975
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zishang Zhou <zhouzs1@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-07-07 05:00:00 -05:00
litong20
17880786ac Close the calibration operation after fwupdate.
TP:
After the touch fwupate, if the config id is different
from before, the calibration operation will be tiggered.
But try not to add calibration operations in touch driver.

Change-Id: Id82c331c4617a03cb2351987380eae96d837fb7e
Reviewed-on: https://gerrit.mot.com/2002079
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-07-06 23:09:07 -05:00
yanyh2
e02e59d144 Modify bm ulog and mmi chargers for Android S
Move the charger driver from mmi charger to be compatible with
Android S build.
Adjust the build make file to be compatible with Android S build.

Change-Id: I67969e25b691f9dfe64b43f65e42ad6e0545ebb6
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2003174
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-07-06 07:11:18 -05:00
wangyq13
f67f735d4e focaltech_v2_mmi: disable focaltech driver drm notify
- disable focaltech driver drm nofity, use touchscreen mmi drm notify
- reduce tp reset time, if tp is invalid, retry
- add pintrl function for touchscreen mmi, to reset touch ic

Change-Id: I2a9c6fdb806905d2e55cee6aa1908941c1c4242f
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2003119
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-07-06 02:59:47 -05:00
chailu1
1125771201 ffc: add ffc featrue
Flash fast charge
At different battery temperature zones, use different
CV and charge iterm.

porting from https://gerrit.mot.com/#/c/1551505/

Change-Id: I8558b47f771b6785af0f7d75ea9093fc5af17c54
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2001406
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-07-04 22:45:14 -05:00
chailu1
9a3090966e CP: Remove unuseful code
charge pump
Remove unuseful code

Change-Id: Id27b93e548f41c182e57011e1656d402154ccf8f
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2001057
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-07-04 22:06:28 -05:00
xuwei9
b51b72177b qc3p:workaroud qc3p shalcomm adapter
Shalcomm qc3p adater have probability stop response.
So kernel rerun APSD twice and operat qpqm regulator
So skip first APSD for increasing voltage.

Change-Id: I0d821081758439bbf27c2098dde0ef8bce5ba8f3
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2001546
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-07-04 01:48:40 -05:00
litong20
eba6280929 Modify the touchscreen report rate
1. When the interpolation is disabled, the report rate is 240Hz;
2. When the interpolation is disabled, and the refresh rate is 144Hz,
the report rate is 576Hz, else the report rate is 480Hz.

Change-Id: I863154a271d5968aab36d0bc3366f4597a30808d
Reviewed-on: https://gerrit.mot.com/2001030
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-07-03 05:08:24 -05:00
chailu1
017a307c61 CP: Use CP read battery voltage
charge pump policy read battery voltage using CP read
voltage,because
1. some product PMIC read battery voltage is not battery
cell but charge pump read battery cell voltage.
2. charge pump read battery voltage realtime is better than
PMIC

also refer to mtk solution https://gerrit.mot.com/#/c/1903322/

Change-Id: I6aa945eabe1527356b78ef53309369ee3c1d5df4
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1982444
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-07-02 04:36:17 -05:00
Ravi Vembu
bc98ea156c slg5bm43670: Update slg5bm43670 for Kernel 5.10
Fix the build error when making the slg5bm43670.ko. Also
Kernel 5.10 removed the regulator locking and locking is
implicit around the notifier call chain. Hence remove it for
kernel 5.10 and beyond.

Change-Id: I475868ae49f8fbbd7514fa43df41a3cd78d138ae
Signed-off-by: Ravi Vembu <raviv@motorola.com>
Mot-CRs-Fixed: (CR)
Reviewed-on: https://gerrit.mot.com/1975249
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jian Luan <jamesluan@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-06-30 17:27:51 -05:00
xuwei9
0f97c8d407 QC3P:add afvc compensation voltage
AFVC enable project,add afvc compensation
voltage for qc3p policy algorithm.

Change-Id: I91b9fcf636c75e2664de04962caa8dd0cdf84bf4
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1997670
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-06-30 04:09:46 -05:00
xuwei9
09471c3c26 PD:add afvc compensation voltage
AFVC enable project,add afvc compensation
voltage for pd policy algorithm.

Change-Id: I0b108a911f2b4ba751e87200047b0a30eceeda0c
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1997668
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-06-30 04:09:25 -05:00
dengwei1
1d9a40e2e1 pstar: input touch update edge set
input touch
update edge set

Change-Id: I50f70348cef44d13213dddaee962b785d24ceced
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1997222
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-06-30 03:16:13 -05:00
dengwei1
84fa39e6b8 pstar: input touch add edge support
input touch
add edge support

Change-Id: I7b4ce8fbbb3e657a7e96eb73337e039c9fc3ef0a
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1995174
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-06-29 04:25:03 -05:00
wangyq13
b628d65b32 focaltech_v2_mmi: don't set gesture_mode enable as default
focaltech_v2_mmi:
Don't set gesture_mode enable as default. It should get value
from upper layer.

Change-Id: I0d949ae241296b18380b1a9bbb1a431be3944ab2
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1995507
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-06-29 03:37:08 -05:00
yanyh2
8f1226f4a5 Adjust the heartbeat time to 100s in discharging state
There is a case that will make the system suspend failing for
mmi,charger wakelock and last for several minutes.
The reason is that the system suspend has the same 60s request
intervals as mmi charger heartbeat delay work, which will request
mmi,charger wakelock.

To avoid this two task run into resonating state, it's feasible to
change the mmi charger heartbeat interval to 100s.

Change-Id: Ie076e5a3657a6c67ea7e9fdcefd3ef897bc81d02
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1995180
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-29 01:41:38 -05:00
cuijy1
412756ee07 sx937x:Android S bringup
change Makefile
add kernel_platform path

Change-Id: Ife163e2a041d05c5b184188b17e54a5468a6e3ad
Signed-off-by: cuijy1 <cuijy2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1992088
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ningkai Zhuang <zhuangnk1@lenovo.com>
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-28 04:35:03 -05:00
litong20
4274b0c2a7 Solve the problem of incompatible type 'struct timespec64'
touchscreen_mmi_gesture.c:196:4: error: passing 'struct timespec' to
parameter of incompatible type 'struct timespec64'.

Change-Id: Iab92d18c89766cfe510957e33e9fcd35290becfe
Reviewed-on: https://gerrit.mot.com/1993292
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-27 22:14:05 -05:00
litong20
aa90e16b32 Slove the build error: redefinition of 'panel_event'
TP:
Error:
touchscreen_mmi.h:285:6: error: redefinition of 'panel_event'
kernel/msm-4.19/include/linux/panel_notifier.h:19:6: note: previous
definition is here enum panel_event {

Change-Id: Ia53d03c8ca03ecb8a62e679cb1e96aad64a9dcab
Reviewed-on: https://gerrit.mot.com/1992621
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-25 22:16:34 -05:00
daiss1
557ad02ce3 fpc_fps_mmi: Modify Makefile for Android S build ko
Modify:
Modify Makefile for Android S build ko

Change-Id: I5f9014ed4be793ab5226aad0dffadc2207bf5b1d
Signed-off-by: daiss1 <daiss1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1992052
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-25 09:50:03 -05:00
yanyh2
3737af3e2b adjust moto_f_usbnet driver makefile
Adjust the makefile to be compatible with Android S
version.

Change-Id: Ica70b178ae1b84dce47221c9018a4d35ff6c4363
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1992143
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haichao Li <liuhc3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-25 08:23:45 -05:00
litong20
b1b4a16e76 Bring up touchscreen_mmi in Rogue S project.
1. Add DRM_PANEL_EVENT nofification for Andorid S.
2. support touchscreen_mmi and related modules build in kernel-5.10.
3. Use timespec64 instead of timespec function.

Change-Id: If0252015e10bff24c10d54b13df2e0f6aa156a6e
Reviewed-on: https://gerrit.mot.com/1965128
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-25 05:50:36 -05:00
litong20
bfda841cba Bringup stmicro_mmi touch module in kernel-5.10
1. warning: ftsFrame.c: comparison of array 'data' equal to a null
pointer is always false.
2. error: fts_proc.c: incompatible pointer types passing 'const struct file_operations *'
to paramet proc_create(DRIVER_TEST_FILE_NODE, 0777, fts_dir, &fts_driver_test_ops);
3. use timespec64 instead of timespec type.

Change-Id: I46604d6c23b0b69238638f162f390a76ef08eeb6
Reviewed-on: https://gerrit.mot.com/1990708
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-25 05:50:33 -05:00
wengjun1
d4b40823fe Cypfg: dlkm: Improve gcore_mmi driver
- Request irq change to thread.
- Resume will use thread instead of queue.
- Fixed irq panic issue.

Change-Id: I9e54944fc276d8554db2b5c23042693923f2e5cc
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1990930
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-06-24 20:49:07 -05:00
Jiyue Cui
908e2bdb8b Revert "(CR) sx937x:mv ps_get_state to work callback"
This reverts commit c2f744d014225db0494144bcc874be8d0c3dbf13.

Change-Id: I14be7ed2aefdd0522d70f6eb2ac2d7c9e2d8e254
Reviewed-on: https://gerrit.mot.com/1991079
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-24 09:27:28 -05:00
Jiyue Cui
409613e8c7 Revert "(CR) sx937x: change global_sx937x initialization position"
This reverts commit 3663cf0b4334e402577e63a4a04a2be39c64ffa9.

Change-Id: I4252469c9bd9c0820bbf8c3d6c4fbfd233bb2946
Reviewed-on: https://gerrit.mot.com/1991077
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-24 09:27:21 -05:00
litong20
b714bb172b Modify the ITO test command
Modify the ITO test command from "A4 04 FF FF"
to "A4 04 FF 01", delete unnecessary tests.

Change-Id: I7884e7503c233b71f7ba342f2386f82f3564898e
Reviewed-on: https://gerrit.mot.com/1991007
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Junpeng Wan <wanjp4@lenovo.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-24 07:38:34 -05:00
cuijy1
40459e9cfd sx937x: change global_sx937x initialization position
sometimes ps_notify_callback will be called
after reg_notifier immediately

at this time global_sx937x is NULL
will cause kernel panic

change global_sx937x initialization position earlier

Change-Id: I2379ea3113563268d36d5ddc0bb2cb5a510b15e7
Signed-off-by: cuijy1 <cuijy2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1990372
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-24 01:44:19 -05:00
cuijy1
b43fdec148 sx937x:mv ps_get_state to work callback
ps_notify_callback warnning for block function usb_psy_get_prop()
mv ps_get_state to work callback

Change-Id: I856879ccd0d727660bc92c945445a64b4a03fddb
Signed-off-by: cuijy1 <cuijy2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1977442
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-06-23 04:55:46 -05:00
xuwt2
e7b1662f5c qpnp-adaptive-charge: use mmi_charger to contrl battery charging
In QCOM 7350/8350, the kernel doesn't provide pmic-vote to control
battery charging.
the mmi_charger is an intermediate layer that forwards charging control
to ADSP Battmngr from the application layer.
By using USE_MMI_CHARGER macro definition that qpnp-adaptive-charge can be use
mmi_charger's func to control battery charging

Change-Id: I4da0604eabdadfc483143360ef7b7aad174cda47
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1983612
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-22 22:18:31 -05:00
yanyh2
6f4a7d98ab add vote mechanism support for mmi_charger
Add vote mechanism support for mmi charger so that
other modules can engage mmi charger interoperation.

Change-Id: I1772007c3acec199bd319601e3486bc7542c663f
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1984291
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-21 01:00:46 -05:00
xuwei9
8b36f90d46 qc3p:limit pulse not beyond max count
Limit Dp/Dm pulse not beyond
max count.
Refer to:https://gerrit.mot.com/#/c/1967489/

Change-Id: I63647bcf78d4fd9e1c737caf3a133cc0741ad4cd
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1985479
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-06-20 22:16:15 -05:00
litong20
9452937a05 use disable_irq_nosync in interrupt handler
When disable_irq is used in interrupt function, touch driver is blocked.

Call trace:  
        : __switch_to+0x328/0x358
        : __schedule+0x6f8/0x884
        : schedule+0x80/0xb0
        : synchronize_irq+0x7c/0xb8
        : disable_irq+0x70/0x9c
        : fts_disableInterrupt+0x58/0xbc [stmicro_mmi]
        : fts_chip_powercycle+0x64/0x26c [stmicro_mmi]
        : fts_error_event_handler+0x98/0x134 [stmicro_mmi]
        : fts_event_handler+0xa4/0x11c [stmicro_mmi]

Change-Id: Ic84a111aebfa93ea3386fc363105e341efc1cc09
Reviewed-on: https://gerrit.mot.com/1984070
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-18 07:28:04 -05:00
Drew Abbott
c94d7986fc Add force_charging_enabled sysfs
Add missing sysfs to allow Factory to re-enable charging while in
factory mode or when using factory software.

Change-Id: If39b3d5f56495b7d89445629bc1541f0b22a296a
Reviewed-on: https://gerrit.mot.com/1949637
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-18 03:13:05 -05:00
Drew Abbott
5fc33ebcee Add force_charger_suspend sysfs
Add missing sysfs to allow Factory to suspend charging during testing.

Change-Id: I21a50cc1ad9acc320c84b082804aa6379f0726a3
Reviewed-on: https://gerrit.mot.com/1936873
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-18 03:10:16 -05:00
chailu1
30246fbd4b CP: add cp switch enable detect
Sometime charge pump charge eanble read is true
but charge pump not switching,So add read switching
judge, will auto recovery if no switch

Porting from https://gerrit.mot.com/#/c/1968879/

Change-Id: Iba23bfcd7db9cf137e4687b188655a3e50ed2fb4
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1982429
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-06-18 01:26:32 -05:00
chailu1
bf61e3a4ff CP: force disable CP while plug out usb cable
SC8551A charge pump will reverse voltage to usbC while plug
out usb cable, So force disable sc8551 to prevent reverse
after quit charge policy.

Porting from https://gerrit.mot.com/#/c/1945421/

Change-Id: Iebfcf055850da29e40e37bd8220ed5d99581cbcb
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1982527
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-06-18 01:26:24 -05:00
chailu1
e7288c181a CP:Add switch enable detect function
charge pump driver
add charge pump switch detect function

Porting from https://gerrit.mot.com/#/c/1968869/

Change-Id: I0210e3bc0ee48d8e27b24c2243a7c5e3426a927c
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1982428
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-06-18 01:25:15 -05:00
chailu1
215e85c066 cp: config sc8549 fault bit
Config sc8549 fault bit to match
charge policy check.

Change-Id: If9634f300a37d2a0b59e47e7dde084ce75377b84
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1982427
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-06-18 01:25:03 -05:00
litong20
74ec6c7a60 Fix the build error on denver project.
Error:
nt36xxx_fw_update.c:23: Panel notifier undefined!!!
[-W#warnings]\n' error, forbidden warning: touchscreen_mmi.h:145

Change-Id: Ibdae0b030dce55f57cdf3da04c09c8f0f9999dbf
Reviewed-on: https://gerrit.mot.com/1983455
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-17 21:56:21 -05:00
yanyh2
c5311dbe8d add charger state sync interface
Do charger state sync when boot completed in case missing
some charger state change.

Change-Id: Iec128382d5edb98cda47752d07e606a6b66316be
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1982792
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2021-06-17 07:42:11 -05:00
yanyh2
5aa73a35c9 Revert "(CR): send charge rate uevent when power supply changes"
As the reverted patch may cause panic for race resource batt_uenvp
when it accesses batt_uenvp which was just freed in heartbeat work.

Mot-CRs-fixed: (CR)

This reverts commit 715a9d18d8fa6b7acfc9540f5e3df2c4332baf28.

Change-Id: I07f3bf2cba6f30b345988231d0ee8ea18da27e4f
Reviewed-on: https://gerrit.mot.com/1982785
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2021-06-17 07:42:00 -05:00
litong20
75b0a4d487 Need to update fw on resume for zero-flash touch IC.
The kernel does not have permission to access the /data/vendor
partition, so send the update firmware notify to touchUpg service
on resume for zero-flash touch IC.

avc: denied { search } for name="param" dev="dm-6" ino=275
scontext=u:r:kernel:s0 tcontext=u:object_r:param_data_file:s0
tclass=dir permissive=0

Change-Id: I5d5c9f39bab25a8d3377e0475e79a0411d93b56b
Reviewed-on: https://gerrit.mot.com/1979786
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Submit-Approved: Jira Key
2021-06-17 02:30:53 -05:00
litong20
4ddfc550ae novatek: Support parameter upgrade method
Support to upgrade TP firmware through the
Parameter APK.

Change-Id: I370e175db38ab7f5de3aa4cc5aabae7ea2f219c6
Reviewed-on: https://gerrit.mot.com/1979783
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Submit-Approved: Jira Key
2021-06-17 02:30:42 -05:00