Commit graph

2,276 commits

Author SHA1 Message Date
xuwei9
dc46dba653 QC3P:ADC algorithm compatible
ADC algorithm compatible design
for bq and sc chip.

Change-Id: I055e965d5d4d6eaa640f801a89c8ad891d2f2eb2
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2139264
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-10 21:05:12 -06:00
xuwei9
3f6de0b277 QC3P:copy of module mmi_parallel_charger_iio for mmi_discrete_turbo_charger
Code copy from mmi_parallel_charger_iio for the
initial code repo of mmi_discrete_turbo_charger
which used for discrete arch qc3p feature.

Change-Id: Ic0d302f084ee6f192c76ce3c6eaaa7276639c8ef
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2137095
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-10 21:04:50 -06:00
litong20
b75bcbf8cf goodix: support film sensitivity function.
TP:
Support film sensitivity function in RoguePRC project.

Change-Id: I830adb55e9b9b93aef6dc90d757ef9eaf206a2cb
Reviewed-on: https://gerrit.mot.com/2134201
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-10 09:00:15 -06:00
litong20
dae8b800e2 Support report rate switch in RoguePRC
1. If the interpolation mode is disabled, the report rate is the
default 240Hz(Hiphic) or 360Hz(Hiphi)
2. If the interpolation is enabled and the refresh
rate is 144Hz, the reporting rate is 576Hz(Hiphic) 720Hz(Hiphi)
3. At other refresh rate, if the interpolation mode is enabled, the
report rate is 480Hz(Hiphic) 720Hz(Hiphi).

Change-Id: Ibcd6ba61457e5e5f6fd32a6583f5bdcada531fc5
Reviewed-on: https://gerrit.mot.com/2134669
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-10 08:59:57 -06:00
dengwei1
845fbe13a9 dubai: vibrator add long brk
add
brk

Change-Id: Ib9ddd71b1c6e80c62b583a27c3ac53ed87ac610f
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2140965
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-10 03:16:27 -06:00
chailu1
4a72bb6b5a PD: Pick Richtek patch13 to improve irq response speed
Revise from irq handler & queue worker to irq thread handler

/**** Release Note ****
 * 2.0.6_G
 * (1) Revise IRQ handling

Change-Id: I5072850f6645fc7f9bda0b985cc6555f81b51c12
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2137060
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-09 21:10:18 -06:00
chailu1
b9fcc4bd40 PD:Revert "(CR):rt1715:add debugfs interface for dump reg"
richtek default support reg dump feature at /d/rt-regmap
so revert this changes and keep richtek default configure.

This reverts commit 7bbb1dcedc862205420cbabe00d2f4134de27f6e.

Change-Id: Id1cca8463c4411aa337d36b2938bf2eb32da4f72
Reviewed-on: https://gerrit.mot.com/2137059
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-09 21:10:14 -06:00
chailu1
4b0c1b930e PD: pick Richtek patch12
/* Release Version
 * 2.0.17_G
 * (1) Add CONFIG_TYPEC_LEGACY3_ALWAYS_LOCAL_RP
 * (2) Fix a synchronization/locking problem in pd_notify_pe_error_recovery()
 * (3) Add USB_VID_MQP
 * (4) Revise the return value checking of tcpc_device_register()

Change-Id: Id6ed12910d2204f2f6e1d57be9547b6820132791
Reviewed-on: https://gerrit.mot.com/2137058
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-09 21:10:09 -06:00
liuyc20
2828296591 FG: power_supply_property get rt9426a battery info from local value
1.when plug the USB cable, charger policy will trigle to get POWER_SUPPORY_PROPERTY
For rt9426a fg getting power_supply_property vaule by read i2c data, that will
make i2c busy and affect the PD sink.

2.remove useless debug info

Change-Id: I2ebee58e1deb9e0d4eeb4d3fa01b731fc0385ffc
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2139569
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-09 03:16:13 -06:00
dengwei1
099f74a3fd dubai: input touch support fod
support
fod

Change-Id: Idcf036159065de4c67388ce0df422ca84e359845
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2139348
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2021-12-09 02:15:54 -06:00
huaqin79
0678779d3b sar: aw9610: Modify sar sensor voltage.
The power supply of sar sensor is changed from 1.7v
to 2.8v to solve the problem of voltage jump

Change-Id: Ia731c372ddce703743d3966ddf7e185e5225cb06
Signed-off-by: huaqin79 <huaqin79@motorola.com>
Reviewed-on: https://gerrit.mot.com/2138719
Reviewed-by: Hong Zhang <zhangh12@motorola.com>
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-08 04:30:28 -06:00
tinno15
1eafe6d9fe moto regulator vibrator: fix null pointer bug
vcc is null while chip is pwr_by_gpio
Add condition to avoid the crash.

Change-Id: I3de63bcf0c17954fb0bfc99767326c9dac34742a
Reviewed-on: https://gerrit.mot.com/2136306
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: <tinno15@motorola.com>
SLTApproved: <tinno15@motorola.com>
Submit-Approved: <tinno15@motorola.com>
Tested-by: <tinno15@motorola.com>
Reviewed-by: Zhenghai Pan <panzh2@lenovo.com>
(cherry picked from commit 07fa0fbff4a0fef6b483d35ddf4c4c74daf658d2)
Reviewed-on: https://gerrit.mot.com/2138542
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
2021-12-08 02:47:57 -06:00
mahj8
c59e7704a2 charging: config ICL after BC1.2 done
Third charging ic IINLIM bits will be changed auto
when BC1.2 done. So we need to Ignore the Rp
changes unless BC1.2 done.

Change-Id: Ib04c9702af17c0540ca8014f4ebaeb3dcc084b66
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2138036
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-07 19:30:15 -06:00
xuwt2
c5b96b7810 qti_glink_charger: Add wls_notify_callback
Registe wireless_charger_notifier to listen wls_event
from ADSP through QTI_GLINK.
Add rx_connected notify callback

Change-Id: I96a8a4979a1f1943d0449dfcfcfeabb4a3f5d485
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2137107
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Submit-Approved: Jira Key
2021-12-07 05:51:43 -06:00
xuwt2
3519c7bfa7 qti_glink_charger: Add folio_mode
For support moto folio accessory.
Enable folio mode when moto folio attached.
Add folio_mode to qti_glink_charger.

Change-Id: I98a81e1438c370c8762425765b978e4a9b5ac43b
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2136258
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Submit-Approved: Jira Key
2021-12-07 05:50:31 -06:00
xuwt2
1002584fa4 qti_glink_charger: Add wls input current limit for thermal
Add wireless_input_current_limit sysfs node
for thermal mititagion
/sys/class/power_supply/wireless/device/wls_input_current_limit

Change-Id: Id16344fd882d35e6cae1da3647ee53300898b69d
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2134720
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-12-07 05:47:35 -06:00
chailu1
1420b9f83b PD: config pd active is inactive status after cable plug out
Config pd active is inactive status while cable plug out happen.
then after cable plug in could first run mmi_pd30_start() then
run mmi_set_pd30_cap(). otherwise perhaps only run mmi_set_pd30_cap()
and pps will fail so charge adapter only out 5v/3A mode.

Change-Id: I6d3a186f4b7d47d62d2a3d34ca808a8a88936db0
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2134594
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-06 20:55:05 -06:00
huaqin87
51a6fb42cb wt6670f_qc3p: qc3p wt6760 isp download function
charging qc3+ wt6670
import blank firmware upgrade function

Change-Id: I5b7a949fb6063607e9e91a23aed60a34d1348918
Signed-off-by: huaqin87 <huaqin87@motorola.com>
Reviewed-on: https://gerrit.mot.com/2133354
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ying Xu <xuying9@motorola.com>
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-06 19:59:09 -06:00
mahj8
1d6b347ce3 charging: add sem lock to protect dpdm detected
In some case, quickly remove and insert qc3 charger, it can't detected
qc3 charger, so need to add sem lock to protect dpdm
when qc3 detected.

Change-Id: I4cef829648a7e09edabbedb71fcd868064fd5bb9
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2136191
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-06 19:15:24 -06:00
liuyc20
98374fea4d FG:cw2217 Remove the redundant msleep in the read i2c operation
For fg driver, i2c reads will be called very frequently,
the redundant msleep causes system loss and a large number of task scheduling

Change-Id: I7237ea17cf1ee92069046beeda75a67e8bbff7a6
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2136133
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-06 05:44:00 -06:00
Wesley Cheng
3086dfec24 FROMGIT: usb: gadget: f_mass_storage: Disable eps during disconnect
When receiving a disconnect event from the UDC, the mass storage
function driver currently runs the handle_exception() routine
asynchronously.  For UDCs that support runtime PM, there is a
possibility the UDC is already suspended by the time the
do_set_interface() is executed.  This can lead to HW register access
while the UDC is already suspended.

Mot-CRs-fixed: (CR)

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

Bug: 204343836
(cherry picked from commit 9fff139aeb11186fd8e75860c959c86cb43ab2f6
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
Change-Id: I6c8011baddf02d6b0eadb5934416bc24b8a93f4a
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
(cherry picked from commit 8c9d9d8e44aa69102ed589e66a55e6ef93b834ef)
Reviewed-on: https://gerrit.mot.com/2135845
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-12-06 03:15:16 -06:00
zhangh12
def94f695a sar: aw9610: the reference channel can't be seen on user layer
ref_channel will be tested failed on factory, it should be filter for user,
add "ref_channel" on dts, it won't be registered to sensor_class.

Change-Id: Ibc5c927d5441665066aba990ecab36dbd7d03e47
Signed-off-by: zhangh12 <zhangh12@motorola.com>
Reviewed-on: https://gerrit.mot.com/2134407
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-06 02:33:14 -06:00
sheqihao
a550379e0b bias/ocp2138:add support ocp2138 bias ic config
Modify:
Porting Bias ocp2138 Code

Change-Id: I123c66bcfdcdc1918f299592a1b8b3970b408f3f
Reviewed-on: https://gerrit.mot.com/2134697
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-04 19:46:59 -06:00
liuyc20
4bfd0faa1a fg: cw2217 add ui_soc feature
we can modify ui_full to adjust  showing 100% limit
The default ui_full is 100, that is hard word.
config it to dts file,that can suit for muti-project

Change-Id: I2a44e28eb1bf1bc7dc66e589331a193fb9c174c7
Reviewed-on: https://gerrit.mot.com/2134308
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-03 03:03:59 -06:00
litong20
6a05847226 IC needs to confirm the device within 50ms after power-on
Goodix IC requires device confirm within 50ms after power on.
If this time exceeds 50ms, the i2c firmware will colse the
spi channel, and the spi firmware will close the i2c channel.

Change-Id: I178cea55e280ffb53fca444cdd8ed32905a928c5
Reviewed-on: https://gerrit.mot.com/2133988
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-12-02 23:37:02 -06:00
litong20
154ec7b967 No need to send the suspend command when power off.
When entering the deepsleep state, touch IC will power off,
so there is no need to send the suspend command.

Change-Id: I6b6a3b29eb3b1acee6c72db2b97fdb90710f25bc
Reviewed-on: https://gerrit.mot.com/2134059
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-02 23:36:49 -06:00
Yuecai Liu
b730a4bd1e Revert "(CR):power: cw2217 add ui_soc feature"
parse dts ui_full parameter fail, 
probe will return.cw2217 driver will can't start.

This reverts commit f835f3a289218791d40a56d06ac32ad5b1fd4aea.

Change-Id: I19a175cc0703e95444415e99848dae55d8861325
Reviewed-on: https://gerrit.mot.com/2133214
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-02 03:51:20 -06:00
wutao
cbbded7657 bq2597x: bq2597x cp_enable interface does not work
bq2597x cp_enable interface does not work,the interface name is worng;
so change to PSY_IIO_CP_ENABLE

Change-Id: I9851dc7933680f9fcc727c362d16fb7777b1ee31
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2133077
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-02 03:02:20 -06:00
wuwl10
3ca68e2cf9 dlkm: sec_nfc: add samsung nfc driver
Rhode 5G + will use samsung rn4v NFC controller.
Add sec driver for it

Change-Id: I5c88e07953fec45b458d47b803a3afd119ee9f10
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/2131748
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ningkai Zhuang <zhuangnk1@lenovo.com>
Reviewed-by: Xu Du <duxu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-01 20:44:08 -06:00
liuyc20
af6293f942 dlkm: sd77426 driver add soh api
- add soh api, init age=-1/cycle_count=-1
- modify chinese comment to english

Change-Id: I321b3149b2a3682c344fe4efe1f5a6bbb2201725
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2057831
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-01 20:11:58 -06:00
liuyc20
6308309340 power: cw2217 add ui_soc feature
we can modify ui_full to adjust  showing 100% limit
The default ui_full is 100, that is hard word.
config it to dts file,that can suit for muti-project

Change-Id: I6aa2e7567e2ed91a8ac1c24be53c5aa471a4c7e7
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2124577
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-01 20:10:53 -06:00
wangyq13
9d79305032 goodix_v1510_mmi: check if panel is available
- Check if panel is available, if not, don't probe, save boot time
- Set avdd to 3v, same as other touch driver.

Change-Id: I34711276c2e5efcf1acc9421db2e347d95f2b41b
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2131131
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-01 01:28:36 -06:00
wangyq13
cac6221ab1 focaltech_v2_mmi: check if panel is available
focaltech_v2_mmi:
Check if panel is available, if not, don't probe, save boot time
and don't disturb other touch driver operation.

Change-Id: Ib4db6f77fc458970dcc42fd7460ee3a800e3ff47
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2131110
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-12-01 01:28:28 -06:00
mahj8
177bfbe63a bms: do battery power supply change when fg update data
fg data can't update to user space timely, because fg driver only power
supply change the bms psy. So need to change to battery psy to update
data.

Change-Id: Idd39efd3790b6e80b473a8048827663d5a61851d
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2131783
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-01 01:12:21 -06:00
liuyc20
0df380501b Power: remove "\n" about mmi_discrete showing factory test node
"\n" is invalid char for
test case.

Change-Id: If15673f6a229ab9f56ae3c97fa676ef8c90a2695
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2130777
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-30 20:44:08 -06:00
mahj8
50231385d2 charging: add charge counter prop
As VTS require, must to add charge counter prop
in sys/class/power_supply/battery

Change-Id: Iad117f5bd7261ed435c5b6704a6242181245da75
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2130897
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-30 04:19:26 -06:00
wangwang1
1f977a8a0b kernel:export interface tcpm_inquire_typec_remote_rp_curr
tcpm_inquire_typec_remote_rp_curr is only used when kernel version < 5.4, which
is referenced in rt-pd-manager.ko.

Change-Id: I512071ac39537276701cb17261a03f58a7f14b48
Reviewed-on: https://gerrit.mot.com/2130450
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
2021-11-30 01:36:04 -06:00
mahj8
3cc6a1b4ff charging: modify heartbeat cycle to 100s
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.

Ported_from: (CR)

Change-Id: Ic24bfc8a4291761f4681e0464e7afd94b9239bd2
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2129919
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Vijayakumar Gn <vijaygn@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2021-11-29 23:51:06 -06:00
mahj8
a50c9fcd46 bms: modify battery capacity unit from mah to uah
As VTS test failed, need to modify battery capacity unit
from mah to uah.

Change-Id: I04b24e6d564917b1a0af06c12eeec5351ae38048
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2130441
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-11-29 21:30:48 -06:00
mahj8
0d91c148b4 charging: remove useless power supply prop
As VTS test failed, need to remove useless
power supply prop

Change-Id: I497bde2a0b61645284daf00b89f28a80faae8748
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2130440
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-29 21:30:41 -06:00
mahj8
3974bb7b3f charging: remove FULL status in charging ic driver
As moto charging FULL status judge in SW policy, so we must remove
FULL status in charging ic driver.

Change-Id: I881b1464bdeb9e9c6599dee15d33189c6b4d1594
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2128758
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-29 21:29:25 -06:00
Bernie Moreno-BERNIEM
c17e04702f power:fet_control ironmn: ps prop usb type BRICKID
Ironmn cold-boot with charger or usb connected tocharge port is
identifying ps_prop_usb_type brickid, apple charger. fet_control
was not handling this charger type.  Why the incorrect detection
is happening needs to be investigated, but battfet control will
now handle all usb_type cases.

Change-Id: I5356ee108e2a2430b434311dd5b2cfaa225b89ac
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/2128139
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-29 09:05:57 -06:00
chenglong1
814dd527c9 regulator: Force shutdown all regulators when system power off.
Add shutdown procedure for WL2864C and force disable all regulators when
system power off to avoid unexpected current leakage.

Change-Id: Ia92782a7baa2599fd6be1a7c62d5f747f10340ae
Signed-off-by: chenglong1 <chenglong1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2128240
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Shuo Wang <wangsh18@motorola.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: <huqian4@motorola.com>
Reviewed-by: Xingyun Fu <fuxy7@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-11-26 07:29:52 -06:00
mahj8
cc8cb1e520 charging: stop charging when capacity > upper_limit
As some discrete charging ic can't suspend usb, so need to disable
charging when capacity > upper_limit. I think it don't effect any scene
in pmic charging solution product.

Change-Id: I2f794cd81371169ea29e2e2918ad47430132415f
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2128317
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-26 04:37:46 -06:00
mahj8
560d51d21f charging: fixed otg boost current limit error
The default code use the error mask, so sgm41542 otg boost
current limit set error.

Change-Id: I97647e99a1dc6b35e01e523860b7642d88f40961
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2127194
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-25 00:27:42 -06:00
litong20
c7ab15c6bf Add pm_qos control to reduce the interrupt responce time
request pm_qos during the interrupt processing to prevent
the CPU from going to sleep state.

Change-Id: I95728329c7df7a4376415b9d8ec20d6525fe45c8
Reviewed-on: https://gerrit.mot.com/2124280
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-11-24 06:21:18 -06:00
tanhua1
87f9105584 wl2868c: modify ldo2 and ldo6 default voltage
modify ldo2 and ldo6 default voltage
ldo2: 1.24v
ldo6: 2.8v

Change-Id: I70493791ad55c4f66114e1de2691e9ebe144deb1
Signed-off-by: tanhua1 <tanhua1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2126124
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-24 03:41:15 -06:00
mahj8
b858c92c54 charging: fixed the error HVDCP voltage standard
As change the get vbus voltage api from BQ25890 to Main PMIC, 
so need to change the HVDCP voltage standard

Change-Id: I5e175b0a5019b3b69810539f21c11b1a26764f84
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2126099
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-24 03:28:15 -06:00
mahj8
55c3b6d4b8 charging: set register 3250ma when icl >=3A
As TI bq25890 chip accuracy issue, so when policy set icl >=3A,
we need to set 3250ma at register for BQ25890H

Change-Id: I74cd75fdae300b50a8a9581b751dff6890258e11
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2125735
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-24 03:28:07 -06:00
xuwt2
701b7cbb08 smart_pen_charger: Add pen_status and pen_error notify
Add sysfs_notify()
Report notify when pen_status and pen_error changed.

Change-Id: I45fda6a759b35f93c736f278054994fd23f5e89d
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2111243
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-23 06:19:59 -06:00