Commit Graph
100 Commits
Author SHA1 Message Date
Konstantin Makariev b70af6472a drv8424_mmi: motor overshoot handling
Transition to COMPACT position in sensors driver scenaRiveright cause
the slider going beyond 3.5 degrees threshold failing position
detection and causing motor faulty state enforced. In this case, it
seems better approach to allow the slider to move all the way to
either EXTENDED or PEEK positions to keep internal state machine
intact

Change-Id: I38425d2ab35e67eb49bb059e6fcee3dee07c394f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2453110
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-12-12 20:00:55 -06:00
Konstantin Makariev a1aa0f60d9 drv8424_mmi: enforced fault state
Introducing a semi-permanent faulting state to stop motor and prevent
any future movements when destination cannot be reached based on data from
sensors. In previous experience it usually happens due to sensors calibration
issues. In this case we want cease all further motor movements and
provide a way to drive motor manually to perform proper sensors
calibration.

Change-Id: I97ccadb69fe569d2b9770d4999eed36fa1a5d0eb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2414475
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-11-08 17:23:41 -06:00
Konstantin Makariev 64eb133992 drv8424_mmi: power up/down slider handling
Objective is to bring the slider down to COMPACT position on power
up and power down.

If slider is not in COMPACT position at power up driver will attemp
to determine its position and required direction to move it to
COMPACT based on data reported by sensors.

If slider is not in COMPACT position at power down driver won't rely
on sensors data since there is no mechanism guaranteeing that SPLI
core and sensors HAL will remaing running until slider gets to
COMPACT position. Thus entirely based on pre-defined sequence
assigned to the current position at power down.

Change-Id: Iba679c7254df5edfc061baddd3e565a5d2939a19
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2383456
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-09-21 10:20:27 -05:00
Konstantin Makariev e8ee2bd612 drv8424_mmi: add max pps interface
Added sysfs interface to set max PPS for FULL and PROLONGED
sequences. Also max PPS for 2.8 pitch has changed to 1800

Change-Id: I76d6a000f9b99c30727916368df940dd5ab163fe
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2377673
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-09-06 14:14:18 -05:00
Konstantin Makariev ef350cb89f drv8424_mmi: handling corner cases
Added handling for the following operations whether they time out
or come short, e.g. incomplete in some way or another:
 1) initial position detection and transition to known
    position if necessary
 2) transition from one known position to another

In case (1) when initial position cannot be determined, enforce
withdrawal to COMPACT.
In case (2) when destination position is not reached at the end of
transition sequence, keep driving with max torque. Panic if high
torque transition recovery fails to allow for traces collection

Change-Id: I990888baa2f14919793934eb5dbf9d255d2e5c20
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2374097
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-09-01 14:49:53 -05:00
Konstantin Makariev 6b1eef402a fixup! (CR) drv8424_mmi: motor slippage recovery
Fixing missed condition for running in no sensors mode

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I2b7bb40a38c432f301d4b1a3a3742bb0d26cfafb
Reviewed-on: https://gerrit.mot.com/2371667
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-25 16:20:32 -05:00
Konstantin Makariev 6b1f9f94b2 drv8424_mmi: motor slippage recovery
Setting time out for a transition creates a noticible delay between
end of sequence and necessary corrective action. Instead driver will
maintain a flag to indicate whether position was properly detected
based on sensors data or not. Corrective action will follow
immediately upon sequence ends and flag still indicates that position
was not detected.

Change-Id: I894f7c0638760c79dc0780a42f46bda6aadc63c9
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2367357
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-24 16:52:57 -05:00
Konstantin Makariev 0287d1a6e0 fixup! (CR) goodix_berlin_mmi: active touch area feature
Fix use of uninitialized environment variable

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I86231e6ce1b988db7c65a14a905f7d86ee00953d
Reviewed-on: https://gerrit.mot.com/2364453
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-16 13:28:18 -05:00
Konstantin Makariev 33dad69b53 drv8424_mmi: updated and new features
This change includes the following changes:
 1) Timed out position detection and motor operation
 2) Run time configurable: proximity, pitch and sensing

Timed out position detection will initiate transition to compact
assiming it starts at extended position.

Incomplete motor operations will be followed by recovery attempt.
Failed operation will be repeated as part of recovery

Change-Id: I51a7011d2c9c46955b48e8f9d6bfb4bb367e2042
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2357537
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-11 17:24:51 -05:00
Konstantin Makariev 6c77e4e403 goodix_berlin_mmi: active touch area feature
Added support for active touch area. This feature utilized by
Rollable HAL in Felix. Goodix calls this feature display modes.
Currently supports 5 modes that correspods to primary, rear and
full touch active regions in different slider positions

Change-Id: I0535c1a8c80947452bc20b92feded4d71b8a1905
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2360061
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-11 17:24:46 -05:00
Konstantin Makariev 2e7767e577 fixup! (CR) drv8424_mmi: adjust motor sequences
Last stage in 2.3 pitch devices should be at 1700 PPS

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I5551e8c76ffc281643d5db586a5505746a386cfb
Reviewed-on: https://gerrit.mot.com/2357541
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-08 15:59:22 -05:00
Konstantin Makariev a300a7c16f drv8424_mmi: adjust motor sequences
Fine motor stepping sequences tuning based on closed unit

Change-Id: Iddba5b7a5c7e52c993c16a51fa9e7ed503f2c52f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2353560
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-04 16:23:26 -05:00
Konstantin Makariev e47bd794ff drv8424_mmi: adjust sequences for 2.3&2.8 pitch
There is a mix of devices with 2.3&2.8 pitch motors. Added sequences
for both pitches. Sequence for 2.3 pitch will be set by default.
Setting sequences for 2.8 pitch requires property use-2p8-pitch set
in device tree. In sensors equipped devices each sequence will be
extended with slow PPS stage to ensure it's a bit longer and allow
successful sensors data processing

Change-Id: I2d0242f4d806632468348e609d5d0c60aebad667
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2351204
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-02 12:39:13 -05:00
Konstantin Makariev e2e8601a20 drv8424_mmi: sensor data driven position detection
Sensor data reported whenever signal changes above pre-defined
threshold. This causes data arriving in bursts when signal changes
rapidly. Handle position detection in kthread to ensure no data will
be lost

Change-Id: Ie08d428a47a792e1b80689a99d2587f4b0dbd389
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2331896
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-08-02 12:38:55 -05:00
Konstantin Makariev 683b26e7ad drv8424_mmi: fix sensors logic and data
Fixed sensors active logic, data order and values range to match
sensor hub's expectations. Timeout timer is disabled due to the
panic it causes.

Change-Id: I2ceae34b7ecdac2f790593b6ff25ea8caa34fb12
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2326249
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Yinjun Chen <a7301c@motorola.com>
Submit-Approved: Jira Key
2022-07-11 20:12:55 -05:00
Konstantin Makariev ee7e452d82 drv8424_mmi: proper IRQ setup
As it turned out nFAULT signal drops for about 200us every time BOOST_EN
enabled. Arming IRQ after SLEEP signal allowing for avoiding false
fault interrupts

Change-Id: I947839591e7c6bff2231bb8e39ae8b6fdd5c2ab7
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2317946
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-06-29 14:45:38 -05:00
Konstantin Makariev eb5123d536 drv8424_mmi: unify source code indentation
Replace leading white spaces with tabs

Change-Id: I6c26f0083cb5bae6a6c76a6fdb7e2a35b28ea936
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2316810
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-06-29 11:33:49 -05:00
Konstantin Makariev 48e2ea9a62 drv8424_mmi: dual motors fault handling
Felix has 2 motors. Thus nFAULT signal can be raised individually
for each motor. If both motors consistently failing any further
motor communications must be suppressed to avoid mechanical damage

Change-Id: I11eec76eea7b056bfa93ebe19e7bb81fe823abd2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2299699
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-06-29 11:33:38 -05:00
Konstantin Makariev 8dce1b9e6e drv8424_mmi: update position/status w/o sensors
Driver option to work w/o data from position sensors has a caveat.
Current position at power up is not detected, but set manually.
This prevents Rollable Display HAL from properly updating active
touch region. This change enforces position/status sysfs entries
update when option no sensors present in device tree

Change-Id: If7c1fc59695652816003a192323bc4393f1e184f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2294160
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-06-08 15:08:07 -05:00
Konstantin Makariev dc8383a32c drv8424_mmi: relative positions, gpio init and reset
Fix for relative positions location. Peek position is farther
from Extended than Compact. Init state can be defined in device
tree to properly initialize GPIOs. Sensors data check became
optionally configurable via device tree property.

Change-Id: I7e31801d86e782e1ac7f5bdd3df0ef6cde7b6b0a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2271623
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-24 15:15:51 -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
Konstantin Makariev 7d1b945671 drv8424_mmi: enable gpio init
Added pinctrl state allowing for initial GPIO configuration, e.g.
function, signal strength and pullups. This feature is controlled
via device tree option. Pinctrl state must be called init_state.

Change-Id: I9af30ab15845fb3db122aead96389443b9d6d707
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2270421
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2022-05-16 15:22:27 -05:00
Konstantin Makariev 0b1073803f drv8424_mmi: position detection and sensor data
Position state machine added. Current position detection will be
attempted on power up. Added sysfs interface for hall effect
sensors data. Added destination position to validate every move.
Defined default stepper sequences for major moves that can be
altered if necessary.

Change-Id: I304c7de05347267f1031fedde9d014779afc933b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2256131
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-16 14:22:16 -05:00
Konstantin Makariev a6b014440f goodix_blr_mmi: active area support
Stub functions to support optional active area region. This change
is for demo purpose only and serves as low level support for touchscreen
class driver

Change-Id: I50a3ae10cb76a5c59ff82cec028f812bf93c676e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2269390
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-16 14:22:05 -05:00
Konstantin Makariev ba8e3d9922 drv8424_mmi: fix makefile to build for android s
Makefile needed some changes to allow building for Android S

Change-Id: Id8c0756321d1048b84bdda293030e2c23a1d29ce
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2259618
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-05-16 14:21:31 -05:00
Konstantin Makariev 17acb1efa6 drv8424_mmi: status & position show methods
Added sysfs_notify call and make status & position show methods
waiting for updated values

Change-Id: Ib19dd3e362a70b6c5217821a46a2f3eb679452ac
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2244143
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-04-28 17:13:51 -05:00
Konstantin Makariev 3f6cd30c0c drv8424_mmi: status and position handling
Added support for the following:
  1) status and position changes
  2) sensor data polling
  3) allow polling status and position in HAL

Change-Id: I73d7c46f0ff7fbdaf703f16d0500c634fae1e721
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2237771
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-04-28 17:13:41 -05:00
Konstantin Makariev 9352766163 drv8424_mmi: support variable speed sequences
Support for accelerated motion. Only distinct status reported.
Added position interface to shutdown motor based on signal from
sensors

Change-Id: I44f7eeb4b86f84c2542c0c29feec42bb7b346e16
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2231441
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-04-28 17:13:27 -05:00
Konstantin Makariev f488925336 drv8424_mmi: stepper motor driver
Initial driver code for TI DRV8424 stepper motor. Based on AW8646
from Awinic. This is just to create an entry point. Needs a lot
of work

Change-Id: Ied7eb3f05801f457494feff098c3b78b3813d30b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2231338
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-04-28 17:13:17 -05:00
Konstantin Makariev bb324fae89 nova_0flash_mmi: log touch down event timestamp
Driver will log the last touch down event timestamp and expose it via
sysfs. This feature utilized by sensors to mitigate false detection of
back tap gestures.

Change-Id: I53db8f1311275ef54c795de7f4f3ed350ed37842
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2190470
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Deng <dengwei1@motorola.com>
Reviewed-by: Eric Hefner <ehefner@motorola.com>
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
2022-02-16 10:26:44 -06:00
Konstantin Makariev 6964a14473 pct1812_mmi: no touch zones
This change allows defining an artificial no touch zones. Reported
touch coordinates will never belong to these zones. This is done by
extending associated screen beyond physical touchpad Y resolution.
If physical touchpad resolution along Y axis is Yres and Z is the
dimension of such a zone, then reported coordinates will be in the
range Z < y < (Yres + Z).

Change-Id: Id53bd8b155bdaa0e2bc470f84f11286710cc27f8
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2092741
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Sridhar Vashist <svashist@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-10-22 16:29:46 -05:00
Konstantin Makariev 9e89c022e5 pct1812_mmi: custom config options
This change includes the following:
 - build ID made by concatenating FW version (reg 0x7e) and Parameters
version (reg 0x7f) info
 - boot status check in the function that reads extended info
 - added custom config options

Custom config options include:
 - max XY coordinates
 - flip reported coordinates along X/Y
 - limit the minimal distance reported in scroll gestures

Change-Id: Ia8cee82df0d69de1efd9b58e18d08f5d495254c9
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2084791
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-10-13 19:52:35 -05:00
Konstantin Makariev 1ddc49de86 pct1812_mmi: report scroll gestures
Scroll gestures will be reported as REL_WHEEL for vertical and
REL_HWHEEL for horizonatal. Motion from left to right for horizontal
and motion from top to bottom for vertical scroll gestures reported
as positive value while motion in opposite direction will be negative.

Scroll distance is measured in tix - artificial units representing
distance traveled by finger between 2 consequitive ineterrupts.
Slow scroll gesture generates only few events while fast gesture will
mimic gradual slow down with a bunch of small steps.

Change-Id: Idaa3df2f8b6297e42f198f5f3750753449585258
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2066795
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-10-13 19:52:24 -05:00
Konstantin Makariev a8e63fa964 pct1812_mmi: properly fail probe on i2c error
When I2C bus is unavailable, waiting for ready state will fail due to
I2C error and not just time out. In that case probe shall fail
gracefully and exit immediately.

Change-Id: Ida7e1877de0893d2d0e0941dbc3ef082ef7ba36f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2066631
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-09-14 14:00:59 -05:00
Konstantin Makariev b6b760eef7 pct1812_mmi: control debug messages
Added sysfs interface to control in run time the amount of debug
messages generated by the driver.

Change-Id: Ie07140e460a4e7f7b2d8a3033226e7900a594cd2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2063420
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-09-09 15:57:16 -05:00
Konstantin Makariev 88d9863a7a pct1812_mmi: added input device
Added input device support to send touch events to Android

Change-Id: I62108c2c1e861bee7a8a111ee581ecc78bf607ea
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2062416
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-09-09 10:49:06 -05:00
Konstantin Makariev 76e8e2daeb pct1812_mmi: firmware update feature
Adding missing components to support firmware update from the file

Change-Id: I5b36476e0e3d6320d2961542ca08b02ee0f3bc4b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2059355
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-09-09 10:48:52 -05:00
Konstantin Makariev 1bb8ed47e5 pct1812_mmi: self-test and sysfs interfaces
Added self-test capabilities: full raw data, SNR and draw line.
Added sysfs interfaces to support IC version and firmware update

Change-Id: I93359b60354e728853a7e43a3ca2fb71c1953987
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2041728
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-08-30 18:06:13 -05:00
Konstantin Makariev bcc68f6a8a pct1812_mmi: firmware upgrade
Added code to support FW upgrade. This code has not been tested yet

Change-Id: I677f0cc6f722515681608581afc9bff650e8a46d
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/2010238
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2021-08-05 13:37:37 -05:00
Konstantin Makariev 67a83c3bef pct1812_mmi: pct1812ff kernel driver
Kernel driver to support PixArt PCT1812FF touch IC

Change-Id: I017e5b2c34b8c833d1350494a621bf1b20b2f05d
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1994779
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2021-08-05 13:37:28 -05:00
Konstantin Makariev 7a6de0ddde bos0614_mmi: fix alignment issue
Structure alignment and missing data initialization allowed for
improperly populated value.

Change-Id: Iab8c395452db159415cf3052e7a7590770d8ae5f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1962683
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-05-27 14:37:47 -05:00
Konstantin Makariev 2107f02e1c bos0614: access to sysfs for others
Need to allow group others to access driver interfaces in sysfs

Change-Id: Ic83b07674ee5396abc58aae3cf21ddf883c3196b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1934267
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-05-20 09:11:18 -05:00
Konstantin Makariev 2873bd469d bos0614_mmi: waveform shape feature
Haptics waveform has shape up and shape down settings that were not
availbale through sysfs set_waveform interface. This change adds an
extra parameter allowing for waveform shape to be specified.

Includes some code cleanup as well

Change-Id: I1901b69520515d79f1f6ccf4d701fc373aab74e9
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1952944
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-05-20 09:11:08 -05:00
Konstantin Makariev fe99218085 bos0614_mmi: support rev C
Update kernel driver to support revision C of BOS0614

Change-Id: I025f5f9e8bf8d17eb92bcf0e1f7f940c4238e3d8
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1938220
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-05-13 20:26:50 -05:00
Konstantin Makariev 168f1b5476 bos0614_mmi: fix few bugs
Includes the following fixes:

  1) waveform ID in autoplay
  2) signed and unsigned representation

Waveform ID cannot be limited to 0&1 only.
While it's not affecting values assigned to the corresponding
parameters, it's weird to see wrong value printed in kernel log

Change-Id: I32df3ad88c1917ed33f6264c3afe672693339bdb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1942571
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-05-07 14:22:36 -05:00
Konstantin Makariev bcbc566eb4 synaptics_mmi_class: fix broken build
Since module name has changed, there is no more naming conflict between
touchscreen class based driver and older version not using class code.
Removing stale references that won't be used again and fixing broken
build on some branches.

Change-Id: Id8f9c2b0ce6e4adae31882b7d28d5c928ee71fd7
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1932146
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-04-26 09:53:29 -05:00
Konstantin Makariev 41374de0cd synaptics_mmi_class: gpio access func can sleep
Replace GPIO set/get functions with can sleep versions

Change-Id: I3d8ccdcc793d554298dbb5c226fbdb81a18c508f
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1919281
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-04-08 11:12:59 -05:00
Konstantin Makariev bb35cba6c1 synaptics_mmi_class: rename files
Renamed sorce code files to avoid build system ambiguity

Change-Id: Ibd86c6869880d340ded8548c92c2ce2cbad4ce7c
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1914332
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-04-01 08:03:02 -05:00
Konstantin Makariev dc86c37e42 bos0614_mmi: added features
Added the following features:

  1) BOS0614 registers dump sysfs
  2) reading device tree and applying default config
     in case of power cut

Change-Id: I53f1b7069ea4d74aa8b02ac525765951fe29bcce
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1889879
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-03-30 09:11:11 -05:00
Konstantin Makariev 9d0fdf76ee synaptics_mmi_class: fix build issue
Reverse condition in makefile

Change-Id: I1493d459e35bf11473ee6b053a9bb347635d0f6e
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1912717
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-03-30 09:05:34 -05:00
Konstantin Makariev b8bca73bb7 fixup! (CR) synaptics_mmi_class: banks cli bringup
Update makefiles to avoid enabling mutually exclusive options

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I3a6f8df5e2296bdf3f1bee11f1c0733a1b6f72d0
Reviewed-on: https://gerrit.mot.com/1911535
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2021-03-29 01:40:38 -05:00
Konstantin Makariev 53726bd9f3 synaptics_mmi_class: banks cli bringup
Synaptics DSX driver is still used in older products in its non-class
version. Version utilizing MMI touchscreen class has more dependencies
and it seems easier to maintain if it's kept separate.

This change combines the following:

1) added MMI status check into probe
2) added module dependencies
3) fixed up panel notifications

Change-Id: I0fcb165c39ef09e0fbd4d5b82ef8130df51ec627
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1887465
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-03-26 03:00:14 -05:00
Konstantin Makariev ecf25732a9 stmicro_mmi: build and config ids
Setup meaningful config and build IDs info to allow for automated
firmware update. Driver will be using release info field of ST
sysinfo as config ID while build ID will become a combination of
FW CFG and CFG version.

Change-Id: I53cec2619ed6afaa83994e7cd40a8254791437a8
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1902864
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-03-24 08:31:48 -05:00
Konstantin Makariev 4060c33bf0 fixup! (CR) stmicro_mmi: bug fixes and new features
Fixing up leftovers

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I559bd6ec3595eec0168af4efaa0743ef2160463a
Reviewed-on: https://gerrit.mot.com/1902234
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-03-15 21:27:38 -05:00
Konstantin Makariev 76e637d7a2 stmicro_mmi: bug fixes and new features
Includes the following fixes:
 * max coordinates values handling
 * invalid preprocessor statements
 * proper interrupt setup on FW update

And following features have been added:
 * option to flip coordinates
 * suspend/resume pin and power control

Change-Id: Id65bababf1daad807aa1b7a56bd457512bcd1b97
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1896934
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2021-03-15 18:07:59 -05:00
Konstantin Makariev 58d96a29a3 bos0614_mmi: build kernel code
Bunch of changes required to build DLKM in MMI environment

Change-Id: Id906a1153eef64111f220f70aca1f48da0132276
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1876599
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-02-26 12:42:43 -06:00
Konstantin Makariev 7dc7b88b7c bos0614_mmi: initial reference driver
Initial reference kernel driver code for BOS0614 piezo haptic IC

Change-Id: Ia7d7abca9eca2f077c830a7edada0f7450a8cebc
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1870423
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-02-26 12:42:39 -06:00
Konstantin Makariev a5e3f07479 sec_mmi: fix regulator get/put
Driver only has to manipulate with regulator reference counter when
it loads or unloads. Adding a new function that will take care of
this in probe and driver remove function. Leaving power function
operating with regulators' state only.

Change-Id: I3ef8b5a8b31ec336f1d1707069ab6330a5c5bb37
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1870282
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: litong <litong20@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-02-18 10:09:35 -06:00
Konstantin Makariev 6e7ca5ef6e synaptics_mmi_class: banks cli bringup
This change combines the following:
1) added MMI status check into probe
2) added module dependencies
3) fixed up panel notifications

Change-Id: I01a541957e3b1bdddd14b6caee4717031ff1a1fa
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1827963
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2021-02-18 10:09:29 -06:00
Konstantin Makariev 4828b47192 synaptics_tcm_mmi: mmi status check
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
2020-12-16 15:42:25 -06:00
Konstantin Makariev c06e44fe0f stmicro_mmi: mmi status check
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
2020-12-16 15:42:20 -06:00
Konstantin Makariev ca2c13ef09 sec_mmi: mmi status check
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
2020-12-16 14:35:06 -06:00
Konstantin Makariev 24469e8156 stmicro_mmi: identify product by chip id
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
2020-12-14 12:45:15 -06:00
Konstantin Makariev 8250cd3d74 stmicro_mmi: update driver to version 5.2.19
Added support for multiple ST chipsets

Change-Id: Iaf54dc69f28eaf90f0308028bde20e3a3af1fb84
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1824927
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
2020-12-14 12:45:06 -06:00
Konstantin Makariev 1cb72c3447 stmicro_mmi: use with touscreen class driver
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
2020-12-14 12:45:00 -06:00
Konstantin Makariev 263d69391c aw8697: play weak haptic on implicit setup
Vibration request (RTP excluded) comes in forms of duration or waveform
ID. Adding code to invalidate duration after playing haptic to
distinguish the case when duration has not been explicitly set. This
allows to play preset wave form (e.g. weark short haptic) in case when
vibration request is missing waveform ID or duration info.

Change-Id: I5bc548ff5a50c81ab3302976a9eb1f11028fa41b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1707674
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-08-05 12:31:16 -05:00
Konstantin Makariev 34aa364e6c aw8697: improve latency
When updating register value by mask, avoid write transfer when old
and ne values are identical.

Change-Id: Ie9a1a51684b106ee05b893805d2a3a468aa1b812
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1701667
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-08-05 12:30:44 -05:00
Konstantin Makariev baebf33071 synaptics_mmi_class: remove handler fix
External function insertion can be delayed due to ongoing firmware
update. However, detection work will still run remove handler if
function needs to be re-inserted. Check handle for NULL in remove
handler to avoid kernel panic.

Change-Id: I87282155d375548b140b8086cee59dde9a552884
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1714293
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-08-05 12:30:36 -05:00
Konstantin Makariev 9d501e96ea fts: support touchscreen class
Make initial driver's code buildable in MMI products. Added initial
support for touchscreen class.

Change-Id: Iabe4b047b8fbe7f1d1c4f0991ff9b261e4dbf673
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1682834
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
2020-08-05 09:11:49 -05:00
Konstantin Makariev ebf8bf9d1c sec_mmi: add clip area
Mechanicals shortcomings require touch events from the bottom of the
screen to be suppressed to avoid unwanted side effects. Adding clip
area option controlled via device tree to support this.

Change-Id: I744197e8db6f595ea77e482f53f29e48e0497e2d
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1707675
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
2020-07-30 14:40:48 -05:00
Konstantin Makariev f0353502be synaptics_mmi_class: postpone loading functions
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
2020-07-22 09:52:49 -05:00
Konstantin Makariev 433cbc1bde aw8697: optimize sequencer registers write
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
2020-07-15 16:07:53 -05:00
Konstantin Makariev 0eb28d01c1 aw8697: i2c transaction logging
Added I2C transaction logging facility. This feature controlled
by macro AW8697_I2C_DEBUG unset by default.

Change-Id: If5d5605ed094616a8dd866483ef40187e42bb3d4
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1680362
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
2020-07-15 16:07:41 -05:00
Konstantin Makariev 8ea2836beb aw8697: treat 100ms haptics as short vibration
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
2020-07-15 16:07:31 -05:00
Konstantin Makariev 366e3815d0 fts: initial STmicro touch driver code
Initial driver code v5.2.18

Change-Id: I1da8b0a36dbd147fee08e2ffba5d175113296c83
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1682343
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-07-14 15:37:49 -05:00
Konstantin Makariev e347ef6e9c synaptics_mmi_class: handle delayed init
When Synaptics touch belongs to secondary display and splash screen
option enabled, driver depends on DRM display notification to follow
with HW init. In this case suspend/resule and irq enable/disable
methods can be called by class driver un-initialized causing kernel
to panic. Added atomic flag to indicate device queried successfully
to prevent un-initialized methods execution.

Change-Id: I3debfb80eac129f550acdd2fc104eacc32f499a2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1641558
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-06-24 16:32:50 -05:00
Konstantin Makariev e2c0f43aff synaptics_mmi_class: panel ready handling
Detection work handling panel ready event need to check current touch
IC state before calling resume method. Sometimes driver can
transition to suspend before panel ready received, thus detection
work must query current state before calling resume.

Change-Id: I58f6e6eb7c717fb11778a5b566eb67369facd603
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1631533
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-06-19 16:30:36 -05:00
Konstantin Makariev e895977efc synaptics_mmi_class: fix suspend/resume callbacks
Touchscreen class driver suspend/resume callbacks updated to properly
enter enter/exit suspend mode.

NO_PROP_NEEDED: this driver only used in Smith

Change-Id: I12e786077bebd08f3011e128b8df665d5ec9d53b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1596492
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Submit-Approved: Jira Key
2020-06-03 10:33:07 -05:00
Konstantin Makariev 537b158992 sec_mmi: show firmware version info
Make driver reporting full firmware version info in the kernel log
on probe and upon firmware update.

Change-Id: Ide1ea8dabd2fbfc804cc3043e56fb2a56f9db5da
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1564546
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
2020-05-19 10:46:35 -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
Konstantin Makariev 421cc631f0 sec_mmi: fix compile error
Fix compilers error caused by unnecessry argument passed to printk

Change-Id: I9ca3226707ebdc5f994118cc798e4a5f2b7a52d2
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1549391
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-11 17:42:52 -05:00
Konstantin Makariev 0a6dbeff9f add panel_notifier.h to mmi kernel modules area
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
2020-05-11 17:42:48 -05:00
Konstantin Makariev fda6327097 sec_mmi: mutual capacitance range interface
New interface to retrieve mutual capacitance range. Range reported as
pair of min,max values found in raw mutual capacitance test report.
This interface will only be available in factory mode and intended to
retrieve range while running in the same controlled environment as
calibration. LSI claims range (e.g. abs(max - min)) must be below 100
to consider calibration successful. In case when driver won't be able
to retrieve test results, pair of (1,-1) will be reported.

Change-Id: I3f884c733d1f5484ad7d9780bef9cd98eff09e43
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1528998
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-04-08 23:24:36 -05:00
Konstantin Makariev 8454073236 fixup! (CR) sec_mmi: support holding grip detection
Function added in the original commit needs to have a stub when
touchscreen class driver is not used to avoid unknown symbol
DLKM loading error

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I1b9891c24a18ec97ac4b171ecfe928b6e6a608de
Reviewed-on: https://gerrit.mot.com/1520688
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-24 14:16:46 -05:00
Konstantin Makariev 32c34e9aff sec_mmi: support holding grip detection
Driver provides access to holding grip info reported by firmware via
sysfs entry. Driver notifies HAL about holding grip info changes.

Change-Id: Ifff66d0a06b904e43dc88432b930e51478c4fa59
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1517457
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:34:30 -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
Konstantin Makariev 5323ba6826 fixup! (CR): Solve the problem of I2C error when power off
Fixup for the original change. Resore registers values on resume.

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I40a9b4683e7bd9764fc2f06b341b379faf884729
Reviewed-on: https://gerrit.mot.com/1515374
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-17 17:01:41 -05:00
Konstantin Makariev 1cc25d4efb sec_mmi: cleanup device tree parse logs
Make sure non-fatal errors do not appear in the kernel log

Change-Id: I57a973709eb0f2ae1b6a2df7375fd8e821f6cfee
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1497921
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-02-13 14:56:37 -06:00
Konstantin Makariev 5775565ac4 sec_mmi: add pill region support
Pill region support added to improve edge double tap detection.
UI will utilize IMotTouch HAL to control this feature. Feature
needs to be optionally enabled by adding sec,pill-region-control
property to device tree node.

Change-Id: I582063c653ddd7631e6bf843c981726997d7c1ad
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1497429
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-02-13 10:38:46 -06:00
Konstantin Makariev 783a66af57 touchscreen_mmi: secondary touch panel supplier
Extract panel supplier name from different properties for primary
and secondary touchcsreens.

Change-Id: I1fcf162bb9f2090ef967343467aa1bbf2803a35a
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1489322
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
2020-01-29 09:04:57 -06:00
Konstantin Makariev 7fff1f29a3 synaptics_mmi_class: fix firmware file name
Firmware file name was truncated causing update to fail.

Change-Id: Ibccd02705d4778653db1f147ff7a4fe91de95bec
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1489162
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-28 09:51:40 -06:00
Konstantin Makariev 1c0beef3e2 fixup! (CR) sec_mmi: update Kbuild
Config option PANEL_NOTIFICATIONS only set for products using
touchscreen_mmi class code.

Mot-CRs-fixed: (CR)

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Change-Id: I01d82a3a8df2a5684b70675c0676ff29aa7cbdc5
Reviewed-on: https://gerrit.mot.com/1488434
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-24 15:53:37 -06:00
Konstantin Makariev c8b1751705 synaptics_mmi_class: start using touchscreen_mmi class
Synaptics driver code aligned with touchscreen_mmi class code. Despite
changed directory name, module name is still synaptics_mmi. Synaptics
driver with class support will build whenever touchscreen_mmi.ko
exists in the list of product DLKMs.

Change-Id: I7aabf417292981d09f4c431d45815ff16e80ba62
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1472910
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-24 13:25:13 -06:00
Konstantin Makariev 5c64bb1f67 touchscreen_mmi: match panel notifier with control dsi
In multiple display configuration, panel notifier will be called for
each display. Control DSI associated with display is passed as a
parameter to panel notifier and will only be actionable in the case
when notification belongs to display.

Change-Id: I6abbf2d34aaedd230ac1de79100babed20ed712b
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1482868
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-24 13:24:13 -06:00
Konstantin Makariev 2cd3a2c96a synaptics_mmi: add touchscreen_mmi class check
This DLKM will only be built if touchscreen_mmi class is not used
for backward compatibility.

Change-Id: Iced4457c6f87faa726ea6de44f9f625955d646fb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1479387
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-24 13:24:06 -06:00
Konstantin Makariev 757e284aca sec_mmi: update Kbuild
Need to build DLKM using touchscreen_mmi class code as well as old
fashion way.

Change-Id: I2013c074b603ac1e048fc2c59dc19efc853808d5
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1486524
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-24 13:23:37 -06:00
Konstantin Makariev e757546214 sec_mmi: do not calibrate on firmware update
Enforced calibration on firmware update might cause problems when
something is touching the screen while it runs.

Change-Id: I7296d3c00881ed482cfa5dadd16de2d09c935230
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1487884
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2020-01-24 11:42:28 -06:00
Konstantin Makariev 20f126bfcb sec_mmi: grip suppression control interface
Adding sysfs interface to control grip suppression in run time
into LSI DLKM.

Change-Id: Id7a9e8df73c815e56093acdbb1dd5602358f58eb
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1482861
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-16 15:15:35 -06:00
Konstantin Makariev 7f7f562b77 aw8697: boost ram loop mode playback
Awinic suggested to boost RAM loop mode haptics playback.

Change-Id: I7b9ac1368809360ed6c38d3a624aeee9d24c1846
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1479394
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-03 16:38:31 -06:00
Konstantin Makariev ec8059b5ef sec_mmi: single/zero tap report format change
LSI came up with reporting MMI gestures via Gesture Event Type VENDOR
(0x8). Single tap has Gesture Event ID (0x1) and zero tap has Gesture
Event ID (0x2) followed by coordinates values.

Change-Id: I1c3b6e6e96dadd2c7f8281378f7f1257f743a4cd
Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-on: https://gerrit.mot.com/1475704
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2019-12-20 20:24:16 -06:00