Commit Graph

1035723 Commits

Author SHA1 Message Date
Jens Reidel
ddc3552d10
input: touchscreen: fst2: Adapt to match zizhan
This is missing Xiaomi touchfeature. The code related to it does not
seem to match our existing drivers a whole lot and is rather complicated
and highly inlined in the binary.

We will manually add the parts we are interested in.

Change-Id: I6fde6485026b2739895bcc5380f4495d13ae13f2
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:21 +01:00
Jens Reidel
ed815ef071
input: touchscreen: Import fst2 driver from google kernel modules and adjust build
Change-Id: Iea7bfed5c95f1b07977cf87b9b53e9a5d77cbc77
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:21 +01:00
Arian
bf3b2adc8e
input: touchscreen: goodix_berlin_driver: Implement fod downup xiaomi touch action
Change-Id: I3c8ba447b6997b7401df5c01a9d3147c68ec268b
2024-12-17 19:41:21 +01:00
Arian
fa989c6913
input: touchscreen: goodix_berlin_driver: Implement gestures via xiaomi touch
Change-Id: I64ffe8fd3131bb7428b187c503908d73195e15a7
2024-12-17 19:41:21 +01:00
Jens Reidel
614b119f31
input: touchscreen: goodix_berlin_driver: Add xiaomi touch integration
Change-Id: Ib3b8c3a49852991a786db252c513f5b1a1437489
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:20 +01:00
Arian
5cc2fe8bff
input: touchscreen: goodix_berlin_driver: Add support to disable rawdata mode on thp enabled devices
Some devices ship a firmware which enables host based touch
processing (proprietary userspace binary). Since we don't
want to use that but still use the stock firmware, we need
to disable the rawdata mode and enable the coor mode on init
and each resume. To enable this, add the goodix,support-thp-fw
property to devicetree.

Change-Id: I55c606a6c468663cadc9506cb7d08e5cf2965bc7
2024-12-17 19:41:20 +01:00
Arian
8b03e5f498
input: touchscreen: goodix_berlin_driver: Introduce a power workqueue for suspend/resume
To avoid blocking the system wide resume for too long while sending
commands and waiting for the touchscreen.

Change-Id: I8ac0ca80c359cc65613245abe2c32de81b459ae0
2024-12-17 19:41:20 +01:00
Arian
31c2ee898d
input: touchscreen: goodix_berlin_driver: Enter suspend in LP mode
Change-Id: I81033ea70a3d699a4cca76862220a6ae801da042
2024-12-17 19:41:20 +01:00
Arian
f5e75c1643
input: touchscreen: goodix_berlin_driver: Resume on early resume notification
Change-Id: I97faa92f65bab911e0c2da065b80cdf2c592fafb
2024-12-17 19:41:20 +01:00
Jens Reidel
a426129cba
input: touchscreen: goodix_berlin_driver: Get IC type from matched compatible
Change-Id: I45123063402b3bbeac99288ccdb4ae2c3280698c
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:20 +01:00
Jens Reidel
73c3523557
input: touchscreen: goodix_berlin_driver: Support A/B panel detection
Change-Id: Ib0511e91a6896ec31b44c5f304f2c3e0421aa262
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:19 +01:00
Jens Reidel
608c10c3c0
input: touchscreen: goodix_berlin_driver: Add support for super resolution IC configs
Change-Id: Iae77a62ee6d8834855f45363ce2566bc4173f61c
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:19 +01:00
Jens Reidel
d6b29b6c30
input: touchscreen: goodix_berlin_driver: Always enable panel event notifier
Change-Id: I7e6c1501c2c552ddd5398fc0a0a0595f191705a2
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:19 +01:00
Jens Reidel
c82132045e
input: touchscreen: goodix_berlin_driver: Enable gesture module
Change-Id: I472d5bdb52249e10b4256f2cd47b9cc43cc1ea28
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:19 +01:00
Simranjeet Thind
7c55203998
input: touchscreen: goodix_berlin_driver: Replacing disable_irq with disable_irq_nosync
disable_irq ensures existing instances of the IRQ handler have
completed before returning which may create a deadlock if the handler
doesn't find the resource.

Change-Id: I7010d2a415f97de5ece8119b855c169ffba665b7
Signed-off-by: Simranjeet Thind <quic_sthind@quicinc.com>
2024-12-17 19:41:19 +01:00
Yu Wu
c86165161e
input: touchscreen: goodix_berlin_driver: Sleep 100ms after reset operation
It is found there might be some i2c NACK error after
power on and reset operation, from goodix datasheet
it is required to wait 100ms after reset operation
before I2C communication, so put a 100ms sleep after
reset.

Change-Id: I2601085f85c83a57bc895915506eaf0c29442678
Signed-off-by: Yu Wu <quic_zwy@quicinc.com>
2024-12-17 19:41:19 +01:00
Jens Reidel
21924d24f4
input: touchscreen: fts_spi: Add support for building as secondary touch
Change-Id: I5036d34a5a4adef81a959480c10edf2e0c7bb2f9
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:18 +01:00
Arian
514bffcb49
input: touchscreen: fts_spi: Disable gestures on nonui values 1 and 2
Change-Id: I390f434f2dd4ff81558be4ccefab835af9a37d92
2024-12-17 19:41:18 +01:00
Arian
1b594feaf5
input: touchscreen: fts_spi: Re-enable simplified support for thp fod downup
Change-Id: I9f263e86137ab2d61dd93d9a17ea76a99dafa514
2024-12-17 19:41:18 +01:00
Arian
daf6743690
input: touchscreen: fts_spi: Only notify sysfs on double click events
Change-Id: I8cd912eb71be83f9f7dc0ec9368402e14e1d961f
2024-12-17 19:41:18 +01:00
Arian
b3f5a52ad3
input: touchscreen: fts_spi: Cleanup fod related code
Change-Id: I73e631127b124be0290543c49602454605333746
2024-12-17 19:41:18 +01:00
Arian
09e880559d
input: touchscreen: fts_spi: Implement single tap gesture command and drop aod_status
Change-Id: Ic87ac9066415835c81addb51215555fbc8032f98
2024-12-17 19:41:18 +01:00
Arian
ff7086fabe
input: touchscreen: fts_spi: Implement fod longpress command
Change-Id: I6615079379dcbfb5d194e398cb3b8308ea12291d
2024-12-17 19:41:18 +01:00
Arian
6fe136bb2b
input: touchscreen: fts_spi: Remove fod singletap and longpress gesture enabling based on fod_status
Change-Id: I0d6c624a42af43ea1d23e0de215cf7ac72cebd92
2024-12-17 19:41:17 +01:00
Arian
fd4e3191e9
input: touchscreen: fts_spi: Cleanup low power gesture entering in fts_mode_handler
Change-Id: I9ebe808b020e1750f90e029dab5577e55cabfb6a
2024-12-17 19:41:17 +01:00
Arian
fd81a30004
input: touchscreen: fts_spi: Use fts_fingerprint_is_enable for fod_status checks where possible
Change-Id: I24d261d80e6cde65841f55d8da58678a716a9144
2024-12-17 19:41:17 +01:00
Arian
bb4f9360ea
input: touchscreen: fts_spi: Get rid of factory code
Change-Id: I6caab7cc2bdfa247fbb33697bff0ac1fc6d88f2d
2024-12-17 19:41:17 +01:00
Jens Reidel
acf1980937
input: touchscreen: fts_spi: Add support for avdd-gpio
Change-Id: Ie4ef42380609b3fa48e73b8c51130bd0a5c19122
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:17 +01:00
Jens Reidel
e40dea9c6f
input: touchscreen: fts_spi: Add support for diting
Change-Id: I00e8237985e363c945005cda6dfbb09781d8967c
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:17 +01:00
Arian
a7a7b60aa1
input: touchscreen: fts_spi: Don't notify about fod presses when fod_status is off
Change-Id: I4b142853b2674671ff5255d9bacf83ecdd66744e
2024-12-17 19:41:16 +01:00
Arian
78340bafe6
input: touchscreen: fts_spi: Change enable_touch_raw argument to int
Change-Id: Ieb329fc0fad6b7113cd7d13b54bd3196ae4afba1
2024-12-17 19:41:16 +01:00
Arian
fb9d97727c
input: touchscreen: fts_spi: Add prototypes to function declarations and add missing type specifiers
Change-Id: I91435bce8d6b4a0df50adf24cfd74e7a5b9862ad
2024-12-17 19:41:16 +01:00
Arian
af50d67138
input: touchscreen: fts_spi: Fix potential buffer overflows
Change-Id: Ib0276b1820b40319c7548778d3bad3e1d3666123
2024-12-17 19:41:16 +01:00
Arian
b080f1857a
input: touchscreen: fts_spi: Remove unused get_slot_trackingId method
Change-Id: I6783f0550ff049780dca80a2ee72fdd75bb214a5
2024-12-17 19:41:16 +01:00
Arian
fa884f3d42
input: touchscreen: fts_spi: Change fts_enable_click_touch_raw to return int
Change-Id: I278eb8084fd124b07ac4d73ef55d73d513b2debe
2024-12-17 19:41:16 +01:00
Arian
163e025590
input: touchscreen: fts_spi: Move back to enable_clicktouch_raw
register_frame_count_change_listener in xiaomi-touch depends on
knock stuff that we didn't reverse yet.

Change-Id: Icbab505357d31c91347df0851ca04cb215f3d818
2024-12-17 19:41:15 +01:00
Arian
d91d8e4f57
input: touchscreen: fts_spi: Revert knock_data to touch raw data
Change-Id: I30cc9bc8806619e34c7cc494aa6dd94ffe850798
2024-12-17 19:41:15 +01:00
Arian
b0c04b1425
input: touchscreen: fts_spi: Implement THP support
Reverse engineered from V14.0.7.0.TLBMIXM and small changes from zeus-s-oss

Change-Id: I1d21c61e9489bb54b6ae34c897b50386c1eebb4c
2024-12-17 19:41:15 +01:00
Arian
23ab7118ae
input: touchscreen: fts_spi: Update headers according to driver changes
mayfly-s-oss missed the header changes unfortunately

Change-Id: I493e5f4b23f081052f6ab6dd6028873e8c4c0fa0
2024-12-17 19:41:15 +01:00
Arian
fb8a3e9acc
input: touchscreen: fts_spi: Add missing cmd_fifo device attr
Change-Id: I7d1f433d8746d428be215c5300c2ee8e067b8069
2024-12-17 19:41:15 +01:00
Arian
d783be1ecd
input: touchscreen: fts_spi: Guard touch_irq_boost
Change-Id: I5fa1e64bbd47b86e3a0dd706cb7b37a4c6119511
2024-12-17 19:41:15 +01:00
Arian
f7d433846c
input: touchscreen: Import fts_spi driver from mayfly-s-oss
Also ran clang-format

Change-Id: I6a88644a5aadf887364a5844b151848fd2a9d30b
2024-12-17 19:41:15 +01:00
Arian
4d326b8ed3
input: touchscreen: xiaomi: Report proper pending gesture events
Change-Id: I8dfbb40d5645b5cf15f0d3a5e529bcfe2ef43fca
2024-12-17 19:41:14 +01:00
Arian
28ad4a31f0
input: touchscreen: Create exported xiaomi touch header
Change-Id: Ic7004aff9220e9b07a9c16708f79eebf2ea790d9
2024-12-17 19:41:14 +01:00
Jens Reidel
a012646c81
input: touchscreen: xiaomi: Try all panels when getting gesture enabled value
Some panels like zizhan's primary panel do not support all gestures that
xiaomi touch supports. Therefore, to check whether a given gesture is
enabled, we need to check all connected touchscreens until one gives a
valid value (i.e. implements the feature).

Change-Id: Id8a3ec12195f6a798c015e6de78f6719849eb9cb
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:14 +01:00
Jens Reidel
dec2a89151
input: touchscreen: xiaomi: Notify both panels of gesture commands
Change-Id: I5fb69bf735c759c574bcc6dd3395625f84b4a9db
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:14 +01:00
Jens Reidel
e9d92e404d
input: touchscreen: xiaomi: Fix touch id assertion bounds
Change-Id: I557185fa36b42056cd959533aec3e7eec5a6677f
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:14 +01:00
Jens Reidel
0a303fb8fb
input: touchscreen: xiaomi: Avoid NPE if getModeValue is not registered
Change-Id: Ia7a70e1823aa36039634bafa8dcd8994139bed06
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2024-12-17 19:41:14 +01:00
Arian
2573b4b7a5
input: touchscreen: xiaomi: Notify sysfs when sensor enabled state changes
Change-Id: I52e3294c27e71b48c45b6e72923df049bb91d42e
2024-12-17 19:41:13 +01:00
Arian
fb2a2dc283
input: touchscreen: xiaomi: Add enable node for double tap sensor
Change-Id: Ie85db6e14e83321d26f5c7eb89e6978401645068
2024-12-17 19:41:13 +01:00