linux-2.6-block.git
4 months agodt-bindings: input/touchscreen: Add compatible for IST3038B
Markuss Broks [Fri, 1 Mar 2024 16:41:01 +0000 (17:41 +0100)]
dt-bindings: input/touchscreen: Add compatible for IST3038B

Imagis IST3038B is a variant (firmware?) of Imagis IST3038 IC
differing from IST3038C in its register interface. Add the
compatible for it to the IST3038C bindings.

Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[balejk@matfyz.cz: elaborate chip differences in the commit message]
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20240301164659.13240-3-karelb@gimli.ms.mff.cuni.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 months agoinput/touchscreen: imagis: Correct the maximum touch area value
Markuss Broks [Fri, 1 Mar 2024 16:41:00 +0000 (17:41 +0100)]
input/touchscreen: imagis: Correct the maximum touch area value

As specified in downstream IST3038B driver and proved by testing,
the correct maximum reported value of touch area is 16.

Signed-off-by: Markuss Broks <markuss.broks@gmail.com>
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20240301164659.13240-2-karelb@gimli.ms.mff.cuni.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 months agoInput: leds - change config symbol dependency for audio mute trigger
Heiner Kallweit [Sun, 3 Mar 2024 22:32:00 +0000 (14:32 -0800)]
Input: leds - change config symbol dependency for audio mute trigger

In a follow-up patch implementation of the LED audio trigger will be
moved to sound/core/snd_ctl_led, including removal of config symbol
LEDS_AUDIO_TRIGGER. Also as of today the audio mute LED trigger
is effectively a no-op w/o config symbol SND_CTL_LED being defined.
Therefore switch the dependency to this config symbol.

Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/6011ca63-187c-42dd-a5fd-7dd733d6257c@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 months agoInput: ti_am335x_tsc - remove redundant assignment to variable config
Colin Ian King [Thu, 8 Feb 2024 20:01:00 +0000 (12:01 -0800)]
Input: ti_am335x_tsc - remove redundant assignment to variable config

The variable config is being initialized with a value that is never
read, it is being re-assigned in the next statement. The initialization
is redundant and can be removed.

Cleans up clang scan build warning:
drivers/input/touchscreen/ti_am335x_tsc.c:160:2: warning: Value stored
to 'config' is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240205215940.1851349-1-colin.i.king@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 months agoInput: xpad - sort xpad_device by vendor and product ID
Brenton Simpson [Thu, 8 Feb 2024 19:13:17 +0000 (11:13 -0800)]
Input: xpad - sort xpad_device by vendor and product ID

This helps making sure there are no duplicate entries in the tables.

Signed-off-by: Brenton Simpson <appsforartists@google.com>
Link: https://lore.kernel.org/r/20240130231903.293265-1-appsforartists@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
4 months agoInput: gameport - make gameport_bus const
Ricardo B. Marliere [Sun, 4 Feb 2024 19:56:34 +0000 (16:56 -0300)]
Input: gameport - make gameport_bus const

Now that the driver core can properly handle constant struct bus_type,
move the gameport_bus variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-input-v1-1-74c2438801cf@marliere.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: matrix_keypad - switch to using managed resources
Dmitry Torokhov [Sun, 21 Jan 2024 05:32:30 +0000 (21:32 -0800)]
Input: matrix_keypad - switch to using managed resources

Switch the drivers to use managed resources (devm) to simplify error
handling and remove the need to have remove() implementation.

Link: https://lore.kernel.org/r/20240121053232.276968-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: matrix_keypad - consolidate handling of clustered interrupt
Dmitry Torokhov [Sun, 21 Jan 2024 05:32:29 +0000 (21:32 -0800)]
Input: matrix_keypad - consolidate handling of clustered interrupt

Now that the driver stores interrupt numbers corresponding to individual
GPIOs in non-clustered mode, it is possible to unify handling of both
modes by storing clustered interrupt at position 0 and setting the
number of interrupts in this case to 1.

Link: https://lore.kernel.org/r/20240121053232.276968-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: matrix_keypad - avoid repeatedly converting GPIO to IRQ
Dmitry Torokhov [Sun, 21 Jan 2024 05:32:28 +0000 (21:32 -0800)]
Input: matrix_keypad - avoid repeatedly converting GPIO to IRQ

There is no need to do conversion from GPIOs to interrupt numbers.
Convert row GPIOs to interrupt numbers once in probe() and use
this information when the driver needs to enable or disable given
interrupt line.

Link: https://lore.kernel.org/r/20240121053232.276968-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: goodix-berlin - add SPI support for Goodix Berlin Touchscreen IC
Neil Armstrong [Mon, 29 Jan 2024 09:16:38 +0000 (10:16 +0100)]
Input: goodix-berlin - add SPI support for Goodix Berlin Touchscreen IC

Add initial support for the new Goodix "Berlin" touchscreen ICs
over the SPI interface.

The driver doesn't use the regmap_spi code since the SPI messages
needs to be prefixed, thus this custom regmap code.

This initial driver is derived from the Goodix goodix_ts_berlin
available at [1] and [2] and only supports the GT9916 IC
present on the Qualcomm SM8550 MTP & QRD touch panel.

The current implementation only supports BerlinD, aka GT9916.

[1] https://github.com/goodix/goodix_ts_berlin
[2] https://git.codelinaro.org/clo/la/platform/vendor/opensource/touch-drivers

Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240129-topic-goodix-berlin-upstream-initial-v15-4-6f7d096c0a0a@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: goodix-berlin - add I2C support for Goodix Berlin Touchscreen IC
Neil Armstrong [Mon, 29 Jan 2024 09:16:37 +0000 (10:16 +0100)]
Input: goodix-berlin - add I2C support for Goodix Berlin Touchscreen IC

Add initial support for the new Goodix "Berlin" touchscreen ICs
over the I2C interface.

This initial driver is derived from the Goodix goodix_ts_berlin
available at [1] and [2] and only supports the GT9916 IC
present on the Qualcomm SM8550 MTP & QRD touch panel.

The current implementation only supports BerlinD, aka GT9916.

[1] https://github.com/goodix/goodix_ts_berlin
[2] https://git.codelinaro.org/clo/la/platform/vendor/opensource/touch-drivers

Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240129-topic-goodix-berlin-upstream-initial-v15-3-6f7d096c0a0a@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: add core support for Goodix Berlin Touchscreen IC
Neil Armstrong [Mon, 29 Jan 2024 09:16:36 +0000 (10:16 +0100)]
Input: add core support for Goodix Berlin Touchscreen IC

Add initial support for the new Goodix "Berlin" touchscreen ICs.

These touchscreen ICs support SPI, I2C and I3C interface, up to
10 finger touch, stylus and gestures events.

This initial driver is derived from the Goodix goodix_ts_berlin
available at [1] and [2] and only supports the GT9916 IC
present on the Qualcomm SM8550 MTP & QRD touch panel.

The current implementation only supports BerlinD, aka GT9916.

Support for advanced features like:
- Firmware & config update
- Stylus events
- Gestures events
- Previous revisions support (BerlinA or BerlinB)
is not included in current version.

The current support will work with currently flashed firmware
and config, and bail out if firmware or config aren't flashed yet.

[1] https://github.com/goodix/goodix_ts_berlin
[2] https://git.codelinaro.org/clo/la/platform/vendor/opensource/touch-drivers

Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240129-topic-goodix-berlin-upstream-initial-v15-2-6f7d096c0a0a@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agodt-bindings: input: document Goodix Berlin Touchscreen IC
Neil Armstrong [Mon, 29 Jan 2024 09:16:35 +0000 (10:16 +0100)]
dt-bindings: input: document Goodix Berlin Touchscreen IC

Document the Goodix GT9916 wich is part of the "Berlin" serie
of Touchscreen controllers IC from Goodix.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240129-topic-goodix-berlin-upstream-initial-v15-1-6f7d096c0a0a@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agodt-bindings: input: melfas,mms114: add MMS252 compatible
Luca Weiss [Tue, 23 Jan 2024 03:33:35 +0000 (19:33 -0800)]
dt-bindings: input: melfas,mms114: add MMS252 compatible

Add a compatible for MMS252 touchscreen which appears to work fine with
the MMS114 driver.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Signed-off-by: Bryant Mairs <bryant@mai.rs>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231105204759.37107-2-bryant@mai.rs
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: 88pm80x_onkey - add SPDX and drop GPL boilerplate
Duje Mihanović [Mon, 22 Jan 2024 19:13:17 +0000 (11:13 -0800)]
Input: 88pm80x_onkey - add SPDX and drop GPL boilerplate

Add a SPDX-License-Identifier to the 88PM80x onkey driver and drop the
GPL boilerplate in accordance with current kernel code guidelines.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240121-88pm80x-onkey-spdx-v1-1-b646d4749f5b@skole.hr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: leds - set default-trigger for mute
Bernhard Seibold [Sat, 13 Jan 2024 10:37:42 +0000 (11:37 +0100)]
Input: leds - set default-trigger for mute

Set the default-trigger for the mute led to audio-mute.

Signed-off-by: Bernhard Seibold <mail@bernhard-seibold.de>
Link: https://lore.kernel.org/r/20240113103743.97205-1-mail@bernhard-seibold.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agodt-bindings: input: touchscreen: goodix: clarify irq-gpios misleading text
Luca Ceresoli [Tue, 2 Jan 2024 08:19:34 +0000 (09:19 +0100)]
dt-bindings: input: touchscreen: goodix: clarify irq-gpios misleading text

The irq-gpios description misleading, apparently saying that driving the
IRQ GPIO resets the device, which is even more puzzling as there is a reset
GPIO as well.

In reality the IRQ pin can be driven during the reset sequence to configure
the client address, as it becomes clear after checking both the datasheet
and the driver code. Improve the text to clarify that.

Also rephrase to remove reference to the driver, which is not appropriate
in the bindings.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20240102081934.11293-1-luca.ceresoli@bootlin.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: bcm-keypad - remove redundant of_match_ptr()
Ruan Jinjie [Wed, 9 Aug 2023 10:16:26 +0000 (18:16 +0800)]
Input: bcm-keypad - remove redundant of_match_ptr()

The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230809101626.2664651-1-ruanjinjie@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agodt-bindings: input: silead,gsl1680: do not override firmware-name $ref
Krzysztof Kozlowski [Mon, 15 Jan 2024 18:20:57 +0000 (19:20 +0100)]
dt-bindings: input: silead,gsl1680: do not override firmware-name $ref

dtschema package defines firmware-name as string-array, so individual
bindings should not make it a string but instead just narrow the number
of expected firmware file names.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240115182057.1610195-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: remove usage of the deprecated ida_simple_xx() API
Christophe JAILLET [Mon, 15 Jan 2024 20:19:04 +0000 (21:19 +0100)]
Input: remove usage of the deprecated ida_simple_xx() API

ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

Note that the upper limit of ida_simple_get() is exclusive, but the one of
ida_alloc_range() is inclusive. So a -1 has been added when needed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/a885de14beead2cc3c1c946f192b8b178dac696a.1705349930.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: synaptics-rmi4 - fail probing if memory allocation for "phys" fails
Kunwu Chan [Thu, 18 Jan 2024 19:37:59 +0000 (11:37 -0800)]
Input: synaptics-rmi4 - fail probing if memory allocation for "phys" fails

While input core can work with input->phys set to NULL userspace might
depend on it, so better fail probing if allocation fails. The system must
be in a pretty bad shape for it to happen anyway.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20240117073124.143636-1-chentao@kylinos.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: navpoint - remove driver
Duje Mihanović [Tue, 16 Jan 2024 21:54:31 +0000 (13:54 -0800)]
Input: navpoint - remove driver

This driver does not use the SPI core as it should, instead tampering
with the SSP registers manually. Refactoring the driver is almost
certainly not worth it as the hardware seems to have been designed for
and used only in the HP iPAQ hx4700 removed more than a year ago in
d6df7df7ae5a ("ARM: pxa: remove unused board files"), so let's remove
it.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Link: https://lore.kernel.org/r/20240116-navpoint-removal-v2-2-e566806f1009@skole.hr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: driver for Adafruit Seesaw Gamepad
Anshul Dalal [Tue, 9 Jan 2024 22:39:26 +0000 (14:39 -0800)]
Input: driver for Adafruit Seesaw Gamepad

Adds a driver for a mini gamepad that communicates over i2c, the gamepad
has bidirectional thumb stick input and six buttons.

The gamepad chip utilizes the open framework from Adafruit called 'Seesaw'
to transmit the ADC data for the joystick and digital pin state for the
buttons. I have only implemented the functionality required to receive the
thumb stick and button state.

Steps in reading the gamepad state over i2c:
  1. Reset the registers
  2. Set the pin mode of the pins specified by the `BUTTON_MASK` to input
      `BUTTON_MASK`: A bit-map for the six digital pins internally
       connected to the joystick buttons.
  3. Enable internal pullup resistors for the `BUTTON_MASK`
  4. Bulk set the pin state HIGH for `BUTTON_MASK`
  5. Poll the device for button and joystick state done by:
      `seesaw_read_data(struct i2c_client *client, struct seesaw_data *data)`

Product page:
  https://www.adafruit.com/product/5743
Arduino driver:
  https://github.com/adafruit/Adafruit_Seesaw

Driver tested on RPi Zero 2W

Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
Link: https://lore.kernel.org/r/20240106015111.882325-2-anshulusr@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agodt-bindings: input: bindings for Adafruit Seesaw Gamepad
Anshul Dalal [Tue, 9 Jan 2024 22:38:57 +0000 (14:38 -0800)]
dt-bindings: input: bindings for Adafruit Seesaw Gamepad

Adds bindings for the Adafruit Seesaw Gamepad.

The gamepad functions as an i2c device with the default address of 0x50
and has an IRQ pin that can be enabled in the driver to allow for a rising
edge trigger on each button press or joystick movement.

Product page:
  https://www.adafruit.com/product/5743
Arduino driver:
  https://github.com/adafruit/Adafruit_Seesaw

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
Link: https://lore.kernel.org/r/20240106015111.882325-1-anshulusr@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: da9063_onkey - avoid explicitly setting input's parent
Dmitry Torokhov [Thu, 21 Dec 2023 03:09:45 +0000 (19:09 -0800)]
Input: da9063_onkey - avoid explicitly setting input's parent

devm_input_allocate_device() already sets parent of the new input
device, there's no need to set it up explicitly.

Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/ZYOseYfVgg0Ve6Zl@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
5 months agoInput: da9063_onkey - avoid using OF-specific APIs
Dmitry Torokhov [Thu, 21 Dec 2023 03:09:05 +0000 (19:09 -0800)]
Input: da9063_onkey - avoid using OF-specific APIs

There is nothing OF-specific in the driver, so switch from OF properties
helpers to generic device helpers.

Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/ZYOsUfKceOFXuCt5@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: iqs269a - add support for OTP variants
Jeff LaBundy [Mon, 1 Jan 2024 20:02:45 +0000 (14:02 -0600)]
Input: iqs269a - add support for OTP variants

This patch adds support for each available OTP variant of the device.
The OTP configuration cannot be read over I2C, so it is derived from
a compatible string instead.

Early revisions of the D0 order code require their OTP-enabled func-
tionality to be manually restored following a soft reset; this patch
accommodates this erratum as well.

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/ZZMaZbdk6iAKUjlm@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agodt-bindings: input: iqs269a: Add bindings for OTP variants
Jeff LaBundy [Mon, 1 Jan 2024 20:02:35 +0000 (14:02 -0600)]
dt-bindings: input: iqs269a: Add bindings for OTP variants

This patch adds bindings for the D0 order code of the device. This
order code represents an OTP variant that enables a touch-and-hold
function in place of slider 1.

Also included is the ability to specify the 00 order code (default
option with no OTP customization) explicitly.

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/ZZMaW9RkQ9bKXOUn@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: iqs269a - add support for slider gestures
Jeff LaBundy [Mon, 1 Jan 2024 20:02:23 +0000 (14:02 -0600)]
Input: iqs269a - add support for slider gestures

This patch adds support for slider gestures that can be expressed
by the device. Each gesture (e.g. tap or hold) can be mapped to a
unique keycode for either slider 0 or 1.

With this change, raw slider coordinates are reported only if the
slider has no keycodes defined. This prevents unwanted mouse cur-
sor movement when expressing axial gestures (e.g. swipe) and also
eliminates some unnecessary I2C traffic.

Different revisions of silicon use different tap and swipe timeout
step sizes. Apply an appropriate scaling factor depending on which
revision is found.

To facilitate this change, store the iqs269_ver_info struct in the
driver's private data so that other functions can use it after the
driver has probed.

Last but not least, a former reserved field in iqs269_ver_info now
contains useful information; give it a name (fw_num).

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/ZZMaT46WQq1/Nrsb@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agodt-bindings: input: iqs269a: Add bindings for slider gestures
Jeff LaBundy [Mon, 1 Jan 2024 20:02:06 +0000 (14:02 -0600)]
dt-bindings: input: iqs269a: Add bindings for slider gestures

This patch adds bindings for slider gestures that can be expressed
by the device.

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/ZZMaPrbSi4IrzwKF@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages
Hermes Zhang [Fri, 29 Dec 2023 01:36:57 +0000 (09:36 +0800)]
Input: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages

commit ae42f9288846 ("gpio: Return EPROBE_DEFER if gc->to_irq is NULL")
make gpiod_to_irq() possible to return -EPROBE_DEFER when the racing
happens. This causes the following error message to be printed:

    gpio-keys gpio_keys: Unable to get irq number for GPIO 0, error -517

Fix that by changing dev_err() to dev_err_probe()

Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
Link: https://lore.kernel.org/r/20231229013657.692600-1-Hermes.Zhang@axis.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: zforce_ts - accept standard touchscreen properties
Andreas Kemnade [Sun, 24 Dec 2023 08:04:23 +0000 (00:04 -0800)]
Input: zforce_ts - accept standard touchscreen properties

Only driver-specific properties were accepted, change it
to use the now-available standard properties.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Link: https://lore.kernel.org/r/20231223221213.774868-4-andreas@kemnade.info
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agodt-bindings: touchscreen: neonode,zforce: Use standard properties
Andreas Kemnade [Sun, 24 Dec 2023 08:04:12 +0000 (00:04 -0800)]
dt-bindings: touchscreen: neonode,zforce: Use standard properties

Enable touchscreen orientation to be specified by using standard
properties.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231223221213.774868-3-andreas@kemnade.info
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agodt-bindings: touchscreen: convert neonode,zforce to json-schema
Andreas Kemnade [Sun, 24 Dec 2023 08:04:00 +0000 (00:04 -0800)]
dt-bindings: touchscreen: convert neonode,zforce to json-schema

Convert Neonode infrared touchscreen controller binding to DT schema.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231223221213.774868-2-andreas@kemnade.info
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agodt-bindings: input: convert drv266x to json-schema
Anshul Dalal [Thu, 21 Dec 2023 18:31:08 +0000 (00:01 +0530)]
dt-bindings: input: convert drv266x to json-schema

Convert devicetree binding documentation for ti drv2665 and drv2667
haptics driver to json-schema. The previously two separate bindings have
been merged into a single drv266x.yaml.

Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231221183109.684325-1-anshulusr@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: da9063 - use dev_err_probe()
Biju Das [Fri, 15 Dec 2023 06:05:20 +0000 (22:05 -0800)]
Input: da9063 - use dev_err_probe()

Replace dev_err()->dev_err_probe() to simplify probe().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-4-biju.das.jz@bp.renesas.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: da9063 - drop redundant prints in probe()
Biju Das [Thu, 14 Dec 2023 07:48:38 +0000 (23:48 -0800)]
Input: da9063 - drop redundant prints in probe()

The memory allocation core code already prints error message in case of
OOM. So, drop additional print messages for OOM cases.

While at it, input_register_device() is already printing error messages on
failure. Drop the redundant print.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-3-biju.das.jz@bp.renesas.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: da9063 - simplify obtaining OF match data
Biju Das [Thu, 14 Dec 2023 05:37:15 +0000 (21:37 -0800)]
Input: da9063 - simplify obtaining OF match data

Simplify probe() by replacing of_match_node() for retrieving match data by
device_get_match_data().

Some minor cleanups:
 * Remove the trailing comma in the terminator entry for the OF
   table making code robust against (theoretical) misrebases or other
   similar things where the new entry goes _after_ the termination without
   the compiler noticing.
 * Move OF table near to the user.
 * Arrange variables in reverse xmas tree order in probe().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20231213214803.9931-2-biju.das.jz@bp.renesas.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: as5011 - convert to GPIO descriptor
Linus Walleij [Wed, 13 Dec 2023 07:04:47 +0000 (23:04 -0800)]
Input: as5011 - convert to GPIO descriptor

This driver does not have any in-tree users but is passing a
legacy GPIO number through platform data.

Convert it to use a GPIO descriptor, new users or outoftree
users can easily be implemented using GPIO descriptor tables
or software nodes.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-4-9433162914a3@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: omap-keypad - drop optional GPIO support
Linus Walleij [Wed, 13 Dec 2023 07:06:55 +0000 (23:06 -0800)]
Input: omap-keypad - drop optional GPIO support

The driver supports passing some GPIO lines for rows and columns
through the driver data, but there is no in-kernel user of this.

Further the use seems convoluted because the GPIO lines are unused
in the driver, then explicitly free:ed when removing it without
being requested when probing it, which is assymetric and just
a recepie for disaster.

Remove the support for these unused GPIOs, if need be support can
be reestablished in an organized fashion using GPIO descriptors.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-3-9433162914a3@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: tca6416-keypad - drop unused include
Linus Walleij [Wed, 13 Dec 2023 07:04:35 +0000 (23:04 -0800)]
Input: tca6416-keypad - drop unused include

The TCA6416 keypad driver is including the legacy GPIO
header <linux/gpio.h> for no reason, it is not using any
of its symbols. Drop the header.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-2-9433162914a3@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: navpoint - convert to use GPIO descriptor
Linus Walleij [Wed, 13 Dec 2023 07:02:56 +0000 (23:02 -0800)]
Input: navpoint - convert to use GPIO descriptor

The Navpoint driver uses a GPIO line, convert this to use
a GPIO descriptor. There are no in-kernel users but out of tree
users can easily be added or converted using a GPIO descriptor
table as with numerous other drivers.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-1-9433162914a3@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: vivaldi - convert to use sysfs_emit_at() API
ye xingchen [Wed, 13 Dec 2023 06:41:50 +0000 (22:41 -0800)]
Input: vivaldi - convert to use sysfs_emit_at() API

Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212071644171074630@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: iqs269a - use sysfs_emit() instead of scnprintf()
ye xingchen [Wed, 13 Dec 2023 06:28:54 +0000 (22:28 -0800)]
Input: iqs269a - use sysfs_emit() instead of scnprintf()

Replace calls to scnprintf() in the methods showing device attributes
with sysfs_emit() to simplify the code.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212011548387254492@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: ims-pcu - use sysfs_emit() instead of scnprintf()
ye xingchen [Wed, 13 Dec 2023 06:21:11 +0000 (22:21 -0800)]
Input: ims-pcu - use sysfs_emit() instead of scnprintf()

Replace calls to scnprintf() in the methods showing device attributes
with sysfs_emit() to simplify the code.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212011548387254492@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: synaptics-rmi4 - use sysfs_emit() to instead of scnprintf()
ye xingchen [Wed, 13 Dec 2023 06:31:44 +0000 (22:31 -0800)]
Input: synaptics-rmi4 - use sysfs_emit() to instead of scnprintf()

Replace calls to scnprintf() in the methods showing device attributes
with sysfs_emit() to simplify the code.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212011551429834598@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: touchscreen - use sysfs_emit[_at]() instead of scnprintf()
ye xingchen [Wed, 13 Dec 2023 05:53:40 +0000 (21:53 -0800)]
Input: touchscreen - use sysfs_emit[_at]() instead of scnprintf()

Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Oliver Graute <oliver.graute@kococonnector.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: mouse - use sysfs_emit[_at]() instead of scnprintf()
ye xingchen [Wed, 13 Dec 2023 06:12:01 +0000 (22:12 -0800)]
Input: mouse - use sysfs_emit[_at]() instead of scnprintf()

Replace the calls to various *printf() functions with sysfs_emit() to
simplify the code.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212021453578171100@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: use sysfs_emit() instead of scnprintf()
ye xingchen [Wed, 13 Dec 2023 06:37:16 +0000 (22:37 -0800)]
Input: use sysfs_emit() instead of scnprintf()

Replace calls to scnprintf() in the methods showing device attributes
with sysfs_emit() to simplify the code.

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212021133398847947@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: max77693-haptic - add device-tree compatible strings
Marek Szyprowski [Fri, 6 Oct 2023 10:03:20 +0000 (12:03 +0200)]
Input: max77693-haptic - add device-tree compatible strings

Add the needed device-tree compatible strings to the MAX77693 haptic
driver, so it can be automatically loaded when compiled as a kernel
module and given device-tree contains separate (i.e. 'motor-driver') node
under the main PMIC node. When device is instantiated from device-tree,
the driver data cannot be read via platform_get_device_id(), so get
device type from the parent MFD device instead, what works for both
cases.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231006100320.2908210-1-m.szyprowski@samsung.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: qt1050 - convert to use maple tree register cache
Mark Brown [Sat, 30 Sep 2023 23:43:40 +0000 (01:43 +0200)]
Input: qt1050 - convert to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231001-input-maple-v1-3-ed3716051431@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: cap11xx - convert to use maple tree register cache
Mark Brown [Sat, 30 Sep 2023 23:43:39 +0000 (01:43 +0200)]
Input: cap11xx - convert to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231001-input-maple-v1-2-ed3716051431@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: cap11xx - cache hardware ID registers
Mark Brown [Sat, 30 Sep 2023 23:43:38 +0000 (01:43 +0200)]
Input: cap11xx - cache hardware ID registers

The cap11xx devices have three hardware identification registers which are
currently marked as volatile, preventing caching of those registers. This
is not ideal since the registers should never change at runtime, we should
be able to cache the value after the first read. Stop marking the registers
as volatile, we don't have register defaults specified in the driver so
this will result in reading from the hardware on first use.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20231001-input-maple-v1-1-ed3716051431@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: cap11xx - add advanced sensitivity settings
Jiri Valek - 2N [Tue, 12 Dec 2023 02:54:45 +0000 (18:54 -0800)]
Input: cap11xx - add advanced sensitivity settings

Add support for advanced sensitivity settings that allows more precise
tunig of touch buttons. Input-treshold allows to set the sensitivity for
each channel separately. Also add signal guard feature for CAP129x chips.

Signed-off-by: Jiri Valek - 2N <jiriv@axis.com>
Link: https://lore.kernel.org/r/20231121155250.613242-3-jiriv@axis.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agodt-bindings: input: microchip,cap11xx: add advanced sensitivity settings
Jiri Valek - 2N [Tue, 12 Dec 2023 02:54:22 +0000 (18:54 -0800)]
dt-bindings: input: microchip,cap11xx: add advanced sensitivity settings

Add support for advanced sensitivity settings and signal guard feature.

Signed-off-by: Jiri Valek - 2N <jiriv@axis.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231121155250.613242-2-jiriv@axis.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: xpad - remove usage of the deprecated ida_simple_xx() API
Christophe JAILLET [Sun, 10 Dec 2023 17:20:57 +0000 (18:20 +0100)]
Input: xpad - remove usage of the deprecated ida_simple_xx() API

ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/a3e30e30f18cc5d6f032c8013ce9d900c8e223e5.1702228806.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: omap4-keypad - react on keypresses if device is runtime-suspended
Andreas Kemnade [Mon, 11 Dec 2023 22:17:57 +0000 (23:17 +0100)]
Input: omap4-keypad - react on keypresses if device is runtime-suspended

According to SWPU235AB, table 26-6, fclk is required to generate events
at least on OMAP4460, so keep fclk enabled all the time the device
is opened.

Suggested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231211221757.517427-1-andreas@kemnade.info
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agoInput: pxrc - simplify mutex handling with guard macro
Marcus Folkesson [Sat, 2 Dec 2023 16:59:48 +0000 (17:59 +0100)]
Input: pxrc - simplify mutex handling with guard macro

Use the guard(mutex) macro for handle mutex lock/unlocks.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Link: https://lore.kernel.org/r/20231202-pxrc-guard-v3-1-2ca8bc8cf689@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
6 months agodt-bindings: input: gpio-mouse: Convert to json-schema
Anshul Dalal [Fri, 8 Dec 2023 07:50:35 +0000 (13:20 +0530)]
dt-bindings: input: gpio-mouse: Convert to json-schema

Convert device tree binding documentation for GPIO attached mouse to
json-schema.

Signed-off-by: Anshul Dalal <anshulusr@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231208075037.114598-1-anshulusr@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 months agoInput: gpio-keys - add system suspend support for dedicated wakeirqs
Tony Lindgren [Wed, 29 Nov 2023 11:06:15 +0000 (13:06 +0200)]
Input: gpio-keys - add system suspend support for dedicated wakeirqs

Some SoCs have a separate dedicated wake-up interrupt controller that can
be used to wake up the system from deeper idle states. We already support
configuring a separate interrupt for a gpio-keys button to be used with a
gpio line. However, we are lacking support system suspend for cases where
a separate interrupt needs to be used in deeper sleep modes.

Because of it's nature, gpio-keys does not know about the runtime PM state
of the button gpios, and may have several gpio buttons configured for each
gpio-keys device instance. Implementing runtime PM support for gpio-keys
does not help, and we cannot use drivers/base/power/wakeirq.c support. We
need to implement custom wakeirq support for gpio-keys.

For handling a dedicated wakeirq for system suspend, we enable and disable
it with gpio_keys_enable_wakeup() and gpio_keys_disable_wakeup() that we
already use based on device_may_wakeup().

Some systems may have a dedicated wakeirq that can also be used as the
main interrupt, this is already working for gpio-keys. Let's add some
wakeirq related comments while at it as the usage with a gpio line and
separate interrupt line may not be obvious.

Tested-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231129110618.27551-2-tony@atomide.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 months agodt-bindings: input: gpio-keys: Allow optional dedicated wakeirq
Tony Lindgren [Wed, 29 Nov 2023 11:06:14 +0000 (13:06 +0200)]
dt-bindings: input: gpio-keys: Allow optional dedicated wakeirq

Allow configuring an optional dedicated wakeirq for gpio-keys that
some SoCs have.

Let's use the common interrupt naming "irq" and "wakeup" that we already
have in use for some drivers and subsystems like i2c framework.

Note that the gpio-keys interrupt property is optional. If only a gpio
property is specified, the driver tries to translate the gpio into an
interrupt.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231129110618.27551-1-tony@atomide.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 months agodt-bindings: input: mediatek,pmic-keys: Drop incomplete example
Rob Herring [Tue, 28 Nov 2023 21:48:16 +0000 (15:48 -0600)]
dt-bindings: input: mediatek,pmic-keys: Drop incomplete example

The example for the Mediatek PMIC keys is incomplete as the binding is
the full PMIC, not just the sub-functions. It is preferred for MFD
examples to be complete in the top-level MFD device binding rather than
piecemeal in each sub-function binding.

This also fixes an undocumented (by schema) compatible warning for
"mediatek,mt6397".

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231128214816.3975893-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 months agodt-bindings: input: sprd,sc27xx-vibrator: Drop incomplete example
Rob Herring [Tue, 28 Nov 2023 21:48:09 +0000 (15:48 -0600)]
dt-bindings: input: sprd,sc27xx-vibrator: Drop incomplete example

The example for the Spreadtrum SC27xx PMIC vibrator is incomplete as the
binding is the full PMIC, not just the sub-functions. It is preferred
for MFD examples to be complete in the top-level MFD device binding
rather than piecemeal in each sub-function binding.

This also fixes an undocumented (by schema) compatible warning for
"sprd,sc2731".

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231128214809.3975719-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 months agoInput: cap11xx - remove unnecessary IRQ parsing
Jiri Valek - 2N [Fri, 17 Nov 2023 02:41:52 +0000 (02:41 +0000)]
Input: cap11xx - remove unnecessary IRQ parsing

Separate IRQ parsing is not necessary, I2C core do the job.

Signed-off-by: Jiri Valek - 2N <jiriv@axis.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
7 months agodt-bindings: input: samsung,s6sy761: convert to DT schema
Krzysztof Kozlowski [Sat, 11 Nov 2023 14:32:21 +0000 (15:32 +0100)]
dt-bindings: input: samsung,s6sy761: convert to DT schema

Convert Samsung  S6SY761 touchscreen controller bindings to DT schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20231111143221.55452-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agoInput: walkera0701 - use module_parport_driver macro to simplify the code
Li Zetao [Tue, 15 Aug 2023 20:13:46 +0000 (13:13 -0700)]
Input: walkera0701 - use module_parport_driver macro to simplify the code

Use the module_parport_driver macro to simplify the code, which is the
same as declaring with module_init() and module_exit().

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20230815080107.1089401-1-lizetao1@huawei.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agoInput: synaptics-rmi4 - fix use after free in rmi_unregister_function()
Dan Carpenter [Sun, 29 Oct 2023 02:53:36 +0000 (02:53 +0000)]
Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()

The put_device() calls rmi_release_function() which frees "fn" so the
dereference on the next line "fn->num_of_irqs" is a use after free.
Move the put_device() to the end to fix this.

Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/706efd36-7561-42f3-adfa-dd1d0bd4f5a1@moroto.mountain
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agodt-bindings: input: fsl,scu-key: Document wakeup-source
Fabio Estevam [Sun, 29 Oct 2023 01:44:24 +0000 (01:44 +0000)]
dt-bindings: input: fsl,scu-key: Document wakeup-source

The SCU Key controller can be used as a system wakeup source.

Document the 'wakeup-source' property.

This fixes the following schema warning:

system-controller: keys: 'wakeup-source' does not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/firmware/fsl,scu.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230926122957.341094-1-festevam@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agoInput: cyttsp5 - add handling for vddio regulator
Lin, Meng-Bo [Fri, 27 Oct 2023 22:56:33 +0000 (15:56 -0700)]
Input: cyttsp5 - add handling for vddio regulator

The Cypress touchscreen controllers are often used with external pull-up
for the interrupt line and the I2C lines, so we might need to enable
a regulator to bring the lines into usable state. Otherwise, this might
cause spurious interrupts and reading from I2C will fail.

Implement support for a "vddio-supply" that is enabled by the cyttsp5
driver so that the regulator gets enabled when needed.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Acked-by: Alistair Francis <alistair@alistair23.me>
Link: https://lore.kernel.org/r/20221117190507.87535-3-linmengbo0689@protonmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agodt-bindings: input: cyttsp5: document vddio-supply
Lin, Meng-Bo [Fri, 27 Oct 2023 22:53:59 +0000 (15:53 -0700)]
dt-bindings: input: cyttsp5: document vddio-supply

The Samsung touchscreen controllers are often used with external pull-up
for the interrupt line and the I2C lines, so we might need to enable
a regulator to bring the lines into usable state. Otherwise, this might
cause spurious interrupts and reading from I2C will fail.

Document support for a "vddio-supply" that is enabled by the cyttsp5
driver so that the regulator gets enabled when needed.

Signed-off-by: Lin, Meng-Bo <linmengbo0689@protonmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alistair Francis <alistair@alistair23.me>
Link: https://lore.kernel.org/r/20221117190507.87535-2-linmengbo0689@protonmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agoInput: tegra-kbc - use device_get_match_data()
Rob Herring [Sat, 14 Oct 2023 03:09:33 +0000 (20:09 -0700)]
Input: tegra-kbc - use device_get_match_data()

Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20231006224432.442709-1-robh@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 months agoInput: Annotate struct ff_device with __counted_by
Kees Cook [Sat, 14 Oct 2023 03:04:12 +0000 (20:04 -0700)]
Input: Annotate struct ff_device with __counted_by

Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct ff_device.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20231006201739.work.350-kees@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: axp20x-pek - avoid needless newline removal
Justin Stitt [Sat, 30 Sep 2023 16:32:31 +0000 (09:32 -0700)]
Input: axp20x-pek - avoid needless newline removal

This code is doing more work than it needs to.

Before handing off `val_str` to `kstrtouint()` we are eagerly removing
any trailing newline which requires copying `buf`, validating it's
length and checking/replacing any potential newlines.

kstrtouint() handles this implicitly:
kstrtouint ->
  kstrotoull -> (documentation)
|   /**
|    * kstrtoull - convert a string to an unsigned long long
|    * @s: The start of the string. The string must be null-terminated, and may also
|    *  include a single newline before its terminating null. The first character
|    ...

Let's remove the redundant functionality and let kstrtouint handle it.

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230925-strncpy-drivers-input-misc-axp20x-pek-c-v2-1-ff7abe8498d6@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: mt - annotate struct input_mt with __counted_by
Kees Cook [Sat, 30 Sep 2023 16:20:20 +0000 (09:20 -0700)]
Input: mt - annotate struct input_mt with __counted_by

Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct input_mt.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922175036.work.762-kees@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: leds - annotate struct input_leds with __counted_by
Kees Cook [Sat, 30 Sep 2023 16:19:13 +0000 (09:19 -0700)]
Input: leds - annotate struct input_leds with __counted_by

Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct input_leds.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922175031.work.467-kees@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: evdev - annotate struct evdev_client with __counted_by
Kees Cook [Sat, 30 Sep 2023 16:17:43 +0000 (09:17 -0700)]
Input: evdev - annotate struct evdev_client with __counted_by

Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct evdev_client.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922175027.work.563-kees@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: synaptics-rmi4 - replace deprecated strncpy
Justin Stitt [Sat, 30 Sep 2023 16:05:07 +0000 (09:05 -0700)]
Input: synaptics-rmi4 - replace deprecated strncpy

`strncpy` is deprecated for use on NUL-terminated destination strings [1]

Let's use memcpy() as the bounds have already been checked and this
decays into a simple byte copy from one buffer to another removing any
ambiguity that strncpy has.

Signed-off-by: Justin Stitt <justinstitt@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230921-strncpy-drivers-input-rmi4-rmi_f34-c-v1-1-4aef2e84b8d2@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: wm97xx-core - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:29 +0000 (14:58 +0200)]
Input: wm97xx-core - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230920125829.1478827-53-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: wm831x-ts - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:28 +0000 (14:58 +0200)]
Input: wm831x-ts - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230920125829.1478827-52-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: ti_am335x_tsc - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:27 +0000 (14:58 +0200)]
Input: ti_am335x_tsc - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-51-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: sun4i-ts - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:26 +0000 (14:58 +0200)]
Input: sun4i-ts - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20230920125829.1478827-50-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: stmpe-ts - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:25 +0000 (14:58 +0200)]
Input: stmpe-ts - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-49-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: pcap_ts - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:24 +0000 (14:58 +0200)]
Input: pcap_ts - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-48-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: mc13783_ts - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:23 +0000 (14:58 +0200)]
Input: mc13783_ts - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-47-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: mainstone-wm97xx - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:22 +0000 (14:58 +0200)]
Input: mainstone-wm97xx - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-46-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: da9052_tsi - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:21 +0000 (14:58 +0200)]
Input: da9052_tsi - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-45-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: xilinx_ps2 - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:20 +0000 (14:58 +0200)]
Input: xilinx_ps2 - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-44-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: sun4i-ps2 - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:19 +0000 (14:58 +0200)]
Input: sun4i-ps2 - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20230920125829.1478827-43-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: rpckbd - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:18 +0000 (14:58 +0200)]
Input: rpckbd - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-42-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: q40kbd - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:17 +0000 (14:58 +0200)]
Input: q40kbd - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-41-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: ps2-gpio - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:16 +0000 (14:58 +0200)]
Input: ps2-gpio - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-40-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: olpc_apsp - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:15 +0000 (14:58 +0200)]
Input: olpc_apsp - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-39-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: maceps2 - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:14 +0000 (14:58 +0200)]
Input: maceps2 - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-38-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: ioc3kbd - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:13 +0000 (14:58 +0200)]
Input: ioc3kbd - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-37-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: i8042 - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:12 +0000 (14:58 +0200)]
Input: i8042 - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-36-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: i8042-sparcio - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:11 +0000 (14:58 +0200)]
Input: i8042-sparcio - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-35-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: ct82c710 - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:10 +0000 (14:58 +0200)]
Input: ct82c710 - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-34-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: arc_ps2 - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:09 +0000 (14:58 +0200)]
Input: arc_ps2 - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-33-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: apbps2 - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:08 +0000 (14:58 +0200)]
Input: apbps2 - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-32-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
9 months agoInput: ams_delta_serio - convert to platform remove callback returning void
Uwe Kleine-König [Wed, 20 Sep 2023 12:58:07 +0000 (14:58 +0200)]
Input: ams_delta_serio - convert to platform remove callback returning void

The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new() which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230920125829.1478827-31-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>