The command is used to set the sliding distance to determine whether
it is a sliding event, the default value is 0xff.
Change-Id: I38baa51e9812bc86613b26e34c36ae4f42934eed
Reviewed-on: https://gerrit.mot.com/1551675
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
TP:
Add suppression control function, the command is 0xdb.
The value means:
Right side grip suppression off: 0x03
Left side grip suppression off: 0x02
Both side grip suppression off: 0x01
Both side grip suppression on : 0x00
Change-Id: I3e3249bf36685afc611523e80e9cd1054cccf413
Reviewed-on: https://gerrit.mot.com/1551576
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Solve the problem that the events between the release of the finger
and the completion of the suspend is not released.
Change-Id: I1ccaa71ecd48b91c99f33a9655408dbf8cd1ce09
Reviewed-on: https://gerrit.mot.com/1553366
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
If IC resume from power off status. IC should wait a while for IC bootup
So add wait_for_ready methord.
Change-Id: Ia05d2ca650540d087c100a058c3832179c4bd07c
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1553616
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
If ts_mmi_on_state or ts_mmi_off_state pinctrl states is defined, and
vendor method not defined it's pinctrl callback function.
Add default pinctrl function for this situation.
Change-Id: I5873980ee6425b22af1af416228481af1abe360d
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1553615
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
NFC hold wake lock too much time that phone
may not suspend during screen turned off for
8 seconds
Change-Id: I7dde533767716af28c806f87a7dd04a38d238e3a
Signed-off-by: Ningkai Zhuang <zhuangnk1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1552151
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zishang Zhou <zhouzs1@motorola.com>
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Xu Du <duxu1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
1. Exports touch events handler in order to obtain the touch events
reported by vendor.
2. Add debug options to control whether to print log.
Change-Id: I3bb89cfe5c7a5a55ca01b3a93488558db4358445
Reviewed-on: https://gerrit.mot.com/1550603
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Submit-Approved: Jira Key
Report down/up touch events generated by the synaptics touch driver to
touchscreen class, this is for unified processing in the touchclass.
Change-Id: If3a6a93b6047ad45def4d81c956e830e30ab238e
Reviewed-on: https://gerrit.mot.com/1550601
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Kernel 4.9 is still using MSM DRM notification mechanism to report
blank/unblank events. To support programs that still on kernel 4.9
adding MSM DRM notifications to touchscreen MMI class
suspend/resume.
Change-Id: I128b216c25ba3a70c2abbb37049cf4102135893c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1549390
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
This include file is required by panel on/off notification mechanism
used in MMI products. It makes more sense to keep it locally to avoid
adding it to various kernels
Change-Id: Ib0bc5a7dfe08c3dbae5f7960d3298b0f65811396
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1549392
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Modify the ratio of the major and minor values for FOD
For racer: ratio = 1948/ 128
Change-Id: I09db7e5adf7998fc468b4258d76d6846f0eb908e
Reviewed-on: https://gerrit.mot.com/1549735
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
base on himax vendor, update the driver
and add usb detect notify
NO_PROP_NEEDED: only for guam
Change-Id: I105e27a5bc548df7a4fcc18c64687553bec31eba
Signed-off-by: dengwei1 <dengwei1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1551148
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
himax_v2_mmi:
1: Because system use drm notify to call touch suspend before display
driver pull down vsn/vsp, rst pin. So touch suspend thread wait until
touch resume thread end, avoid touch resume thread is interrupted by
touch suspend thread.
Set flag for resume start and end.
Suspend tread will check this flag, if resume is not end, then
don't pull down the vsn/vsp and reset pin, to avoid affect touch resume
thread, especially touch firmware upgrade.
2: Sometimes the reverse thing happen, suspend thread is interrupted by
resume thread. Such as the following process:
touch suspend->lcd resume+touch resume->lcd suspend. So when lcd resume
again, the last state of touch is resume, so touch will skip current
resume process, don't download touch firmware.
To fix this issue, force touch driver to execute the resume process.
Change-Id: I0ed48ec2bf8f65e2db281bef0c7f6cc63051ea64
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1549942
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yiwen Liu <liuyw2@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
himax_v2_mmi:
Set hx83102d only if defined by product makefile, to avoid
affect other ICs.
Change-Id: I422df9d8f4318f46990cf81c03a6aa576ee3a97a
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1549941
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
Since framework need vendor id to filter double tap
set up vendor for fpc
Change-Id: Ie8faf63b5dcc4d5f3dc5992c3f16a273d39095af
Signed-off-by: zhongling1 <zhongling1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1550566
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Weilong Wu <wuwl10@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
when headset insert
use special reg config
NO_PROP_NEEDED: only racer need this change
Change-Id: Iaea4faf18b5fce845a05f7262b2e683e1e37c16b
Signed-off-by: cuijy2 <cuijy1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1539481
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guoyue Liu <liugy11@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Reviewed-by: Wen Xie <xiewen3@motorola.com>
Submit-Approved: Jira Key
The probe will succeed if the fg is not actually attached. To prevent
probe from adding a failing heartbeat function, fail out of the probe
function if there are i2c errors when trying to get the fw version on
the chip.
NO_PROP_NEEDED: This only affects phones with a flip FG and does not
need to be cherry-picked into branches for phones without one
Change-Id: I86fda0a6dd0dff59d7159a1a77991052838db6f9
Signed-off-by: Drew Abbott <drewa@motorola.com>
Reviewed-on: https://gerrit.mot.com/1546571
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Report wireless turbo charging if wireless reports
that it is a fast charger
Change-Id: I0312700bb7cfb8a44b4486f272aa91e8ce298a75
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1548060
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Only report fast charging rate if the guaranteed power
is greater than or equal to 15W.
Change-Id: I6f8a5492d47bf7a81b5b17215b5c8aa0ca65e871
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1548059
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Drew Abbott <drewa@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
The complication error i observed after remove -fno-builtin
in kernel with commit: 6af03f4 Makefile: Remove -fno-builtin cflag
++++
kernel/msm-4.19/../../motorola/kernel/modules/drivers/misc/utag/utags.c:1805:45:
warning: size argument in 'strlcpy' call appears to be size of the
source; expec ted the size of the destination
[-Wstrlcpy-strlcat-size]
++++
Change-Id: I68144bce14af6944e1b4d8c225d1ad04203aefa5
Signed-off-by: a7301c <a7301c@motorola.com>
Reviewed-on: https://gerrit.mot.com/1545924
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Submit-Approved: Jira Key
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
When system is freezed or has no response, DFers often reset the phone
by long-press power btn. So there is no useful log for developpers and
the issue becomes very hard to analysis.
This hw_warmreset feature will trigger a warmreset reboot, so that next
cycle system can save the lastkmsg and re-trigger a clean hardware
cold reboot.
Only when the command line is configured with "hw_warmreset_enable=1",
the feature will take effect.
Change-Id: Icb694be4023ad1e47e5872fee2cd9a9697bbb48d
Reviewed-on: https://gerrit.mot.com/1545767
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
input_free_device() should only be used if
input_register_device() was not called yet or if it failed. Once
device was unregistered use input_unregister_device() and memory
will be freed once last reference to the device is dropped.
NO_PROP_NEEDED: only one branch 'bo'
Change-Id: I82a8402192daed8ac94eb9a4c360984c4b28487d
Reviewed-on: https://gerrit.mot.com/1543781
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianlin Nie <niejl1@motorola.com>
Reviewed-by: Zhihong Kang <kangzh@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-by: Minghui Wei <weimh1@motorola.com>
Submit-Approved: Jira Key
For writeable sys entry, if value is same with cached value, do not
write again.
Change-Id: I75b3b1ca6aa190e9507ca922071ba23c745dba5e
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1544483
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
To call touchscreen methods may cause concurrent competition.
So use uniform macro TRY_TO_CALL and TRY_TO_GET to call and get from
touch IC.
Add a mutex to lock all method invoke.
Change-Id: Ifca60891582e76c5d31fbdb31a386618665d7258
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1544138
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
For touchscreen class sys entries which support read and write.
Those entry value is set by user space and will be read by user space.
When IC is not active, read and write to touch IC may fail (power off or
interrupt closed). So, when write to those entries, just save value to
cache and restore when IC resume. Read those entries just return cached
value.
Change-Id: Ieee193597b68b2d87c6234116f2f085e5ab6aeac
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1544046
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
When IC not resume, LCD refresh and charger mode no need set to IC.
Just save the value and the value will restore in IC resume work.
Change-Id: Icadcb7883c6347ae65c5ebaafac39d138cbac5e4
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543990
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
When touch start enter suspend, touch_stop will set to 1.
When touch resumed totally, pm_mode will be TS_MMI_PM_ACTIVE
Add two macro to get touch state.
Change-Id: I20ddb852f277ec6c0ffd38d33851416af4d2d06e
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543989
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
it will cause compile error on other mainline
This reverts commit f1cc9d58ffc3bff2ab7f23d583c2c13b23afd665.
Change-Id: I554e68ad26680746d7863ea70434dc23644e394b
Reviewed-on: https://gerrit.mot.com/1545352
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
When system is freezed or has no response, DFers often reset the phone
by long-press power btn. So there is no useful log for developpers and
the issue becomes very hard to analysis.
This hw_warmreset feature will trigger a warmreset reboot, so that next
cycle system can save the lastkmsg and re-trigger a clean hardware
cold reboot.
Only when the command line is configured with "hw_warmreset_enable=1",
the feature will take effect.
Change-Id: I9e0abcf3757b69175125bcf14188ad54f78a087d
Reviewed-on: https://gerrit.mot.com/1536790
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Submit-Approved: Jira Key
After enabling CONFIG_INIT_STACK_ALL, which make reading cmd
from fifo is 0xAAAAAA00, instead of 0x00. This makes
command mismatch and touch is not resuming once goes to suspend.
Change-Id: I730ba3c562000024fdc8dfb1c9aed138b2d4e715
Signed-off-by: Kanagarathina Kalathi <kalath(CR)@motorola.com>
Reviewed-on: https://gerrit.mot.com/1545167
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Update configured registers on open and close events
if set in the device tree.
Change-Id: I004f519e1dd5851a93affab81598969509f27712
Signed-off-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543714
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reset fuel gauges in factory boot mode or in a
factory build
Change-Id: I63a3efe7ddf1e2a7cf612f56a10ca868265c2467
Signed-off-by: Perry White <awhite6@motorola.com>
Reviewed-on: https://gerrit.mot.com/1544240
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Submit-Approved: Jira Key
1. The i2c error message is output only when the i2c transmission error
exceeds the maximum number of attempts.
2. Output coordinate information when the touchscreen is pressed.
Change-Id: Ida9f51904b0d40e39111529843b146844b4240b6
Reviewed-on: https://gerrit.mot.com/1543943
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
TP:
Add power status flag to indicate whether it is powered on
or powered off.
Set power state when power on and power off.
Change-Id: I9f8677278a2bc358233e7221ee564b69e4b75dcc
Reviewed-on: https://gerrit.mot.com/1538895
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Added USB cable detection support to better handle charging noise.
This is optional feature controlled via device tree property
mmi,usb-charger-detection.
Change-Id: Ie7ec0625d1712da94926d1903810a9ec1b497779
Reviewed-on: https://gerrit.mot.com/1543354
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
TP:
Take the larger value of x_width and y_width as the major, and the
smaller value as the minor.
Change-Id: I15461a286210e8925d5a497e9005d4dd1c624352
Reviewed-on: https://gerrit.mot.com/1542931
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key