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
"kernel_halt" is not in Google's GKI whitelist, add modules.symvers of
QGKI to fix build error on GKI build.
This module is no must in GKI, it doesn't matter that fails to load
Change-Id: I77c89c1236bcd2352b85b69e180687744e1f59b4
Reviewed-on: https://gerrit.mot.com/1807425
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
For linux 5.4, vfs_write will not be used, and it is changed to kernel_write,
so, we add the version judgment for this.
Change-Id: Iec34f046e608ec42436a741784aeeb9a1f46f479
Signed-off-by: weiweij <weiweij@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1806106
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
motorola/kernel/modules/drivers/input/misc/ets_fps_mmi/ets_fps.*:
Add panel notifier and ioctl command GET_DISP_PANEL_STATUS
To get the display panel status, register panel notifier to monitor the
events of PANEL_EVENT_DISPLAY_ON and PANEL_EVENT_DISPLAY_OFF.
And, add an ioctl command GET_DISP_PANEL_STATUS to support HAL service
querying for the panel status.
Change-Id: Ife5b6bc48517234b12c780af44dffaf4a1ad96e5
Signed-off-by: chengql2 <chengql2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1794293
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Submit-Approved: Jira Key
Add V2 version of focaltech i2c driver.
Because first version focaltech_mmi is too old for new focaltech
i2c chip. And this is common codebase, old products also use this
bo branch, it change old focaltech_mmi codes, will impact old
products stability.
NO_PROP_NEEDED: <New IC for NPI>
Change-Id: I46368ebf7d4d87c79c4c7283f2e220f0295a1a51
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1802966
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Register the mmi_relay notify to send the FOD state change
events to touchscreen class.
Change-Id: I2c14322ce21ff69e3a921f38ee2784e8d23a7c65
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1802937
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Sergio Vilela <sv008@motorola.com>
Submit-Approved: Sergio Vilela <sv008@motorola.com>
Tested-by: Sergio Vilela <sv008@motorola.com>
The module encapsule a group of notification,
used for decoupling between modules, for example,
the touchscreen driver are coupling fingerprint
and display driver in the bring-up phase,
the dependencies between modules need to fixed
to avoid proceeding blocked,
This module is middle layer, it change a direct
dependece into an indirect dependence.
Change-Id: I4469dd70300fce2dc5d9af48e96d65755974ef9f
Reviewed-on: https://gerrit.mot.com/1802936
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Sergio Vilela <sv008@motorola.com>
Submit-Approved: Sergio Vilela <sv008@motorola.com>
Tested-by: Sergio Vilela <sv008@motorola.com>
When importing the Modules.symvers in fix path, the GKI module will import an
incorrect one and cause module load fail in boot-gki kernel mode.
Change-Id: I58d33bd17a2419dee8efa335314535c25eb325d1
Signed-off-by: Kanagarathina Kalathi <kalath(CR)@motorola.com>
Reviewed-on: https://gerrit.mot.com/1802317
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key