Commit graph

2,557 commits

Author SHA1 Message Date
Haijian Ma
3fe2a866c8 charging: if pd active,don't detected HVDCP
Some 3rd charger support PD and HVDCP. The charger will send pd reset
when detect hvdcp and only send fixed pdo to AP. So don't detect HVDCP
when pd active.

Change-Id: I820f7ac1018d65ef02cf242ccabb2e8539c67f87
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2281956
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
2022-05-31 05:20:59 -05:00
xuwt2
949e1838bc factory: Add tx_mode_vout for factory testing
Add factory testing
Read vout of Tx mode

Change-Id: If33a0f3885b2b12ec6ab344f86593e0158eb4d45
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2284794
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haichao Li <liuhc3@motorola.com>
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-31 02:20:01 -05:00
hqjiangy
691a24cae8 TP charger mode[1/1]
touch IC is synaptics

Change-Id: I47342572c8dbfafe1d5743be81ad5e7bbd4d3abc
Signed-off-by: hqjiangy <hqjiangy@motorola.com>
Reviewed-on: https://gerrit.mot.com/2284688
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
2022-05-31 01:00:42 -05:00
hqjiangy
acbfb03049 TP gesture wake up[1/1]
touch IC is synaptics

Change-Id: I7057eacb50367790d142b9c948c1acc759d96e4b
Signed-off-by: hqjiangy <hqjiangy@motorola.com>
Reviewed-on: https://gerrit.mot.com/2284677
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
2022-05-30 23:55:08 -05:00
Haijian Ma
728097ddbe cp: add input voltage and current file node
add input voltage and current file node in charger pump
for HW debug

Change-Id: I297a28194b86ce249b105b7ca5a912756a9f5ae1
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2284652
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-30 22:49:40 -05:00
weiweij
9776b190b3 wls-chg: increase wait time for boost voltage
For 2nd charger IC(SC89890H), we found that it will take about
100ms to boost voltage. So we have to increase delay time to
wait boost voltage stable.

Change-Id: Icae4af50141188dfb89fefb5d1f1c0c75ae454ee
Reviewed-on: https://gerrit.mot.com/2283852
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-30 22:21:08 -05:00
Wenge Zhu
661042eff0 Fix kernel trace when execting mutex lock
Init mutex lock before use or will cause call trace:
05-17 16:54:07.141 1504 1504 I Call trace:
05-17 16:54:07.141 1504 1504 I : __mutex_lock+0xc7c/0xdcc
05-17 16:54:07.141 1504 1504 I : mutex_lock_nested+0x4c/0x5c
05-17 16:54:07.141 1504 1504 I : cyttsp5_sensor_set_enable+0x4c/0xac [parade_tma5xx_mmi_core]
05-17 16:54:07.141 1504 1504 I : sensors_enable_store+0x88/0x104 [sensors_class]
05-17 16:54:07.141 1504 1504 I : dev_attr_store+0x38/0x8c
05-17 16:54:07.141 1504 1504 I : sysfs_kf_write+0xa0/0x100
05-17 16:54:07.141 1504 1504 I : kernfs_fop_write_iter+0x1b0/0x2f8

Change-Id: Ib1812c5a1b5b0e2fdb9b620dc26a256b3feb0fcf
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2283850
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
2022-05-30 04:44:28 -05:00
Wenge Zhu
a17c871168 Fix CLI touch easywake failure
Before read touch report data from touch IC when in easy wakeup state,
wait for I2C bus controller to wake or I2C communication will fail.

Change-Id: I8e33fac59b089f46bd71c2361ca7396d1ae8ac5b
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2282270
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-30 02:35:19 -05:00
Haijian Ma
fb5f11ae52 charging: optimize PD capacity select algorithm
In order to be compatible with more 3rd PD charger, optimize
PD capacity select algorithm.

Change-Id: Ieab59321a9ca300bb1e12b1f7b6a12d0f4ade707
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2280621
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
2022-05-29 22:54:17 -05:00
qiurp1
6b6e05c2cb rtwo: add log
fix issuse:variable 'ret' set but not used

Change-Id: Ib25d5b56f02eb3c5a23e088739b72c44bdb058eb
Signed-off-by: qiurp1 <qiurp1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2282049
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
2022-05-27 10:05:22 -05:00
wingte49
c32d8edb54 motorola:Rhodec:Update chipone_fhd_mmi
Modify:
 Prevent the module from being disconnected when starting up.


Change-Id: I6f4cbe2d24ec9673f38b0b0589aae323f6b7c240
Reviewed-on: https://gerrit.mot.com/2279582
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-27 05:11:12 -05:00
longc130
5494085c90 Devon:Optimize The FPC Power-on Process
By fpc power-on hw test:rst and vcc power-on time interval 
error rst and vcc power-on processtime interval error

Change-Id: I445422795d98278f2b4941e47c502504d1bccea8
Reviewed-on: https://gerrit.mot.com/2272241
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: liujian <liujian24@lenovo.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-27 01:37:56 -05:00
Wenge Zhu
cfa37b64df Fix goodix touch SPI config compile error
Moto driver module compiled using qcom makefile from 8450/8475/8550 and
it does not support KERNEL_CFLAGS,so in these plaform we use
KBUILD_OPTIONS.

Change-Id: I6dbcf28b194201ac19a40e891683acc667893b34
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2281001
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ping Xiao <xiaoping@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-26 08:12:00 -05:00
Deng Wei
fc65cf4672 tundra: input touch use boottime to get timestampe
use boottime
to get timestampe

Change-Id: If5f678b542a4a9b2b46ea5ec6b263510cc16ea94
Signed-off-by: Deng Wei <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2279515
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-25 05:15:55 -05:00
qiurp1
a90e01d022 ONELI: add sar sensor log
add sar sensor log

Change-Id: I73bfb9692316d26971e04ff894ab104accb63181
Signed-off-by: qiurp1 <qiurp1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2279259
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
2022-05-25 04:37:05 -05:00
Haijian Ma
1126a1c7e3 charging: reset dpdm when charger removed
The issue is HVDCP charger inserted and removed, and then OTG
device can't connected. Because dpdm don't auto reset in bq25890H.
So reset dpdm when charger removed.

Change-Id: I8a145379de10310e02b356c60d1cc25c87e513f8
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2279387
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-25 04:27:46 -05:00
longc104
77d1c0a0e9 rt9471 not charge 3min during a complete charging test
rt9471 charge state is chg done when charge pump quit
set rt9471 charge state eoc reset

Change-Id: I1828cdb2df7a625205807bb295bd9ada51551237
Signed-off-by: longc104 <longc104@motorola.com>
Reviewed-on: https://gerrit.mot.com/2278315
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-25 03:41:45 -05:00
hujing3
5f3dc5f3a1 focaltech_0flash_v2_mmi: enable FTS_PATCH_COMERR_PM for deep sleep
focaltech_0flash_v2_mmi
enable wait mechanism for bus deep sleep

Change-Id: I7a6d0b65ce5a64b879c5957b9016036450c28623
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2278268
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-05-24 22:01:02 -05:00
Haijian Ma
cc4f1a773d charging: add config charger mode to FG
As mm8013 fg need charger mode info, so add config charger
mode to FG

Change-Id: I70758ccdc6ce0328cf4e7959782d77df7a282cf9
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2274890
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-24 21:40:37 -05:00
liuyc20
fd90788699 fg: add api to write temperature/chargeType to fg interior
apply to fg FW V 0812
need write tepmerature/chargeTyep to fg interior when charging

Change-Id: Ic5faba103e11ab1143234d297cd4f9dfe2574a93
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2272161
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
2022-05-24 21:40:31 -05:00
Haijian Ma
7c7177a3a4 Revert "charging: Don't switch dpdm from AP to pmic when host mode"
Revert first,
because build error

This reverts commit 07a95e30fedd835de2e1b0f2a61a0cd9e23fa10b.

Change-Id: I42232ac2bff46e2808d7b0c26f30c021da8df4ee
Reviewed-on: https://gerrit.mot.com/2279036
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-24 21:39:33 -05:00
Konstantin Makariev
dc8383a32c drv8424_mmi: relative positions, gpio init and reset
Fix for relative positions location. Peek position is farther
from Extended than Compact. Init state can be defined in device
tree to properly initialize GPIOs. Sensors data check became
optionally configurable via device tree property.

Change-Id: I7e31801d86e782e1ac7f5bdd3df0ef6cde7b6b0a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2271623
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-24 15:15:51 -05:00
weiweij
0732d05b33 wls-chg: change psy/voltage_now's value to vout value
For the file pointer of psy/wireless/voltage_now, it should be the result
of VOUT value. If we use the result of vbus(from usb/voltage_now), it
could not distinguish between the result from charger out and the one
from wireless out. Meanwhile, the required voltage unit is 0.1mV. So
we should make the result by 10.

Change-Id: Ibf6e657da8bd594985c64cf2aabe004b153e78ea
Reviewed-on: https://gerrit.mot.com/2278185
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-24 05:06:50 -05:00
Yan Zhang
86843361fe Add timestamp log for FOD debug
Tundra:
Add timestamp log before and after image capture for
debug ICON issue.


Change-Id: Iec96b515c2c62b97cf4b6b865aa4d9c9df0d84b5
Signed-off-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2277879
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2022-05-24 04:15:16 -05:00
hujing3
99e6f06fc2 focaltech_0flash_v2_mmi: disable FTS debug config by default
focaltech_0flash_v2_mmi
disable FTS debug config by default

Change-Id: Ib6b0fda454e56053db8e1f3b564abec6327ee38c
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2278176
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-05-24 03:44:40 -05:00
hujing3
45f76c2fcc focaltech_0flash_v2_mmi: single tap gesture not work fix
focaltech_0flash_v2_mmi
fix single tap gesture feature, remove invalid gesture invoke

Change-Id: I269a51346c40a4cc4409378342e29073d7e0acf6
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2278143
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-05-24 03:44:34 -05:00
mahj8
9554e1f581 charging: Don't switch dpdm from AP to pmic when host mode
The charger is inserted when usb is host mode, as charging want to
switch dpdm for detecting charger type, urb communicate error.

Change-Id: I938d80bc3428add5a7a1d82d4631cbffdaf1ce71
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2273301
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
2022-05-24 01:40:04 -05:00
hqjiangy
9293c0bd41 TP bring up[1/4]
touch IC is synaptics

Change-Id: I5cc6c211d1a157967666c2d9bf910b0bde0d3541
Reviewed-on: https://gerrit.mot.com/2267911
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: <hqjiangy@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2022-05-24 00:43:35 -05:00
Yonghua Yan
0769972de6 Add charger power watt uevent
Support charger power watt uevent to notify BatteryService
the charger power capability.

Filter uevent by uevent message POWER_SUPPLY_POWER_WATT=
to parse the charger power in watt.

Change-Id: I9Montana081355e68b281825476d241f570d3118c5fb
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2276713
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-23 04:13:19 -05:00
dengwei1
473692abb9 tundra: input touch add sample rate
add
sample

Change-Id: Ic00991b8358c696dd7bbb8326d1b276d73fcbfe9
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2271092
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-22 21:12:02 -05:00
Wenge Zhu
bb5af1188d Lift off current touch when suspend
Lift off current touch when suspend in case after resume still receive
last touch data.

Change-Id: I2c7e7824d724534af45d88880d08d314e9e9a23c
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2274865
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-20 03:11:51 -05:00
weiweij
8c1a4feee8 WLS_CHG: change fw upgrade judgment
When the chip is blank, the value in ver&id register wiil
be a random value. So we could not judge fw status just
by version. We should also check chip id register. And to
avoid user version fw missing problem, I will check fw
not only in factory mode.

Change-Id: I51269a4489062ebc23beee362aac987bc9da8f49
Reviewed-on: https://gerrit.mot.com/2274673
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2022-05-20 02:47:04 -05:00
dengwei1
cfe7cfbe38 tundra: input touch fix gki issue
fix gki
issue

Change-Id: I19432333e40d9978e33c80511efd5347a994e953
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2274541
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-20 00:05:27 -05:00
weiweij
df8702a208 wls-chg: add fw ver judgment for blank chip
For cps4019, when there is no fw in chip(blank chip), its version
may be 0xB4B5.0xB6B7. It is larger than normal version number
(for example, 1.2). So fw update judgement should consider this
situation.

Change-Id: I033ab39837f85fab9d1d1e1694d0b3fb972a375d
Reviewed-on: https://gerrit.mot.com/2274466
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-19 21:47:20 -05:00
Haijian Ma
496a6958d1 bms: add charge counter in mm8013
As CTS test, need add charger_counter file node
for mm8013

Change-Id: I3e90679f50eaf8d3891867ef240a170dca702815
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2273595
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-19 21:27:57 -05:00
jixj
2e56ea884d Integrate mmi_device_is_available() into mmi_check_dynamic_device_node()
mmi_check_dynamic_device_node() uses of_find_node_by_path() to get device
node so that mmi_device_is_available() can use this node to find where is
"mmi,status".but need use of_node_put() to put this node in there drivers.
So move "mmi_device_is_available()" into "mmi_check_dynamic_device_node()"
and put the device node at the end.

Change-Id: Id42e73b844ef6928ebea673dcd7f9c57c8804f8b
Reviewed-on: https://gerrit.mot.com/2271017
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2022-05-19 20:02:02 -05:00
jixj
f1c46d33ce mmi_info: Add missing of_node_put()
of_find_node_by_path() returns a node point with refcount
incremented and need use of_node_put() to decrement refcount

Change-Id: Ib1cbdc4c40b1ea5e9bfc1c5d02ddd231185a42b1
Reviewed-on: https://gerrit.mot.com/2269870
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
2022-05-19 20:01:48 -05:00
Yonghua Yan
e9dcdc46e0 Check return of regulator_enable
Check return of regulator_enable to avoid compile issue
for in some build environment.

Change-Id: I49e64662959c2f5e57909901ae3c373ae57b3e08
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2273786
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-19 07:34:57 -05:00
xieqiong2
81067e6616 charger:add the handle for quick plug out/in case.
While the quick plug out/in happen, the detection of bc1.2 happens very
early and no irq received even, and it starts detection hvdcp quickly.
So need to handle the special case for hvdcp detected result for bc12
and the subsequent qc3p detection accordingly.

Change-Id: Ic9558b9490963f585163ae29a9903ba6831abddf
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2273497
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-19 05:40:16 -05:00
Yonghua Yan
e4e70fc2b3 Turn off load switch during charging
Turn off load switch when charger is attached and paired
battery is under charging, but not discharging.

Change-Id: Idbd2824c85a43175b8030eeb2e0af2e7a400f27e
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2273610
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-19 03:34:29 -05:00
Yonghua Yan
949abff4c6 Improve cw2217b fg driver compatibility
1. make it compatible with Android S build environment
2. add optional i2c pullup power regulator
3. make battery current polority selectable from DT
4. make the power supply name configurable from DT
5. use battery temperature for battery present detection

Change-Id: I326688b499296e3c99ebde67632af90edac092c1
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2269111
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
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
2022-05-19 01:35:40 -05:00
zhuwg1
210f570c86 Optimize high report rate feature
Support config different touch report rate by product,
search corresponding report rate command in config struct according to
refresh/interpolation config and then send it to IC.

Change-Id: Ieff127e4b1e6dbb18fdda5deca91972326ebbb9c
Signed-off-by: zhuwg1 <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2258273
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-05-18 22:30:06 -05:00
weiweij
7737ad1aa5 WLS-CHG: ADD usb icl vote for wls chg
For wls power off charging, main charger driver will start before
wls charger driver. As a rsult,  it could not get wls present status
at the beginning of power off charging.  So we should check
wls presentation before USB ICL voting. And set ICL as defined.

Change-Id: Ibc846d907ce2deb85aeb787fcdd7427dd8ebc2e6
Reviewed-on: https://gerrit.mot.com/2272083
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-18 04:51:31 -05:00
mahj8
4a36724c7e charging: config vindpm by dts
change code logic to config vindpm
by dts. Default value is 4600mv;

Change-Id: I531c7b23acd664b9c63870281d779dba8a263662
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2270958
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-18 03:53:10 -05:00
longc102
0c797318a4 DUT keeps vibrating after connecting to computer via USB
charging with CDP will stop charge when battery volatge is high
use dynamic vindpm tracking voltage when CDP charging

Change-Id: I31434a85963c605126930a5d0f29dd46eea43b8f
Signed-off-by: longc102 <longc102@motorola.com>
Reviewed-on: https://gerrit.mot.com/2269909
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-16 21:51:48 -05:00
Konstantin Makariev
2be78db15c touchscreen_mmi: active region interface
New interface to set/get touchscreen active region parameters. This
interface intended for use by Rollable Display HAL

Change-Id: I78e99893ff9b694ea61143e8d79311954840aa6b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2237772
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2022-05-16 15:28:57 -05:00
Konstantin Makariev
7d1b945671 drv8424_mmi: enable gpio init
Added pinctrl state allowing for initial GPIO configuration, e.g.
function, signal strength and pullups. This feature is controlled
via device tree option. Pinctrl state must be called init_state.

Change-Id: I9af30ab15845fb3db122aead96389443b9d6d707
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2270421
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2022-05-16 15:22:27 -05:00
Konstantin Makariev
0b1073803f drv8424_mmi: position detection and sensor data
Position state machine added. Current position detection will be
attempted on power up. Added sysfs interface for hall effect
sensors data. Added destination position to validate every move.
Defined default stepper sequences for major moves that can be
altered if necessary.

Change-Id: I304c7de05347267f1031fedde9d014779afc933b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2256131
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-16 14:22:16 -05:00
Konstantin Makariev
a6b014440f goodix_blr_mmi: active area support
Stub functions to support optional active area region. This change
is for demo purpose only and serves as low level support for touchscreen
class driver

Change-Id: I50a3ae10cb76a5c59ff82cec028f812bf93c676e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2269390
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-16 14:22:05 -05:00
Konstantin Makariev
ba8e3d9922 drv8424_mmi: fix makefile to build for android s
Makefile needed some changes to allow building for Android S

Change-Id: Id8c0756321d1048b84bdda293030e2c23a1d29ce
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2259618
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-16 14:21:31 -05:00