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
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
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
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
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
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
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
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
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