Update qti_glink charger driver to match the common
charger adjustment for the charger configure data
structure.
Change-Id: Ic0672b8b1f4a0eb8290accd2e5f02cf6078417e6
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1864228
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Add register dump interface to monitor PMIC when camera exception observed.
2 different ways can observe the WL2864C register dump from kernel log:
- Call kernel regulator API: regulator_get_error_flags()
- ADB command:
adb shell "cat /sys/class/regulator/regulator.90/status"
The regulator name regulator.90 shall be replaced acording to different products.
We may execute:
adb shell "cat /sys/class/regulator/regulator.*/name"
to observe the regulator name and find out the correct number for your debugging regulator.
Change-Id: Idc33fcbab7ae108d579d934d0f4139476da38967
Signed-off-by: chenglong1 <chenglong1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1863819
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Jian Zhang <zhangjo@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Compiler complained about two if statements that will
always return false. Comment them out.
Change-Id: I6aafa17252238ac3cf6da48ba45ab428b0b7fe35
Signed-off-by: Tiago Ganselli <ganselli@motorola.com>
Reviewed-on: https://gerrit.mot.com/1859386
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
wl2864c default iovdd current limit is 220mA.
OV02b iovdd current can reach to 235mA.
This may cause cci issue as all camera shared iovdd, include cci pullup voltage.
Change-Id: If7828cd0b294cf2d362ec9001d39fceaceb9b734
Signed-off-by: liuwang2 <liuwang2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1859122
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Long Cheng <chengl1@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
For multi fps sensor, if there was some unexprect
INT signal comming during sensor being remove,
IRQ handle will panic becase the sysfs kobj had
ben free. Disable the irq to avoid this.
Change-Id: I2144c6f803547c281830058b29438b9d71cd5933
Signed-off-by: wuwl10 <wuwl10@motorola.com>
Reviewed-on: https://gerrit.mot.com/1853153
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
- If display can't get the matched panel name, it will use dummy
panel, so we can re-probe touch driver until display api can be used.
This way we can get the right panel and don't need to care of when
display api is ready.
NO_PROP_NEEDED: needn't for shm2018
Change-Id: Ie0beec4ca4d59202e9ba087935d6052e92eef264
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1836793
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Dezhen Hou <houdz1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
We do not need the turn on the clocks for banks,
so do not turn them on if the field is missing from the
dt.
Change-Id: I00ceffb3772b655bc08217759b962b3d1dd4b20d
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1850012
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Allow chip enable and spi handshake gpio get/set to sleep
so they will work with an i2c gpio expander.
Also make rtc gpio optional since that pin is not present
on banks.
Change-Id: Ibeb530de04d4f1a858193be80ea656b03bdd87a5
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1834059
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Fix the set output function so that it will configure the
gpio to the specified state.
Change-Id: I265e53a83b64c6663eb52013087e1960de29f0d3
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1834058
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
some time request firmware may fail
so add some delay when retry
NO_PROP_NEEDED
Change-Id: I3ea961952cb37df4c4e09d9d2055f8f078c857da
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1841824
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
Make the vl53l5 Kernel driver compatible for both 32bit and 64bit
applications from userspace, including L5 test program, factory TCMD
and camera app through L5 Sensor HAL.
Change-Id: Ia0ce2db08de83f7ab6ff487660ccd2bd21b48a14
Signed-off-by: zhuwg1 <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1831972
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
Add gpio expander driver. Supports both TCA6418E and
PCAL6408A chips. Does not currently support interrupts.
Change-Id: I4c4e59dd2c392e1ec4296251cb26b9ec839144c6
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1810602
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
TP:
(1) Modify compilation error of synaptics.
(2) When insmod the modules so that they can find the
Modules.symvers in the correct path.
Change-Id: I086cec560585a7e52eb350b036c70f35c23d1cba
Reviewed-on: https://gerrit.mot.com/1829612
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
TP:
When insmod the modules so that they can find the
Modules.symvers in the correct path.
Change-Id: I36c7b0ac1a992ede402bce60f321054c01575c10
Reviewed-on: https://gerrit.mot.com/1829648
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Add charge_full_design property to sysfs and uevent of battery power
supply so as to support access by userspace.
Change-Id: I672e3f7bd5cbfbfce87fd8338f94fa5043c082e0
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1829543
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
Kernel changes the signal callback function parameter
from "sigifno" to "kernel_siginfo" on kernel-5.4
change:
ae7795bc61 signal: Distinguish between kernel_siginfo and siginfo
Change-Id: If120a520bc949b354855f804fcfb3fca97224f47
Reviewed-on: https://gerrit.mot.com/1828677
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Added MMI status check to driver's probe. Kernel module will be loaded
only when MMI status check succeed. Driver node needs to have property
mmi,status in device tree for this to work.
Change-Id: I93a077aee70f45dde1aa6c760b7cd73ed7cf4b3e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1827965
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Added MMI status check to driver's probe. Kernel module will be loaded
only when MMI status check succeed. Driver node needs to have property
mmi,status in device tree for this to work.
Change-Id: I5c904ed47ac382a758ff44b236a077038b8f1038
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1827964
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Added MMI status check to driver's probe. Kernel module will be loaded
only when MMI status check succeed. Driver node needs to have property
mmi,status in device tree for this to work.
Change-Id: Ie7dffc5e9bb4769492e5fd15f0da94908cf8ef79
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1827959
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Use chip ID_0 reported in touch IC system information block
to represent the product. This will help distinguishing firmware
files for different ST chipsets
Change-Id: I250c6ae57411e6a3aca3f87c789379a048ccb0eb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1825923
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Use config option CONFIG_INPUT_TOUCHSCREEN_MMI to allow
touchscreen class driver handling suspend/resume.
Use DRM_PANEL_NOTIFICATIONS enviroment variable to enable
notifications from DRM. Multiple adjustments made to deviate
from the original path when used with MMI touchscreen class driver
Change-Id: Ica625a836b820c45564d51a4dfad5ebf224f83bc
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1780211
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
if we set the device name, It would block the firmware downloading.
the reason is that the expected path is not correct.
Change-Id: I71244fab069c779842d9d3e9883fa30d0da9647a
Signed-off-by: huangys <huangys@motorola.com>
Reviewed-on: https://gerrit.mot.com/1776191
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
As a common charger driver mmi_charger inherits Motorola legacy battery
charging features, including Demo charging, Step charging, Flash Fast
charging, and common features for factory test support.
More importantly, it provides a cross-platform solution to support
various battery charging design, not only Qualcomm SoC but also Samsung,
MTK, even remote system over network, and especially suite multiple
battery packs and multiple charger ICs in one system.
To achieve this goal, besides mmi_charger driver, there need a low level
charger driver for each battery charging solution(a couple of charger IC
& battery pack) to register to mmi_charger driver with implementation of
required interfaces depending on their own HW design.
With mmi_charger driver, Motorola common features have been stripped
from the HW dependent charger drivers(older Motorola charger drivers),
in which all the common features have to be implemented by each driver
of its own. So a low level charger driver can focus on HW specific
features and function development.
Motorola charger driver architecture:
----------------------------------------------------------------------
Userspace Common Interfaces for Charging Features and Factory Test
----------------------------------------------------------------------
Kernel mmi_charger (Motorola demo, step, flash-fast charging,
/ | \ factory and debugging interfaces)
/ | \
qti_glink_charger x_charger N_charger (basic charging functions HW
| | | specific factory debugging interfaces)
| | |
------------glink----i2c------spmi------------------------------------
| | |
| | |
ADSP i2c chip PMIC
Benefit from this new Motorola charger driver design:
1. Easy upgrade, migration, and maintenance, as common driver is
cross-platform and HW independent.
2. Reduce develop workload, as developers can pay more energy and
efforts on HW or platform specific business logic.
3. Easy to support complex battery charging solution, as it can support
N couples of charger IC & battery pack in one system at the same time
theoretically.
Change-Id: Ie44a22a2c65ea01fd3930879aeb9aae1c44341e0
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1502333
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Because GKI, export api move from pmic-voter.c to
mmi-pmic-voter.c and for compatible, use kernel version
to compatible with old product.
Change-Id: Ia2c74ae4447d0621ac5bced0f3355d868712ac24
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1823126
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Remove EB mod battery charge functions, they are no longer in used.
and these functions and global variables are not exported in GKI.
such as:
alarm_try_to_cancel
power_supply_class
power_supply_notifier
Change-Id: I1da88b149ee377cfffffad7af1fd3c7b6d2620fe
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1814959
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
kallsyms_lookup_name() is not exported on kernel5.4,use register_kprobe()
to get kallsyms_lookup_name().
Also fix path incorrect issue on Android R.
Change-Id: I5e0fb8c3bd7a14c5bb8316635261f411c5952577
Reviewed-on: https://gerrit.mot.com/1820763
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key