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