aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-07-08dt-bindings: input: touchscreen: himax,hx83112b: add HX83100AFelix Kaechele1-0/+1
Add a compatible string for the Himax HX83100A touch controller. The HX83100A presents touch events on the internal bus rather than offering a dedicated event register like the other chips in this family do. Signed-off-by: Felix Kaechele <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: do not check number of events in input_pass_values()Dmitry Torokhov1-3/+0
Now that the input_dev->vals array is always there we can be assured that input_pass_values() is always called with a non-0 number of events. Remove the check. Reviewed-by: Jeff LaBundy <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: preallocate memory to hold event valuesDmitry Torokhov1-17/+44
Preallocate memory for holding event values (input_dev->vals) so that there is no need to check if it was allocated or not in the event processing code. The amount of memory will be adjusted after input device has been fully set up upon registering device with the input core. Reviewed-by: Jeff LaBundy <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: rearrange input_alloc_device() to prepare for preallocating of valsDmitry Torokhov1-15/+22
In preparation to have dev->vals memory pre-allocated rearrange code in input_alloc_device() so that it allows handling multiple points of failure. Reviewed-by: Jeff LaBundy <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: simplify event handling logicDmitry Torokhov1-41/+68
Streamline event handling code by providing batch implementations for filtering and event processing and using them in place of the main event handler, as needed, instead of having complex branching logic in the middle of the event processing code. Reviewed-by: Jeff LaBundy <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: make events() method return number of events processedDmitry Torokhov2-5/+8
In preparation to consolidating filtering and event processing in the input core change events() method to return number of events processed by it. Reviewed-by: Jeff LaBundy <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: make sure input handlers define only one processing methodDmitry Torokhov1-0/+24
Input core expects input handlers to be either filters, or regular handlers, but not both. Additionally, for regular handlers it does not make sense to define both single event method and batch method. Refuse registering handler if it defines more than one method. Reviewed-by: Jeff LaBundy <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: evdev - remove ->event() methodDmitry Torokhov1-12/+0
Input core favors ->events() (batch) method over ->event() method if the former is defined, so there is no point in defining evdev_event() as it is never called. Remove it. Reviewed-by: Jeff LaBundy <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: imagis - add supports for Imagis IST3038Raymond Hackley1-4/+20
Imagis IST3038 is another variant of Imagis IST3038 IC, which has a different register interface from IST3038C (possibly firmware defined). Unlike IST3038C/IST3032C, IST3038 has different registers for commands, which means IST3038 doesn't use protocol B. Similar to IST3032C and maybe the other variants, IST3038 has touch keys support, which provides KEY_APPSELECT and KEY_BACK. Add support for IST3038 with touch keys. Signed-off-by: Raymond Hackley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08dt-bindings: input/touchscreen: imagis: Document ist3038Raymond Hackley1-0/+1
Imagis IST3038 is a variant of Imagis touchscreen IC. Document it in imagis,ist3038c bindings. Signed-off-by: Raymond Hackley <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: imagis - clarify the usage of protocol_bRaymond Hackley1-4/+5
protocol_b is a property, which tells Imagis panel to use a different format for coordinates. IST30XXC series is known for using protocol B, while the other series aren't. Note this could be confusing, unlike the model name implies. Adjust the usage of protocol_b to avoid confusion. Signed-off-by: Raymond Hackley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08dt-bindings: input: ti,nspire-keypad: convert to YAML formatAndrew Davis2-60/+74
Convert TI-NSPIRE Keypad controller bindings to DT schema. Signed-off-by: Andrew Davis <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: fsl-imx25-tcq - constify struct regmap_configJavier Carrasco1-1/+1
`mx25_tcq_regconfig` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-08Input: qt1050 - constify struct regmap_configJavier Carrasco1-1/+1
`qt1050_regmap_config` is not modified and can be declared as const to move its data to a read-only section. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-03Input: cypress_ps2 - use u8 when dealing with byte dataDmitry Torokhov1-44/+34
When dealing with byte data use u8 instead of unsigned char or int. Stop layering error handling in cypress_ps2_sendbyte() and simply pass on error code from ps2_sendbyte(). Additionally use u8 instead of unisgned char throughout the code. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-03Input: cypress_ps2 - propagate errors from lower layersDmitry Torokhov1-27/+35
Do not override errors reported by lower layers with generic "-1", but propagate them to the callers. Change the checks for errors to be in the form of "if (error)" to maintain consistency. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-03Input: cypress_ps2 - report timeouts when reading command statusDmitry Torokhov1-3/+6
Report -ETIMEDOUT error code from cypress_ps2_read_cmd_status() when device does not send enough data within the allotted time in response to a command. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-03Input: cypress_ps2 - fix error handling when sending command failsDmitry Torokhov2-23/+15
Stop layering error handling in cypress_ps2_sendbyte() and simply pass on error code from ps2_sendbyte() and use it in the callers. This fixes mishandling of error condition in cypress_ps2_read_cmd_status() which expects errors to be negative. Reported-by: Igor Artemiev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-03Input: cypress_ps2 - clean up setting reporting rateDmitry Torokhov1-2/+3
Casting an integer field containing desired rate to a pointer to bytes works on little endian architectures where the driver is used, but not a good practice. Use a temporary of proper type instead. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-07-01Input: elan_i2c - do not leave interrupt disabled on suspend failureDmitry Torokhov1-0/+2
Make sure interrupts are not left disabled when we fail to suspend the touch controller. Fixes: 6696777c6506 ("Input: add driver for Elan I2C/SMbus touchpad") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-28Input: ili210x - use guard notation when disabling and reenabling IRQDmitry Torokhov1-9/+7
This makes the code more compact and error handling more robust. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-28Input: ili210x - switch to using cleanup functions in firmware codeDmitry Torokhov1-60/+63
Start using __free() attributes to simplify the code and error handling. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-28Input: ili210x - use kvmalloc() to allocate buffer for firmware updateDmitry Torokhov1-3/+3
Allocating a contiguous buffer of 64K may fail if memory is sufficiently fragmented, and may cause OOM kill of an unrelated process. However we do not need to have contiguous memory. We also do not need to zero out the buffer since it will be overwritten with firmware data. Switch to using kvmalloc() instead of kzalloc(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-28Input: rohm_bu21023 - switch to using cleanup functionsDmitry Torokhov1-21/+19
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-28Input: rohm_bu21023 - switch to using sysfs_emit()Dmitry Torokhov1-3/+3
sysfs_emit() is preferred over snprintf() for sysfs attribute handling. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2024-06-28Input: rohm_bu21023 - factor out settings update codeDmitry Torokhov1-48/+29
The code to toggle axis swapping and inversion is repetitive and can be factored out. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
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-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: 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]>