Commit graph

2,522 commits

Author SHA1 Message Date
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
litong20
792c7174a0 Integrate goodix stylus Direct Data Access feature
In order to reduce stylus writing latency,MotoNote read touch data from
touch driver via goodix_pendev character device directly,this change
bypass the HAL layer and input subsystem.

Change-Id: Iccb121336992574f03fb89ff5cf4cc074ff3dc50
Reviewed-on: https://gerrit.mot.com/2247007
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-05-16 06:14:05 -05:00
hujing3
201dff4cec focaltech_0flash_v2_mmi: disable FTS ESD check by default
focaltech_0flash_v2_mmi
disable FTS ESD check by default

Change-Id: Ifccb02a5b2d7ecc346e9884c210436f5df5c0ed7
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2252208
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-16 03:22:54 -05:00
litong20
de4584117f Fix goodix touch driver build error
Fix goodix touch driver build error that variable defined but not
used and return value not match.

Change-Id: Ibded582ff67e524be8b148592e8577f4864417c8
Reviewed-on: https://gerrit.mot.com/2265448
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-05-16 01:18:32 -05:00
mahj8
0252f629d7 charging: only turbo charger enable FFC function
As D team discuss, KP require FFC function only enable
in turbo charging.

Change-Id: I76acfdf2caf33b841993d9cca348336fa7219e8d
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2268184
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-16 01:10:00 -05:00
mahj8
65ea3cf178 charging: config batt profile max fv
config batt profile max fv for FFC
function

Change-Id: I5f6200d7bc61525069de73b889dc727b0851449c
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2268183
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-16 01:09:50 -05:00
hujing3
f7f53bd5d0 focaltech_0flash_v2_mmi: gesture mode feature support
focaltech_0flash_v2_mmi: gesture mode support
support to enable gesture mode by sensor config

Change-Id: Ie101b341618b0d0f7b253603c372ae3e38c527af
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2266979
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-12 20:45:21 -05:00
weiweij
caf64803c0 wls-chg: change chg pad led to green when soc is 100
When battery so is 100, the led in charging pad should be changed
from blue to green. It depends on PPP command transmission. The
command is as following:
head -> 0x5
cmd -> 0x64
data -> null
And it gets the event from "battery"(could be changed in dts configuration)
power supply notification by register power supply "supplied-from" element.

Change-Id: If7978d97a6bdae51acbdcf7342719ab2facce6a8
Reviewed-on: https://gerrit.mot.com/2266476
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-12 02:57:58 -05:00
weiweij
7883e39b0b wls-chg: adjust some registers' addreess value
For original code from vender, some registers' address value
are incorrect. We should fix them as data sheet.

Change-Id: I52f68cd549b8b5bfa08f29168e7a99bb3d25fd4a
Reviewed-on: https://gerrit.mot.com/2265882
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-11 22:25:31 -05:00
weiweij
5024ad827a wls-chg: add tcmd test interface
Adding tcmd test interface, and meanwhile, adjusting some
file point name as tcmd requirement.

Change-Id: I0b1460545288f320a5b5ecfd430f1ca6f38a0845
Reviewed-on: https://gerrit.mot.com/2264522
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-11 22:25:21 -05:00
hujing3
7d652e6066 nova_0flash_mmi: gesture mode improve
devon: set touch state when enable gesture
to avoid panel reset when suspend

Change-Id: I7c8684bf3af42a9829c2bde9071eb6c3b7a65e96
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2265701
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-11 19:13:33 -05:00
hujing3
491f4e4523 ili9882_mmi:gesture mode improve
devon:
set touch state when enable gesture
to avoid panel reset when suspend

Change-Id: I874c9d7b8e5f7bb98afe38393bdd37c120260ba8
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2265698
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-11 19:13:27 -05:00
mahj8
2496d8de1f charging: vote PD ICL 3A when PD connected
As vote 500ma when PD active, it will load to ICL only 500ma
in main charger side, so need vote 3A when cp active.

Change-Id: Ia6ddb0632c5e61f90d7633dbc0ff871366f24875
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2264803
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-10 22:16:28 -05:00
mahj8
b3abad7222 charging: show turbo charger when PD connected
real charger type add PD charger type for showing turbo
when PD connected and defined bc1p2_charger_type only
for BC1.2 type, because rt_pd_manager need BC1.2 result
for usb enumeration.

Change-Id: I3cd856c887883ff13603a8660bbb40f0782097c4
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2264632
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Submit-Approved: Jira Key
2022-05-10 22:16:20 -05:00
hujing3
d84f9b679b focaltech_0flash_v2_mmi:update fw info when fw resume
focaltech_0flash_v2_mmi: update fw info when fw resume
to fix test fw download issue because of fw_length check

Change-Id: Ida2f21393ca741654228f7e9a2c4ba8ce2c3b026
Signed-off-by: hujing3 <hujing3@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2265462
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-10 21:51:13 -05:00
xieqiong2
0e0c7f3a01 devon:fix z350 detect issue for apple charger.
Z350 detect apply charger as OCP type.
So need to match the correct type in definition.

Change-Id: If5a5fbecf643cc18dff91ae137f2635529fe9f06
Signed-off-by: xieqiong2 <xieqiong2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2264873
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lei Chen <chenl18@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-05-10 21:50:48 -05:00
Guocheng Wang
f298e1bd95 charging:Ignore request dpdm
Add interface to set ignore sc89890h and bq25890
 request dpdm in factory mode.

Change-Id: Ie6dcf7990a0a258f6500a735f75d467c46d508b7
Signed-off-by: Guocheng Wang <wanggc6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2264918
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Wei <weiweij@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-10 20:29:41 -05:00
mahj8
3aa525eb21 charging: optimize rerun apsd for sc89890H
As sc89890H chip issue, need optimize rerun apsd
before setting force dpdm = true to fixed sdp connected

Change-Id: I9ab07f24cfc836e376b7313c120bef5f80f4c519
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2261041
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <wanggc6@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-10 04:52:43 -05:00
wanggc6
0b86b9c63d charging:Ignore request dpdm
Add interface to set ignore sgm4154x
 request dpdm in factory mode.

Change-Id: I0582008bebf57541c2a04d1073a9ef9c7d3797b6
Signed-off-by: Guocheng Wang <wanggc6@motorola.com>
Reviewed-on: https://gerrit.mot.com/2264484
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wei Wei <weiweij@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-10 02:44:02 -05:00
xuwt2
e12bf299f8 qti_glink_charger: Add WLC func
1, Add sysnode wlc_light_ctrl/wlc_fan_speed
2, Add NOTIFY_EVENT_WLS_WLC_CHANGE

Change-Id: I52f0ef0e26a8813d8b31534c2e6254749c140738
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2257842
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2022-05-09 21:45:36 -05:00
jixj
ab3a836a04 utags: Free allocated memory when rmmod utags.ko
These two memory are allocated when driver probe, and need free
them to avoid memory leak.

Change-Id: I0a875043e73598baca0436620c26c41750b8ce17
Reviewed-on: https://gerrit.mot.com/2261525
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-09 20:58:31 -05:00
jixj
f28c86729f utags: Free the device name buffer when rmmod utags.ko
If the device name can be expanded, it will allocate a buffer to store expand
name, so need free it when removing.
If not expand, it will keep use buffer getting from "of_property_read_string"
and this buffer can not free on our driver, so allocate a new buffer for it.

Change-Id: Id1c18ac7caae426319813f48d1a67366216fe630
Reviewed-on: https://gerrit.mot.com/2261463
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-09 20:58:21 -05:00
weiweij
97cfc95e6c charger: add wireless type judgement for healthd
For healthd's charge type judgment logic, we should set USB/online
as false when wireless charger connected. And set DC/WIRELESS type
as "wireless" at the same time.

Change-Id: I5397224e7432802891706b3b7facf79cb749cbd7
Reviewed-on: https://gerrit.mot.com/2263683
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-09 20:18:42 -05:00
weiweij
5062a34253 wls-chg: change name of the file point chip_id
For CQA test requirement, the name of the file point chip id
should be chip_id. And its result should be "0xXXXX". So we
will change this file point as requests.

Change-Id: Ic37fa0645c64a766960f0799e7aad7f469121491
Reviewed-on: https://gerrit.mot.com/2263347
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-09 03:01:02 -05:00
weiweij
170c7d9dff wls-chg: add force wls chg test interface
Add a file point interface to let tcmd could force wls
chg when usb&wls connected at the same time.

Change-Id: I545cc4d7ac8ffa562596ed85706b62fcacc718dd
Reviewed-on: https://gerrit.mot.com/2263182
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-09 02:54:50 -05:00
weiweij
58ea6b5c86 psy: add DPDM operation ignore option
For special factory test, USB DP/DM may should not be
operated when VBUS status changed. So we will add
DP/DM operation ignore options in power supply property.

Change-Id: I226c02cf126ecae9308804334c1bdbfb933d7bac
Reviewed-on: https://gerrit.mot.com/2263246
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-09 02:54:47 -05:00
weiweij
6a46f28d25 wls-chg: set fix register definition error
For original code from vender, some registers are defined
incorrectly. We should fix them as CPS4019's data sheet.

Change-Id: I2e5004a0578cbcd92ee046cea7e8d1af6e6900f3
Reviewed-on: https://gerrit.mot.com/2262811
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-09 02:51:21 -05:00
mahj8
110cccb3ac charging: optimize code for discrete charging
all mmi power supply defined in mmi_discrete_power_supply.h
to remove discrete defined in many files.


Change-Id: I41c978961072f7aedf398df0984467d3d7d089b1
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2261274
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Wei <weiweij@motorola.com>
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-05-08 20:40:01 -05:00
yanyh2
3717c3b14b Use delta OCV to limit the charging current
Use delta OCV to limit the charging current to improve the controlling
policy accuracy as battery SOC may be incorrect for FG issue.

Change-Id: I55eda8f32d833ece0b281732b34bd4357fbdb6ef
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2259903
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-05 02:35:10 -05:00
mahj8
d1bcd95c98 charging: optimize search charger capacity method
optimize search charger capacity method
for max watt pdo.

Change-Id: I8c065ea7961a17e0b4283266cdeb783d7ac1c411
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2258494
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-04 22:52:43 -05:00
mahj8
c6b1717bbe charging: add pd vdm verify IIO channel
add pd vdm verify IIO channel for getting
pd notify

Change-Id: Idd751759e30a631a70a5822ae01d7b068b90a6a0
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2258493
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-04 22:52:38 -05:00
mahj8
7c90ce4083 pd: add pd vdm verify notify passageway
add pd vdm verify notify passageway to
mmi discrete charger core.

Change-Id: Ia7989b11f425f86085e398bafdfd2b14e0d18c3a
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2258492
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-04 22:52:27 -05:00
mahj8
6a8548a3e6 pd: Add moto private charge protocol
To implement 68w fast charging , the adapter would be
provide the maximum 11v/6.2A APDO to phone.
In USB Power Delivery Specificatin, the PPS Source shall
deliver the Maximum Current only up to 5A,
therfore, to achieve 11v/6.2A APDO, the moto private charge
protocol need to be developed,
Use VDM(Vendor-defined message) to exchange the authenticaion
information between PD charger and phone.
and Use HMAC-Sha256 encryption algorithms to ensure authentication
security.

Change-Id: I5d7561fece060adfdb21d24de90277dddab10b55
Signed-off-by: mahj8 <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2252818
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-04 22:51:58 -05:00
weiweij
929f435aab wls_chg: add dependence for mmi_discrete_charger
For cps4019 driver will call the fucntions in mmi_discrete_charger,
so we should add the relatvie dependence.

Change-Id: I8dc350da427ca076c2be3feaa1e7390fd557edbf
Reviewed-on: https://gerrit.mot.com/2258487
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-04 21:13:51 -05:00
weiweij
c3f1b7cdec wls_chg: add charger class interface
Adding discrete charger symbol, to let wls4019 driver
could use interfaces in charger class. And the name of
main_charger is configured in dts file.

Change-Id: Ic74d77f6645c0b166feaafb3ee354b7d12323ccc
Reviewed-on: https://gerrit.mot.com/2255421
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
2022-04-29 04:12:06 -05:00
liujg6
9e4a81ebea wt6670f: use integer instead of floating point
kernel_neon_begin and kernel_neon_end didn't disable preemption,
then SIMD and VFP instructions will be executed in a non-preemptible
section.
Use integer instead will be safer and effective.

Change-Id: I02db0845fcbd135f25423f38c72c7a9d1622e450
Reviewed-on: https://gerrit.mot.com/2256755
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
2022-04-29 04:08:47 -05:00