summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
AgeCommit message (Collapse)Author
2026-04-19Input: edt-ft5x06 - fix use-after-free in debugfs teardownDmitry Torokhov
The commit 68743c500c6e ("Input: edt-ft5x06 - use per-client debugfs directory") removed the manual debugfs teardown, relying on the I2C core to handle it. However, this creates a window where debugfs files are still accessible after edt_ft5x06_ts_teardown_debugfs() frees tsdata->raw_buffer. To prevent a use-after-free, protect the freeing of raw_buffer with the device mutex and set raw_buffer to NULL. The debugfs read function already checks if raw_buffer is NULL under the same mutex, so this safely avoids the use-after-free. Fixes: 68743c500c6e ("Input: edt-ft5x06 - use per-client debugfs directory") Cc: stable@vger.kernel.org Link: https://patch.msgid.link/adnJicDh-bTUaWXP@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-04-08Input: mk712 - remove driverDmitry Torokhov
This touchscreen controller was used om Gateway AOL Connected Touchpad released in 2000 and, according to Wikipedia, removed from the market in October 2001 due to slow sales. It looks like it can still be bought on eBay for $1000 but I really doubt anyone will actually use it. Remove the driver. Link: https://patch.msgid.link/20240808172733.1194442-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-04-01Input: usbtouchscreen - refactor endpoint lookupJohan Hovold
Use the common USB helpers for looking up bulk and interrupt endpoints (and determining endpoint numbers) instead of open coding. Note that the NEXIO data interface has two bulk endpoints (see commit 5197424cdccc ("Input: usbtouchscreen - add NEXIO (or iNexio) support") for the descriptors). The lookup in probe handles both bulk-in and interrupt-in endpoints and was added to handle NEXIO devices. Replace the open coded lookup with a lookup for the common interrupt endpoint and an explicit fallback accepting a bulk endpoint. This iterates over the (two) endpoints twice for NEXIO devices but makes it more clear what is going on. Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260401082212.2180434-1-johan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: goodix-berlin - report a resolution of 10 units/mmVal Packett
Without a reported resolution, userspace was assuming 1 unit/mm which is wildly wrong: a regular smartphone is clearly not 2.4 meters tall. Most applications do not care much for this kind of raw mm value, but Phosh's on-screen keyboard would accidentally trigger swipe-to-close gestures due to misinterpreting small movements as huge ones. Do what the older goodix.c driver does and set the resolution to 10 units/mm to make sure the numbers calculated by userspace are reasonable. Signed-off-by: Val Packett <val@packett.cool> Link: https://patch.msgid.link/20260321073242.556253-1-val@packett.cool Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: zinitix - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: wm97xx - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: wdt87xx_i2c - switch to using cleanup functionsDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: tsc2007 - use guard notation when acquiring mutexesDmitry Torokhov
This makes the code more compact and error handling more robust. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: sx8654 - use IRQF_NOAUTOEN when requesting interruptDmitry Torokhov
Instead of requesting interrupt normally and immediately disabling it with call to disable_irq() use IRQF_NOAUTOEN to keep it disabled until it is needed. This avoids a tiny window when interrupt is enabled but not needed. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: sx8654 - use guard notation when acquiring spinlockDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: sur40 - use guard notation when acquiring spinlockDmitry Torokhov
Guard notation simplifies code. Also use list_first_entry() instead of list_entry() to emphasize intent. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: stmfts - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: raydium_i2c_ts - switch to using cleanup functionsDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: pixcir_i2c_ts - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: novatek-nvt-ts - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-25Input: mxs-lradc-ts - use guard notation when acquiring spinlockDmitry Torokhov
Guard notation simplifies code and shows critical section more clearly. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: msg2638 - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: mms114 - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Also stop trying to check if input device is opened/in use in the interrupt handler - the interrupt is disabled when device is closed or suspended. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: mk712 - use guard notation when acquiring spinlockDmitry Torokhov
Using guard notation makes the code more compact and error handling more robust by ensuring that locks are released in all code paths when control leaves critical section. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: melfas_mip4 - switch to using cleanup functionsDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: lpc32xx_ts - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: iqs7211 - use cleanup facility for fwnodesDmitry Torokhov
Use __free(fwnode_handle) cleanup facility to ensure that references to acquired fwnodes are dropped at appropriate times automatically. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: iqs5xx - simplify parsing of firmware blobDmitry Torokhov
Do not define or use iqs5xx_ihex_rec structure: the original code was using just a couple of fields in it and instead used it to calculate offset to record data. The data field was actually reserving space for checksum. Instead iterate through fields and advance pointer explicitly. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: iqs5xx - switch to using cleanup functionsDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: ipaq-micro-ts - use guard notation when acquiring mutex/spinlockDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: imx6ul_tsc - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: imagis - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: hycon-hy46xx - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: hideep - switch to using cleanup functionsDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: goodix - switch to using cleanup functions in firmware codeDmitry Torokhov
Start using __free(firmware) to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: exc3000 - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Note that callers of exc3000_vendor_data_request() always expect response, so it was adjusted to always wait for it. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: elo - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: elants_i2c - switch to using cleanup facilitiesDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: ektf2127 - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: eeti_ts - use guard notation when acquiring mutexesDmitry Torokhov
This makes the code more compact and error handling more robust. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: edt-ft5x06 - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: cyttsp - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Also fix the touchscreen not being marked as suspended when noone has opened/is using it. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: chipone_icn8318 - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: bu21029_ts - use guard notation when acquiring mutexDmitry Torokhov
Guard notation simplifies code. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: auo-pixcir-ts - use guard notation when acquiring mutexesDmitry Torokhov
This makes the code more compact and error handling more robust. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: atmel_mxt_ts - switch to using cleanup functionsDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: ads7846 - switch to using cleanup functionsDmitry Torokhov
Start using __free() and guard() primitives to simplify the code and error handling. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: ad7879 - use guard notation when acquiring mutexesDmitry Torokhov
This makes the code more compact and error handling more robust. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-24Input: ad7877 - use guard notation when acquiring mutexes/locksDmitry Torokhov
This makes the code more compact and error handling more robust. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-03-12Merge tag 'v7.0-rc3' into nextDmitry Torokhov
Sync up with the mainline to brig up the latest changes, specifically changes to ALPS driver.
2026-02-21Convert 'alloc_obj' family to use the new default GFP_KERNEL argumentLinus Torvalds
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-02-21treewide: Replace kmalloc with kmalloc_obj for non-scalar typesKees Cook
This is the result of running the Coccinelle script from scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to avoid scalar types (which need careful case-by-case checking), and instead replace kmalloc-family calls that allocate struct or union object instances: Single allocations: kmalloc(sizeof(TYPE), ...) are replaced with: kmalloc_obj(TYPE, ...) Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...) are replaced with: kmalloc_objs(TYPE, COUNT, ...) Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...) are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...) (where TYPE may also be *VAR) The resulting allocations no longer return "void *", instead returning "TYPE *". Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-17Input: st1232 - expose firmware version via sysfsMichael Tretter
Allow user space programs to read the firmware version and revision of the touch controller from the sysfs. Suggested-by: Khalid Talash <ktalash@topcon.com> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Link: https://patch.msgid.link/20260123-input-st1232-firmware-version-v1-2-32df7eefdafe@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-02-17Input: st1232 - read firmware version and revisionMichael Tretter
According to the data sheet, the st1332 contains a firmware, which may be updated. The version and revision of the firmware may be read from the registers of the device. Read the firmware version and revision and report it to the log when probing the device. Suggested-by: Khalid Talash <ktalash@topcon.com> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Link: https://patch.msgid.link/20260123-input-st1232-firmware-version-v1-1-32df7eefdafe@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-02-15Merge tag 'input-for-v7.0-rc0' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - support for FocalTech FT8112 added to i2c-hid driver - support for FocalTech FT3518 added to edt-ft5x06 driver - support for power buttons in TWL603x chips added to twl4030-pwrbutton driver - an update to gpio-decoder driver to make it usable on non-OF platforms and to clean up the code - an update to synaptics_i2c driver switching it to use managed resources and a fix to restarting polling after resume - an update to gpio-keys driver to fall back to getting IRQ from resources if not specified using other means - an update to ili210x driver to support polling mode - a number of input drivers switched to scnprintf() to suppress truncation warnings - a number of updates and conversions of device tree bindings to yaml format - fixes to spelling in comments and messages in several drivers - other assorted fixups * tag 'input-for-v7.0-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits) dt-bindings: input: qcom,pm8941-pwrkey: Document PMM8654AU dt-bindings: input: touchscreen: imagis: allow linux,keycodes for ist3038 Input: apbps2 - fix comment style and typos Input: gpio_keys - fall back to platform_get_irq() for interrupt-only keys Input: novatek-nvt-ts - drop wake_type check dt-bindings: input: touchscreen: tsc2007: document '#io-channel-cells' Input: ili210x - add support for polling mode dt-bindings: touchscreen: trivial-touch: Drop 'interrupts' requirement for old Ilitek Input: appletouch - fix potential race between resume and open HID: i2c-hid: Add FocalTech FT8112 dt-bindings: input: i2c-hid: Introduce FocalTech FT8112 Input: synaptics_i2c - switch to using managed resources Input: synaptics_i2c - guard polling restart in resume Input: gpio_decoder - don't use "proxy" headers Input: gpio_decoder - make use of the macros from bits.h Input: gpio_decoder - replace custom loop by gpiod_get_array_value_cansleep() Input: gpio_decoder - unify messages with help of dev_err_probe() Input: gpio_decoder - make use of device properties Input: serio - complete sizeof(*pointer) conversions Input: wdt87xx_i2c - switch to use dev_err_probe() ...