cw2217b:
When the soc reaches 100 and the usb is online, and the
battery is not in discharging status, the ui_soc remains
at 100.
Change-Id: I075229f572eb3330f490b5840d25d1ed119311c4
Reviewed-on: https://gerrit.mot.com/2631323
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Sometimes the pump can't recovery if disabled accidentally.
The recovery_pmic_chrg flag should reset to 0.
Change-Id: I01119c6531ca42aa7e92d590cca9989ce18a53b0
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2630990
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
To ensure the battery current can meet the target, optimize the
qc3p init votalge while the soc above 65%.
Change-Id: I005799a1a530bd1d5899206da4f64bf4492d4c84
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2629112
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
First unify the polarity of the current through the ibat_polority,
then judge the charging state according to the polarity of the current.
Change-Id: Ie2c155708e0c6808f56502325af0248e74e6c420
Reviewed-on: https://gerrit.mot.com/2620148
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Set touch reset and interrupt pin to low after touch IC
powered off to reduce power consumption.
Change-Id: I9443a29ee5ccb7d19290024048e054102710a65b
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2619346
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
Different devices require different settings for tcpc's max polling
count. Make this value configurable.
Change-Id: I10b3bc4f27d14e00c5ec2b4ca943c1f97b4eb14a
Reviewed-on: https://gerrit.mot.com/2610513
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Bruno Oliveira <brunosoe@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Submit-Approved: Jira Key
SME-Granted: SME Approvals Granted
The value of ui_full will be lost after reboot,
so save the value of ui_full to the 0xA2 register.
Change-Id: Ib183f9ee745e8e91207f5dd0763729845573ec04
Reviewed-on: https://gerrit.mot.com/2612156
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Firmware flash is ok but verify fail, change to verify the last 4 bytes
on firmware.
Change-Id: If4e80a914d8ad7b9352a26fb7259aa97451c7863
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2611066
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
Goodix touch:
Clear correct bit 13 to enable FOD zero tap wake up gesture.
Change-Id: Iece50a5dc5ae27c562f0cdf1087c44ec6fa5d5c7
Signed-off-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2608756
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: <zhuwg1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
The qc3p request voltage is too high while the vbat
is float. Optimize the qc3p request voltage when
charger pump entry.
Change-Id: I206e23f6f21519cf59725ce5d0874e11582325c9
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2603252
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lei Chen <chenl18@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Found that zinitix touch firmware upgrade failed due to checksum
error,but now firmware version check right and touch works well.
It's not sram broken or burst upgrade problem, suspect "0x55aa"
check sum not stable.
Change the firmware check to a more stable way after burst upgrade.
Change-Id: I1edb0dc608179e3d64c8ac931603aae9e28cd78d
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2604234
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
sc760x:
The step of thermal radio is 0.5, so the thermal_ratio is
(thermal_ratio_nums * 0.5).
Change-Id: I87238d652c90be53c7bd2901c63fcf2c84Montana467
Reviewed-on: https://gerrit.mot.com/2601346
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
The jiffies value is only recorded in the charging state,
and it needs to be cleared in other states.
Change-Id: I9beb3465a24784d35399c10733416f3104269678
Reviewed-on: https://gerrit.mot.com/2601217
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
use the battery voltage estimated by the fuel gauge in charging logic,
not the adc value of the charge pump.
Change-Id: Ia001e41dc909ce3ec57ddbcfe888a7b566ad358a
Reviewed-on: https://gerrit.mot.com/2599627
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
bangkok:modify for focal tp
power off and on
Change-Id: I23791c139fa095611fdb3989d3fb318222144533
Reviewed-on: https://gerrit.mot.com/2597827
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Throw out BATT_PSY power_supply_changed
when mmi_register_charger_driver success.
It order to update the battery status more timely.
Change-Id: I7ea63a9340c44a2393ac86ab2b6cb94c62cb5905
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2592493
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
sc->thermal_ratio assign to default value, so no need retrun failed if
not define thermal-ratio in dts, or sc760x may register failed
Change-Id: I8f0494c85bf36caad9aa8d5340d8bcc70e779b5a
Signed-off-by: xuxj <xuxj12@motorola.com>
Reviewed-on: https://gerrit.mot.com/2592059
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
bangkok:remove focaltech fod log,because too many logs in
interrupts can cause system crash
Change-Id: Ia7444d41a1e60398b5524938299e457b8f96527d
Reviewed-on: https://gerrit.mot.com/2574799
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Dual battery thermal mitigation, Add equal ratio thermal level control
Define THERMAL_RATIO_CONTRO to enable this feature.
It will ignore thermal-mitigation-level and force to rewite new thermal
level through calculating the (batt_fcc_ma/thermal-ratio) of parnter
battery
Change-Id: Ib44eccfe540b6d8d705bb53fb5001207288a7b85
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2567981
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
In order to debug the problem of fuel gauge soc jumping,
add some debug logs,
Change-Id: I5b6adf50d496126059366a0c322915a0f533acd4
Reviewed-on: https://gerrit.mot.com/2567828
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key