- 03 Jul, 2024 3 commits
-
-
Dmitry Torokhov authored
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/20240628224728.2180126-3-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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 <Igor.A.Artemiev@mcst.ru> Link: https://lore.kernel.org/r/20240628224728.2180126-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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/20240628224728.2180126-1-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 01 Jul, 2024 1 commit
-
-
Dmitry Torokhov authored
Make sure interrupts are not left disabled when we fail to suspend the touch controller. Fixes: 6696777c ("Input: add driver for Elan I2C/SMbus touchpad") Link: https://lore.kernel.org/r/ZmKiiL-1wzKrhqBj@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 28 Jun, 2024 8 commits
-
-
Dmitry Torokhov authored
This makes the code more compact and error handling more robust. Link: https://lore.kernel.org/r/20240609234757.610273-3-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Start using __free() attributes to simplify the code and error handling. Link: https://lore.kernel.org/r/20240609234757.610273-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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/20240609234757.610273-1-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Start using __free() and guard() primitives to simplify the code and error handling. Link: https://lore.kernel.org/r/20240609235134.614592-3-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
sysfs_emit() is preferred over snprintf() for sysfs attribute handling. Link: https://lore.kernel.org/r/20240609235134.614592-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
The code to toggle axis swapping and inversion is repetitive and can be factored out. Link: https://lore.kernel.org/r/20240609235134.614592-1-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Switch the driver to use __free(kfree) cleanup facility instead of freeing memory by hand. Link: https://lore.kernel.org/r/Zmk1SGwVt3rIbbMU@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Switch the driver to use guard notation when acquiring mutex to have it released automatically. Link: https://lore.kernel.org/r/Zmkyvkr9AFyywy1V@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 27 Jun, 2024 1 commit
-
-
Dmitry Torokhov authored
Bring in ADS7846 hsync changes.
-
- 25 Jun, 2024 1 commit
-
-
Andrei Lalaev authored
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: cbebf5ad ("Input: qt1050 - add Microchip AT42QT1050 support") Signed-off-by: Andrei Lalaev <andrei.lalaev@anton-paar.com> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20240617183018.916234-1-andrey.lalaev@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 22 Jun, 2024 5 commits
-
-
Andreas Kemnade authored
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 <andreas@kemnade.info> Reviewed-by: Oliver Graute <oliver.graute@kococonnector.com> Link: https://lore.kernel.org/r/20240501204758.758537-3-andreas@kemnade.infoSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Andreas Kemnade authored
Add compatible for ft5426. Searches for documentation reveal neither edt nor evervision as some related company, only FocalTech. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Oliver Graute <oliver.graute@kococonnector.com> Link: https://lore.kernel.org/r/20240501204758.758537-2-andreas@kemnade.infoSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Andreas Kemnade authored
The chip is similar, but has status bits at different positions, so use the correct bits. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20240621224022.1620897-4-andreas@kemnade.infoSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Andreas Kemnade authored
Add a compatible for the EKTF2232, which is similar to other chips in this document. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240621224022.1620897-3-andreas@kemnade.infoSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Andreas Kemnade authored
Convert EKTF2127 infrared touchscreen controller binding to DT schema and add ektf2232 compatible. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240621224022.1620897-2-andreas@kemnade.infoSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 21 Jun, 2024 3 commits
-
-
Linus Walleij authored
Add handling of HSYNC signal emitted by the TI ADS7846 if it is hooked up to a GPIO. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20240430-gpio-leds-miscarm-v1-3-9c94d7711f6c@linaro.org [dtor: dropped Spitz changes, kept platform data wait_for_sync option] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Linus Walleij authored
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 <linus.walleij@linaro.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20240430-gpio-leds-miscarm-v1-2-9c94d7711f6c@linaro.orgSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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 <contact@artur-rojek.eu> Link: https://lore.kernel.org/r/ZmkrgTlxNwm_oHxv@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 20 Jun, 2024 4 commits
-
-
Dmitry Torokhov authored
Start using __free() and guard() primitives to simplify the code and error handling. Link: https://lore.kernel.org/r/20240610041813.722445-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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/20240610041813.722445-1-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Javier Carrasco authored
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 <javier.carrasco.cruz@gmail.com> Reviewed-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-2-3ee0ead2e57d@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Javier Carrasco authored
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 <javier.carrasco.cruz@gmail.com> Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-1-3ee0ead2e57d@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 11 Jun, 2024 4 commits
-
-
Dmitry Torokhov authored
Switch to using guard(mutex)() notation to acquire and automatically release mutexes. Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240610164301.1048482-4-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Switch the driver to use managed resources to simplify error handling. Link: https://lore.kernel.org/r/20240610164301.1048482-3-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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/20240610164301.1048482-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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 <nuno.sa@analog.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20240610164301.1048482-1-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 09 Jun, 2024 3 commits
-
-
Jeff Johnson authored
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 <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240609-md-drivers-input-v1-1-a2f394e0f9d8@quicinc.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
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 <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237FEA55FAC8A9453F2DA6F8BC42@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
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 <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB723708364CC0DF2EAAFEE5968BC42@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 07 Jun, 2024 4 commits
-
-
Dmitry Torokhov authored
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 <jiriv@axis.com> Link: https://lore.kernel.org/r/ZXlCRsnOu_L8xeTC@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Chris Morgan authored
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 <macromorgan@hotmail.com> Acked-by: Artur Rojek <contact@artur-rojek.eu> Link: https://lore.kernel.org/r/20240115192752.266367-1-macroalpha82@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
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 <erick.archer@outlook.com> Link: https://lore.kernel.org/r/PAXPR02MB72483F512F863C74A4AECA2B8BFB2@PAXPR02MB7248.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
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 <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237D3D898CCC9C50C18DE078BFB2@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 06 Jun, 2024 3 commits
-
-
Dmitry Torokhov authored
This brings in support for guard(disable_irq)(...);
-
Dmitry Torokhov authored
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 <tglx@linutronix.de> Link: https://lore.kernel.org/r/ZljAV6HjkPSEhWSw@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Jason Gerecke authored
Fixes: 6c7cc1a2 ("Input: wacom_w8001 - simplify device name generation") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Link: https://lore.kernel.org/r/20240605164656.61623-1-jason.gerecke@wacom.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-