aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-28Input: goodix_berlin - use __free() cleanup in SPI transportDmitry Torokhov1-11/+13
Switch the driver to use __free(kfree) cleanup facility instead of freeing memory by hand. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-28Input: wacom_w8001 - use "guard" notation when acquiring mutexDmitry Torokhov1-12/+10
Switch the driver to use guard notation when acquiring mutex to have it released automatically. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-27Merge branch 'ib/ads7846-hsync' into nextDmitry Torokhov2-6/+30
Bring in ADS7846 hsync changes.
2024-06-25Input: qt1050 - handle CHIP_ID reading errorAndrei Lalaev1-1/+6
If the device is missing, we get the following error: qt1050 3-0041: ID -1340767592 not supported Let's handle this situation and print more informative error when reading of CHIP_ID fails: qt1050 3-0041: Failed to read chip ID: -6 Fixes: cbebf5addec1 ("Input: qt1050 - add Microchip AT42QT1050 support") Signed-off-by: Andrei Lalaev <[email protected]> Reviewed-by: Marco Felsch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-22Input: edt-ft5x06 - add ft5426Andreas Kemnade1-0/+1
As ft5426 seems to be compatible with this driver, add it. Debug output during identification: Model "generic ft5x06 (79)", Rev. " Signed-off-by: Andreas Kemnade <[email protected]> Reviewed-by: Oliver Graute <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-22dt-bindings: input: touchscreen: edt-ft5x06: Add ft5426Andreas Kemnade1-0/+1
Add compatible for ft5426. Searches for documentation reveal neither edt nor evervision as some related company, only FocalTech. Signed-off-by: Andreas Kemnade <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Oliver Graute <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-22Input: ektf2127 - add ektf2232 supportAndreas Kemnade1-6/+30
The chip is similar, but has status bits at different positions, so use the correct bits. Signed-off-by: Andreas Kemnade <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-22dt-bindings: touchscreen: elan,ektf2127: Add EKTF2232Andreas Kemnade1-0/+1
Add a compatible for the EKTF2232, which is similar to other chips in this document. Signed-off-by: Andreas Kemnade <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-22dt-bindings: touchscreen: convert elan,ektf2127 to json-schemaAndreas Kemnade2-25/+57
Convert EKTF2127 infrared touchscreen controller binding to DT schema and add ektf2232 compatible. Signed-off-by: Andreas Kemnade <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-21Input: ads7846 - handle HSYNC GPIOLinus Walleij1-6/+29
Add handling of HSYNC signal emitted by the TI ADS7846 if it is hooked up to a GPIO. Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] [dtor: dropped Spitz changes, kept platform data wait_for_sync option] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-21dt-bindings: ads7846: Add hsync-gpiosLinus Walleij1-0/+1
The TI ADS7846 emits a horizontal sync signal that is usually connected to a GPIO for polling. Add a binding for this. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-21Input: adc-joystick - move axes data into the main structureDmitry Torokhov1-53/+61
There is no need to allocate axes information separately from the main joystick structure so let's fold the allocation and also drop members (such as range, flat and fuzz) that are only used during initialization of the device. Acked-by: Artur Rojek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-20Input: ims-pcu - switch to using cleanup functionsDmitry Torokhov1-73/+62
Start using __free() and guard() primitives to simplify the code and error handling. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-20Input: ims-pcu - use driver core to instantiate device attributesDmitry Torokhov1-25/+28
Instead of manually creating driver-specific device attributes set struct usb_driver->dev_groups pointer to have the driver core do it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-20Input: ims-pcu - drop repeated "input" in error messageJavier Carrasco1-2/+1
This case of the common error message upon failure of input_allocate_device() repeats the word "input". Drop one "input" from the error message. Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-20Input: ims-pcu - annotate struct ims_pcu_flash_fmt with __counted_byJavier Carrasco1-1/+1
Use the __counted_by compiler attribute for the data[] flexible array member to improve the results of array bound sanitizers. Signed-off-by: Javier Carrasco <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-20Input: ads7846 - use spi_device_id tableAlexander Stein1-1/+11
As the driver supports more devices over time the single MODULE_ALIAS is complete and raises several warnings: SPI driver ads7846 has no spi_device_id for ti,tsc2046 SPI driver ads7846 has no spi_device_id for ti,ads7843 SPI driver ads7846 has no spi_device_id for ti,ads7845 SPI driver ads7846 has no spi_device_id for ti,ads7873 Fix this by adding a spi_device_id table and removing the manual MODULE_ALIAS. Signed-off-by: Alexander Stein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-11Input: adxl34x - switch to using "guard" notationDmitry Torokhov1-41/+20
Switch to using guard(mutex)() notation to acquire and automatically release mutexes. Reviewed-by: Nuno Sa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-11Input: adxl34x - switch to using managed resourcesDmitry Torokhov4-53/+17
Switch the driver to use managed resources to simplify error handling. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-11Input: adxl34x - use input_set_capability()Dmitry Torokhov1-19/+13
Switch to using input_set_capability() instead of using __set_bit() to make clear what exactly kinds of events (EV_KEY, EV_REL) are being declared. Also drop redundant calls setting EV_ABS and ABS_X|Y|Z bits as that is taken care by input_set_abs_params(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-11Input: adxl34x - use device core to create driver-specific device attributesDmitry Torokhov4-8/+10
Instead of creating driver-specific device attributes with sysfs_create_group() have device core do this by setting up dev_groups pointer in the driver structure. Reviewed-by: Nuno Sa <[email protected]> Acked-by: Michael Hennerich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-09Input: add missing MODULE_DESCRIPTION() macrosJeff Johnson6-0/+6
On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/touchscreen/cyttsp_i2c_common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/misc/soc_button_array.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/matrix-keymap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/vivaldi-fmap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/tests/input_test.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes drivers/input/misc/sgi_btns.c which, although it did not produce a warning with the x86 allmodconfig configuration, may cause this warning with other configurations when either CONFIG_SGI_IP22 or CONFIG_SGI_IP32 is enabled. Signed-off-by: Jeff Johnson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-09Input: joystick - use sizeof(*pointer) instead of sizeof(type)Erick Archer25-26/+30
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). At the same time refactor the code to not use assignment in "if" conditions. This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/AS8PR02MB7237FEA55FAC8A9453F2DA6F8BC42@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-09Input: touchscreen - use sizeof(*pointer) instead of sizeof(type)Erick Archer17-23/+24
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). The refactoring is mostly trivial except for "usbtouchscreen.c" file. Here, in the "mtouch_alloc" and "nexio_alloc" functions, it is necessary to use a variable with a predefined type instead of the "usbtouch->priv" variable (void * type). This way, the "sizeof" operator can now know the correct size. Moreover, we need to set the "usbtouch->priv" pointer after the memory allocation since now the "kmalloc" return value is not assigned directly. This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/AS8PR02MB723708364CC0DF2EAAFEE5968BC42@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-07Input: xpad - add support for ASUS ROG RAIKIRI PROLuke D. Jones1-0/+1
Add the VID/PID for ASUS ROG RAIKIRI PRO to the list of known devices. Signed-off-by: Luke D. Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-07Input: ili210x - fix ili251x_read_touch_data() return valueJohn Keeping1-2/+2
The caller of this function treats all non-zero values as an error, so the return value of i2c_master_recv() cannot be returned directly. This fixes touch reporting when there are more than 6 active touches. Fixes: ef536abd3afd1 ("Input: ili210x - define and use chip operations structure") Signed-off-by: John Keeping <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-07Input: cap11xx - stop using chip ID when configuring itDmitry Torokhov1-55/+70
struct cap11xx_hw_model is supposed to describe the chip capabilities, however later code changes introduced checks against chip ID. Introduce new capabilities in cap11xx_hw_model and use them when applying chip configuration, and remove the enum for chip ID. While at it, rename no_gain to has_gain to match the rest of the new capabilities. Reviewed-by: Jiri Valek - 2N <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-07Input: adc-joystick - handle inverted axesChris Morgan1-0/+20
When one or more axes are inverted, (where min > max), normalize the data so that min < max and invert the values reported to the input stack. This ensures we can continue defining the device correctly in the device tree while not breaking downstream assumptions that min is always less than max. Signed-off-by: Chris Morgan <[email protected]> Acked-by: Artur Rojek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-07Input: gameport - use sizeof(*pointer) instead of sizeof(type)Erick Archer4-5/+5
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/PAXPR02MB72483F512F863C74A4AECA2B8BFB2@PAXPR02MB7248.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-07Input: serio - use sizeof(*pointer) instead of sizeof(type)Erick Archer23-37/+37
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/AS8PR02MB7237D3D898CCC9C50C18DE078BFB2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-06Merge branch 'ib/6.9-disable-irq-guard' into nextDmitry Torokhov1-0/+4
This brings in support for guard(disable_irq)(...);
2024-06-06linux/interrupt.h: allow "guard" notation to disable and reenable IRQDmitry Torokhov1-0/+4
Drivers often need to first disable an interrupt, carry out some action, and then reenable the interrupt. Introduce support for the "guard" notation for this so that the following is possible: ... scoped_cond_guard(mutex_intr, return -EINTR, &data->sysfs_mutex) { guard(disable_irq)(&client->irq); error = elan_acquire_baseline(data); if (error) return error; } ... Reviewed-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-06Input: wacom_w8001 - correct device name generationJason Gerecke1-1/+1
Fixes: 6c7cc1a29d1e ("Input: wacom_w8001 - simplify device name generation") Signed-off-by: Jason Gerecke <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-02Input: tablet - use sizeof(*pointer) instead of sizeof(type)Erick Archer5-5/+5
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/AS8PR02MB7237B05083487507CFAF96B08BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-02Input: mouse - use sizeof(*pointer) instead of sizeof(type)Erick Archer14-16/+15
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/AS8PR02MB7237FB736DBF67A58798FDF38BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-02Input: misc - use sizeof(*pointer) instead of sizeof(type)Erick Archer8-9/+9
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/AS8PR02MB7237884EB989EFF55D1BEF8B8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-02Input: keyboard - use sizeof(*pointer) instead of sizeof(type)Erick Archer8-8/+8
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Link: https://lore.kernel.org/r/AS8PR02MB7237277464F23CA168BFB3B18BF52@AS8PR02MB7237.eurprd02.prod.outlook.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-31Input: i8042 - add Ayaneo Kun to i8042 quirk tableTobias Jakobi1-2/+16
See the added comment for details. Also fix a typo in the quirk's define. Signed-off-by: Tobias Jakobi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-30Input: wacom_w8001 - simplify device name generationJason Gerecke1-8/+5
Replace pairs of strscpy/strlcat calls with snprintf. Signed-off-by: Jason Gerecke <[email protected]> Link: https://lore.kernel.org/r/CANRwn3SuTjdCCK4YH1ObvsC_gZuythAQ7kSHJP-CiAFw9h5Qcw@mail.gmail.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-28Input: elantech - fix touchpad state on resume for Lenovo N24Jonathan Denose1-0/+31
The Lenovo N24 on resume becomes stuck in a state where it sends incorrect packets, causing elantech_packet_check_v4 to fail. The only way for the device to resume sending the correct packets is for it to be disabled and then re-enabled. This change adds a dmi check to trigger this behavior on resume. Signed-off-by: Jonathan Denose <[email protected]> Link: https://lore.kernel.org/r/20240503155020.v2.1.Ifa0e25ebf968d8f307f58d678036944141ab17e6@changeid Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-27Merge tag 'v6.9' into nextDmitry Torokhov32818-946737/+2562521
Sync up with the mainline to bring in the new cleanup API.
2024-05-22Merge branch 'next' into for-linusDmitry Torokhov82-168/+328
Prepare input updates for 6.10 merge window.
2024-05-22Input: edt-ft5x06 - add support for FocalTech FT5452 and FT8719Joel Selvaraj1-0/+12
The driver is compatible with FocalTech FT5452 and FT8719 touchscreens too. FT5452 supports up to 5 touch points. FT8719 supports up to 10 touch points. Add compatible data for both of them. Signed-off-by: Joel Selvaraj <[email protected]> Link: https://lore.kernel.org/r/20240521-add-support-ft5452-and-ft8719-touchscreen-v1-2-2a648ac7176b@gmail.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-22dt-bindings: input: touchscreen: edt-ft5x06: Document FT5452 and FT8719 supportJoel Selvaraj1-0/+2
Document FocalTech FT5452 and FT8719 support by adding their compatibles. Signed-off-by: Joel Selvaraj <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/20240521-add-support-ft5452-and-ft8719-touchscreen-v1-1-2a648ac7176b@gmail.com Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-20Input: xpad - add support for Machenike G5 Pro ControllerKirill Artemev1-0/+2
Add VID and PID to the xpad_device and VID to the xpad_table to allow driver to use Machenike G5 Pro Controller, which is XTYPE_XBOX360 compatible in Xinput mode. Signed-off-by: Kirill Artemev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-19Input: try trimming too long modalias stringsDmitry Torokhov1-15/+89
If an input device declares too many capability bits then modalias string for such device may become too long and not fit into uevent buffer, resulting in failure of sending said uevent. This, in turn, may prevent userspace from recognizing existence of such devices. This is typically not a concern for real hardware devices as they have limited number of keys, but happen with synthetic devices such as ones created by xen-kbdfront driver, which creates devices as being capable of delivering all possible keys, since it doesn't know what keys the backend may produce. To deal with such devices input core will attempt to trim key data, in the hope that the rest of modalias string will fit in the given buffer. When trimming key data it will indicate that it is not complete by placing "+," sign, resulting in conversions like this: old: k71,72,73,74,78,7A,7B,7C,7D,8E,9E,A4,AD,E0,E1,E4,F8,174, new: k71,72,73,74,78,7A,7B,7C,+, This should allow existing udev rules continue to work with existing devices, and will also allow writing more complex rules that would recognize trimmed modalias and check input device characteristics by other means (for example by parsing KEY= data in uevent or parsing input device sysfs attributes). Note that the driver core may try adding more uevent environment variables once input core is done adding its own, so when forming modalias we can not use the entire available buffer, so we reduce it by somewhat an arbitrary amount (96 bytes). Reported-by: Jason Andryuk <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> Tested-by: Jason Andryuk <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-13Input: drop explicit initialization of struct i2c_device_id::driver_data to 0Uwe Kleine-König64-99/+99
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. While add it, also remove commas after the sentinel entries. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-13Input: zet6223 - remove an unused field in struct zet6223_tsChristophe JAILLET1-2/+0
In "struct zet6223_ts", the 'vcc' and 'vio' fields are unused. So, remove them. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/3065d885341e2730dd3e7905d75514796a8c25e4.1715507858.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-13Input: chipone_icn8505 - remove an unused field in struct icn8505_dataChristophe JAILLET1-1/+0
In "struct icn8505_data", the 'wake_gpio' field is unused. There is also nothing about gpio neither in this driver nor in the data-sheet. So, remove it. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/37443a675ca07c91c5f0118ce255406e6e3c08f5.1715502304.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov <[email protected]>
2024-05-12Linux 6.9Linus Torvalds1-1/+1