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
Plug out charger when increasing vbus voltage
Stop the increasing algo otherwise phone can not charge
because of dp dm status remained at next charger plugged in.
Change-Id: I7f16054f5bef4996d629ddfe3b5fb05e21c92a88
Signed-off-by: xuwei9 <xuwei9@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1816232
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Vibrator on phone main board can disturb camera AF VCM when it's vibrating.
To avoid the camera lens str(CR) noise during vibrating, power on AF and
push lens to certain position (for Nio DAC 400) can greatly reduce the
noise.This change is for notifiying camera actuator that vibrator will start
or stop work, then camera can respond accordingly..
Change-Id: Ifa5dd445311867b581fa0498d67ebad31cb6b1fb
Reviewed-on: https://gerrit.mot.com/1817562
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Darong Huang <huangdra@motorola.com>
Reviewed-by: Wang Liu <liuwang2@lenovo.com>
Reviewed-by: Xu Ji <jixu@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhuoran Xu <xuzr3@motorola.com>
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
Correct function usb_ether_xmit return value type to match
the prototype of the member ndo_start_xmit in struct net_device_ops
to avoid CFI checking failure.
Change-Id: I8439e967ee824bb5f0ac8447d79ae066379a6465
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1818255
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
User an orderly shutdown for factory kill instead of a
kernel power off. The orderly shutdown will attempt to
call the reboot binary from userspace first, and then
fallback to kernel power off if it fails.
Change-Id: Ie07e8786e34e1f9b38ca4b62085051bd89177054
Signed-off-by: mahj8 <mahj8@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1817422
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
- Since now nova_check_dt only possible return 0 or -ENODEV,
so if the driver can't get the active_panel_name properly, that means
no display panels are initialized, so need to return -ENODEV on probe
in this case, otherwise, it may affect the initialization of other touch ICs.
NO_PROP_NEEDED: needn't for shm2018
Change-Id: I6148ac8b10f552f180696221b1517c5fb60915e0
Signed-off-by: wengjun1 <wengjun1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1812635
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqiu Huang <huangjq9@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
default state set as high will lead to ELNA module on, which will consume battery power.
turn it off as default settings to fix this issue.
Change-Id: I38421a6b7e8d62e17e851a6cfded48b4a030ab0f
Reviewed-on: https://gerrit.mot.com/1810804
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
goodix fps driver is used by capacitive fps sensor as well, however
mmi_relay is required by FOD module only, so add the mmi_relay module
under conditional.
Change-Id: Ib93a2a7f9f8c8254cd67b7882336e9b7751e9863
Signed-off-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-on: https://gerrit.mot.com/1808891
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Lijun Chen <chenlj2@motorola.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key