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