Postpone loading functions while firmware upgrade in progress. Otherwise
loading F54 fails and following function remove causes kernel to panic
Change-Id: I6f5f7ddf523fc33ccd2403f0963eba2a001df6c4
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1696371
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Fix pointer to null char constant comparison
+++++++++++++++++++++++++++++++++++++++
Build error:
motorola/kernel/modules/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_test/focaltech_test_ini.c:136:21: warning: comparing a pointer to a null character constant; did you mean to compare to NULL? [-Wpointer-compare]
error, forbidden warning: focaltech_test_ini.c:136
+++++++++++++++++++++++++++++++++++++++
Change-Id: Ie1c9bcb4497ba8c0aeff74c2aa9ebaa111bb806d
Reviewed-on: https://gerrit.mot.com/1687857
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Rafael Ortolan <rafones@motorola.com>
Submit-Approved: Sergio Vilela <sv008@motorola.com>
TP:
Add support for USB detection based on touchscreen class in ft8756.
NO_PROP_NEEDED: <only needed for kiev in bo branch>
Change-Id: I94198558444620977ee90914347ffdb3c3360a01
Reviewed-on: https://gerrit.mot.com/1654275
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
If power supply supplier registered brfore touchscreen,
ps_notify_callback will not receive PSY_EVENT_PROP_ADDED
event, and will cause miss to set TP into charger state.
So check PS state in probe.
NO_PROP_NEEDED: <only needed for bo branch>
Change-Id: Ib2c190fe06bc9167a5e0108304e34389aa16ff5b
Reviewed-on: https://gerrit.mot.com/1685838
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Re-initialize via a watchdog failure instead of a general
i2c failure. This will allow us to recover from failures that
happen during init, and re-init. The current solution does not
account of the fact that init could fail, and if init fails
there l(CR) won't be an interrupt that will drive the i2c
read/write failure to cause a recovery.
This should also reduce false postives, such as if we failed
to read i2c while suspending/resuming.
Change-Id: If7579a90c6490d5f9c4fec4c0d3e7b74cb8bdcaa
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1690483
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
The state of health will provide a way to determine if a battery needs
to be replaced or not
NO_PROP_NEEDED: soh is only for TI FGs on Smith
Change-Id: I6281480033435d60b2e21ac81f093f1e09b51fca
Signed-off-by: Drew Abbott <drewa@motorola.com>
Reviewed-on: https://gerrit.mot.com/1690869
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
To proivde a sysfs node to reset hvdcp_power_max setting,
and rerun HVDCP process after that
Change-Id: I497a22d3e6974f27396595f894d868b55f4a80f0
Signed-off-by: xuwt2 <xuwt2@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1686918
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
If we get an unexpected i2c failure, toggle the ldo
and re-init the registers after it is back online.
Change-Id: Ie17a208fb612264a6ddc8cb5fff16e3123b5719e
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1672836
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Factory agrees to manually reset FG'es rather than automatically
in BL factory bootmode, in addition to factory_build. This will
allow CFC test to charge batteries in COM and reboot with minimal
charge capacity variation compared to re-init'ing FG at every boot.
NO_PROP_NEEDED: TI FG for smith product only
Change-Id: I6f0b2ceaeff5d4c20b01e154b48f9c54e22a9ef0
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/1689972
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Factory s/w currently forces FG resets at every power up, as well
as from sysfs cmd. The s/w build applied reset causes unstable soc
when batteries are charged prior and esp with high rate chargers
in backend COM test.
NO_PROP_NEEDED: TI FG specific to Smith product.
Change-Id: I7b8bc56efa113db465e8f4cc965ca7b064543ebe
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/1687439
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
1. kiev use panel notifications, so DRM and FB notifications are
not used.
2. Kiev use touchscreen class to control the resume and suspend
process, so conmment out unused notifications.
Change-Id: Ied0266b821d797ea38080c0f9a2027ce2be7ead6
Reviewed-on: https://gerrit.mot.com/1683922
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
1. If there is a demand in the future, the touch screen class can add
some processing before reporting the touch events.
2. Output touch events for debugging
NO_PROP_NEEDED: <only for kiev in bo branch>
Change-Id: I1ad85bd86efc4799398530d30c6fe263e861e189
Reviewed-on: https://gerrit.mot.com/1683831
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
The golden profiles generated in TI tool does not account for Mot
custom chemistry setting. So we need to manually add dm element IDs
85, 84, 85, 108 to both FG gmfs files. Also increment dm ver to rev3.
NO_PROP_NEEDED: specific to only TI FG in smith.
Change-Id: Iba79bb27ddf7e3cd1007ca843d5a0092f275ca32
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/1685703
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Updated wakeup_source API's need to be used for kernel_versions > 4.19.
Ensure to retain old wakeup_source API's for kernel_versions < 4.19.
ref.: https://gerrit.mot.com/#/c/1681553/
NO_PROP_NEEDED: applicable only to kernel_versions > 4.19
Change-Id: If7dc7924e584da29215b69027230856b0dc6e8c8
Reviewed-on: https://gerrit.mot.com/1685190
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Sergio Vilela <sv008@motorola.com>
Submit-Approved: Sergio Vilela <sv008@motorola.com>
Tested-by: Sergio Vilela <sv008@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Write all sequencer registers in one I2C transaction. Set WAVSEQ1
to 1 in vibrate function when it was not explicitly set
Change-Id: I24e13813bd97b6afb4436f91e79090ea6cb51a78
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1680232
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Gboard settings UI allows vibration strength to be 100ms. Make driver
considering 100ms vibration as short haptics instead of long one.
Change-Id: I3fe503b2718e6fa2349cc6fea2f76f4805b0374e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1667611
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Updated wakeup_source API's need to be used for kernel_versions > 4.19.
Ensure to retain old wakeup_source API's for kernel_versions < 4.19.
Change-Id: If5d90025486c944b85674098a28bf9c989f276bc
Reviewed-on: https://gerrit.mot.com/1681965
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Updated wakeup_source API's need to be used for kernel_versions > 4.19
Ensure to retain old wakeup_source API's for kernel_versions < 4.19
Change-Id: Ia96c57cc99f7e395de3e3d4896f5702cf5c4e1a4
Reviewed-on: https://gerrit.mot.com/1681964
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Updated wakeup_source API's need to be used for kernel_versions > 4.19.
Ensure to retain old wakeup_source API's for kernel_versions < 4.19.
Change-Id: Idfbdadf5a63d3d87a7598df40d8bc47756c7a453
Reviewed-on: https://gerrit.mot.com/1681801
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
On latest kernel wakeup_source_init API removed, instead
need to use wakeup_source_register.
This fix replaces:
wakeup_source_init with wakeup_source_register
wakeup_source_trash with wakeup_source_unregister
Change-Id: If252a430a40f695b9a2c4e4aa02d5905fb8d933c
Signed-off-by: Kanagarathina Kalathi <kalath(CR)@motorola.com>
On latest kernel wakeup_source_init API remove,
Need to use wakeup_source_register for the same.
This fix replaces wakeup_source_init to wakeup_source_register
wakeup_source_trash to wakeup_source_unregister
Change-Id: I684bb709000342165c74c2cf400edd54c0045f63
Signed-off-by: Kanagarathina Kalathi <kalath(CR)@motorola.com>
fix implicit bld errs of wakeup_source API's in Android R
On latest kernel rebase from QC:
we see couple of wakeup_source API's are removed,
errors as below:
motorola/kernel/modules/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c:4120:2: error: implicit declaration of function 'wakeup_source_init' [-Werror,-Wimplicit-function-declaration]
motorola/kernel/modules/drivers/power/qpnp-smbcharger-mmi/qpnp-smbcharger-mmi.c:4443:2: error: implicit declaration of function 'wakeup_source_trash' [-Werror,-Wimplicit-function-declaration]
motorola/kernel/modules/drivers/power/p938x_charger/p938x_charger.c:2945:2: error: implicit declaration of function 'wakeup_source_init' [-Werror,-Wimplicit-function-declaration]
wakeup_source_init(&chip->wls_wake_source, "p938x wireless charger");
motorola/kernel/modules/drivers/power/p938x_charger/p938x_charger.c:3015:2: error: implicit declaration of function 'wakeup_source_trash' [-Werror,-Wimplicit-function-declaration]
wakeup_source_trash(&chip->wls_wake_source);
This fix replaces
1) wakeup_source_init(..) function with to wakeup_source_register(..)
2) wakeup_source_trash(..) function with to wakeup_source_unregister(..)
Change-Id: I9639f64ad8f9efeaf8f3d199f9a2af27341b145b
Signed-off-by: kumarv <kumarv@motorola.com>
Factory SW boots charger driver quicker than user builds. So charger drv
may attempt a heartbeat update prior to completion of FG reset and re-init.
This can cause a negative bad read from FG.
Chrger drv checks will force the negative value to 0 soc instead. To
prevent this, delay to the next scheduled hearbeat capacity update.
NO_PROP_NEEDED: keep to smith & TI FG timing.
Change-Id: I71213fd0a33083fa3a885896e406b513279867ab
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/1678268
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
do_gettimeofday is not supported in new Kernel version, redefine
it if it is not supported for compatible compilation of stmvl53l1
DLKM module.
Change-Id: I718eedf4d8cd8479f0d34fca8a78e7e1e39e49ec
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1679227
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Legacy api get_ds is not used any more in new Kernel
version, and it can be replaced by KERNEL_DS directly
according to the explanation of the commit patch to
remove get_ds() from Kernel.
Change-Id: I9beffbeac23d5399fcf87f9bf832241f442654e0
Signed-off-by: yanyh2 <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1679179
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
When the display and touch IC share power, we need to send the TP status
in the gesture mode to notify the display to keep on powering.
NO_PROP_NEEDED: <only for kiev in bo branch>
Change-Id: I87b56d3d3712c956de88e09b2751f5c355fb7a9b
Reviewed-on: https://gerrit.mot.com/1666974
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
Set TI-FGes termination current to a lower level to prevent early
charge termination. The higher 200mA level caused lower capacity
Main batt to cycle continuously between chrg and dischrg while
Higher Cap Flip battery catches up.
NO_PROP_NEEDED: TI-FG is specific to SMITH product only
Change-Id: Ifa0504713ab420bb324dd20a73f1868146c9611c
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/1672957
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Patch from Vendor ILITEK:
To prevent the register of hardware DMA from getting the wrong value,
resulting in verification failure.
NO_PROP_NEEDED: New touch IC for NPI
Change-Id: Id81e539f3b3334d1c859d8794e730598be3469c9
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1667401
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
Access to focaltech touch driver through touchscreen class
unified interface.
NO_PROP_NEEDED: <Touch driver code is unified in bo branch>
Change-Id: I32874ac2cc55b7e6df6c01470d767963e2b45122
Reviewed-on: https://gerrit.mot.com/1664276
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key