summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen
AgeCommit message (Collapse)AuthorFilesLines
2024-09-22Input: hynitron_cstxxx - drop explicit initialization of struct ↵Uwe Kleine-König1-1/+1
i2c_device_id::driver_data to 0 These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20240920153430.503212-12-u.kleine-koenig@baylibre.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - switch to using asynchronous probingDmitry Torokhov1-0/+1
The driver waits for the device to boot, which can be a lengthy process. Switch it to asynchronous probing to allow more devices to be probed simultaneously. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-19-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - remove assert/deassert wrappersDmitry Torokhov1-12/+2
The wrappers are extremely simple, used once, and do not bring much value. Remove them. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-18-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - do not hardcode interrupt levelDmitry Torokhov1-2/+1
Stop forcing interrupt to be low level triggered and instead rely on the platform to define proper trigger to allow flexibility in board designs. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-17-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - switch to using devm_regulator_get_enable()Dmitry Torokhov1-12/+1
The driver does not actively manage regulator state past probe() time, so we can use devm_regulator_get_enable() to simplify the code. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-16-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - stop treating VDD regulator as optionalDmitry Torokhov1-15/+13
This regulator is not optional from the controller point of view, so stop treating it as such. For hard-wired designs that omit the regulator from their device trees regulator subsystem will create a dummy instance. This may introduce unnecessary delay of 100us in case of dummy regulator, but if it is important the driver should be marked as using asynchronous probing to avoid even longer delays waiting for the command completions. Also use usleep_range() instead of udelay() to avoid spinning. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-15-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - make zforce_idtable constantDmitry Torokhov1-1/+1
The I2C ID table is not supposed to change; mark it as const. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-14-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - use dev_err_probe() where appropriateDmitry Torokhov1-132/+113
Use dev_err_probe() helper to log deferrals in the devices_deferred debugfs file and avoid extra messages in the logs. Also rename "ret" variables holding error codes only to "error". Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-13-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - do not ignore errors when acquiring regulatorDmitry Torokhov1-1/+1
We should abort probe on any error besides -ENOENT which signifies that the regulator is not defined in device tree or elsewhere, not only when we see -EPROBE_DEFER. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-12-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - make parsing of contacts less confusingDmitry Torokhov1-12/+13
Zforce touch data packet consists of a byte representing number of contacts followed by several chunks with length of 9 bytes representing each contact. Instead of accounting for the leading byte by increasing offset of each field in contacts by one introduce a pointer to contact data and point it appropriately. This avoids awkward constructs like: point.prblty = payload[9 * i + 9]; which makes it seem like there is off-by-one error, in favor of more straightforward: point.prblty = p[8]; Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-11-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - switch to using get_unaligned_le16Dmitry Torokhov1-12/+12
Instead of doing conversion from little-endian data to CPU endianness by hand use existing helpers. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-10-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - use guard notation when acquiring mutexesDmitry Torokhov1-21/+24
Guard notation allows for simpler code and ensures that mutexes are automatically released in all code paths. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-9-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - ensure that pm_stay_awake() and pm_relax() are balancedDmitry Torokhov1-5/+11
There is a small chance that ts->suspending flag may change while the interrupt handler is running. To make sure call to pm_relax() is not skipped on accident use a temporary to hold the original value at the beginning of interrupt. Use READ_ONCE() so that the value is actually fetched at the right time. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-8-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - remove unneeded lockingDmitry Torokhov1-38/+9
There is no need to have a lock around calls to i2c_master_send() and i2c_master_recv() as they are not issued concurrently and they are not sharing any buffers. Also there is no need for command_mutex as all commands are issued sequentially. Remove both. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-7-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - handle errors from input_mt_init_sots()Dmitry Torokhov1-1/+5
input_mt_init_slots() can potentially return error which needs to be handled. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - do not explicitly set EV_SYN, etc bitsDmitry Torokhov1-4/+0
Input core and various helpers already do that for us, so drop the code setting these bits explicitly. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - remove support for platfrom dataDmitry Torokhov1-40/+16
There are no in-tree users of platform data and any new ones should either use device tree or static device properties, so let's remove platform data support. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - simplify reporting of slot stateDmitry Torokhov1-4/+2
input_mt_report_slot_state() returns true if slot is active, so we can combine checks for point.state != STATE_UP. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Input: zforce_ts - use devm_add_action_or_reset()Sudip Mukherjee1-4/+1
If devm_add_action() fails we are explicitly calling the cleanup to free the resources allocated. Lets use the helper devm_add_action_or_reset() and return directly in case of error, as we know that the cleanup function has been already called by the helper if there was any error. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-06Merge branch 'ib/6.11-rc6-matrix-keypad-spitz' into nextDmitry Torokhov3-13/+9
Bring in changes removing support for platform data from matrix-keypad driver.
2024-09-01Input: zinitix - varying icon status registersLinus Walleij1-2/+35
The different revisions of the Zinitix BTXXX touchscreens place the icon status register (to read out touchkey status) in different places. Use the chip revision bits to discern between the different versions at runtime. This makes touchkeys work on the BT404 on the Samsung Codina GT-I8160 mobile phone. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240830-zinitix-tk-versions-v2-2-90eae6817eda@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-09-01Input: zinitix - read and cache device version numbersLinus Walleij1-0/+36
The chip hardware revision, firmware version and regdata revision is needed to discern because for example touchkeys are handled by different registers on different versions of the chip. Example output from BT404: Zinitix-TS 3-0020: chip revision 4040 firmware version 0088 regdata version 0004 Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240830-zinitix-tk-versions-v2-1-90eae6817eda@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-24Merge tag 'input-for-v6.11-rc4' of ↵Linus Torvalds3-13/+9
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a tweak to uinput interface to reject requests with abnormally large number of slots. 100 slots/contacts should be enough for real devices - support for FocalTech FT8201 added to the edt-ft5x06 driver - tweaks to i8042 to handle more devices that have issue with its emulation - Synaptics touchpad switched to native SMbus/RMI mode on HP Elitebook 840 G2 - other minor fixes * tag 'input-for-v6.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: himax_hx83112b - fix incorrect size when reading product ID Input: i8042 - use new forcenorestore quirk to replace old buggy quirk combination Input: i8042 - add forcenorestore quirk to leave controller untouched even on s3 Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table Input: uinput - reject requests with unreasonable number of slots Input: edt-ft5x06 - add support for FocalTech FT8201 dt-bindings: input: touchscreen: edt-ft5x06: Document FT8201 support Input: adc-joystick - fix optional value handling Input: synaptics - enable SMBus for HP Elitebook 840 G2 Input: ads7846 - ratelimit the spi_sync error message
2024-08-20Input: himax_hx83112b - fix incorrect size when reading product IDDmitry Torokhov1-12/+2
We need to read a u32 value (4 bytes), not size of a pointer to that value. Also, himax_read_mcu() wrapper is an overkill, remove it and use himax_bus_read() directly. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202408200301.Ujpj7Vov-lkp@intel.com/ Fixes: 0944829d491e ("Input: himax_hx83112b - implement MCU register reading") Tested-by: Felix Kaechele <felix@kaechele.ca> Link: https://lore.kernel.org/r/ZsPdmtfC54R7JVxR@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-19Input: colibri-vf50-ts - make use of the helper function dev_err_probe()Cai Huoqing1-7/+3
When possible use dev_err_probe help to properly deal with the PROBE_DEFER error, the benefit is that DEFER issue will be logged in the devices_deferred debugfs file. Using dev_err_probe() can reduce code size, and the error value gets printed. Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210916153148.14045-1-caihuoqing@baidu.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: cyttsp4 - remove driverDmitry Torokhov9-3005/+56
The cyttsp4 touchscreen driver was contributed in 2013 and since then has seen no updates. The driver uses platform data (no device tree support) and there are no users of it in the mainline kernel. There were occasional fixes to it for issues either found by static code analysis tools or via visual inspection, but otherwise the driver is completely untested. Remove the driver. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/ZrAZ2cUow_z838tp@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: cyttsp - use devm_regulator_bulk_get_enable()Dmitry Torokhov2-31/+8
The driver does not try to power down the rails at system suspend or when touchscreen is not in use, but rather enables regulators at probe time. Power savings are achieved by requesting the controller to enter low power mode. Switch to devm_regulator_bulk_get_enable() instead of separately requesting regulators, enabling them, and installing a custom devm-action to disable them on unbind/remove, which simplifies the code. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/ZrAgj9rG6oVqfdoK@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: cyttsp - stop including gpio.hDmitry Torokhov1-1/+0
The driver does not use legacy GPIO API, stop including this header. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/ZrAaOu_vf-cVBhRn@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: ilitek_ts_i2c - stop including gpio.hDmitry Torokhov1-1/+0
The driver does not use legacy GPIO API, stop including this header. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/ZrAaHWNvaAfDlDfI@google.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: ilitek_ts_i2c - add report id message validationEmanuele Ghidoli1-0/+7
Ensure that the touchscreen response has correct "report id" byte before processing the touch data and discard other messages. Fixes: 42370681bd46 ("Input: Add support for ILITEK Lego Series") Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://lore.kernel.org/r/20240805085511.43955-3-francesco@dolcini.it Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: ilitek_ts_i2c - avoid wrong input subsystem syncEmanuele Ghidoli1-6/+5
For different reasons i2c transaction may fail or report id in the message may be wrong. Avoid closing the frame in this case as it will result in all contacts being dropped, indicating that nothing is touching the screen anymore, while usually it is not the case. Fixes: 42370681bd46 ("Input: Add support for ILITEK Lego Series") Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://lore.kernel.org/r/20240805085511.43955-2-francesco@dolcini.it Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: tsc2004/5 - use guard notation when acquiring mutexes/locksDmitry Torokhov1-101/+81
This makes the code more compact and error handling more robust. Link: https://lore.kernel.org/r/20240711172719.1248373-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: tsc2004/5 - respect "wakeup-source" propertyDmitry Torokhov1-1/+2
Do not mark the device as wakeup-enabled by default, respect the standard "wakeup-source" property. Link: https://lore.kernel.org/r/20240711172719.1248373-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: tsc2004/5 - do not use irq_set_irq_wake() directlyDmitry Torokhov1-1/+12
Instead of setting irq_set_irq_wake() directly in probe(), mark the device as wakeup-capable, and use enable_irq_wake() and disable_irq_wake() in suspend/resume path. This also allows changing the wakeup setting dynamically at runtime using /sys/devices/.../tsc2005/power/wakeup. Reviewed-By: Sebastian Reichel <sre@kernel.org> Link: https://lore.kernel.org/r/20240711172719.1248373-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: tsc2004/5 - fix reset handling on probeDmitry Torokhov1-13/+15
When the driver has been converted to use gpiod API it was requesting and asserting the reset on probe, but never deasserted it. However because of incorrect annotations in device tree marking reset line as active high whereas in reality it is active low, the end result was that the chip was never reset on probe. With polarity of the reset line now corrected this became a problem. Fix this by calling tsc200x_reset() from tsc200x_probe() to properly complete the reset sequence and move requesting the reset GPIO and VIO supply closer to the point where we need to start talking to the hardware. Fixes: d257f2980feb ("Input: tsc2005 - convert to gpiod") Link: https://lore.kernel.org/r/20240711172719.1248373-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: tsc2004/5 - do not hard code interrupt triggerDmitry Torokhov1-4/+2
Instead of hard-coding interrupt trigger rely on ACPI/DT/board code to set it up appropriately. Link: https://lore.kernel.org/r/20240711172719.1248373-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: tsc2004/5 - fix handling of VIO power supplyDmitry Torokhov4-36/+4
The chip needs to be powered up before calling tsc200x_stop_scan() which communicates with it; move the call to enable the regulator earlier in tsc200x_probe(). At the same time switch to using devm_regulator_get_enable() to simplify error handling. This also makes sure that regulator is not shut off too early when unbinding the driver. Link: https://lore.kernel.org/r/20240711172719.1248373-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-08-05Input: edt-ft5x06 - add support for FocalTech FT8201Felix Kaechele1-0/+6
The driver supports the FT8201 chip as well. It registers up to 10 touch points. Tested on: Lenovo ThinkSmart View (CD-18781Y), LCM: BOE TV080WXM-LL4 Signed-off-by: Felix Kaechele <felix@kaechele.ca> Link: https://lore.kernel.org/r/20240804031310.331871-3-felix@kaechele.ca Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-29minmax: don't use max() in situations that want a C constant expressionLinus Torvalds1-1/+1
We only had a couple of array[] declarations, and changing them to just use 'MAX()' instead of 'max()' fixes the issue. This will allow us to simplify our min/max macros enormously, since they can now unconditionally use temporary variables to avoid using the argument values multiple times. Cc: David Laight <David.Laight@aculab.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-07-24Input: ads7846 - ratelimit the spi_sync error messageMarek Vasut1-1/+1
In case the touch controller is not connected, this message keeps scrolling on the console indefinitelly. Ratelimit it to avoid filling kernel logs. " ads7846 spi2.1: spi_sync --> -22 " Signed-off-by: Marek Vasut <marex@denx.de> Link: https://lore.kernel.org/r/20240708211913.171243-1-marex@denx.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-20Merge tag 'input-for-v6.11-rc0' of ↵Linus Torvalds29-236/+358
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - streamlined logic in input core for handling normal input handlers vs input filters - updates to input drivers to allocate memory with sizeof(*pointer) instead of sizeof(type) - change to ads7846 touchscreen driver to use hsync GPIO instead of requiring platform data with special method (which is not compatible with boards using device tree) - update to adc-joystick driver to handle inverted axes - cleanups in various drivers switching them to use the new "guard" and "__free()" facilities - changes to several drivers (adxl34x, atmel_mxt_ts, ati-remote2, omap-keypad, yealink) to stop creating driver-specific device attributes manually and use driver core facilities for this - update to Cypress PS/2 protocol driver to properly handle errors from the PS/2 transport as well as other cleanups - update to edt-ft5x06 driver to support ft5426 variant - update to ektf2127 driver to support ektf2232 variant - update to exc3000 driver to support EXC81W32 variant - update to imagis driver to support IST3038 variant - other assorted driver cleanups. * tag 'input-for-v6.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (71 commits) Input: yealink - simplify locking in sysfs attribute handling Input: yealink - use driver core to instantiate device attributes Input: ati-remote2 - use driver core to instantiate device attributes Input: omap-keypad - use driver core to instantiate device attributes Input: atmel_mxt_ts - use driver core to instantiate device attributes Input: exc3000 - add EXC81W32 support dt-bindings: input: touchscreen: exc3000: add EXC81W32 Input: twl4030-pwrbutton - fix kernel-doc warning Input: himax_hx83112b - add support for HX83100A Input: himax_hx83112b - add himax_chip struct for multi-chip support Input: himax_hx83112b - implement MCU register reading Input: himax_hx83112b - use more descriptive register defines dt-bindings: input: touchscreen: himax,hx83112b: add HX83100A Input: do not check number of events in input_pass_values() Input: preallocate memory to hold event values Input: rearrange input_alloc_device() to prepare for preallocating of vals Input: simplify event handling logic Input: make events() method return number of events processed Input: make sure input handlers define only one processing method Input: evdev - remove ->event() method ...
2024-07-20Input: zinitix - add touchkey supportNikita Travkin1-3/+60
Zinitix touch controllers can use some of the sense lines for virtual keys (like those found on many phones). Add support for those keys. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Nikita Travkin <nikita@trvn.ru> Link: https://lore.kernel.org/r/20240717-zinitix-tkey-v5-2-52ea4cd4bd50@trvn.ru Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-20Input: goodix-berlin - add sysfs interface for reading and writing touch IC ↵Charles Wang4-0/+46
registers Export a sysfs interface that would allow reading and writing touchscreen IC registers. With this interface many things can be done in usersapce such as firmware updates. An example tool that utilizes this interface for performing firmware updates can be found at [1]. [1] https://github.com/goodix/fwupdate_for_berlin_linux Signed-off-by: Charles Wang <charles.goodix@gmail.com> Link: https://lore.kernel.org/r/20240514115135.21410-1-charles.goodix@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-16Input: msc5000_ts - remove the driverDmitry Torokhov3-301/+0
MCS-5000 belongs to the 1st generation of Melfas chips, manufactured in 2000-2007. The driver relies on custom platform data (no DT support) and there never were any users of this driver in the mainline kernel. The commit adding the driver mentioned that the driver was tested on S3C6410 NCP board (with Samsung S3C6410 SoC) but the touchscreen device was never added to the board file. This board was removed in v6.3 in commit 743c8fbb90ca ("ARM: s3c: remove most s3c64xx board support"). Remove the driver since there are no users. Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240714060029.1528662-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-16Input: usbtouchscreen - switch to using __free() cleanup facilityDmitry Torokhov1-57/+33
Use __free(kfree) cleanup facility when allocating temporary buffers for USB transfers. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240712051851.3463657-8-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-16Input: usbtouchscreen - use guard notation when acquiring mutexesDmitry Torokhov1-32/+33
This makes the code more compact and error handling more robust. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240712051851.3463657-7-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-16Input: usbtouchscreen - split device info table into individual piecesDmitry Torokhov1-331/+293
Instead of using a single table containing information about various touchscreens and enums to match the driver ID table data with chip information define individual per-protocol instances of usbtouch_device_info structure and reference them directly from the usbtouch_devices ID table. This is simpler, safer, and uses less memory in case some protocols are disabled. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240712051851.3463657-6-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-16Input: usbtouchscreen - constify usbtouch_dev_info tableDmitry Torokhov1-11/+9
The data in this table is shared between all instances of the touchscreens so it should not be modified. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240712051851.3463657-5-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-16Input: usbtouchscreen - move process_pkt() into main device structureDmitry Torokhov1-15/+13
In preparation of splitting big usbtouch_dev_info table into separate per-protocol structures and constifying them move process_pkt() from the device info into main drvice structure and set it up in probe(). We can derive if we should use single- or multi-packet handling based on presence of get_pkt_len() method. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240712051851.3463657-4-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-07-16Input: usbtouchscreen - move the driver ID tableDmitry Torokhov1-105/+104
Move the driver's ID table closer to where it is used in preparation to it using pointers to device info/parameters instead of device type enum. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20240712051851.3463657-3-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>