Following changes are made to fix Devon build issue:
- conditionally enable spi CS Hold Time feature based on product flag
- include proper spi header file depending on kernel version
For details please refer to: https://gerrit.mot.com/2630767
Change-Id: I7d1e6e55ccde912442f11c71f1f92e5302318315
Reviewed-on: https://gerrit.mot.com/2637062
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Bruno Oliveira <brunosoe@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Capacity is not getting updated because of wrong status
being checked by update capacity. Force updating battery
status before reading it to decide about updating capacity.
Change-Id: I1d8f68d7fb855aa878284b34303d04ccf1c5c2ab
signed-off-by: brunosmp@motorola.com
Reviewed-on: https://gerrit.mot.com/2633986
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Miami is having a Kernel Panic when battery reaches 0%
while device is charging. Android system uses battery
capacity_level prop to control shutdown when device is
charging but battery reaches a critical level. Add
this prop to discrete charger driver.
Change-Id: I6a278ba0157a22a54ecedf0cf26f73361e711354
signed-off-by: brunosmp@motorola.com
Reviewed-on: https://gerrit.mot.com/2625350
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Bruno Oliveira <brunosoe@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
bangkk select the max current is beyond the sourcecap pdo.
Optimize the pdo max current when the pd power is lower than
18W.
Change-Id: Iaded43336951bcfbd9620d45a89c3517ccd058a9
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2638964
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Lei Chen <chenl18@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: I9befe0b38669af4085d268e3564d966ee16bfada
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2637539
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
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