Commit Graph
100 Commits
Author SHA1 Message Date
litong20 89cb6ae120 need to clear jiffies in non-charging state.
The jiffies value is only recorded in the charging state,
and it needs to be cleared in other states.

Change-Id: I9beb3465a24784d35399c10733416f3104269678
Reviewed-on: https://gerrit.mot.com/2601217
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-05-10 03:03:57 -05:00
litong20 aca130a133 use the battery voltage of fuel guage in charging logic.
use the battery voltage estimated by the fuel gauge in charging logic,
not the adc value of the charge pump.

Change-Id: Ia001e41dc909ce3ec57ddbcfe888a7b566ad358a
Reviewed-on: https://gerrit.mot.com/2599627
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-05-08 21:20:41 -05:00
litong20 eda20302a8 Need to initialize full charger capacity of 100%.
cw2217b:
Need to initialize ui_full
Change-Id: I4ae00866e93a56625cd4ec529c441f943f70060b
Reviewed-on: https://gerrit.mot.com/2591425
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-05-06 05:40:07 -05:00
litong20 1e1506a5e5 fg_cw2217b: Ensuring monotonic variation of soc
fg_cw2217b:
Ensuring monotonic variation of soc

Change-Id: If13fbfcbd32e8e8897388b236c5355838c7e114c
Reviewed-on: https://gerrit.mot.com/2586781
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-04-24 03:57:16 -05:00
litong20 9eb7fe65ac Ensuring monotonic variation of soc
Ensure that the power monotonically increases during charging
and monotonically decreases during discharging.

Change-Id: I4ef202daf4b65e0640e4794d7f74a17241051c25
Reviewed-on: https://gerrit.mot.com/2575379
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-04-17 05:06:25 -05:00
litong20 e831fbc96e cw2217b: add some logs for soc jumping debug.
In order to debug the problem of fuel gauge soc jumping,
add some debug logs,

Change-Id: I5b6adf50d496126059366a0c322915a0f533acd4
Reviewed-on: https://gerrit.mot.com/2567828
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2023-04-06 21:24:52 -05:00
litong20 c1f9c09b52 Support the input charge current limit for wireless charger
sgm4154x:
Support the input charge current limit setting for wireless charger.

Change-Id: Iaaadbf4936099c7614471d72d288c26969862095
Reviewed-on: https://gerrit.mot.com/2557864
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-04-03 04:47:00 -05:00
litong20 aea77fa8f4 The current units should be consistent.
The unit of thermal_fcc_ua is ua, but the
unit of target_fcc is ma.

Change-Id: Ic7065344f417adbd840efe473005861a69428e70
Reviewed-on: https://gerrit.mot.com/2536876
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-03-13 01:52:26 -05:00
litong20 e9e36e9fca ensure that user configuration takes precedence.
sc760x:
If there is no user configuration, set the value of thermal limit.

Change-Id: I0866031ab7f33445846d868d2fa4202c51812185
Reviewed-on: https://gerrit.mot.com/2532545
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Tao Sun <suntao2@motorola.com>
Submit-Approved: Jira Key
2023-03-08 03:38:23 -06:00
litong20 d18cb2d891 support transfer the flip target fcc to main battery.
Transfer the target fcc value of the flip battery to the main battery
through glink for power dynamic configuration.

Change-Id: I3b8b2029e5f5cdf1b7ccc49fd7ce32a63b94c957
Reviewed-on: https://gerrit.mot.com/2520452
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
2023-02-27 23:44:54 -06:00
litong20 7b5ea4f9cf check the charger status again when devices shutdown.
When the device shutdown due to unplugging the charger in factory mode,
we need to check the status of the charger again.

Change-Id: I43160b0802a700be88542427bad8a75fcd4a4e13
Reviewed-on: https://gerrit.mot.com/2512562
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2023-02-17 02:57:00 -06:00
litong20 a5eafafcdd Enable the charge IC after the detection compelte.
Disable charging if charger input is not ready in case the
charger input current limit does not match the target.

Change-Id: I8bc2a3b10e18c5dd7b034c760731bb04f3c0d4ca
Reviewed-on: https://gerrit.mot.com/2440276
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-12-01 04:36:41 -06:00
litong20 77f7c23afb fix wired charging error online logic
Only when wireless charging is used, re-judgment whether it is online
or not. but wired charging maintains the previous online status.

Change-Id: I01b2074f496867237fc733645a088329e5432818
Reviewed-on: https://gerrit.mot.com/2442366
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-11-27 23:57:30 -06:00
litong20 295d99566c cancel the work befor scheduling.
sgm4154x:
cancel the work befor scheduling.

Change-Id: Ia27360757b1fd06cf2f15c23debd7c41b63951d9
Reviewed-on: https://gerrit.mot.com/2437359
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-11-23 21:26:52 -06:00
litong20 58ad7de68c fixed unused variable 'batt_curr' error.
cw2217b:
delete unused variable 'batt_curr'.

Change-Id: I4e463cffa73248fd15cfcf3c44c2f2340d15672b
Reviewed-on: https://gerrit.mot.com/2429659
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-11-14 20:21:33 -06:00
litong20 5e838bd297 Add charging state for wireless charging.
sgm4154x:
Add the charging state for wireless charging in flip battery.

Change-Id: Id078692862c927e5254dc02ceee425785babc43d
Reviewed-on: https://gerrit.mot.com/2427231
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-11-14 04:37:25 -06:00
litong20 ee381ff374 Support wireless power source as charger input.
sgm415x:
Support wireless power source as charger input.

Change-Id: Iad9cd8526aa1697b9d749264b27e1d0db06e0ac0
Reviewed-on: https://gerrit.mot.com/2417538
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-11-11 01:46:55 -06:00
litong20 c99b4911b9 Reconfigue the charger for user input or chip reset
Reconfigure the charger when charger IC reset
or user input.

Change-Id: I71f910b122fd1e64c22521bc4cf72dfb3dae7ee1
Reviewed-on: https://gerrit.mot.com/2427353
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-11-11 01:46:52 -06:00
litong20 2ec619a4b7 Juno: Keep the current limit unchanged.
When the user sets the input current limit or constant
charge current through sysnodes, these values are fixed
and do not charge with other logic.

Change-Id: Iea171ce60ab6e1c1605a7dc89aadaecaecaba4c1
Reviewed-on: https://gerrit.mot.com/2423701
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-11-08 03:48:30 -06:00
litong20 b67dba787f Add fcc_ma/fv_mv and thermal_level debug info in kernel
Charging:
Add thermal_level, fcc_ma/fv_mv and otg_enabled debug info in kernel

Change-Id: Ieb994c688641f1a2b26c665c875433295bd0f597
Reviewed-on: https://gerrit.mot.com/2339182
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-by: Wentao Xu <xuwt2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-07-26 07:41:29 -05:00
litong20 792c7174a0 Integrate goodix stylus Direct Data Access feature
In order to reduce stylus writing latency,MotoNote read touch data from
touch driver via goodix_pendev character device directly,this change
bypass the HAL layer and input subsystem.

Change-Id: Iccb121336992574f03fb89ff5cf4cc074ff3dc50
Reviewed-on: https://gerrit.mot.com/2247007
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-05-16 06:14:05 -05:00
litong20 de4584117f Fix goodix touch driver build error
Fix goodix touch driver build error that variable defined but not
used and return value not match.

Change-Id: Ibded582ff67e524be8b148592e8577f4864417c8
Reviewed-on: https://gerrit.mot.com/2265448
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-05-16 01:18:32 -05:00
litong20 433150deb9 Clear data buffer after releasing connects.
1. Clear data buffer after releasing connects.
2. Filter invalid events during event handler
and no longer report.

Change-Id: I24ab2257c7f7641188fae7898cd4af7514066905
Reviewed-on: https://gerrit.mot.com/2253924
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
2022-04-27 20:59:21 -05: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 da392862a5 Fix build errors with missing header files.
Error:
cyttsp5_regs.h:62:10: fatal error: 'linux/cyttsp5_core.h' file not found


Change-Id: I824cd60cb7cf62f5e57f8850c10e18f95a9777e0
Reviewed-on: https://gerrit.mot.com/2203813
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:46 -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 78d8b6b65c Solve the problem of sending command conflicts
TP:
When sending multiple commands at the same time, the ack signal of
unexpected commands may be read, resulting in command sending errors.

Change-Id: I6f222a20725f5adc1509a01bd29f972c3171e56d
Reviewed-on: https://gerrit.mot.com/2178632
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-01-26 05:17:02 -06:00
litong20 d803d067a0 goodix: Open the touch esd check function
TP:
1. Open the esd check function,when the touch IC dies, it can be
restored to normal by hardware reset.
2. Increase the delay between the stylus command and the clock to
prevent the IC from hanging up.

Change-Id: I20617d63c0d53d60d1100b9eb26182096c657b16
Reviewed-on: https://gerrit.mot.com/2164520
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2022-01-07 00:34:15 -06:00
litong20 8487ee8e40 lock mode switching operations for thread synchronization.
TP:
Lock mode switching operations for thread synchronization
to prevent conflicts.

Change-Id: Ia7158b29bb697187e0b326aeb8ea5adbf582dc12
Reviewed-on: https://gerrit.mot.com/2160991
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2022-01-05 03:48:59 -06:00
litong20 4eceb69f09 goodix: Modify the report rate command.
00 00 05 C1 00 C6 00//exit period report
00 00 05 C1 02 C8 00//480Hz
00 00 05 C1 03 C9 00//576Hz

Change-Id: I07b03820a05636488935f0955ca3a4c7298d5371
Reviewed-on: https://gerrit.mot.com/2159224
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-12-31 02:01:26 -06:00
litong20 ce42066416 Increase the number of I2C retries.
TP:
When the screen is off, the TP driver starts to read gesture events
after receiving the interrupt.But I2C bus is still in the suspended
state, so gesture events cannot be read out.

geni_i2c_xfer System suspended
[GTP-INF][goodix_i2c_read:82] I2c read retry[1]:0x10308
geni_i2c_xfer System suspended
[GTP-INF][goodix_i2c_read:82] I2c read retry[2]:0x10308
[GTP-ERR][goodix_i2c_read:87] I2c read failed,dev:5d,reg:10308,size:26
[GTP-ERR][gsx_gesture_ist:236] failed get gesture data





Change-Id: If3ebbc4b65829def142835c51816b70e0a474865
Reviewed-on: https://gerrit.mot.com/2158726
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-30 05:44:22 -06:00
litong20 2d3b0cbc54 goodix: Solve cpu_latency_qos_add_request called warning
TP:
WARNING cpu_latency_qos_add_request called for already added request

Change-Id: If99edff041cfeb57c45d9f6e2119ad24bf35f3ab
Reviewed-on: https://gerrit.mot.com/2147984
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-22 00:45:32 -06:00
litong20 c042d862af Do not re-enable the stylus when the stylus mode is switched
TP:
  When exiting the stylus mode, the IC will send an abnormal reset
interrupt. At this time, the stylus will be enabled again,
but because the stylus clock is closed, the touch will not work.

Change-Id: Id1b393de2b2bee5b06e9d4f5b74dfd301be4547d
Reviewed-on: https://gerrit.mot.com/2150837
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-21 19:46:47 -06:00
litong20 0c96a30306 Disable irq before entering gesture mode and IC resetting.
TP:
Disable interrupt before entering gesture mode and IC resetting.


Change-Id: I056458b7b405c1ba46f27eda9754c9d64eeeaef0
Reviewed-on: https://gerrit.mot.com/2149576
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-20 19:45:37 -06:00
litong20 4710e99d3f Support resend stylus cmd after abnormal resetting.
TP:
Support resend stylus command after abnormal resetting.

Change-Id: I9cd2885988f92ca8d50b96f2b5c7569439e277b2
Reviewed-on: https://gerrit.mot.com/2147994
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-20 02:36:43 -06:00
litong20 95429c472f Record and restore the value of the mode
TP:
Record the value of the received mode from system and the value
successfully set to the touch IC.

Change-Id: Ie10f25be6d0d9fe9d21cf385a626496cc9aedfa5
Reviewed-on: https://gerrit.mot.com/2144916
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-20 02:36:31 -06:00
litong20 b75bcbf8cf goodix: support film sensitivity function.
TP:
Support film sensitivity function in RoguePRC project.

Change-Id: I830adb55e9b9b93aef6dc90d757ef9eaf206a2cb
Reviewed-on: https://gerrit.mot.com/2134201
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-10 09:00:15 -06:00
litong20 dae8b800e2 Support report rate switch in RoguePRC
1. If the interpolation mode is disabled, the report rate is the
default 240Hz(Hiphic) or 360Hz(Hiphi)
2. If the interpolation is enabled and the refresh
rate is 144Hz, the reporting rate is 576Hz(Hiphic) 720Hz(Hiphi)
3. At other refresh rate, if the interpolation mode is enabled, the
report rate is 480Hz(Hiphic) 720Hz(Hiphi).

Change-Id: Ibcd6ba61457e5e5f6fd32a6583f5bdcada531fc5
Reviewed-on: https://gerrit.mot.com/2134669
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-12-10 08:59:57 -06:00
litong20 6a05847226 IC needs to confirm the device within 50ms after power-on
Goodix IC requires device confirm within 50ms after power on.
If this time exceeds 50ms, the i2c firmware will colse the
spi channel, and the spi firmware will close the i2c channel.

Change-Id: I178cea55e280ffb53fca444cdd8ed32905a928c5
Reviewed-on: https://gerrit.mot.com/2133988
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-12-02 23:37:02 -06:00
litong20 154ec7b967 No need to send the suspend command when power off.
When entering the deepsleep state, touch IC will power off,
so there is no need to send the suspend command.

Change-Id: I6b6a3b29eb3b1acee6c72db2b97fdb90710f25bc
Reviewed-on: https://gerrit.mot.com/2134059
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-12-02 23:36:49 -06:00
litong20 c7ab15c6bf Add pm_qos control to reduce the interrupt responce time
request pm_qos during the interrupt processing to prevent
the CPU from going to sleep state.

Change-Id: I95728329c7df7a4376415b9d8ec20d6525fe45c8
Reviewed-on: https://gerrit.mot.com/2124280
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-11-24 06:21:18 -06:00
litong20 bad4b4d393 Add calibration noise error handler
TP:
 If the noise detection fails after calibration, the touch IC will
 report the "F3 E0" event, and when the event is received,
 the touch driver will send the calibration command again.

Change-Id: Ifd2f4bd287fbdc7861a127d2ffd481f635d963c7
Reviewed-on: https://gerrit.mot.com/2123149
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-22 20:02:58 -06:00
litong20 cf6c77763e Add pm_qos control to reduce the interrupt responce time
request pm_qos during the interrupt processing to prevent
the CPU from going to sleep state.

Change-Id: I78a67ef1aa9a363e9d7f9546b8d4c20a81ac04c4
Reviewed-on: https://gerrit.mot.com/2107618
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-22 06:45:24 -06:00
litong20 ce40bdb1a9 support pmk8350 gpio3 as stylus clk.
TP:
  Support Pmk8350 gpio3 as the stylus clock for Rogue PVT, and the
output frequency is 19.2Mhz.

Change-Id: I5dae054b6170b921b7afee1853b7de7995531705
Reviewed-on: https://gerrit.mot.com/2111742
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-11-17 00:39:18 -06:00
litong20 9fcd292e9a support goodix edge suppression function.
TP:
Command: 00 00 06 17 data0 data1 ChecksumL CheckSumH
data0 rotation direction:
0x00 Default  
0x40 Left rotation 90
0x80 Right rotation 90

data1 edge suppression area
0x00 Default  
0x40 Level1 R-200 quadrant Pixel
0x80 Level2 R-250 quadrant Pixel

Change-Id: I0cafadf1f5238198368f7f9f7c51cbcd41f9af1a
Reviewed-on: https://gerrit.mot.com/2116171
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-15 04:04:10 -06:00
litong20 e2b20f5f02 goodix: Support interpolation game mode function.
Command:
Enable interpolation:  00 00 05 C2 01 C8 00
Disable interpolation: 00 00 05 C2 00 C7 00

Change-Id: I34eeac1a1305d6727c3a82ad6fecb023674da086
Reviewed-on: https://gerrit.mot.com/2115930
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-15 04:02:34 -06:00
litong20 553a486ed7 stmicro: Add the judgment of the sensitivity mode value.
TP:
Since the sensitivity node is a general node in the framework,
the judgment of the mode value is increased.

Change-Id: I82d2727e8ebd60c96c13edf2dd923630dc828290
Reviewed-on: https://gerrit.mot.com/2116173
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-15 04:02:24 -06:00
litong20 e028939dc0 Support leather mode setting.
1. Add the function of leather mode in the
univeral interface sensitivity.
2. The mode setting instructions are as follows:
mode = 0x00/0x01 Exit/Enter film sensitivity mode.
mode = 0x10/0x11 Exit/Enter leahter sensitivity mode

Change-Id: I35d49aaf225e8b941a4f2552a2ccd9d33a34dd92
Reviewed-on: https://gerrit.mot.com/2113437
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-12 02:23:32 -06:00
litong20 1d0fe48a70 Close the stylus clock when system suspend.
1. Close the stylus clock when system suspend and the stylus
mode exits.
2. Add 16ms delay between each command.

Change-Id: I6dff47410315272167d47a733b1058736f72c737
Reviewed-on: https://gerrit.mot.com/2108295
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-05 01:55:50 -05:00
litong20 70be896a4a Support goodix single tap to wake the device
TP:
Support goodix single tap to wake the device.

Change-Id: I038edf7655f6944653d22e13c3ec056baca77084
Reviewed-on: https://gerrit.mot.com/2105483
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-11-02 02:49:24 -05:00
litong20 15813afb44 goodix: support charger mode switching.
TP:
support charger mode switching.

Change-Id: Iae244cf9a74d978b9d1841842f5382fed9cf9a74
Reviewed-on: https://gerrit.mot.com/2101710
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-10-28 03:57:38 -05:00
litong20 0d19c2eeb7 stmicro: support touch film sensitivity switching
TP:
support touch film sensitivity switching
With phone film : C0 20 01
Without Phone film: C0 20 00

Change-Id: I5ef4ecfc3e3a7b40235350ec11236ce11fdf7fdb
Reviewed-on: https://gerrit.mot.com/2098548
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
2021-10-27 21:05:24 -05:00
litong20 d17c8eb6c6 fts: deleate the PM_WAKEUP_EVENT in interrupt threaded
TP:
The PM_WAKEUP_EVENT causes a delay of more than 4ms before
starting i2c transmission.

Change-Id: Id5dc406f8e7b675c4d34597b37fa12992cdb24d6
Reviewed-on: https://gerrit.mot.com/2098214
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-10-25 22:19:06 -05:00
litong20 98012f1ed0 Suspend and resume process using touchscreen class.
TP:
Not use the PM suspend and resume process, but use
the touchscreen class unified process control.

Change-Id: I8d104c0b44abba22d624187cf351d2fd2eb4fe0f
Reviewed-on: https://gerrit.mot.com/2097211
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-10-25 02:46:25 -05:00
litong20 54686bafb0 Solve goodix tp firmware upgrade problem
1. In the case of firmware damage, the input device is directly released
when probe, and the input device is accessed when the system is
suspended, causing the system crash.
2. When the firmware is damaged, because the product information cannot
be read, the touch upgrade script cannot repair the firmware.
So we need to use the ic_name in the dtbo file.
3. When probing, if obtaining the configuration file fails, reflash the
configuration file after the firmware upgrade is completed.

Change-Id: I10cf96e3721d539d6e15f4c6cc490eb0f4328700
Reviewed-on: https://gerrit.mot.com/2095432
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-10-23 04:28:17 -05:00
litong20 a745460a6f touchscreen_mmi: Support refresh reate notification in Rogue
1. dsi_freq_head is undefined, so add Module.symvers of display driver.
2. Use the KBUILD_OPTIONS to pass the configuration parameters to
the Kbuild filed.

Change-Id: I24d792a26cb1d3a9f8beca8089cea7116ae1a669
Reviewed-on: https://gerrit.mot.com/2097103
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-10-22 04:31:54 -05:00
litong20 bd038d5ab1 Update goodix berlin touchscreen driver to v1.2.3
1. Modify the factory test code
2. Modify the waiting time during the firmware upgrade process.
3, Report the tile_x and tile_y of stylus.

Change-Id: I8e398ff731e59b179edf28c6d5cd5923ec0083fe
Reviewed-on: https://gerrit.mot.com/2090807
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-10-18 00:40:00 -05:00
litong20 8b83241083 goodix: support stylus mode switching.
TP:
Support stylus mode switching.
0 00 05 A4 00 A9 00 //close stylus, finger:360 Hz
00 00 05 A4 01 AA 00 //enable stylus, finger: 120Hz stylus:240Hz

Change-Id: I05d38631fa8cd4a2b35597dd182578b0c9e4909e
Reviewed-on: https://gerrit.mot.com/2088362
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-10-13 00:51:44 -05:00
litong20 dc8be450b4 Modify the config id and build id
1. Modify the config id to touch class common time format.
2. The reset operation has been performed after powe on,
so delete the redundate reset operation.

Change-Id: Ia93c8491c62f51d7effc56479462bb90a7a43c9f
Reviewed-on: https://gerrit.mot.com/2075360
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-10-11 06:02:31 -05:00
litong20 94555cd54a Resolve compilation errors for unused functions
TP:
Resolve compilation errors for unused functions ts_mmi_kobject_get_path.

Change-Id: I22b213db2304f4c3c73867ad9625f20715a4a528
Reviewed-on: https://gerrit.mot.com/2077104
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-27 00:27:36 -05:00
litong20 a6e5f91024 solve the kobject_get_path undefined in gki build
TP:
The kobject_get_path function is not in Google's
whitelist, so reimplement the function.

Change-Id: I162e4d91cc5d8e918da1e7497fba7d48df9e86ef
Reviewed-on: https://gerrit.mot.com/2076930
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-26 21:02:55 -05:00
litong20 8fae36905f Only save test file in factory build
TP
The kernel_write is not in google white list, and we only need the test
data saved during the factory build.

Change-Id: Iad0cb0a32902af116425ef26d53397d53973f7db
Reviewed-on: https://gerrit.mot.com/2075505
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-26 21:02:46 -05:00
litong20 d0d2dc4963 Does not distinguish 9916 and 9916P touch chips.
Because 9916 and 9916P use the same firmware file and configuration file,
so the chip does not need to distinguish between 9916 and 9916P.

Change-Id: I08921833b01ee1700bd6c81bbf10e204e57b080a
Reviewed-on: https://gerrit.mot.com/2070699
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-23 07:37:18 -05:00
litong20 4094cad855 goodix: support factory tcmd test.
TP:
1. support matching limit files of multiple panels.
2. save the test results, and the file name contains the test time
and panel name.

Change-Id: Ife15047d24b39680a1c0c94f9c405796c35be47d
Reviewed-on: https://gerrit.mot.com/2068602
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-17 04:20:11 -05:00
litong20 84617eb200 goodix: update test file to 1.2.2 version
TP:
Add goodix berlinD related test in 1.2.2 version.

Change-Id: I25e6e5e4e93b2d3155f2dd76fd017074fb13ec2c
Reviewed-on: https://gerrit.mot.com/2066818
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-17 04:18:54 -05:00
litong20 3b040bb312 goodix: enable stylus clock on Rogue project.
TP:
Enable stylus clocks as touchIC external clock for active pen.

Change-Id: I213a83cbe0384a0fa8f77342a1225b6d92a63f71
Reviewed-on: https://gerrit.mot.com/2063784
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-15 03:54:45 -05:00
litong20 f243369174 Support loadding multiple config files
TP:
Support loading different configuration files according to
the panel name.

Change-Id: Ibe6d99c99f08951b35100921c4eaa587048aee1f
Reviewed-on: https://gerrit.mot.com/2062784
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-09-10 05:47:38 -05:00
litong20 c67f5d4ade Support touchscreen calss in the goodix drvier code.
TP:
Add initial support for touchscreen calss in the goodix drvier code.

Change-Id: I056be5b1d6f5f92493a77c237727a5ee9eeb4e11
Reviewed-on: https://gerrit.mot.com/2038606
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-09-07 22:08:57 -05:00
litong20 50d5a673b2 goodix_brl_mmi: Add mmi status check.
TP:
1. Add "mmi,status" check to goodix driver's probe.
2. Add touch pinctrl settings.

Change-Id: I34581d199a80c4e03cd0e94332ca5cd8ad6d87e4
Reviewed-on: https://gerrit.mot.com/2053118
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-08-30 02:41:46 -05:00
litong20 9432419679 Modify the goodix driver code format
TP:
Delete the symbol ^M at the end of each line of the driver code.

Change-Id: Icf5b64b01ae3c27c1d942e0d0d02056f32cb41c8
Reviewed-on: https://gerrit.mot.com/2038562
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-08-30 02:41:38 -05:00
litong20 f7b5112616 Support sensitivity mode function
TP:
1. Sensitivity mode off
1st finger filter 01, 2nd finger filter 03
C0 17 01 03 

2. Sensitivity mode on
C0 17 00 00


Change-Id: I69f01316a3354650026a37af69ef27f88a5716a6
Reviewed-on: https://gerrit.mot.com/2033528
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
2021-08-11 22:11:54 -05:00
litong20 d7e576198b Update goodix berlin code to V1.1.21
TP:
Update goodix berlin driver code to V1.1.21.

Change-Id: I56ac06c10f7c3ea9bb3bf936fe8e791f8753740a
Reviewed-on: https://gerrit.mot.com/2027427
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-08-09 00:48:29 -05:00
litong20 6f79fdf2ff Support touch corner/edge suppression function.
TP:
Command: C0 1F Byte[0] Byte[1]
Byte[0] Device posture:
	0x00 portrait(Default)
        0x01 90 degrees right rotation
        0x02 90 degrees left rotation
Byte[1] Suppression area
	0x00 normal (0 pixel)(Default)
        0x01 Small area suppression (R-200 quadrant Pixel)
        0x02 Larger area suppression (R-250 quadrant Pixel)

Change-Id: I30334a49740a5fb36c4ff2108c93c059300a7484
Reviewed-on: https://gerrit.mot.com/2030537
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
2021-08-04 01:13:51 -05:00
litong20 6493ee9055 Use bi_bootmode instead of mmi_bl_bootmode.
In Android S-8450, the bootconfig feature begins enable.
So that androidboot.bootreason canot be found in the cmdline.
And compatibility has been done in mmi_info.

Change-Id: I96b3d9ed988416c640c0b115cdad9fe1fd11a34b
Reviewed-on: https://gerrit.mot.com/2020001
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-07-22 03:23:27 -05:00
litong20 6e3e921cf0 When find drm panel successfully, set panel_status to 0
After successfully finding the drm panel, set panel_status to 0,
otherwise it will re-schedule work and continue to look for drm panel.


Change-Id: I121d24a66d518b75b73d130b18394c4d7ffead11
Reviewed-on: https://gerrit.mot.com/2021004
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-07-22 01:25:04 -05:00
litong20 ac7db4fdec put register_panel_notifier into ts_mmi_worker_func.
When there is no need to find the active panel, that is,
the panel_status is always 0, register panel notifier normally.

Change-Id: I2aef34a1fd7ca310bf1fc6a4d9501413208d14c9
Reviewed-on: https://gerrit.mot.com/2019893
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-07-21 01:29:08 -05:00
litong20 988952bcc6 Delayed active panel detection
TP:
When the touchscreen modules loads faster than display,
the acive panel may not be found. So we look for the
active panel again through delay work.

Change-Id: Ife617c4cf19035120c5f381bb6da8f28346a9f34
Reviewed-on: https://gerrit.mot.com/2013538
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
2021-07-20 21:23:18 -05:00
litong20 17880786ac Close the calibration operation after fwupdate.
TP:
After the touch fwupate, if the config id is different
from before, the calibration operation will be tiggered.
But try not to add calibration operations in touch driver.

Change-Id: Id82c331c4617a03cb2351987380eae96d837fb7e
Reviewed-on: https://gerrit.mot.com/2002079
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-07-06 23:09:07 -05:00
litong20 eba6280929 Modify the touchscreen report rate
1. When the interpolation is disabled, the report rate is 240Hz;
2. When the interpolation is disabled, and the refresh rate is 144Hz,
the report rate is 576Hz, else the report rate is 480Hz.

Change-Id: I863154a271d5968aab36d0bc3366f4597a30808d
Reviewed-on: https://gerrit.mot.com/2001030
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-07-03 05:08:24 -05: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 bfda841cba Bringup stmicro_mmi touch module in kernel-5.10
1. warning: ftsFrame.c: comparison of array 'data' equal to a null
pointer is always false.
2. error: fts_proc.c: incompatible pointer types passing 'const struct file_operations *'
to paramet proc_create(DRIVER_TEST_FILE_NODE, 0777, fts_dir, &fts_driver_test_ops);
3. use timespec64 instead of timespec type.

Change-Id: I46604d6c23b0b69238638f162f390a76ef08eeb6
Reviewed-on: https://gerrit.mot.com/1990708
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:33 -05:00
litong20 b714bb172b Modify the ITO test command
Modify the ITO test command from "A4 04 FF FF"
to "A4 04 FF 01", delete unnecessary tests.

Change-Id: I7884e7503c233b71f7ba342f2386f82f3564898e
Reviewed-on: https://gerrit.mot.com/1991007
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Junpeng Wan <wanjp4@lenovo.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-06-24 07:38:34 -05:00
litong20 9452937a05 use disable_irq_nosync in interrupt handler
When disable_irq is used in interrupt function, touch driver is blocked.

Call trace:  
        : __switch_to+0x328/0x358
        : __schedule+0x6f8/0x884
        : schedule+0x80/0xb0
        : synchronize_irq+0x7c/0xb8
        : disable_irq+0x70/0x9c
        : fts_disableInterrupt+0x58/0xbc [stmicro_mmi]
        : fts_chip_powercycle+0x64/0x26c [stmicro_mmi]
        : fts_error_event_handler+0x98/0x134 [stmicro_mmi]
        : fts_event_handler+0xa4/0x11c [stmicro_mmi]

Change-Id: Ic84a111aebfa93ea3386fc363105e341efc1cc09
Reviewed-on: https://gerrit.mot.com/1984070
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-18 07:28:04 -05:00
litong20 74ec6c7a60 Fix the build error on denver project.
Error:
nt36xxx_fw_update.c:23: Panel notifier undefined!!!
[-W#warnings]\n' error, forbidden warning: touchscreen_mmi.h:145

Change-Id: Ibdae0b030dce55f57cdf3da04c09c8f0f9999dbf
Reviewed-on: https://gerrit.mot.com/1983455
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-17 21:56:21 -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 4ddfc550ae novatek: Support parameter upgrade method
Support to upgrade TP firmware through the
Parameter APK.

Change-Id: I370e175db38ab7f5de3aa4cc5aabae7ea2f219c6
Reviewed-on: https://gerrit.mot.com/1979783
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Submit-Approved: Jira Key
2021-06-17 02:30:42 -05:00
litong20 38f8cc8aae Add sense off process to enter the idle process.
Add sense off process berfore sense on to avoid
the problem that tp firmware cannot exit the
gesture mode normally.

Change-Id: Ibb7a8572c168f8c4427c868fd8075ea086138243
Reviewed-on: https://gerrit.mot.com/1973335
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-08 04:13:17 -05:00
litong20 0af265a862 Solve the build error: MODULE_IMPORT_NS missing
TP
MODULE_IMPORT_NS declaration specifier missing, defaulting
to 'int'

Change-Id: Ibe478fff1f66e478f6ec198c0554f2433ddfdcde
Reviewed-on: https://gerrit.mot.com/1969007
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-06-03 05:24:23 -05:00
litong20 a5632a94c1 Stmicro: Support parameter upgrade method
TP:
Support to upgrade TP firmware through the
Parameter APK.

Change-Id: I62fa7f7af03f6e850231a36e1d8a0f3911c92ee9
Reviewed-on: https://gerrit.mot.com/1966402
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:29 -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
litong20 60840057ae Enable PANEL_NOTIFICATIONS for berlna touchscreen
When using drm panel notifications, there is a problem with
the display and touch loading sequence, which may cause TP to fail to 
find the active panel and thus fail to receive the display notification
So use panel notificaitons to avoid the issue.

Change-Id: I7269436bd8117db74467050d4cb839353efdf1a0
Reviewed-on: https://gerrit.mot.com/1962331
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
2021-05-27 05:57:30 -05:00
litong20 9061c0b31d Add NVT_SET_TOUCH_STATE to avoid compilation errors
TP:
The touch_set_state function will only be used when the
NVT_SET_TOUCH_STATE configuration is enabled. So add the
configuration to avoid compilation errors.

Change-Id: I832362899339c3465f475c13bb654a73216d8e9c
Reviewed-on: https://gerrit.mot.com/1960799
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-05-27 01:29:25 -05:00
litong20 8899397ed7 Deleate fts_system_reset in wait_for_ready
TP:
There may be a problem of function recursive calling.

[ 72.152265] Kernel panic - not syncing: kernel stack overflow
[ 72.152270] CPU: 2 PID: 515 Comm: modprobe Tainted: G S O 5.4.61-moto-00155-gb5a835fac66e #1
[ 72.152273] Hardware name: Berlin (DT)
[ 72.152277] Call trace:
[ 72.152283] dump_backtrace.cfi_jt+0x0/0x4
[ 72.152289] show_stack+0x18/0x24
[ 72.152296] dump_stack+0xb8/0x114
[ 72.152302] panic+0x188/0x3f0
[ 72.152306] nmi_panic+0x98/0xb8
[ 72.152311] handle_bad_stack+0x11c/0x130
[ 72.152317] __bad_stack+0xc8/0xcc
[ 72.152322] update_group_capacity+0x4/0x290
[ 72.152326] find_busiest_group+0xe0/0x834
[ 72.152331] load_balance+0x2b0/0xe7c
[ 72.152336] newidle_balance+0x2f4/0x5d4
[ 72.152341] pick_next_task_fair+0x40/0x664
[ 72.152347] __schedule+0x290/0x8ac
[ 72.152351] schedule+0x8c/0xc0
[ 72.152356] schedule_timeout+0x90/0x120
[ 72.152361] wait_for_common+0xd0/0x16c
[ 72.152366] wait_for_completion_timeout+0x14/0x20
[ 72.152372] geni_i2c_xfer+0x3d8/0x12fc
[ 72.152379] __i2c_transfer+0x2a4/0x8d8
[ 72.152383] i2c_transfer+0xd4/0x1a4
[ 72.152412] fts_writeReadU8UX+0x1ac/0x290 [stmicro_mmi]
[ 72.152433] pollForEvent+0xc0/0x378 [stmicro_mmi]
[ 72.152454] fts_system_reset+0x104/0x268 [stmicro_mmi]
[ 72.152475] fts_system_reset+0x11c/0x268 [stmicro_mmi]

Change-Id: I0f09ef7edd856b21afe71866fc260208184807c0
Reviewed-on: https://gerrit.mot.com/1960709
Reviewed-by: Jichao Zou <zoujc@motorola.com>
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
2021-05-26 04:34:35 -05:00
litong20 0f6b37ff56 Fix berlna user version build error.
TP:
When link binary object, touch_set_state is undefined,
No kernel symbal table was imported.

Change-Id: Ibd1cde478b08308d14fdba210ae3a61cd9887ff5
Reviewed-on: https://gerrit.mot.com/1957708
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-05-24 00:37:50 -05:00
litong20 39087fae46 Support novatek single tap in berlna
TP:
Support novatek single tap function in berlin NA.

Change-Id: I8f1d8d82b919b20fcba4812a74f247399a097ddf
Reviewed-on: https://gerrit.mot.com/1955575
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-05-24 00:37:06 -05:00
litong20 4cf1d3ef52 fix user version build error
When link binary object, panel_register_notifier is undefined,
No kernel symbal table was imported.

Change-Id: I539793e5aa2bd2d27d8ed9b959d9bef86739b26c
Reviewed-on: https://gerrit.mot.com/1957707
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Reviewed-by: Shanshan Dai <daiss1@motorola.com>
Submit-Approved: Jira Key
2021-05-24 00:36:47 -05:00
litong20 2f8e7af032 Support report rate switch
TP:
Recieve dsi refresh rate notification to switch
touch report

Change-Id: Ibe7ab1910552dd2c6b2bc395306d9635356966fe
Reviewed-on: https://gerrit.mot.com/1950078
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-05-18 22:15:32 -05:00
litong20 815b312e37 Add game mode parameter adjustment function
1. firset frame filter { C0 17 byte2 byte3 }
byte2: 0x01 Enaable first frame filter of first finger; 0x00 Disable
byte3: 0x01 Enable first frame of second finger; 0x00 Disable

2. Linearity adjustment cmd { C0 19 byte2 }
byte2: 0x01 Enable linearity adjustment; 0x00 Disable

3. tap jitter and slide jitter cmd { C0 18 byte2 byte3 byte4 byte5 byte6 byte7 }
byte2: tap X jitter; byte3: tap Y jitter
byte4: slow slide X jitter; byte5:  slow slide Y jitter
byte6: fast slide X jitter; byte7: fast slide Y jitter

Change-Id: I8691b3410e5fe487bb6d2f6aac941506ec31f3a9
Reviewed-on: https://gerrit.mot.com/1950913
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jichao Zou <zoujc@motorola.com>
Submit-Approved: Jira Key
2021-05-18 21:34:36 -05:00