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
Added sysfs_notify call and make status & position show methods
waiting for updated values
Change-Id: Ib19dd3e362a70b6c5217821a46a2f3eb679452ac
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2244143
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Added support for the following:
1) status and position changes
2) sensor data polling
3) allow polling status and position in HAL
Change-Id: I73d7c46f0ff7fbdaf703f16d0500c634fae1e721
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2237771
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Support for accelerated motion. Only distinct status reported.
Added position interface to shutdown motor based on signal from
sensors
Change-Id: I44f7eeb4b86f84c2542c0c29feec42bb7b346e16
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2231441
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Initial driver code for TI DRV8424 stepper motor. Based on AW8646
from Awinic. This is just to create an entry point. Needs a lot
of work
Change-Id: Ied7eb3f05801f457494feff098c3b78b3813d30b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2231338
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
For original usage, function check_chip_id is used to decide
whether FW need to be upgraded. But we have change it by
FW version checking. So this function will not used any more.
We should remove it.
Change-Id: Idbf875a8491f8321755c56f9b8cc5f2310409214
Reviewed-on: https://gerrit.mot.com/2255040
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
In normal use, we may need to update FW to fix some
chip bugs. So we need to add fw check logic to decide
if the FW should be updated. And the latest FW version
is defined in dts file.
Change-Id: I4642dcd311b2fe6dc85c316efd88fa50d50e6a76
Reviewed-on: https://gerrit.mot.com/2254034
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
1. Consider the battery is absent if battery temperature
is lower than -30 degree C.
2. Disable bq27426 register dump for debugging in heartbeat
work.
3. Change the heartbeat work interval to 60s.
Change-Id: I043c6a28f998668a0dad7f39b75f21fb1b3c6f1f
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2253210
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
As I_BDEV cannot be used in GKI build before
kernel version 5.15, so add kernel version
check when use I_BDEV.
Change-Id: I7f02b64434559d4a1e00a2c8ea6b38bb1288957b
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/2252790
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key