Commit Graph
43 Commits
Author SHA1 Message Date
Wenge Zhu ec7d16daad Support touch assit p-sensor dectection
Support TP assist p-sensor detection due to ultrasonic
p-sensor limitation.

Change-Id: I71c7ee1ddbd800dae4e8188ed6ca5c8260262f7d
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2579809
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2023-05-03 22:37:54 -05:00
Wenge Zhu 31a13f0565 Support touch under water detection
TP:
Support touch under water detection.

Change-Id: If079e97c34100c54d07d25b9486f32b37d2fcefe
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2434461
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-12-06 20:01:44 -06:00
Wenge Zhu 1d1206c18f Rework cli gesture mode
1.Use same name node to receive gesture type notification.
2.Use extended api to notify TP driver gesture type.

Change-Id: Ice74f7b6081cf8a44c7fdc2cf19c022f79ec109b
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2424064
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Submit-Approved: Jira Key
2022-11-13 20:06:15 -06:00
Wenge Zhu 626a5f4fda Add CLI touch gesture support on mmi touch screen class
1.Add cli_gesture sysfs node on mmi touch screen class,use this node to
notify which gesture type that user set.
2.Create another tap sensor named s-dt-gesture,use it to report CLI
touch gesture events.

Change-Id: I9e954a00a2a5f37ff54be08d99c0b904516a57b7
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2381634
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-09-16 02:28:06 -05:00
Wenge Zhu 3f23e29dd7 Support double tap to wake up the screen
TP:
Support double tap to wake up the screen.

Change-Id: Ie99fda37fd7dcba66f3c4d91e9fd6b8179d61018
Signed-off-by: Wenge Zhu <zhuwg1@motorola.com>
Reviewed-on: https://gerrit.mot.com/2298079
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-07-24 21:01:52 -05:00
Konstantin Makariev 2be78db15c touchscreen_mmi: active region interface
New interface to set/get touchscreen active region parameters. This
interface intended for use by Rollable Display HAL

Change-Id: I78e99893ff9b694ea61143e8d79311954840aa6b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2237772
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2022-05-16 15:28:57 -05:00
Yan Zhang 0732d87c21 : Trigger fod event only when FOD is enabled
1. Register  FOD state thru mmi_relay.
2. Send Fod event when FOD is enabled.

Change-Id: I56fed42e8377dc86c84e8dd1042cd04a55fb0a16
Signed-off-by: Yan Zhang <zhangy26@motorola.com>
Reviewed-on: https://gerrit.mot.com/2205960
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
2022-03-03 01:22:08 -06:00
litong20 e938b5dfd1 Fix "active_panel" undefined build error.
Fix "active_panel" undefined build error in
CONFIG_DRM_PANEL_EVENT_NOTIFICATIONS

Change-Id: I45b9c513b0abb0c35ed95383b398f1b9bac0bb22
Reviewed-on: https://gerrit.mot.com/2203843
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-02-28 21:34:52 -06:00
litong20 12e78678a8 Support receiving dual-screen notifiactions.
Support receiving dual-screen notifications to support
touch ic suspend and resume.

Change-Id: I2af3fb7632ca164c85626957f42c0d3dca2af179
Reviewed-on: https://gerrit.mot.com/2188839
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: <zhuwg1@motorola.com>
Submit-Approved: Jira Key
2022-02-28 03:33:42 -06:00
litong20 4274b0c2a7 Solve the problem of incompatible type 'struct timespec64'
touchscreen_mmi_gesture.c:196:4: error: passing 'struct timespec' to
parameter of incompatible type 'struct timespec64'.

Change-Id: Iab92d18c89766cfe510957e33e9fcd35290becfe
Reviewed-on: https://gerrit.mot.com/1993292
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-27 22:14:05 -05:00
litong20 aa90e16b32 Slove the build error: redefinition of 'panel_event'
TP:
Error:
touchscreen_mmi.h:285:6: error: redefinition of 'panel_event'
kernel/msm-4.19/include/linux/panel_notifier.h:19:6: note: previous
definition is here enum panel_event {

Change-Id: Ia53d03c8ca03ecb8a62e679cb1e96aad64a9dcab
Reviewed-on: https://gerrit.mot.com/1992621
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-25 22:16:34 -05:00
litong20 b1b4a16e76 Bring up touchscreen_mmi in Rogue S project.
1. Add DRM_PANEL_EVENT nofification for Andorid S.
2. support touchscreen_mmi and related modules build in kernel-5.10.
3. Use timespec64 instead of timespec function.

Change-Id: If0252015e10bff24c10d54b13df2e0f6aa156a6e
Reviewed-on: https://gerrit.mot.com/1965128
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-25 05:50:36 -05:00
litong20 75b0a4d487 Need to update fw on resume for zero-flash touch IC.
The kernel does not have permission to access the /data/vendor
partition, so send the update firmware notify to touchUpg service
on resume for zero-flash touch IC.

avc: denied { search } for name="param" dev="dm-6" ino=275
scontext=u:r:kernel:s0 tcontext=u:object_r:param_data_file:s0
tclass=dir permissive=0

Change-Id: I5d5c9f39bab25a8d3377e0475e79a0411d93b56b
Reviewed-on: https://gerrit.mot.com/1979786
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Submit-Approved: Jira Key
2021-06-17 02:30:53 -05:00
litong20 51573bcad9 Add flash mode sysfs node in touchscreen mmi
TP:
Add flash mode sysfs node in touchscreen mmi
if flash_mode == 1, read firmware from /data/vendor/param/touch
else follow the previous process.

Change-Id: I17add2b289534533f6c87e4c321847f682cc02b1
Reviewed-on: https://gerrit.mot.com/1853339
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-06-03 00:33:07 -05:00
litong dd553da38a Export panel supplier method for ST
TP:
Export panel supplier method to distinguish different
limit files for ST CQA test.

Change-Id: I482d1b5e86e7c73f91f8bb799165f05afaa9ce46
Reviewed-on: https://gerrit.mot.com/1924781
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-04-15 21:11:24 -05:00
wangyq13 9f48ad0ebd input: touchscreen_mmi: add palm detection sensor class
touchscreen_mmi:
Add palm detection sensor class.
NO_PROP_NEEDED: <New function for NPI>

Change-Id: I3ef215b92eba592c8452f347f4fbcb5ab58aab84
Signed-off-by: wangyq13 <wangyq13@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1824129
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-12-14 03:00:06 -06:00
litong 440ca970d5 Continue to probe touch even if no matching panel is found
TP:
1.Continue to probe touchscreen driver even if no matching panel is found
  to ensure the basic functions of the touchscreen.
2.There is no member "id" in drm_panel_notifier at present, so set id to 0
  to ensure touch driver can receive notifications from panel.

Change-Id: I2f8c946304be4511bc7ef3422937bfe8ea927a98
Reviewed-on: https://gerrit.mot.com/1745970
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-11-03 01:07:49 -06:00
litong 2e64a2b0e5 Use alloc_chrdev_region instead of input_get_new_minor
Because the input_get_new_minor function is not in the whitelist, and
Google thinks that a normal input driver should not use those functions,
so use the alloc_chrdev_region function to obtain the device number,
which is used to create node under the path /sys/class/touchscreen/.

Change-Id: Iedd2abdc6b772b62ea95c1edcd9eabc4b1256eec
Reviewed-on: https://gerrit.mot.com/1758757
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
2020-09-27 20:55:14 -05:00
litong 4b881a0efd Determine whether to load by "mmi,panel_name"
Because there is no contains function on kernel 5.4, and we have no way
to modify the kernel code. So "mmi,panel_name" is used to determine
whether to probe this driver.

Change-Id: I956b6ce1d463cbe472b80599c954dd06bd633082
Reviewed-on: https://gerrit.mot.com/1728590
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-08-24 03:33:03 -05:00
litong a722fdb3f9 Slove the compile error of of_drm_find_panel function
CONFIG_DRM_PANEL -> CONFIG_DRM_PANEL_NOTIFICATIONS
Because CONFIG_PANEL_NOTIFICATIONS is already defined in other project,,
the <drm/drm_panel.h> file is not included, but because DRM_PANEL is
defined by default, the code compilation fails. so Modify the
configuration CONFIG_DRM_PANEL to CONFIG_DRM_PANEL_NOTIFICATIONS.

Change-Id: I2c341a0db33501158d602888c86bdb60127d62d9
Reviewed-on: https://gerrit.mot.com/1728347
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2020-08-20 05:31:20 -05:00
litong eb09216ede Add mmi_bl_bootmode function to get boot mode.
In order to reduce the dependence on other modules, mmi_bl_bootmode is
added for touchscreen.

Change-Id: Ic77772fd155baf3b0af234141257e3062597b02e
Reviewed-on: https://gerrit.mot.com/1725851
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-08-19 21:41:31 -05:00
litong 681210f2b8 Add DRM PANEL notifications to touchscreen
TP:
Kernel 5.4 support DRM PANEL notification mechanism to report
blank/unblank event. So add DRM_PANEL notifications to touchscreen
MMI class suspend and resume.

Change-Id: I53861dd33a6a9d3d6a7b3112e667b06c102a2328
Reviewed-on: https://gerrit.mot.com/1708453
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2020-08-19 21:41:16 -05:00
litong20 9858787efb Revert "(CR): Send the touchscreen status to display"
CRs-fixed: (CR)

This reverts commit f365d6f2a3d5c2bbfe960c3fbaa06f9474217422.

Change-Id: Iaa0be2cc5a738483a61766bcfdee6cbccee0b28d
Reviewed-on: https://gerrit.mot.com/1678633
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-07-12 23:00:23 -05:00
litong df91ea2299 Send the touchscreen status to display
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
2020-07-12 21:18:28 -05:00
litong 28c6857203 Fixup the definition of unregister_panel_notifier
TP:
Fix the error definition of unregister_panel_notifier in (CR).
NO_PROP_NEEDED: <Touch driver code is is unified in bo branch>

Change-Id: Ibb5e0be256e78a31efd59b4f7a2e4329797c3e9c
Reviewed-on: https://gerrit.mot.com/1651390
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
2020-07-02 04:52:30 -05:00
haojl2 ef916eb278 touchscreen_mmi: Add poison slot support.
Import a new gesture, poison slot.
When the report point is in this supression area, and the Y-axis
coordinate changes in little range over a period of time.
This is considered to be a point caused by the user's grip at edge.
Temporarily close all events report function for this slot from driver,
until this slot receives a release event or touch screen suspend.

Change-Id: Id7541aab8314e611d6943ed081f07776e5939f1b
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1584617
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2020-05-29 01:55:09 -05:00
haojl2 04f414b1fa touchscreen_mmi: Control baseline update by FPS notifier
FOD sensor will depend on touch event to trigger fingerprint
authentication.
When device is waken up, and user put finger on FOD area just when touch
IC is resuming, IC will update baseline and set current finger on screen
as touch baseline. In this situation, no touch event will report.
To fix this issue, touchscreen class will disable touch IC baseline
update function by FPS working status.
If FPS is working, delay baseline update to FPS stop working or get
touch up event.

Change-Id: I16b964c71bf1adc71832a8d25c74b7734dd88d20
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1551682
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-05-18 21:18:55 -05:00
haojl2 fe14f72d22 touchscreen_mmi: Add update baseline entry
Touch
Add baseline control sys entry in touchscreen class.

Change-Id: Iede6e212e731934a33fe18a45f50ac6abbb07f3d
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1549501
Reviewed-by: <litong20@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-05-18 21:16:14 -05:00
haojl2 843da210a8 touchscreen_mmi: Add default pinctrl methord
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
2020-05-14 02:38:58 -05:00
litong 55d43ce7cd touchscreen_mmi: exports touch events handler
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
2020-05-11 21:25:29 -05:00
Konstantin Makariev 2bed9f6ab4 touchscreen_mmi: qcom drm notifications support
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
2020-05-11 17:43:00 -05:00
haojl2 beca016ae8 touchscreen_mmi: use try to call and try to read
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
2020-04-30 00:38:52 -05:00
haojl2 1044348204 touchscreen_mmi: update RW sys entry.
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
2020-04-30 00:38:46 -05:00
haojl2 578ac982ce touchscreen_mmi: Add macro to get touch status
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
2020-04-30 00:38:33 -05:00
haojl2 d55d2842ec touchscreen_mmi: Add edge touch support
Moto edge touch need touch driver create some specific sys entries to
handle edge touch functions.

Add those sys entries to support edge touch.

Change-Id: I1385d75cd911d3c4b9fd2e07f811fa00393fbfd1
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543327
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
2020-04-30 00:38:25 -05:00
Konstantin Makariev 3e7c7ab6a3 touchscreen_mmi: export class kobject
When driver exports sysfs entries to the class, they are created
under class' kobject. If driver needs to notify HAL about some
changes that happen asynchronously, it needs pointer to kobject
to call sysfs_notify. For that purpose pointer to kobject added
to class imports structure.

Change-Id: I05e72ee3a30cccce089ec571837b25df2fd07346
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1517618
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-03-20 09:33:58 -05:00
litong b1d61265f5 touchscreen_mmi: Modify the process of panel off and on
1. Process of panel off and on
   Panel OFF:
(pre_suspend)->IRQ_OFF->INTO_MODE ->(post_suspend)->PINCTRL_OFF->POWER_OFF
   Panel ON:
POWER_ON->RESET->PINCTRL_ON->(pre resume)->MODE->IRQ_ON->(post resume)
2. Only when both the sensor and the gesture are enabled can the
   gesture mode be entered.
3. Interrupt will be turned on only in gesture mode.
4. Turn off the power only when Power_off_suspend is set
   and not in gesture mode

Change-Id: I962cde8711333a4f213b01dccc99a3268e3ca519
Reviewed-on: https://gerrit.mot.com/1479065
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-30 01:17:03 -06:00
litong 6f0a6e79df Create the methods to get touchscreen class name
TP:
Add get_class_fname methods to get class name
the name is provided to vendor.

Change-Id: I1984af824bb1d59b8d736c59b327619b89bb010b
Reviewed-on: https://gerrit.mot.com/1471685
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
2019-12-17 21:07:32 -06:00
Konstantin Makariev 04643c7759 touchscreen_mmi: usb detection
Added USB detection to the class code to handle charging source
bit setting.

Change-Id: Ic947504509b454150b7067ceb31786c5d29296b2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1471999
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-12-16 09:28:31 -06:00
Konstantin Makariev 97c0828acb touchscreen_mmi: generic gesture handling
Adding generic gesture reporting mechnism to touchscreen_mmi class

Change-Id: I551d58dcda8231032221f0b8dd41c40ff96a33c6
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1471846
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-12-16 09:28:03 -06:00
haojl2 b68ad30820 touchscreen_mmi: add notification function
TP:
Add LCD notification notification chain.
Add freq change notofication chain.

Change-Id: I6fb9005a0ea27d6339345db3b640a83898e47ea6
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1470315
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-12-12 22:48:20 -06:00
haojl2 935c915013 touchscreen_mmi: create extra sys entry group.
TP:
If touch vendor driver need create extra sys entries for some vendor
special reason. Create a method to get this attr group.


Change-Id: I39482b504428ab915c8e2eda5db9f29495dbc5b8
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1470200
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-12-11 03:57:46 -06:00
haojl2 75c9b13ad6 touchscreen_mmi: Add touchscreen class for moto product.
TP:
Touchscreen mmi contains moto touchscreen features.
For curent version.
1. Create touchscreen class
2. Create panel info sys entries.
3. Create irq, reset, buildid sys entries.
4. Create firmware update sys entries.

Change-Id: I6938eda4fd20dc4e483e68cc1926bd53402e2224
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1447777
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2019-12-09 04:12:13 -06:00