Add and remove the sysfs files when usbnet configures the
ip by host PC.
When this sysfs files are ready, it means ip config received
from host PC and the phone can configure the network interface.
Change-Id: I2dabc4693d5e698e0c4853d0fa9d06e454ba7875
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2306945
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Always power on eSE to avoid eSE not open
issue
Change-Id: I46c9697fb329eb259759d2c461eec8cfd5782cf7
Signed-off-by: zhuangnk1 <zhuangnk1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2307741
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
Set charging status to discharging if charger absent
in case FG report confused status.
Change-Id: I95194b19750eb5af422ebb05f5937ca18a15a61c
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2301533
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
the first_batt_param_ver and second_batt_param_ver maybe different.
so we need match battery_id && param_ver when update parameter.
Change-Id: I474d711b9d83286ed6c5e1c1a19ae3d30e2b1319
Signed-off-by: liuyc20 <liuyc20@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2291391
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
get charge counter value from flip fg and assign this value
to batt_chg_counter of battery info struct.
Change-Id: I4356f928217dc2806fc722d2e8d9e7ff1da755d6
Reviewed-on: https://gerrit.mot.com/2300250
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Don't enable main charger termination when slave cp
disabled, because main cp also work well, it will load
to main charger termination.
Change-Id: Idce843eaede60120963efdee92746b3d15c98742
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2298500
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
For some authen tests, charging parameters may need to be changed
as requirement. And for original designation, these ops interfaces only
work in factory mode. So we need to export them in normal mode.
Change-Id: I4ed54474fb6f8e0a164231d8919bc0f385954bd5
Reviewed-on: https://gerrit.mot.com/2299683
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For some reasons, WLC authen test may upgrade FW without
fw version changed. So we add force flag for fw upgrade interface,
to let it could be applied in authen test.
Change-Id: I964984b4dd81e750e17ac23bfe0a5e9cf70a109f
Reviewed-on: https://gerrit.mot.com/2296260
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
keep irq always wake up
can get I2C message from irq
Change-Id: Ie338aec3f3caf90cd910b87ebbfc5089d7ceb7d1
Signed-off-by: zhangjun10 <zhangj10@motorola.com>
Reviewed-on: https://gerrit.mot.com/2298808
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
It gets incorrect paired_ichg value before setting to make a wrong
decision on charging current setting.
This issue may cause battery charging out of controlling of battery
charging policy.
Change-Id: If5ed84d5cebc231ecda70dcb919b76c681f52d84
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2298136
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
if plug in usb slowly, wt6670 will output float or sdp type
recheck charge type if detect float or sdp
Change-Id: I316d05a5178e4e6f5a3140ba6adf3e4a0c19e987
Signed-off-by: longc102 <longc102@motorola.com>
Reviewed-on: https://gerrit.mot.com/2295174
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
It's not reasonable to allow paired main battery to
charge the backup battery, as the main battery is
constant power supply for the system power, and it
does not benefit the principle to keep the main battery
voltage no less than backup battery.
Force battery soc to 0 only if paired battery volatge
is lower than empty voltage and soc becomes to 0.
Change-Id: Ifdaed984565f3c696d08fa43696e5b563930adf4
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2294021
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Support touch sensitivity in game mode for eqs,default touch report rate
is 240HZ and high report rate is 360HZ.
Change-Id: I5d6f580e05e15bb2cd62ef2500fc1d6559a968d0
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2294916
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
As sgm41542 ic input current positive error,
so limit 100ma in max icl for wls attestation
Change-Id: I48a7aa7aa8be2709d39eaad891ba1e0f94d0bb61
Signed-off-by: Haijian Ma <mahj8@motorola.com>
Reviewed-on: https://gerrit.mot.com/2293039
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
Driver option to work w/o data from position sensors has a caveat.
Current position at power up is not detected, but set manually.
This prevents Rollable Display HAL from properly updating active
touch region. This change enforces position/status sysfs entries
update when option no sensors present in device tree
Change-Id: If7c1fc59695652816003a192323bc4393f1e184f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2294160
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Remove the sysfs notify for sysfs node from usb interrupt
context, as sysfs_notify may be scheduled or sleep.
Change-Id: I45baf51b96506e4df6290b74c3a033240f8a1a83
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2293617
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Add sysfs files under /sys/devices/virtual/net/usb0/
1. ip address
2. subnet mask
3. iff flag
Userspace program can set the net interface for the usbnet in factory mode,
and read back the ip address, subnet mask, and net interface up/down flag
to configure the net interface via socket ioctl to sending ifrequest.
Change-Id: I5c9d1181823a07467eaa9acd1b722b52f7601bed
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2289066
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haichao Li <liuhc3@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
classify ic state error
if ic status is eoc, charge status should be charging
Change-Id: I123a6256275b087762c599cad1a499f75f7aa7a4
Signed-off-by: longch99 <longch99@motorola.com>
Reviewed-on: https://gerrit.mot.com/2287101
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
set report rate
base on new fw
Change-Id: I15de7af4a4141d142b89edb795434cdf1448f930
Signed-off-by: Deng Wei <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2286669
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
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
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