Commit graph

2,066 commits

Author SHA1 Message Date
mahj8
5dd6f5b15a charging: fixed uevent block issue
cat sys/class/power_supply/battery/uevent and return null,
so UI can't show turbopower label.
The power supply val->intval can't equal to -EINVAL.

Change-Id: Ibd6a40770144185b11c54e8f21741fc06477686c
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2121820
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-19 03:19:42 -06:00
wutao
08b3dee44f mmi_qc3p_wt6670f: int pin config to input mode
wt6670f int pin(gpio85) default is output mode,if request_irq
while fialed(return -5),so config to input mode to fix it.

Change-Id: I1f6e08e6b1ca652be57448334bb15465e3a87d3f
Reviewed-on: https://gerrit.mot.com/2120830
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <huaqin85@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-19 00:01:30 -06:00
Rohit Sisodia
c763e7f8ae Revert "(CR): Revert "Revert (CR) power:fet_control Vbatt2 balance path""
This reverts commit 19d004c6c999c9dd1b6b7122ebf32738d1ce5e64.

Change-Id: Ibbdf8a9e103e4558af0d194a87ada40b9479d573
Reviewed-on: https://gerrit.mot.com/2121056
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Yinjun Chen <a7301c@motorola.com>
Submit-Approved: Yinjun Chen <a7301c@motorola.com>
Tested-by: Yinjun Chen <a7301c@motorola.com>
2021-11-18 13:27:27 -06:00
Rohit Sisodia
ebc8a767c0 Revert "(CR) power:fet_control Remove ps_notification cb"
This reverts commit e7c24f09b40f98dc3ba5f23586e3db0769d99997.

Change-Id: I7765f6c6234bd85452fe7260ee2e43615e6a7053
Reviewed-on: https://gerrit.mot.com/2121057
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Yinjun Chen <a7301c@motorola.com>
Submit-Approved: Yinjun Chen <a7301c@motorola.com>
Tested-by: Yinjun Chen <a7301c@motorola.com>
2021-11-18 13:25:39 -06:00
xuwt2
accd702702 qpnp_adaptive: Change Makefile to compatible with Android S build
Change the build make file to be compatible with
Android S build.

Change-Id: I9faf66a92f1d4c4bb32b6069d9ed4b9e08f66392
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2117635
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-11-18 00:18:47 -06:00
wengjun1
329c4bc70b dlkm: Add check if panel is available for gt9916s
- Add if panel is available logic for gt9916s with
using spi bus.

Change-Id: I0489672829c2e411f58a1799e35cf05024f7a75b
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2108636
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-17 21:10:52 -06:00
liuyc20
c7989e92e3 power: fix rt9426a get the negative soc or soc jump
11-06 10:22:19.922     0     0 I rt9426a 1-0055: RT9426A block read 0x2c fail
11-06 10:22:19.922     0     0 I rt9426a 1-0055: SOC(-13)
11-06 10:22:19.922     0     0 I rt9426a 1-0055: RT9426A block read 0x2c fail
11-06 10:22:19.922     0     0 I rt9426a 1-0055: read soc value fail
QC holi project can't permit do i2c test when phone into suspend or resuming.
The failure of I2C operation jointly produces many unexpected behaviors,
including but not limited to the negative power number and serious power jump.

when calling to the fg_update_work_func(),
avoid the system into the suspend.

Change-Id: Ideeecffc1abe6e7eed12173c7a589cf1f3dc1b22
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2118864
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-17 20:43:00 -06:00
zhouzs1
86370de399 Wallet shown slow when screenoff at qingdao
when device screen off, the wallet running slow and some time
nfc service will reset.

remove IRQF_NO_SUSPEND feature on driver to avoid issue

Change-Id: I1828ce8293915b288020595fa3d2a992503c90a8
Reviewed-on: https://gerrit.mot.com/2119768
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ningkai Zhuang <zhuangnk1@lenovo.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-11-17 20:25:59 -06:00
wutao
1b1b1538aa mmi_qc3p_wt6670f: remove QC3.5 detection in shutdown ops
wt6670f_shutdown() will trigger QC3.5 charger type detection and cause kernel panic .
No need to do QC3.5 action while system shutdown, so remove it .

<1>[   16.536435] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028 
<1>[   16.536437] Mem abort info: 
<1>[   16.536439]   ESR = 0x96000005 
<1>[   16.536441]   EC = 0x25: DABT (current EL), IL = 32 bits 
<1>[   16.536443]   SET = 0, FnV = 0 
<1>[   16.536445]   EA = 0, S1PTW = 0 
<1>[   16.536446] Data abort info: 
<1>[   16.536448]   ISV = 0, ISS = 0x00000005 
<1>[   16.536450]   CM = 0, WnR = 0 
<1>[   16.536452] user pgtable: 4k pages, 39-bit VAs, pgdp=00000001ce121000 
<1>[   16.536454] [0000000000000028] pgd=0000000000000000, pud=0000000000000000 
<0>[   16.536458] Internal error: Oops: 96000005 [#1] PREEMPT SMP 
<0>[   16.536582] Skip md ftrace buffer dump for: 0x1609e0 

<4>[   16.536673] Call trace: 
<4>[   16.536675]  mutex_lock+0x18/0x40 
<4>[   16.536679]  wt6670f_shutdown+0x24/0x8c [mmi_qc3p_wt6670f] 
<4>[   16.536683]  i2c_device_shutdown+0x5c/0x90 
<4>[   16.536686]  device_shutdown+0x1b8/0x298 
<4>[   16.536690]  kernel_restart+0x40/0x108 


Change-Id: I7e81484c25ff8f65d84e86a88b0ae51d7601fab6
Reviewed-on: https://gerrit.mot.com/2119210
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Tested-by: Jira Key
Reviewed-by: <huaqin85@motorola.com>
Submit-Approved: Jira Key
2021-11-17 19:52:41 -06:00
Bernie Moreno-BERNIEM
59532d88ef power:fet_control Remove ps_notification cb
Some units may panic on charger cable insertion at powerup. Seems
to be a race condition either registering the ps notifier, so remove
the call.  This will reduce the reaction time to check for overcurr
condition at time of charger application.

Change-Id: I71e00636630605e393334e2c8424dfadd2913566
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/2115456
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-11-17 11:20:18 -06:00
Sridhar Vashist
d693f3b415 Revert "Revert (CR) power:fet_control Vbatt2 balance path"
Re-instate the original commit back into mainline to validate.

This reverts commit e5433a437a06221b577d0b54c4e4936d317e4c1e.

Change-Id: Ida06a55eee333d31fb0f0f212daed74c11c790b9
Reviewed-on: https://gerrit.mot.com/2118107
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Bernie Moreno <berniem@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-11-17 11:19:38 -06:00
mahj8
7221ea47ce charging: update charging status when power supply get
update charging status when policy get power supply prop
for sgm41542

Change-Id: Idbf9addb9312dc2705d0c722b4f1bf07b03712fb
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2118981
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-11-17 04:38:57 -06:00
litong20
ce40bdb1a9 support pmk8350 gpio3 as stylus clk.
TP:
  Support Pmk8350 gpio3 as the stylus clock for Rogue PVT, and the
output frequency is 19.2Mhz.

Change-Id: I5dae054b6170b921b7afee1853b7de7995531705
Reviewed-on: https://gerrit.mot.com/2111742
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-11-17 00:39:18 -06:00
mahj8
a23570c75d charging: use msleep instead of mdelay
In COM kernel panic. Kthread max runtime is 0.95s, but we use
mdelay 1.5S, it will kernel panic. So change mdelay to msleep.

Change-Id: I643df7edc75b8640ff6a5d2aa90106e378e0df9f
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2117321
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-16 04:18:14 -06:00
wuwl10
3849eeccd0 dlkm: silead_fps: remapping the keycode
Remapping the keycode report to HAL  per moto spec.
Remove the HOMEPAGE key to avoid factory test issue.

Change-Id: I8b4c5ee1d10fe43f466906d70a58fd007d89b6cb
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/2117197
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Zhong <zhongl1@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2021-11-16 03:21:27 -06:00
mahj8
f64b636d80 charging: defined default termination current 120ma
As cyprus IP68 SW terminate current is 150ma, so HW
termination current need set below 150ma.

Change-Id: Ib52492992495e03945943b18363ea58f1cf6a49f
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2116841
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-16 01:26:03 -06:00
mahj8
38dc43e76b charging: optimize ICO feature
sometimes we need disable ICO feature, so add
enable ico judge

Change-Id: Iffa1673c33f3018e03e61f01696fcb229fdade2e
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2117107
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-16 01:25:10 -06:00
mahj8
df808e52a6 charging: schedule monitor work when charging
schedule monitor work when charging for debug
and add register dump.

Change-Id: I50e182b03d8156b09418270d5f2e28ed482267ce
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2116792
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-16 01:24:53 -06:00
mahj8
cdef1f9524 charging: enable absolute vindpm
The force vindpm bit will clear by itself when remove charger,
so need re-set force vindpm bit when use absolute vindpm.

Change-Id: I8c8c5747c3ee58b9394c35ca0c0f465cdb52064b
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2116766
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-16 01:24:43 -06:00
litong20
9fcd292e9a support goodix edge suppression function.
TP:
Command: 00 00 06 17 data0 data1 ChecksumL CheckSumH
data0 rotation direction:
0x00 Default  
0x40 Left rotation 90
0x80 Right rotation 90

data1 edge suppression area
0x00 Default  
0x40 Level1 R-200 quadrant Pixel
0x80 Level2 R-250 quadrant Pixel

Change-Id: I0cafadf1f5238198368f7f9f7c51cbcd41f9af1a
Reviewed-on: https://gerrit.mot.com/2116171
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-15 04:04:10 -06:00
litong20
e2b20f5f02 goodix: Support interpolation game mode function.
Command:
Enable interpolation:  00 00 05 C2 01 C8 00
Disable interpolation: 00 00 05 C2 00 C7 00

Change-Id: I34eeac1a1305d6727c3a82ad6fecb023674da086
Reviewed-on: https://gerrit.mot.com/2115930
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-15 04:02:34 -06:00
litong20
553a486ed7 stmicro: Add the judgment of the sensitivity mode value.
TP:
Since the sensitivity node is a general node in the framework,
the judgment of the mode value is increased.

Change-Id: I82d2727e8ebd60c96c13edf2dd923630dc828290
Reviewed-on: https://gerrit.mot.com/2116173
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-15 04:02:24 -06:00
wuwl10
4e43d2c020 dlkm: nfc: alway probe nfc driver
We need to probe the nfc driver even through I2C
communication fail to make sure Force FW Download work.

Change-Id: I3a84bd7927ec01f4a663d332dd3551cd00c7a8f2
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/2116211
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ningkai Zhuang <zhuangnk1@lenovo.com>
Reviewed-by: Jun Zhang <zhangj10@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
2021-11-15 03:47:12 -06:00
wutao
5cf523287d mmi_qc3p_wt6670f: fix wt6670f driver bug
modify wt6670f_i2c_probe code,if gpio_request failed
go to gpio_direction_output while dump.So add return
before gpio_direction_output.

Change-Id: Ia61ec64165a8754a948474ff848b07eaf79968c6
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2115729
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-14 21:28:45 -06:00
Rohit Sisodia
75367c2726 : Revert "(CR) power:fet_control Vbatt2 balance path"
At present this change causing random Kernel panics. WE will investigate
in prallel revert change temporarily for stable dialy SW

This reverts commit 2e2fbc387e3aee0d96fbdbea9ebb7de64ad4b1aa.

Change-Id: I91374b0ff97a39b11fcf64e6cb1f8aaMontanaf89cf3
Reviewed-on: https://gerrit.mot.com/2115325
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-11-12 17:43:17 -06:00
mahj8
681fa9b27d charging: optimize otg current setting logic
Select close current value base on setting.
This logic is batter.

Change-Id: I5a456cc87e779edca326e7ddf563c42818adbda4
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2114858
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-12 03:34:50 -06:00
litong20
e028939dc0 Support leather mode setting.
1. Add the function of leather mode in the
univeral interface sensitivity.
2. The mode setting instructions are as follows:
mode = 0x00/0x01 Exit/Enter film sensitivity mode.
mode = 0x10/0x11 Exit/Enter leahter sensitivity mode

Change-Id: I35d49aaf225e8b941a4f2552a2ccd9d33a34dd92
Reviewed-on: https://gerrit.mot.com/2113437
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-12 02:23:32 -06:00
mahj8
424fc3bd64 charging: fixed sometimes don't request dpdm issue
sometimes vbus type don't equal to NONE, so don't request
dpdm, so qc3.0 can't be correctly identified.
we must request dpdm when charger inserted.

Change-Id: I68f48ac713e468250709a6788dddf57e460887d0
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2114459
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-12 02:16:09 -06:00
zhangh12
236b122c27 sar: modify the vdd name for aw9610.
aw9610
modify a specific vcc name for sar.

Change-Id: Ia5fc08b70e37d8b74a05d45d995fb101d6e0b5c9
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/2112766
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-11-10 23:21:46 -06:00
zhaoxp3
e6fe8e87df mmi_charger: align gki 2.0 requirement
orderly_poweroff is not supported in GKI2.0

Change-Id: I2fa959f0abdacb2188c054c46e1a05c8d8c9813c
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2112840
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-11-10 22:36:35 -06:00
mahj8
48d2c2835a charging: enable ILIM pin for bq25890H
As DVT1 HW ready, so re-enable ILIM pin and remove
MMI_STOPSHIP for bq25890H

Change-Id: I2f07b880a082598c0e6bb1b63d9bb62b764f4dc8
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2111606
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Shicheng Gong <gongsc1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-09 20:41:16 -06:00
huaqin86
5fec7d3d8f bq2597x_mmi_iio: add bq2597x gki and irq code
modify bq2597x_mmi_iio code for GKI
and modify irq read function
disable some not used config

Change-Id: I258f48cf1b34d0b3918312c03a9dbf1e7e6904f0
Signed-off-by: huaqin86 <huaqin86@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110613
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-11-09 08:37:41 -06:00
huaqin86
8d0f2f73b3 bq2597x_mmi_iio: add bq2597x initial code
add bq2597x_mmi_iio initial code
this code copy from bq2597x_mmi.

Change-Id: I889a32d672b05babec30d9ce4de972fd2fee3151
Signed-off-by: huaqin86 <huaqin86@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110603
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-09 08:37:32 -06:00
huaqin86
27f4937a59 mmi_qc3p_wt6670f: add qc3p logic initial code
add add qc logic wt6679f code for bring up
this code i2c can work normal,but function need bring up

Change-Id: I68e424ad6db2f12a70c1a59470b423035bf6cb67
Signed-off-by: huaqin86 <huaqin86@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110593
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-09 08:37:25 -06:00
huaqin86
19c6a8b733 mmi_discrete_charger: modify enum redefined
change mmi_charger enum redefined
It has been redefined in kernel:
kernel/msm-4.19/include/linux/power_supply.h

Change-Id: I8c5c31f8e1b8e3c63df611f54361508fcb4e4e96
Reviewed-on: https://gerrit.mot.com/2110591
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-09 08:37:18 -06:00
huaqin86
58f8d6743c sgm4154x_chg_mmi: changed chg_en_pin judgment logic
rhode have not charger enable pin,
changed chg_en_pin judgment logic ,otherwise old judgment logic will
return fail in probe.

Change-Id: I39dd4b91b76ca9a5487b56c1776c4041bce34cf9
Signed-off-by: huaqin86 <huaqin86@motorola.com>
Reviewed-on: https://gerrit.mot.com/2109970
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-11-09 08:37:11 -06:00
huaqin86
6cd6569853 mmi_charger: modify enum redefined
change mmi_charger enum redefined
It has been redefined in kernel:
kernel/msm-4.19/include/linux/power_supply.h

Change-Id: I10d158cf5c79d2a17903e92e9e5d5a353178f1d6
Signed-off-by: huaqin86 <huaqin86@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110586
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
2021-11-09 08:36:46 -06:00
mahj8
25c3701a54 charging: fixed unit can't connected PC sometimes
sometimes vbus_type register don't be cleared by itself when
removed usb cable. So can not run charger removed code logic.

Workaround DSEL 47nf Cap HW issue of Milanf on TI BQ25890 

Change-Id: I354bb10f46d3ffc59b949849b1f6e43eeae1e928
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110861
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-11-09 05:16:19 -06:00
weimh1
e5175ed214 milan5G: sar sensor driver
1.optimize log for debug.
  2.drivers/misc/sx937x/sx937x_sar.c

Change-Id: Icc3ed680148ce243aca26bc7419ae1f3c83fe2b9
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2110918
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-09 04:44:19 -06:00
zhangh12
484bae18fd sar: add aw9610 driver
add the driver of aw9610,
modify the build scripts.

Change-Id: Ic2be827fd281759c6184e68cfe5690f76642cc46
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110739
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-11-09 02:08:48 -06:00
mahj8
73f818f4b5 charging: avoid vbus voltage increase to 12V
If sometimes dm drop to 0V slowly, then vbus increase to 12V as
dp 0.6V dm 0.6V. So first drop dm to 0V and then drop dp to 0.6V.

Change-Id: I8db3b6273dd4be244b75513a0103a021719bf070
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2109927
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Submit-Approved: Jira Key
2021-11-08 21:53:27 -06:00
mahj8
f0b71b186c charging: add qc3.0 arch for bq25890H
add qc3.0 detected function
for bq25890H

Change-Id: I8b7f9de35175756daa9c0f9b631eb767e560dd8c
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2109874
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-08 21:51:59 -06:00
Bernie Moreno-BERNIEM
4659a9f917 power:fet_control Vbatt2 balance path, chrg fullcurr, ocp
Logic control for vbatt2 balance_en_n (gpio105), battplus_en (gpio90),
chrg fullcurr_en (pm8350b_gpio8) and vbus_ocp_fault_n detection.

Enable low-Z battplus_en when vbatt2 is within 200mV of vbatt_main lev
Otherwise, leave in balance_en_n path.  Charge fullcurr_en dflt to
disabled (low) and set high on charger connect, with vbus_ocp_fault_n
logic high and mainbatt_current < 1C (2500mA). Full charge current will
be 5000mA for both batteries in parallel.

Finally, check for factory mode state or Not Charging + battplus_state
High. If either condition met, skip out of fet_control workfunc and
delayed work. Future charger detection will restart delayed work again.

Change-Id: I108f5d4e7382d67ad874db03f498dfeac729a9d2
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/2110359
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-11-08 21:43:35 -06:00
chailu1
fbe06d4b12 charge: add iio interface for typeC mode
charge/typec
add typeC mode iio interface form typec module

Change-Id: I2df7d66757399924e03678e69e734637b5dac06e
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2106497
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-11-08 20:08:44 -06:00
chailu1
0222c9e9e7 typeC: add iio interface for typeC mode
typec mode
add typeC mode iio interface to charge module

Change-Id: I73ed231e93588606c9dd34755759ae6e31e5af57
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2107389
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-11-08 20:08:42 -06:00
mahj8
1972d6de66 charging: config charger power supply type unknown
If online prop is 1 and power supply type is MAINS, healthd will
think charger type is AC. So config charger power supply type
is unknown to avoid conflict with usb power suply.

Change-Id: I6e0baf4c40df1cc4f42d83b44bb918e2708a2bdc
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2108494
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Submit-Approved: Jira Key
2021-11-08 00:00:41 -06:00
zhaoxp3
80456d6e6b mmi_charger: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: I52bac148c92a2aaf6a3929b4c1a2709e4b3421af
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2108688
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-11-07 09:01:57 -06:00
litong20
1d0fe48a70 Close the stylus clock when system suspend.
1. Close the stylus clock when system suspend and the stylus
mode exits.
2. Add 16ms delay between each command.

Change-Id: I6dff47410315272167d47a733b1058736f72c737
Reviewed-on: https://gerrit.mot.com/2108295
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-05 01:55:50 -05:00
mahj8
490f9b94e5 charging: avoid kernel panic
avoid NULL pointer kernel panic
<1>[ 4.240233] Unable to handle kernel NULL pointer dereference
at virtual address 0000000000000488
......
<4>[ 4.240332] Call trace:
<4>[ 4.240334] _raw_spin_lock_irqsave+0x40/0x74
<4>[ 4.240337] power_supply_changed+0x24/0x6c
<4>[ 4.240341] batt_external_power_changed+0x44/0x54
[mmi_discrete_charger]
<4>[ 4.240344] __power_supply_changed_work+0x50/0x88
<4>[ 4.240347] class_for_each_device+0xdc/0x148
<4>[ 4.240349] power_supply_changed_work+0x60/0xcc
<4>[ 4.240352] process_one_work+0x2cc/0x51c
<4>[ 4.240354] worker_thread+0x278/0x4d0
<4>[ 4.240356] kthread+0x16c/0x17c
<4>[ 4.240358] ret_from_fork+0x10/0x18
<0>[ 4.240362] Code: 1100054a b900192a 52800029 f9800011
<4>[ 4.240364] --[ end trace 55041178414fca52 ]--
<0>[ 4.241541] Kernel panic - not syncing: Fatal exception

Change-Id: I14e651a74cb6598fb2ba9fbad44e372c18fed024
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2107613
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-11-04 21:37:42 -05:00
Jefferson Capovilla
de6c28300f Fix path for ion lib in Kernel 4.19
The mobicoreDriver from Trustonic drop 410a-V108 was not including
the correct ion header when CONFIG_ION_SYSTEM_HEAP is disabled, causing
a build failure.

Change-Id: Ie324ba066fb1a487a13c86716af8a79a3ce3b16a
Reviewed-on: https://gerrit.mot.com/2107997
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2021-11-04 16:58:16 -05:00