Commit graph

2,194 commits

Author SHA1 Message Date
mahj8
264b8e8d71 charging: add icl*vbus to report power max
As pd type can't equal to real_charger_type in discrete charging,
so need to add icl*vbus to report power max for showing turbopower
connected UI.

Change-Id: I16f4b559383f86eb38ec1b5e6cac09556d9dfada
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2154206
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-24 02:36:27 -06:00
huaqin85
1c7538d444 charger: compatible NU2105 Charge Pump in bq2597x
NU2105: compatible ADC & regulator for NU2105 pump
print bq2597x , NU2105 , SC8551A PartNo, and Deivce Name
Change the base Addr for show registers

Change-Id: I4540dc9fac6caa35b848988359c4462d86f4dd76
Signed-off-by: huaqin85 <huaqin85@motorola.com>
Reviewed-on: https://gerrit.mot.com/2142696
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-12-24 01:16:18 -06:00
yanyh2
fed40d1211 Reset charger configure and constraint for glink down
Reset charger configure and constraint for glink down, so that
AP will resend the charger configure and constraint to ADSP
battery management, otherwise uninitilized value of charger
configure and constraint will be used in ADSP side after ADSP
restart, and then power max value will use default value 0;

Change-Id: Ic29a61763c85be62102ecb0333ae7f03f79ac670
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2153260
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-12-23 21:13:13 -06:00
liuyc20
abd4219f55 FG: rt9426a add cancel_work when system into suspend
when system into suspend. at this time running battery_work to
read the I2C that will make reading the i2c error.
so add cancle_delay_work when suspend, queue_delay_work when resume.

Change-Id: I7a39f8689b8b560ecfc04b40171bb59f20b6b57a
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2152989
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
2021-12-23 05:42:39 -06:00
huaqin86
efc3721336 wt6670: add retry function to wt6670 read fw
Power supply is updated every 5 seconds, and firmware reading will be called every 5 seconds
The original firmware reading will pull the interrupt pin up and down
This operation will cause incorrect timing of wt6670, resulting in incorrect value read by wt6670

Change-Id: Ia4cfd37b8705ce2527fe6f6509a4b14b1eb8dd51
Signed-off-by: huaqin86 <huaqin86@motorola.com>
Reviewed-on: https://gerrit.mot.com/2153027
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-23 05:35:54 -06:00
Yan Zhang
565cf7a3ab Update Goodix TP FOD event implementation
1. Update FOD gesture trigger in screen off mode.
2. Add FOD event support in screen on mode

Change-Id: I7ecbfdb4aff8eaf34e88247d91d08279edd018a6
Signed-off-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2152070
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-23 03:06:05 -06:00
xuwei9
3f42788a45 qc3p:optimize power supply init
Optimize power supply int time
Keep get supply name once.

Change-Id: Iba46c0885dccecf6c66346879227d1e8756aa70a
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2152814
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-23 02:08:15 -06:00
xizx
15f84bb003 mmi_annotate: write info mem when persist mem unsupported
From 8450 platform, Qcom doesn't support warmreset, so pstore memory
cannot work again. All persist memory data should be writtle into
memory.

Change-Id: I9f20a35b50a10c69b7df96037a27b965e130b5f9
Reviewed-on: https://gerrit.mot.com/2152098
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2021-12-23 00:54:01 -06:00
tinno18
beb23b07a3 [hawaii+oled]:vibrator long short vibration intensity 1/2
vibration intensity
play_ms > 80ms means long, otherwise short
long : 2.6V
short: 3V


change reason:vibrator resonates with camera

Change-Id: Icdb29bf77b3987ef7f25e0f6660b8461fe74e84c
Reviewed-on: https://gerrit.mot.com/2152699
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <tinno18@motorola.com>
Reviewed-by: Zhenghai Pan <panzh2@lenovo.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-12-23 00:40:08 -06:00
xuwt2
81a711a700 smart_pen_charger: Add PEN_STAT_CHARGE_DISABLED
Add new pen status : PEN_STAT_CHARGE_DISABLED
it means the pen charging was disabled.

Change-Id: I784d770f34b1bbe1e8e34bf785810e180924de6d
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2151778
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-12-22 23:43:37 -06:00
liyiying
ef103ab40d mod the sc89890h register config
as the sc89890 datasheet,
the REG04 Icc - Fast Charge Current offset is 0ma, LSB is 60ma
the REG05 Itc - Tirckle Current offect is 60ma, LSB is 60ma
the REG05 Iterm - Termination Current offect is 30ma, LSB is 60ma

Change-Id: I6cd85cd48878492682c1c9802e5ce972e2db0664
Signed-off-by: liyiying <liyiying@wingtech.com>
Reviewed-on: https://gerrit.mot.com/2151683
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-22 20:40:37 -06:00
wangwang1
e02ce4fcd2 Rhode:use regulator interface to control vbus
during kernel boot up sequence, regulator framework has a delayed
workitem to cleanup all pre-enabled but not in use regulators,
as we want to keep the vbus on when otg device is plugged in before
kernel boots up, we need to use regulator interface to turn on the
related regulators, which in turn set the regulator as in use,
so the delayed workitem ignores the already engaged regulators.

Change-Id: I6baf4977768eb6837cd3b416a23c30fad5af789b
Reviewed-on: https://gerrit.mot.com/2151867
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Submit-Approved: Jira Key
2021-12-22 20:01:44 -06:00
dengwei1
868e8bde39 dubai: input touch add gki support
add
gki

Change-Id: I84ee20f77b4665c20e0f09b3180be5ecffb8b90f
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2152515
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-12-22 20:01:02 -06:00
huaqin86
a08643e104 bq:add enable termination function
Add main charger enable termination function
at sc89890H charger ic.

Change-Id: I8b53d39c1db702e30f1e94281e38621216dd6152
Signed-off-by: huaqin86 <huaqin86@motorola.com>
Reviewed-on: https://gerrit.mot.com/2150957
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-22 07:04:41 -06:00
liuyc20
cc3c111f0f FG: RT9426a add safeguard for SOH
In some abnormal cases the soh=0 from the chip, that make the
bms_charge_counter&&bms_charge_full abnormal,then calculate the wrong
UI_SOC for battery.
if get soh=0; use old soh to aviod getting the wrong soc.

Change-Id: Ic7433d23c3162a96a40f9bc5e7043dcdfb42fb14
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2151691
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-22 04:10:53 -06:00
liuyc20
881e346bc6 FG: RT9426A add safeguard for ocv_index
ocv_index is used for ocv_table parameter.
In some case read a invalid ocv_indes(65535/-13),then driver read the wrong
ocv parameter, that make checksum fail and exit the driver.
the ocv_index only 0~4 is valid, if read a invalid ocv_index,
using the default ocv_index to fix above issue.

Change-Id: I633aaa7f9abc4a98abb72cbec45025c8c52d5662
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2151514
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-22 04:10:42 -06:00
litong20
2d3b0cbc54 goodix: Solve cpu_latency_qos_add_request called warning
TP:
WARNING cpu_latency_qos_add_request called for already added request

Change-Id: If99edff041cfeb57c45d9f6e2119ad24bf35f3ab
Reviewed-on: https://gerrit.mot.com/2147984
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-22 00:45:32 -06:00
wangyq13
df08fa99ef input: goodix_v1510: add charging and gtp-tools node
- Add charging detection function
- Add gtp-tools node for cqa test
- Remove software esd check for touch, touch firmware itself to recover

Change-Id: Id3b398f302370baddf56b5973813d5a09591460e
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2150842
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>
Submit-Approved: Jira Key
2021-12-21 23:51:35 -06:00
chailu1
06ca2a6c80 PD: config cc status for sc2150 after shutdown
pd/sc2150
config CC status to RD after shudown for sc2150

Change-Id: Iba282f3f7b982a63715553df5eded9168a76f459
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2150656
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>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Submit-Approved: Jira Key
2021-12-21 23:34:51 -06:00
litong20
c042d862af Do not re-enable the stylus when the stylus mode is switched
TP:
  When exiting the stylus mode, the IC will send an abnormal reset
interrupt. At this time, the stylus will be enabled again,
but because the stylus clock is closed, the touch will not work.

Change-Id: Id1b393de2b2bee5b06e9d4f5b74dfd301be4547d
Reviewed-on: https://gerrit.mot.com/2150837
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-21 19:46:47 -06:00
zhuwg1
bcb890a074 mmi_charger:use orderly shutdown in factory mode
On user-debug build, use 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: Ia3d80b828670a5098afccbca2d934f9d32255a93
Signed-off-by: zhuwg1 <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2145390
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-21 06:19:14 -06:00
xieqiong2
0899181581 sgm4154x:add hawao vbus adc sample ratio
Hawao use 180 pull up and 39 pull down
hw design for vbus adc.
So we need to use specific sample ratio
to do the caculation.
This is just a debug modification to
accommodate evt/evt1 hw.

Change-Id: If062be5ac2f0586d39eb7115ab16f211c5c29d29
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2147468
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-12-21 03:29:21 -06:00
xuwei9
dce57a8af0 qc3p:limit ibus 300mA for main charger no ibus adc
Due to discrete main charger have no ibus adc
so limit main charger fixed input 300mA.

Change-Id: Ic762f33d91552c387aa27d6cbe8e4639b39df388
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2150432
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-21 03:07:40 -06:00
mahj8
3f275d7116 charging: Ignore the PD vote icl unless BC1.2 done
Third charging ic IINLIM bits will be changed auto
when BC1.2 done. So we need to Ignore the PD
vote icl untill BC1.2 done.

Change-Id: I394f80b71c427e5b2a98b6012aeb7a852329ce4f
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2150599
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-12-21 02:37:15 -06:00
liyiying
b04c4e14c3 add charger ic - sc89890h config
motorola/kernel/modules
config sc89890 charger ic param for rhodec

Change-Id: I04813d73feae4844dfb37aaaf63fd6c70c07765f
Signed-off-by: liyiying <liyiying@wingtech.com>
Reviewed-on: https://gerrit.mot.com/2148046
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-12-21 01:52:56 -06:00
liyiying
646dd1871c modules:add sm5602 patch to fix the soc jump problem
1.what circumstances does this problem occur.
RD found sometimes the soc will jump as normal use
2. the rootcause of this issue.
the soc return value is not conform to the calculation method
3. how to fix this issue.
change the soc report way

Change-Id: I27032c5252d5ebe5ea005deac9e2e8403245e37f
Signed-off-by: liyiying <liyiying@wingtech.com>
Reviewed-on: https://gerrit.mot.com/2149683
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-21 01:50:49 -06:00
liuyc20
ca98480525 FG: Modify SM5602 FG first update battery data time to 50ms
start driver then update battery data was delayed 8s.
that is too late, it will cause UI can't get correct battery capacity.
so from 8s change to 50ms.

Change-Id: I3cfb510e222c1c937e02bc5bd8cd1d7a88c958f7
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2149410
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-20 20:18:00 -06:00
huaqin86
cbdab92e7e add force_chg_auto_enable interface
add sys/class/power_supply/cp-standalone/force_chg_auto_enable
self tcmd test step:
enable Cap SWITCH:tcmd_send 00850702
disable Cap SWITCH:tcmd_send 00850703

Change-Id: I4ae5c9e9088bd16da7c33b6bbd62a22a1d76b617
Reviewed-on: https://gerrit.mot.com/2149651
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-20 20:15:51 -06:00
huaqin86
8f7de27de6 add firmware interface
charging qc3+ wt6670
add sys/class/power_supply/QC3P/firmware_num

Change-Id: I57f1d32846a6211ca8f7e33c4e6f7e1853d5fab0
Reviewed-on: https://gerrit.mot.com/2149692
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-20 20:15:23 -06:00
litong20
0c96a30306 Disable irq before entering gesture mode and IC resetting.
TP:
Disable interrupt before entering gesture mode and IC resetting.


Change-Id: I056458b7b405c1ba46f27eda9754c9d64eeeaef0
Reviewed-on: https://gerrit.mot.com/2149576
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-20 19:45:37 -06:00
wangyq13
28a097c665 input: goodix_v1510: enable single tap function
goodix_v1510:
Enable single tap function.

Change-Id: I783f8ca04efd73354f0b10c2e4e13add6721cc96
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2146428
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-20 03:17:46 -06:00
litong20
4710e99d3f Support resend stylus cmd after abnormal resetting.
TP:
Support resend stylus command after abnormal resetting.

Change-Id: I9cd2885988f92ca8d50b96f2b5c7569439e277b2
Reviewed-on: https://gerrit.mot.com/2147994
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-20 02:36:43 -06:00
litong20
95429c472f Record and restore the value of the mode
TP:
Record the value of the received mode from system and the value
successfully set to the touch IC.

Change-Id: Ie10f25be6d0d9fe9d21cf385a626496cc9aedfa5
Reviewed-on: https://gerrit.mot.com/2144916
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-20 02:36:31 -06:00
wutao
119a19f18e QC3P:use qc3p config distinguish other not qc3p project
Add QC3P config
use qc3p config distinguish other not qc3p project

Change-Id: I32571a4d3d407867eab6da1ec1f9b5b30b8b4b87
Reviewed-on: https://gerrit.mot.com/2149237
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-20 01:15:53 -06:00
wutao
453ca3dcbd QC3P:detection and iio sys support
Add QC3P detection and iio
sys support.

Change-Id: I7459889d1c7fc35b0913ba908b3ef9cf00c5729e
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2148672
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-20 01:15:41 -06:00
wutao
f2d6f6fa98 z350: add 2nd z350 qc logic
add 2nd z350 code
copy code from mtk platform:
https://gerrit.mot.com/#/c/2075447/
https://gerrit.mot.com/#/c/2078505/

Change-Id: Ide23c12c0ab1d5dfba5854f9ee76847b25255b4d
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2148665
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-20 01:15:36 -06:00
xuwei9
149f0a2f9c sgm:add enable termination function
Add main charger enable termination function
at sgm4154x charger ic.

Change-Id: Id907405ec331c01b76736771f7c0ea73590864dc
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2148139
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-19 20:47:27 -06:00
xuwei9
247b2c7d64 discrete:add enable termination iio definition
Add main charger enable termination
iio definition.

Change-Id: I80ba57a4c669c44561bab152a2f7d3f1a887b325
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2148136
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-19 20:47:22 -06:00
xuwei9
833103f052 qc3p:add main charger termination ctl algorithm
Discrete main charger have limitaion of terminating before
charging full really. disable termination when cp enabled.
enabled after dp disable.

Change-Id: Ibc9154c5b71b0a30ff15c61480d3d5cf179c626b
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2148129
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-19 20:47:15 -06:00
huaqin85
1b7224c595 QC3P:turbo charger module return value error
mmi chrg manager load fail,reason:
[    7.800978] mmi_chrg_manager: mmi_chrg_manager_probe: Could not get battery power_supply
[    7.809099] ------------[ cut here ]------------
[    7.813721] WARNING: CPU: 6 PID: 1 at drivers/base/devres.c:953 devm_kfree+0xe8/0x108
[    7.821549] Modules linked in: mmi_discrete_turbo_charger(O+).

probe return value error, it will be loaded success when battery is not existed.

Change-Id: Ia51a176181fae332b5322ff15fc8934f1cdf5f45
Signed-off-by: huaqin85 <huaqin85@motorola.com>
Reviewed-on: https://gerrit.mot.com/2148539
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-12-18 06:28:39 -06:00
dengwei1
ac8f1a04f1 dubai: vibrator add haptic rtp
haptic
rtp

Change-Id: Iaa5434190a002978566d0d13aMontanafad8aae59ba0
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2147763
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-12-17 02:14:04 -06:00
xuwei9
5c2cbc381f qc3p:optimize turbo charging current
Optimize turbo charging current
which can not reach 6A.

Change-Id: I443e9bb6ba5f051e7407fde26f611dd462de57e4
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2146708
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-12-16 04:07:03 -06:00
mahj8
d8253a9ab8 charging: add ibat monitor work
As bq25890H HW limit, some otg devices have high current pulse
when inserted. bq25890H trigger OTG OCP, so otg devices can't work.
So we config max boost current limit for bq25890H. For avoiding ibat
more than battery max discharging current, we add ibat monitor work.

Change-Id: If1d11fb47e26577055a181ea846c473f2cf73ec2
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2145129
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-12-16 03:38:47 -06:00
mahj8
c18b814d11 fg: get current in real time
some feature need to get current in real time
for rt9426a.

Change-Id: I28afc6471c771748db0edb7b8a433cfd9dc6c55a
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2146513
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-16 03:38:35 -06:00
wutao
8d9ed582bd sm5602: fix kernel panic when the device resume
fgauge/sm5602
it should return negative value when sm5602 not probe,
otherwise the mobile phone will crash when it is dormant
[ 46.987266] Call trace:
[ 46.987271] __mod_timer.llvm.510399912499890970+0x6dc/0x6e0
[ 46.987274] add_timer+0x20/0x30
[ 46.987279] queue_delayed_work_on+0x9c/0xf4
[ 46.987285] sm_bat_resume+0x24/0x34 [sm5602_fg_mmi]
[ 46.987289] device_resume+0x29c/0x41c
[ 46.987292] dpm_resume+0x1fc/0x500
[ 46.987296] suspend_devices_and_enter+0x180/0x4ac
[ 46.987300] enter_state+0x3e8/0x4c8
[ 46.987303] pm_suspend+0xd0/0x190
[ 46.987307] state_store+0x124/0x15

Change-Id: Ie267de68fd62a930df7846dac273ef70a948bd3b
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2146582
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-16 03:06:40 -06:00
qiurp1
48af563ae0 PEN_HALL:disable wakeup source
if the disable wakeup source is not avalible,
result the sleep state is not enter

Change-Id: Iaffb9bf70c574ce5dad5d1379be91159ef0e500b
Signed-off-by: qiurp1 <qiurp1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2145095
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jiyue Cui <cuijy2@lenovo.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2021-12-16 01:02:21 -06:00
a17671
b736076b7f fs:exfat-linux:Integrate exfat-linux open source driver
Opensource exfat-linux driver provide better performance
Comparing with the existing Moto exfat-nofuse
It could support various kernel versions l(CR) 5.4/4.19/4.14/4.9
Original source :https://github.com/arter97/exfat-linux.git
version 5.8-2arter97
This commit also integrates almost all the exfat upstream
changes from kernel 5.8-5.16 listed in:
https://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat.git/log/fs/exfat?h=exfat-for-5.16-rc1

Change-Id: I7c0db070ee33be8f7f24a42f987b4e825d957998
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/2137224
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xinmin Fu <fuxm1@motorola.com>
Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2021-12-15 23:10:34 -06:00
wutao
bc1f9b3b7d fg/sm5602: Early detection device chipID
it should add device id detect before parse dtsi,
otherwise it will effect other fgauge boot time

Change-Id: If5d6e2de0a8783c40b4b60097baff1ffe3fa97e5
Reviewed-on: https://gerrit.mot.com/2144787
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-12-14 23:59:03 -06:00
wutao
1963090b48 fg/sm5602: correct the unit of vbat and temp
vbat need  ua : *1000
temp need : *10

Change-Id: I32b66ce23829ab5f051b0e678adcf5bac6d53912
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2144165
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-12-14 23:58:54 -06:00
wutao
6d3ebfe5f3 sc89890h:device: add sc89890h device id
rhode second master charger
add device id 0x04 for sc89890h in bq2589x.c

Change-Id: I8295ffcc73443e68e73c8c0bfd6ded57cd7b1756
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2144127
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-14 23:58:36 -06:00