Commit Graph

8096 Commits

Author SHA1 Message Date
James Ogletree
c38fe1bb5d Input: cs40l50 - Add support for the CS40L50 haptic driver
Introduce support for Cirrus Logic Device CS40L50: a
haptic driver with waveform memory, integrated DSP,
and closed-loop algorithms.

The input driver provides the interface for control of
haptic effects through the device.

Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20240620161745.2312359-5-jogletre@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-28 15:36:11 +01:00
Dmitry Torokhov
19a3e16006 Merge branch 'ib/ads7846-hsync' into next
Bring in ADS7846 hsync changes.
2024-06-27 10:17:15 -07:00
Andrei Lalaev
866a5c7e27 Input: qt1050 - handle CHIP_ID reading error
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: cbebf5adde ("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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-25 09:13:08 -07:00
Alexey Makhalov
f0db90b412 input/vmmouse: Use VMware hypercall API
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API.
Eliminate arch specific code. No functional changes intended.

Signed-off-by: Alexey Makhalov <alexey.makhalov@broadcom.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20240613191650.9913-4-alexey.makhalov@broadcom.com
2024-06-25 17:15:47 +02:00
Linus Torvalds
55027e6899 Input updates for v6.10-rc5
- fixes for ili210x and elantech drivers
 
 - new products IDs added to xpad controller driver
 
 - a tweak to i8042 driver to always keep keyboard in Ayaneo Kun
   handheld in raw mode
 
 - populated "id_table" in ads7846 touchscreen driver to make sure
   non-OF instantiated devices can properly determine the model data.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZnm3BgAKCRBAj56VGEWX
 nBEoAP0U+pcUU4wFKM5XcLgtH6n5xjk6mll9baeW6o+vDg0PagD/c2jEHn+XYe9R
 o4QMNEqJDs3TwTg3xHxiezfKB3eLdwo=
 =yK5H
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - fixes for ili210x and elantech drivers

 - new products IDs added to xpad controller driver

 - a tweak to i8042 driver to always keep keyboard in Ayaneo Kun
   handheld in raw mode

 - populated "id_table" in ads7846 touchscreen driver to make sure
   non-OF instantiated devices can properly determine the model data.

* tag 'input-for-v6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: ads7846 - use spi_device_id table
  Input: xpad - add support for ASUS ROG RAIKIRI PRO
  Input: ili210x - fix ili251x_read_touch_data() return value
  Input: i8042 - add Ayaneo Kun to i8042 quirk table
  Input: elantech - fix touchpad state on resume for Lenovo N24
2024-06-24 14:36:11 -04:00
Andreas Kemnade
0ca1323c6a Input: edt-ft5x06 - add ft5426
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.info
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-22 01:29:17 -07:00
Andreas Kemnade
f7b41baa10 Input: ektf2127 - add ektf2232 support
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.info
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-22 00:58:44 -07:00
Linus Walleij
8685f22b5b Input: ads7846 - handle HSYNC GPIO
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>
2024-06-21 15:23:50 -07:00
Dmitry Torokhov
50717edb6d Input: adc-joystick - move axes data into the main structure
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-21 10:16:40 -07:00
Dmitry Torokhov
703f12672e Input: ims-pcu - switch to using cleanup functions
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-20 14:57:08 -07:00
Dmitry Torokhov
204d18a7a0 Input: ims-pcu - use driver core to instantiate device attributes
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-20 14:57:08 -07:00
Javier Carrasco
daa268ae28 Input: ims-pcu - drop repeated "input" in error message
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-20 08:45:12 -07:00
Javier Carrasco
e8135f9dc7 Input: ims-pcu - annotate struct ims_pcu_flash_fmt with __counted_by
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-20 08:45:12 -07:00
Alexander Stein
7c7b1be19b Input: ads7846 - use spi_device_id table
As the driver supports more devices over time the single MODULE_ALIAS
is complete and raises several warnings:
SPI driver ads7846 has no spi_device_id for ti,tsc2046
SPI driver ads7846 has no spi_device_id for ti,ads7843
SPI driver ads7846 has no spi_device_id for ti,ads7845
SPI driver ads7846 has no spi_device_id for ti,ads7873

Fix this by adding a spi_device_id table and removing the manual
MODULE_ALIAS.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20240619122703.2081476-1-alexander.stein@ew.tq-group.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-20 08:39:32 -07:00
Dmitry Torokhov
9b9247397e Input: adxl34x - switch to using "guard" notation
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-11 11:17:52 -07:00
Dmitry Torokhov
985addc133 Input: adxl34x - switch to using managed resources
Switch the driver to use managed resources to simplify error handling.

Link: https://lore.kernel.org/r/20240610164301.1048482-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-11 11:17:44 -07:00
Dmitry Torokhov
8f275fc73d Input: adxl34x - use input_set_capability()
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-11 11:17:44 -07:00
Dmitry Torokhov
6f7e4f81f7 Input: adxl34x - use device core to create driver-specific device attributes
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-11 11:17:44 -07:00
Jeff Johnson
e17fb91cd4 Input: add missing MODULE_DESCRIPTION() macros
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-09 14:38:48 -07:00
Erick Archer
4654c4cc79 Input: joystick - use sizeof(*pointer) instead of sizeof(type)
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-09 14:38:43 -07:00
Erick Archer
f81d03d439 Input: touchscreen - use sizeof(*pointer) instead of sizeof(type)
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-09 14:38:38 -07:00
Luke D. Jones
cee77149eb Input: xpad - add support for ASUS ROG RAIKIRI PRO
Add the VID/PID for ASUS ROG RAIKIRI PRO to the list of known devices.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20240607223722.1170776-1-luke@ljones.dev
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-07 16:41:22 -07:00
John Keeping
9f0fad0382 Input: ili210x - fix ili251x_read_touch_data() return value
The caller of this function treats all non-zero values as an error, so
the return value of i2c_master_recv() cannot be returned directly.

This fixes touch reporting when there are more than 6 active touches.

Fixes: ef536abd3a ("Input: ili210x - define and use chip operations structure")
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Link: https://lore.kernel.org/r/20240523085624.2295988-1-jkeeping@inmusicbrands.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-07 16:35:36 -07:00
Dmitry Torokhov
f4c7fa7c05 Input: cap11xx - stop using chip ID when configuring it
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-07 12:32:31 -07:00
Chris Morgan
6560cfcfb4 Input: adc-joystick - handle inverted axes
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-07 12:29:32 -07:00
Erick Archer
5bbcece640 Input: gameport - use sizeof(*pointer) instead of sizeof(type)
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-07 11:59:41 -07:00
Erick Archer
06b449d7f7 Input: serio - use sizeof(*pointer) instead of sizeof(type)
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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-07 11:59:21 -07:00
Jason Gerecke
7ba38c2a9e Input: wacom_w8001 - correct device name generation
Fixes: 6c7cc1a29d ("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.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-06 13:43:10 -07:00
Hans de Goede
38a38f5a36 Input: silead - Always support 10 fingers
When support for Silead touchscreens was orginal added some touchscreens
with older firmware versions only supported 5 fingers and this was made
the default requiring the setting of a "silead,max-fingers=10" uint32
device-property for all touchscreen models which do support 10 fingers.

There are very few models with the old 5 finger fw, so in practice the
setting of the "silead,max-fingers=10" is boilerplate which needs to
be copy and pasted to every touchscreen config.

Reporting that 10 fingers are supported on devices which only support
5 fingers doesn't cause any problems for userspace in practice, since
at max 4 finger gestures are supported anyways. Drop the max_fingers
configuration and simply always assume 10 fingers.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20240525193854.39130-2-hdegoede@redhat.com
2024-06-03 11:10:08 +02:00
Erick Archer
2960d4c8e7 Input: tablet - use sizeof(*pointer) instead of sizeof(type)
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/AS8PR02MB7237B05083487507CFAF96B08BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-02 21:32:03 -07:00
Erick Archer
dc2f1423f0 Input: mouse - use sizeof(*pointer) instead of sizeof(type)
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/AS8PR02MB7237FB736DBF67A58798FDF38BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-02 21:32:02 -07:00
Erick Archer
a0bd7adadb Input: misc - use sizeof(*pointer) instead of sizeof(type)
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/AS8PR02MB7237884EB989EFF55D1BEF8B8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-02 21:32:01 -07:00
Erick Archer
bb8706a419 Input: keyboard - use sizeof(*pointer) instead of sizeof(type)
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/AS8PR02MB7237277464F23CA168BFB3B18BF52@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-06-02 21:32:01 -07:00
Tobias Jakobi
955af6355d Input: i8042 - add Ayaneo Kun to i8042 quirk table
See the added comment for details. Also fix a typo in the
quirk's define.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Link: https://lore.kernel.org/r/20240531190100.3874731-1-tjakobi@math.uni-bielefeld.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-31 15:49:42 -07:00
Jason Gerecke
6c7cc1a29d Input: wacom_w8001 - simplify device name generation
Replace pairs of strscpy/strlcat calls with snprintf.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Link: https://lore.kernel.org/r/CANRwn3SuTjdCCK4YH1ObvsC_gZuythAQ7kSHJP-CiAFw9h5Qcw@mail.gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-30 13:55:48 -07:00
Jonathan Denose
a69ce592cb Input: elantech - fix touchpad state on resume for Lenovo N24
The Lenovo N24 on resume becomes stuck in a state where it
sends incorrect packets, causing elantech_packet_check_v4 to fail.
The only way for the device to resume sending the correct packets is for
it to be disabled and then re-enabled.

This change adds a dmi check to trigger this behavior on resume.

Signed-off-by: Jonathan Denose <jdenose@google.com>
Link: https://lore.kernel.org/r/20240503155020.v2.1.Ifa0e25ebf968d8f307f58d678036944141ab17e6@changeid
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-28 16:06:46 -07:00
Dmitry Torokhov
6f47c7ae8c Linux 6.9
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmZBML0eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGt3MH/3r3+FUQy4GWJARA
 T7Q2AB36dHI5dA5N3Q1t3L4VVgeypjy5ZScgMi5J4MtEr2m3z2akjWH9+SVnFxMd
 Nf7s4McY+461MpindBoGEKeJFsxXWiOqf8i+5lc6JGgHAjD1qiIjD5lFFirgTbeJ
 vSd6wbzYwLp4145TM2J8R7xG5ib2DMk0Z0n3DcOmWVCTIJujSPCM7Wz+86w/vw2e
 4hkqPrcmQS3CGov/fOMnSvALkA6MegWmpvYv3/z7Kj6yq3TEz5sYKR9FZzRxj7bm
 FoW0T7gkxHXGODnQsD7Ex4CG+XYfUyv8H2LgImYAk8sjMZWD8sTzOuGM8g89RLS+
 tvGYU9U=
 =MG7d
 -----END PGP SIGNATURE-----

Merge tag 'v6.9' into next

Sync up with the mainline to bring in the new cleanup API.
2024-05-27 21:37:18 -07:00
Linus Torvalds
9ea370f341 Input updates for v6.10-rc0
- a change to input core to trim amount of keys data in modalias string
   in case when a device declares too many keys and they do not fit in
   uevent buffer instead of reporting an error which results in uevent
   not being generated at all
 
 - support for Machenike G5 Pro Controller added to xpad driver
 
 - support for FocalTech FT5452 and FT8719 added to edt-ft5x06
 
 - support for new SPMI vibrator added to pm8xxx-vibrator driver
 
 - missing locking added to cyapa touchpad driver
 
 - removal of unused fields in various driver structures
 
 - explicit initialization of i2c_device_id::driver_data to 0 dropped
   from input drivers
 
 - other assorted fixes and cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZk/rJQAKCRBAj56VGEWX
 nOFVAQD8lfavuaJwEc0k/P39hZGOnTh423Um5gqIj8FOMw/V3AEA3D9IdTFC32DA
 JphZ5YvneDAfqu76ZRnjQi2oyOikygo=
 =8zDF
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.10-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - a change to input core to trim amount of keys data in modalias string
   in case when a device declares too many keys and they do not fit in
   uevent buffer instead of reporting an error which results in uevent
   not being generated at all

 - support for Machenike G5 Pro Controller added to xpad driver

 - support for FocalTech FT5452 and FT8719 added to edt-ft5x06

 - support for new SPMI vibrator added to pm8xxx-vibrator driver

 - missing locking added to cyapa touchpad driver

 - removal of unused fields in various driver structures

 - explicit initialization of i2c_device_id::driver_data to 0 dropped
   from input drivers

 - other assorted fixes and cleanups.

* tag 'input-for-v6.10-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (24 commits)
  Input: edt-ft5x06 - add support for FocalTech FT5452 and FT8719
  dt-bindings: input: touchscreen: edt-ft5x06: Document FT5452 and FT8719 support
  Input: xpad - add support for Machenike G5 Pro Controller
  Input: try trimming too long modalias strings
  Input: drop explicit initialization of struct i2c_device_id::driver_data to 0
  Input: zet6223 - remove an unused field in struct zet6223_ts
  Input: chipone_icn8505 - remove an unused field in struct icn8505_data
  Input: cros_ec_keyb - remove an unused field in struct cros_ec_keyb
  Input: lpc32xx-keys - remove an unused field in struct lpc32xx_kscan_drv
  Input: matrix_keypad - remove an unused field in struct matrix_keypad
  Input: tca6416-keypad - remove unused struct tca6416_drv_data
  Input: tca6416-keypad - remove an unused field in struct tca6416_keypad_chip
  Input: da7280 - remove an unused field in struct da7280_haptic
  Input: ff-core - prefer struct_size over open coded arithmetic
  Input: cyapa - add missing input core locking to suspend/resume functions
  input: pm8xxx-vibrator: add new SPMI vibrator support
  dt-bindings: input: qcom,pm8xxx-vib: add new SPMI vibrator module
  input: pm8xxx-vibrator: refactor to support new SPMI vibrator
  Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation
  Input: sur40 - convert le16 to cpu before use
  ...
2024-05-24 09:01:21 -07:00
Dmitry Torokhov
2ec0028a1c Merge branch 'next' into for-linus
Prepare input updates for 6.10 merge window.
2024-05-22 17:39:34 -07:00
Joel Selvaraj
832f54c9cc Input: edt-ft5x06 - add support for FocalTech FT5452 and FT8719
The driver is compatible with FocalTech FT5452 and FT8719 touchscreens
too. FT5452 supports up to 5 touch points. FT8719 supports up to 10 touch
points. Add compatible data for both of them.

Signed-off-by: Joel Selvaraj <joelselvaraj.oss@gmail.com>
Link: https://lore.kernel.org/r/20240521-add-support-ft5452-and-ft8719-touchscreen-v1-2-2a648ac7176b@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-22 10:36:11 -07:00
Kirill Artemev
e7647cbaba Input: xpad - add support for Machenike G5 Pro Controller
Add VID and PID to the xpad_device and VID to the xpad_table
to allow driver to use Machenike G5 Pro Controller, which is
XTYPE_XBOX360 compatible in Xinput mode.

Signed-off-by: Kirill Artemev <artewar6767@gmail.com>
Link: https://lore.kernel.org/r/20240516032926.12501-2-artewar6767@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-20 16:46:27 -07:00
Dmitry Torokhov
0774d19038 Input: try trimming too long modalias strings
If an input device declares too many capability bits then modalias
string for such device may become too long and not fit into uevent
buffer, resulting in failure of sending said uevent. This, in turn,
may prevent userspace from recognizing existence of such devices.

This is typically not a concern for real hardware devices as they have
limited number of keys, but happen with synthetic devices such as
ones created by xen-kbdfront driver, which creates devices as being
capable of delivering all possible keys, since it doesn't know what
keys the backend may produce.

To deal with such devices input core will attempt to trim key data,
in the hope that the rest of modalias string will fit in the given
buffer. When trimming key data it will indicate that it is not
complete by placing "+," sign, resulting in conversions like this:

old: k71,72,73,74,78,7A,7B,7C,7D,8E,9E,A4,AD,E0,E1,E4,F8,174,
new: k71,72,73,74,78,7A,7B,7C,+,

This should allow existing udev rules continue to work with existing
devices, and will also allow writing more complex rules that would
recognize trimmed modalias and check input device characteristics by
other means (for example by parsing KEY= data in uevent or parsing
input device sysfs attributes).

Note that the driver core may try adding more uevent environment
variables once input core is done adding its own, so when forming
modalias we can not use the entire available buffer, so we reduce
it by somewhat an arbitrary amount (96 bytes).

Reported-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Link: https://lore.kernel.org/r/ZjAWMQCJdrxZkvkB@google.com
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-19 17:58:45 -07:00
Linus Torvalds
4853f1f6ac ARM development updates for v6.10-rc1
- Updates to AMBA bus subsystem to drop .owner struct device_driver
   initialisations, moving that to code instead.
 - Add LPAE privileged-access-never support
 - Add support for Clang CFI
 - clkdev: report over-sized device or connection strings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAmZF8aoACgkQ9OeQG+St
 rGShNg//aShGJvs0ezHMt7j4MVrToGHgmpkryaMiYDPU6ud3xSM29sIMxtdEw6yR
 DGJp8Lcx2KsJU8HKwEzRl7dMr4Cx16bXj69lHNCmalOflTOPCDJuZZ87OUFD6fXh
 RNbDbEnPlp474E1f3rJB4WkB3UA+hUq/26Z8mpfbWLunVMUeCilgKiDFQzJMobMH
 smHx1TyBwTDPbY6jHqdiGEzSoLzvDdtSFyYz69aRy8rfUHXESVdvqkXWMf33Bf60
 fONhK4O4ln8iaQT0MmbWbV4TGNeOzqeNC4M4U3bVAyrwW4naSRFnVQEVJdaAgM/P
 6w5DLpStjef5YHpGbx3nodBb+xvi0Kb25vL/fvnsmVLqPV3Rsp8T3d1WQI8RWnJo
 GphHk2QmogdOFwoiyMLXv6JZrc796SogSQBlF5lj3LoR8RCjuYUMVOvikTqfF0BK
 gMbvtF4v3SwJoKitjbiRgkusPEmziooi7hTwluFuWNfmkc7dJKPkfMhC0RkvIn0J
 VpL17A3A35YBnpjTAxTMsAh4OsBRasvBK/4np8nizwre+K5pPuF0PV6rFhndD31h
 JKfkXgIziyVN5TVfoocM1kQqQmDjTkyOmehgZ0dYRORyGJMoDgy6LUucQRziLubm
 C5Od5hcPhHhN8lECBjMA9P+9m0S+PvK3vepefdNIpSMoQwxAMFQ=
 =t/xl
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux

Pull ARM updates from Russell King:

 - Updates to AMBA bus subsystem to drop .owner struct device_driver
   initialisations, moving that to code instead.

 - Add LPAE privileged-access-never support

 - Add support for Clang CFI

 - clkdev: report over-sized device or connection strings

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: (36 commits)
  ARM: 9398/1: Fix userspace enter on LPAE with CC_OPTIMIZE_FOR_SIZE=y
  clkdev: report over-sized strings when creating clkdev entries
  ARM: 9393/1: mm: Use conditionals for CFI branches
  ARM: 9392/2: Support CLANG CFI
  ARM: 9391/2: hw_breakpoint: Handle CFI breakpoints
  ARM: 9390/2: lib: Annotate loop delay instructions for CFI
  ARM: 9389/2: mm: Define prototypes for all per-processor calls
  ARM: 9388/2: mm: Type-annotate all per-processor assembly routines
  ARM: 9387/2: mm: Rewrite cacheflush vtables in CFI safe C
  ARM: 9386/2: mm: Use symbol alias for cache functions
  ARM: 9385/2: mm: Type-annotate all cache assembly routines
  ARM: 9384/2: mm: Make tlbflush routines CFI safe
  ARM: 9382/1: ftrace: Define ftrace_stub_graph
  ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement
  ARM: 9357/2: Reduce the number of #ifdef CONFIG_CPU_SW_DOMAIN_PAN
  ARM: 9356/2: Move asm statements accessing TTBCR into C functions
  ARM: 9355/2: Add TTBCR_* definitions to pgtable-3level-hwdef.h
  ARM: 9379/1: coresight: tpda: drop owner assignment
  ARM: 9378/1: coresight: etm4x: drop owner assignment
  ARM: 9377/1: hwrng: nomadik: drop owner assignment
  ...
2024-05-17 08:53:47 -07:00
Linus Torvalds
101b7a9714 ACPI updates for 6.10-rc1
- Add EINJ CXL error types to actbl1.h (Ben Cheatham).
 
  - Add support for RAS2 table to ACPICA (Shiju Jose).
 
  - Fix various spelling mistakes in text files and code comments in
    ACPICA (Colin Ian King).
 
  - Fix spelling and typos in ACPICA (Saket Dumbre).
 
  - Modify ACPI_OBJECT_COMMON_HEADER (lijun).
 
  - Add RISC-V RINTC affinity structure support to ACPICA (Haibo Xu).
 
  - Fix CXL 3.0 structure (RDPAS) in the CEDT table (Hojin Nam).
 
  - Add missin increment of registered GPE count to ACPICA (Daniil
    Tatianin).
 
  - Mark new ACPICA release 20240322 (Saket Dumbre).
 
  - Add support for the AEST V2 table to ACPICA (Ruidong Tian).
 
  - Disable -Wstringop-truncation for some ACPICA code in the kernel to
    avoid a compiler warning  that is not very useful (Arnd Bergmann).
 
  - Make the kernel indicate support for several ACPI features that are
    in fact supported to the platform firmware through _OSC and fix the
    Generic Initiator Affinity _OSC bit (Armin Wolf).
 
  - Make the ACPI core set the owner value for ACPI drivers, drop the
    owner setting from a number of drivers and eliminate the owner
    field from struct acpi_driver (Krzysztof Kozlowski).
 
  - Rearrange fields in several structures to effectively eliminate
    computations from container_of() in some cases (Andy Shevchenko).
 
  - Do some assorted cleanups of the ACPI device enumeration code (Andy
    Shevchenko).
 
  - Make the ACPI device enumeration code skip devices with _STA values
    clearly identified by the specification as invalid (Rafael Wysocki).
 
  - Rework the handling of the NHLT table to simplify and clarify it and
    drop some obsolete pieces (Cezary Rojewski).
 
  - Add ACPI IRQ override quirks for Asus Vivobook Pro N6506MV, TongFang
    GXxHRXx and GMxHGxx, and XMG APEX 17 M23 (Guenter Schafranek, Tamim
    Khan, Christoffer Sandberg).
 
  - Add reference to UEFI DSD Guide to the documentation related to the
    ACPI handling of device properties (Sakari Ailus).
 
  - Fix SRAT lookup of CFMWS ranges with numa_fill_memblks(), remove
    lefover architecture-dependent code from the ACPI NUMA handling code
    and simplify it on top of that (Robert Richter).
 
  - Add a num-cs device property to specify the number of chip selects
    for Intel Braswell to the ACPI LPSS (Intel SoC) driver and remove a
    nested CONFIG_PM #ifdef from it (Andy Shevchenko).
 
  - Move three x86-specific ACPI files to the x86 directory (Andy
    Shevchenko).
 
  - Mark SMO8810 accel on Dell XPS 15 9550 as always present and add a
    PNP_UART1_SKIP quirk for Lenovo Blade2 tablets (Hans de Goede).
 
  - Move acpi_blacklisted() declaration to asm/acpi.h (Kuppuswamy
    Sathyanarayanan).
 
  - Add Lunar Lake support to the ACPI DPTF driver (Sumeet Pawnikar).
 
  - Mark the einj_driver driver's remove callback as __exit because it
    cannot get unbound via sysfs (Uwe Kleine-König).
 
  - Fix a typo in the ACPI documentation regarding the layout of sysfs
    subdirectory representing the ACPI namespace (John Watts).
 
  - Make the ACPI pfrut utility print the update_cap field during
    capability query (Chen Yu).
 
  - Add HAS_IOPORT dependencies to PNP (Niklas Schnelle).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmZCZksSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxQHMQAIaab/0AY6MXznyZtf9bfVXzwa/HXWJV
 CWVhubByKHKSJjGcsMbxAXvRq5EDX91QiuaoExEzKY7G9q+jFl1rUMvGWVrySveS
 ae1+jMF9Kd3QXTXB6bCbre4/7bn/LZN0U5nvD5yFpuEEl8GqGafKiUVRVEIQmMuB
 1yi5HU2orKxLYU84mCGIiiWlTAi/6MlSeJ5NZwxPfj/+B24pPWTdu4AsD+b7gC2G
 g36KlAZpnGJqRZ1pg5KQDCV0eKGCJuh9X7ACM8t/XDg4S7FL75X2fWMRUh+4sYp9
 12DdxaEPYCNaVebm2Ae7vrLtcifHNsMoirs3Me0RUOmFqRPaH5YILw3Un2jabiBp
 OWgVuIAa1+M4pKoVVnimM1f9i8rUr8XEl/kheb0c0OinQlecYpPeza9T5U+mMOsy
 knOs5jTm5oIhHS4sQxPu4I1/HX4/5kczDuMs1XW+6ypuT28WCbTj+mrryAQOQHyD
 vFsDBdInU5Yiit4APuJjiTSeEtFkClNI54oKz29mesPRRdDMuYBubdEuXG4lbsF1
 n4SWds3ELFqWlWvyshCMQdyjTN7UUMc2Af+xY3AEIq7uvPTdTQWUmf5LQi2vfgSO
 y3vhCjjt0ONyTXqbkP7HYcOXx5DZsFb/1uXqAAo4/RlZ6LWx/K1+onttECsoQIRH
 rR3pwW76z0Vy
 =UiEQ
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These are ACPICA updates coming from the 20240322 release upstream, an
  ACPI DPTF driver update adding new platform support for it, some new
  quirks and some assorted fixes and cleanups.

  Specifics:

   - Add EINJ CXL error types to actbl1.h (Ben Cheatham)

   - Add support for RAS2 table to ACPICA (Shiju Jose)

   - Fix various spelling mistakes in text files and code comments in
     ACPICA (Colin Ian King)

   - Fix spelling and typos in ACPICA (Saket Dumbre)

   - Modify ACPI_OBJECT_COMMON_HEADER (lijun)

   - Add RISC-V RINTC affinity structure support to ACPICA (Haibo Xu)

   - Fix CXL 3.0 structure (RDPAS) in the CEDT table (Hojin Nam)

   - Add missin increment of registered GPE count to ACPICA (Daniil
     Tatianin)

   - Mark new ACPICA release 20240322 (Saket Dumbre)

   - Add support for the AEST V2 table to ACPICA (Ruidong Tian)

   - Disable -Wstringop-truncation for some ACPICA code in the kernel to
     avoid a compiler warning that is not very useful (Arnd Bergmann)

   - Make the kernel indicate support for several ACPI features that are
     in fact supported to the platform firmware through _OSC and fix the
     Generic Initiator Affinity _OSC bit (Armin Wolf)

   - Make the ACPI core set the owner value for ACPI drivers, drop the
     owner setting from a number of drivers and eliminate the owner
     field from struct acpi_driver (Krzysztof Kozlowski)

   - Rearrange fields in several structures to effectively eliminate
     computations from container_of() in some cases (Andy Shevchenko)

   - Do some assorted cleanups of the ACPI device enumeration code (Andy
     Shevchenko)

   - Make the ACPI device enumeration code skip devices with _STA values
     clearly identified by the specification as invalid (Rafael Wysocki)

   - Rework the handling of the NHLT table to simplify and clarify it
     and drop some obsolete pieces (Cezary Rojewski)

   - Add ACPI IRQ override quirks for Asus Vivobook Pro N6506MV,
     TongFang GXxHRXx and GMxHGxx, and XMG APEX 17 M23 (Guenter
     Schafranek, Tamim Khan, Christoffer Sandberg)

   - Add reference to UEFI DSD Guide to the documentation related to the
     ACPI handling of device properties (Sakari Ailus)

   - Fix SRAT lookup of CFMWS ranges with numa_fill_memblks(), remove
     lefover architecture-dependent code from the ACPI NUMA handling
     code and simplify it on top of that (Robert Richter)

   - Add a num-cs device property to specify the number of chip selects
     for Intel Braswell to the ACPI LPSS (Intel SoC) driver and remove a
     nested CONFIG_PM #ifdef from it (Andy Shevchenko)

   - Move three x86-specific ACPI files to the x86 directory (Andy
     Shevchenko)

   - Mark SMO8810 accel on Dell XPS 15 9550 as always present and add a
     PNP_UART1_SKIP quirk for Lenovo Blade2 tablets (Hans de Goede)

   - Move acpi_blacklisted() declaration to asm/acpi.h (Kuppuswamy
     Sathyanarayanan)

   - Add Lunar Lake support to the ACPI DPTF driver (Sumeet Pawnikar)

   - Mark the einj_driver driver's remove callback as __exit because it
     cannot get unbound via sysfs (Uwe Kleine-König)

   - Fix a typo in the ACPI documentation regarding the layout of sysfs
     subdirectory representing the ACPI namespace (John Watts)

   - Make the ACPI pfrut utility print the update_cap field during
     capability query (Chen Yu)

   - Add HAS_IOPORT dependencies to PNP (Niklas Schnelle)"

* tag 'acpi-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (72 commits)
  ACPI/NUMA: Squash acpi_numa_memory_affinity_init() into acpi_parse_memory_affinity()
  ACPI/NUMA: Squash acpi_numa_slit_init() into acpi_parse_slit()
  ACPI/NUMA: Remove architecture dependent remainings
  x86/numa: Fix SRAT lookup of CFMWS ranges with numa_fill_memblks()
  ACPI: video: Add backlight=native quirk for Lenovo Slim 7 16ARH7
  ACPI: scan: Avoid enumerating devices with clearly invalid _STA values
  ACPI: Move acpi_blacklisted() declaration to asm/acpi.h
  ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MV
  ACPICA: AEST: Add support for the AEST V2 table
  ACPI: tools: pfrut: Print the update_cap field during capability query
  ACPI: property: Add reference to UEFI DSD Guide
  Documentation: firmware-guide: ACPI: Fix namespace typo
  PNP: add HAS_IOPORT dependencies
  ACPI: resource: Do IRQ override on TongFang GXxHRXx and GMxHGxx
  ACPI: resource: Do IRQ override on GMxBGxx (XMG APEX 17 M23)
  ACPICA: Update acpixf.h for new ACPICA release 20240322
  ACPICA: events/evgpeinit: don't forget to increment registered GPE count
  ACPICA: Fix CXL 3.0 structure (RDPAS) in the CEDT table
  ACPICA: SRAT: Add dump and compiler support for RINTC affinity structure
  ACPICA: SRAT: Add RISC-V RINTC affinity structure
  ...
2024-05-14 13:31:24 -07:00
Uwe Kleine-König
5852f2afcd Input: drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While add it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240509174158.2211071-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-13 15:43:19 -07:00
Christophe JAILLET
adb2e48afc Input: zet6223 - remove an unused field in struct zet6223_ts
In "struct zet6223_ts", the 'vcc' and 'vio' fields are unused.

So, remove them.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/3065d885341e2730dd3e7905d75514796a8c25e4.1715507858.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-13 14:10:09 -07:00
Christophe JAILLET
ae7620b283 Input: chipone_icn8505 - remove an unused field in struct icn8505_data
In "struct icn8505_data", the 'wake_gpio' field is unused.
There is also nothing about gpio neither in this driver nor in the
data-sheet.

So, remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/37443a675ca07c91c5f0118ce255406e6e3c08f5.1715502304.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-13 14:09:57 -07:00
Rafael J. Wysocki
82303dd304 Merge branch 'acpi-bus'
Merge changes related to _OSC handling and updates eliminating the owner
field from struct acpi_driver:

 - Make the kernel indicate support for several ACPI features that are
   in fact supported to the platform firmware through _OSC and fix
   the Generic Initiator Affinity _OSC bit (Armin Wolf).

 - Make the ACPI core set the owner value for ACPI drivers, drop the
   owner setting from a number of drivers and eliminate the owner
   field from struct acpi_driver (Krzysztof Kozlowski).

* acpi-bus: (24 commits)
  ACPI: drop redundant owner from acpi_driver
  virt: vmgenid: drop owner assignment
  ptp: vmw: drop owner assignment
  platform/x86/wireless-hotkey: drop owner assignment
  platform/x86/toshiba_haps: drop owner assignment
  platform/x86/toshiba_bluetooth: drop owner assignment
  platform/x86/toshiba_acpi: drop owner assignment
  platform/x86/sony-laptop: drop owner assignment
  platform/x86/lg-laptop: drop owner assignment
  platform/x86/intel/smartconnect: drop owner assignment
  platform/x86/intel/rst: drop owner assignment
  platform/x86/eeepc: drop owner assignment
  platform/x86/dell: drop owner assignment
  platform: classmate-laptop: drop owner assignment
  platform: asus-laptop: drop owner assignment
  platform/chrome: wilco_ec: drop owner assignment
  net: fjes: drop owner assignment
  Input: atlas - drop owner assignment
  ACPI: store owner from modules with acpi_bus_register_driver()
  ACPI: bus: Indicate support for IRQ ResourceSource thru _OSC
  ...
2024-05-13 19:15:14 +02:00
Linus Torvalds
736676f5c3 alpha: cleanups and build fixes
I had investigated dropping support for alpha EV5 and earlier a while
 ago after noticing that this is the only supported CPU family
 in the kernel without native byte access and that Debian has already
 dropped support for this generation last year [1] in order to
 improve performance for the newer machines.
 
 This topic came up again when Paul E. McKenney noticed that
 parts of the RCU code already rely on byte access and do not
 work on alpha EV5 reliably, so we decided on using my series to
 avoid the problem entirely.
 
 Al Viro did another series for alpha to address all the known build
 issues. I rebased his patches without any further changes and included
 it as a baseline for my work here to avoid conflicts and allow
 backporting the fixes to stable kernels for the now removed hardware
 support as well.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmY9z8gACgkQYKtH/8kJ
 UicPPw/+P++IYWKdWV5bFYZvK60yLNfnH9wqyog9vGJtlJg5Vj5olia9g5gM+TnN
 2b7X8elEPcBrrGL1GbsUikt3WyUVr2IccKWXaM7Akpw5uuMDJRQiN+VefWuZ765y
 0TzQ8aTSvyJPVX9GOA/zdXq0L6+8k5EAVrW4+rChZRJnwiPUE5GTQqpDXPxsVBVy
 ZUkEQeXs3cs0VzPzGdxuakXosvBNppGRTAEbxV/1b3RQ2yp3wcSuShF3jd20l3Oo
 X/RdecQtkA6oJylXRCW59ShSKPscgLxAxpHQlo1apZpGiik3xbRfyrWrQR3Va+P7
 z9D3mkigGEoyL8KgR4F6pVamZ9Uhcn3+kv3e/V0sxzorkiv2Ab+qW38U1osFTKrt
 /I/DX6kG8Dv8r6otadHsImWK+sMP2jBDNHNmZAOA+SK9GgZ3AnK6HVtjGISe3l2b
 tYcM/W3QQ+pjYNnnguksh1OIHM4cKD7BbxZ3YU6iQ5z3f5Rpu/1NTSt0OSGAwjEz
 DfSkDW4baS81cpHfA36TbG942Hv8asM9BqwASgYWAyFZzPBrGGYJWWXVnR33A8L2
 HnMXjfueTtWJYCV71q9EboNtM8diVDXRdU4B0qrEYTf1TlsdVXReaFfJsR9y/wmQ
 04DBRaH2CBnktAp5nZNpZr5bX2jnm+dqYRi+CMNQTl4Cr2DVq+0=
 =0Sgm
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull alpha updates from Arnd Bergmann:
 "I had investigated dropping support for alpha EV5 and earlier a while
  ago after noticing that this is the only supported CPU family in the
  kernel without native byte access and that Debian has already dropped
  support for this generation last year [1] in order to improve
  performance for the newer machines.

  This topic came up again when Paul McKenney noticed that parts of the
  RCU code already rely on byte access and do not work on alpha EV5
  reliably, so we decided on using my series to avoid the problem
  entirely.

  Al Viro did another series for alpha to address all the known build
  issues. I rebased his patches without any further changes and included
  it as a baseline for my work here to avoid conflicts and allow
  backporting the fixes to stable kernels for the now removed hardware
  support as well"

[ I dearly loved alpha back in the days, but the lack of byte and word
  operations was a horrible mistake and made everything worse -
  including very much the crazy IO contortions that resulted from it.

  It certainly wasn't the only mistake in the architecture, but it's the
  first-order issue.

  So while it's a bit sad to see the support for my first alpha go away,
  if you want to run museum hardware, maybe you should use museum
  kernels..    - Linus ]

* tag 'asm-generic-alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  alpha: drop pre-EV56 support
  alpha: cabriolet: remove EV5 CPU support
  alpha: remove LCA and APECS based machines
  alpha: sable: remove early machine support
  alpha: remove DECpc AXP150 (Jensen) support
  alpha: trim the unused stuff from asm-offsets.c
  alpha: jensen, t2 - make __EXTERN_INLINE same as for the rest
  alpha: core_lca: take the unused functions out
  alpha: missing includes
  alpha: sys_sio: fix misspelled ifdefs
  alpha: don't make functions public without a reason
  alpha: add clone3() support
  alpha: fix modversions for strcpy() et.al.
  alpha: sort scr_mem{cpy,move}w() out
2024-05-13 09:14:57 -07:00
Christophe JAILLET
5128de84d8 Input: cros_ec_keyb - remove an unused field in struct cros_ec_keyb
In "struct cros_ec_keyb", the 'keymap_data' field is unused.
Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/6bab1449c01c4537aa2d9cb4481e1d5da8aa2389.1714546173.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-06 15:41:44 -07:00
Christophe JAILLET
f88f4a160d Input: lpc32xx-keys - remove an unused field in struct lpc32xx_kscan_drv
In "struct lpc32xx_kscan_drv", the 'irq' field is unused.
Remove it.

Found with cppcheck, unusedStructMember.

While at it, move the 'row_shift' field in order to fill a hole in the
structure (at least on 64 bits arch).

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e006dfb77e35762c6e4f8ba6ba792b0c52fde375.1714545542.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-06 15:41:37 -07:00
Christophe JAILLET
9df3278549 Input: matrix_keypad - remove an unused field in struct matrix_keypad
In "struct matrix_keypad", the 'gpio_all_disabled' field is unused.
Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/4f1a946789445500b6118b9ee1d6ef5255f8c696.1714542052.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-06 15:41:33 -07:00
Christophe JAILLET
99c9f0fb97 Input: tca6416-keypad - remove unused struct tca6416_drv_data
"struct tca6416_drv_data" is unused.
Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/3e6fd1d0875ef3c90ecaab7adf7fd4a5e8e6f708.1714541432.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-06 15:41:28 -07:00
Christophe JAILLET
9dee24d248 Input: tca6416-keypad - remove an unused field in struct tca6416_keypad_chip
In "struct tca6416_keypad_chip", the 'irqnum' field is unused.
Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/926c0f40040671565dcc54d5146a8f9511fb6d46.1714541432.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-06 15:41:28 -07:00
Christophe JAILLET
8a22f96009 Input: da7280 - remove an unused field in struct da7280_haptic
In "struct da7280_haptic", the 'legacy' field is unused.
Remove it.

Found with cppcheck, unusedStructMember.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/ac251b456933bcc6fe297b738f9304bd259185c1.1714539865.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-05-06 15:41:18 -07:00
Linus Torvalds
3f1d086500 Input updates for v6.9-rc6
- a new ID for ASUS ROG RAIKIRI controllers added to xpad driver
 
 - amimouse driver structure annotated with __refdata to prevent section
   mismatch warnings.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZjb8AwAKCRBAj56VGEWX
 nEyMAP99BLxJkuEq6nyiHuAvXUpDAX/unCZmsCyt/p5Q2dEfGgEAoDn1Al+0EIb4
 yLqu6IeHPh7YGQ/oS0CFJYrZeURyzwY=
 =oso0
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a new ID for ASUS ROG RAIKIRI controllers added to xpad driver

 - amimouse driver structure annotated with __refdata to prevent section
   mismatch warnings.

* tag 'input-for-v6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: amimouse - mark driver struct with __refdata to prevent section mismatch
  Input: xpad - add support for ASUS ROG RAIKIRI
2024-05-05 10:00:47 -07:00
Arnd Bergmann
f81f335a56 alpha: remove DECpc AXP150 (Jensen) support
This is one of the hackiest Alpha machines, and the only one without
PCI support. Removing this allows cleaning up code in eise and tty
drivers in addition to the architecture code.

Acked-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-05-03 22:09:50 +02:00
Erick Archer
a08b8f8557 Input: ff-core - prefer struct_size over open coded arithmetic
This is an effort to get rid of all multiplications from allocation
functions in order to prevent integer overflows [1][2].

As the "ff" variable is a pointer to "struct ff_device" and this
structure ends in a flexible array:

struct ff_device {
	[...]
	struct file *effect_owners[] __counted_by(max_effects);
};

the preferred way in the kernel is to use the struct_size() helper to
do the arithmetic instead of the calculation "size + count * size" in
the kzalloc() function.

The struct_size() helper returns SIZE_MAX on overflow. So, refactor
the comparison to take advantage of this.

This way, the code is more readable and safer.

This code was detected with the help of Coccinelle, and audited and
modified manually.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments [1]
Link: https://github.com/KSPP/linux/issues/160 [2]
Signed-off-by: Erick Archer <erick.archer@outlook.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/AS8PR02MB72371E646714BAE2E51A6A378B152@AS8PR02MB7237.eurprd02.prod.outlook.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-30 14:04:31 -07:00
Uwe Kleine-König
0537c8eef4 Input: amimouse - mark driver struct with __refdata to prevent section mismatch
As described in the added code comment, a reference to .exit.text is ok
for drivers registered via module_platform_driver_probe(). Make this
explicit to prevent the following section mismatch warning

	WARNING: modpost: drivers/input/mouse/amimouse: section mismatch in reference: amimouse_driver+0x8 (section: .data) -> amimouse_remove (section: .exit.text)

that triggers on an allmodconfig W=1 build.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/2e3783106bf6bd9a7bdeb12b706378fb16316471.1711748999.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-30 11:47:23 -07:00
Marek Szyprowski
7b4e0b3918 Input: cyapa - add missing input core locking to suspend/resume functions
Grab input->mutex during suspend/resume functions like it is done in
other input drivers. This fixes the following warning during system
suspend/resume cycle on Samsung Exynos5250-based Snow Chromebook:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 1680 at drivers/input/input.c:2291 input_device_enabled+0x68/0x6c
Modules linked in: ...
CPU: 1 PID: 1680 Comm: kworker/u4:12 Tainted: G        W          6.6.0-rc5-next-20231009 #14109
Hardware name: Samsung Exynos (Flattened Device Tree)
Workqueue: events_unbound async_run_entry_fn
 unwind_backtrace from show_stack+0x10/0x14
 show_stack from dump_stack_lvl+0x58/0x70
 dump_stack_lvl from __warn+0x1a8/0x1cc
 __warn from warn_slowpath_fmt+0x18c/0x1b4
 warn_slowpath_fmt from input_device_enabled+0x68/0x6c
 input_device_enabled from cyapa_gen3_set_power_mode+0x13c/0x1dc
 cyapa_gen3_set_power_mode from cyapa_reinitialize+0x10c/0x15c
 cyapa_reinitialize from cyapa_resume+0x48/0x98
 cyapa_resume from dpm_run_callback+0x90/0x298
 dpm_run_callback from device_resume+0xb4/0x258
 device_resume from async_resume+0x20/0x64
 async_resume from async_run_entry_fn+0x40/0x15c
 async_run_entry_fn from process_scheduled_works+0xbc/0x6a8
 process_scheduled_works from worker_thread+0x188/0x454
 worker_thread from kthread+0x108/0x140
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xf1625fb0 to 0xf1625ff8)
...
---[ end trace 0000000000000000 ]---
...
------------[ cut here ]------------
WARNING: CPU: 1 PID: 1680 at drivers/input/input.c:2291 input_device_enabled+0x68/0x6c
Modules linked in: ...
CPU: 1 PID: 1680 Comm: kworker/u4:12 Tainted: G        W          6.6.0-rc5-next-20231009 #14109
Hardware name: Samsung Exynos (Flattened Device Tree)
Workqueue: events_unbound async_run_entry_fn
 unwind_backtrace from show_stack+0x10/0x14
 show_stack from dump_stack_lvl+0x58/0x70
 dump_stack_lvl from __warn+0x1a8/0x1cc
 __warn from warn_slowpath_fmt+0x18c/0x1b4
 warn_slowpath_fmt from input_device_enabled+0x68/0x6c
 input_device_enabled from cyapa_gen3_set_power_mode+0x13c/0x1dc
 cyapa_gen3_set_power_mode from cyapa_reinitialize+0x10c/0x15c
 cyapa_reinitialize from cyapa_resume+0x48/0x98
 cyapa_resume from dpm_run_callback+0x90/0x298
 dpm_run_callback from device_resume+0xb4/0x258
 device_resume from async_resume+0x20/0x64
 async_resume from async_run_entry_fn+0x40/0x15c
 async_run_entry_fn from process_scheduled_works+0xbc/0x6a8
 process_scheduled_works from worker_thread+0x188/0x454
 worker_thread from kthread+0x108/0x140
 kthread from ret_from_fork+0x14/0x28
Exception stack(0xf1625fb0 to 0xf1625ff8)
...
---[ end trace 0000000000000000 ]---

Fixes: d69f0a43c6 ("Input: use input_device_enabled()")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Link: https://lore.kernel.org/r/20231009121018.1075318-1-m.szyprowski@samsung.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-25 11:34:38 -07:00
Vicki Pfau
be81415a32 Input: xpad - add support for ASUS ROG RAIKIRI
Add the VID/PID for ASUS ROG RAIKIRI to xpad_device and the VID to xpad_table

Signed-off-by: Vicki Pfau <vi@endrift.com>
Link: https://lore.kernel.org/r/20240404035345.159643-1-vi@endrift.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-24 15:10:12 -07:00
Krzysztof Kozlowski
6fce490c80 ARM: 9369/1: Input: ambakmi - drop owner assignment
Amba bus core already sets owner, so driver does not need to.

Link: https://lore.kernel.org/r/20240326-module-owner-amba-v1-17-4517b091385b@linaro.org

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2024-04-18 12:09:20 +01:00
Fenglin Wu
9e0631695e input: pm8xxx-vibrator: add new SPMI vibrator support
Add support for a new SPMI vibrator module which is very similar
to the vibrator module inside PM8916 but has a finer drive voltage
step and different output voltage range, its drive level control
is expanded across 2 registers. The vibrator module can be found
in following Qualcomm PMICs: PMI632, PM7250B, PM7325B, PM7550BA.

Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240416-pm8xxx-vibrator-new-design-v11-3-7b1c951e1515@quicinc.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-17 15:27:12 -07:00
Fenglin Wu
6d84ec254a input: pm8xxx-vibrator: refactor to support new SPMI vibrator
Currently, vibrator control register addresses are hard coded,
including the base address and offsets, it's not flexible to
support new SPMI vibrator module which is usually included in
different PMICs with different base address. Refactor it by using
the base address defined in devicetree.

Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240416-pm8xxx-vibrator-new-design-v11-1-7b1c951e1515@quicinc.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-17 15:27:12 -07:00
Fenglin Wu
48c0687a32 Input: pm8xxx-vibrator - correct VIB_MAX_LEVELS calculation
The output voltage is inclusive hence the max level calculation is
off-by-one-step. Correct it.

iWhile we are at it also add a define for the step size instead of
using the magic value.

Fixes: 11205bb63e ("Input: add support for pm8xxx based vibrator driver")
Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240412-pm8xxx-vibrator-new-design-v10-1-0ec0ad133866@quicinc.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-15 16:21:45 -07:00
Ricardo Ribalda
ba2ec9c4f0 Input: sur40 - convert le16 to cpu before use
Smatch found this issue:
drivers/input/touchscreen/sur40.c:424:55: warning: incorrect type in argument 2 (different base types)
drivers/input/touchscreen/sur40.c:424:55:    expected int key
drivers/input/touchscreen/sur40.c:424:55:    got restricted __le16 [usertype] blob_id

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20240410-smatch-v1-6-785d009a852b@chromium.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-04-15 16:21:44 -07:00
Krzysztof Kozlowski
726c149e07 Input: atlas - drop owner assignment
ACPI bus core already sets the .owner, so driver does not need to.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-04-08 16:16:55 +02:00
Dmitry Torokhov
8984e0b569 Input: adafruit-seesaw - only report buttons that changed state
If a button has not changed its state when we poll the device the
driver does not need to report it. While duplicate events will be
filtered out by the input core anyway we can do it very cheaply
directly in the driver.

Link: https://lore.kernel.org/r/ZZ-U_bmZpIdoYA6c@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-28 13:37:55 -07:00
Karel Balej
d40e9edcf3 Input: ioc3kbd - add device table
Without the device table the driver will not auto-load when compiled as
a module.

Fixes: 273db8f035 ("Input: add IOC3 serio driver")
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20240313115832.8052-1-balejk@matfyz.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-28 13:35:49 -07:00
Arnd Bergmann
bf32bceedd Input: ims-pcu - fix printf string overflow
clang warns about a string overflow in this driver

drivers/input/misc/ims-pcu.c:1802:2: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 12 [-Werror,-Wformat-truncation]
drivers/input/misc/ims-pcu.c:1814:2: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 12 [-Werror,-Wformat-truncation]

Make the buffer a little longer to ensure it always fits.

Fixes: 628329d524 ("Input: add IMS Passenger Control Unit driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240326223825.4084412-7-arnd@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-28 13:29:44 -07:00
Krzysztof Kozlowski
c7df39b2a5 Input: stmpe - drop driver owner assignment
Core in platform_driver_register() already sets the .owner, so driver
does not need to.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240327174655.519503-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-28 10:54:19 -07:00
Linus Torvalds
3bcb0bf65c TTY/Serial driver update for 6.9-rc1
Here is the big set of TTY/Serial driver updates and cleanups for
 6.9-rc1.  Included in here are:
   - more tty cleanups from Jiri
   - loads of 8250 driver cleanups from Andy
   - max310x driver updates
   - samsung serial driver updates
   - uart_prepare_sysrq_char() updates for many drivers
   - platform driver remove callback void cleanups
   - stm32 driver updates
   - other small tty/serial driver updates
 
 All of these have been in linux-next for a long time with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZfwqow8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynNegCffxTbsnbMGjWhVrQ326IJx/DFvNMAoI9csigv
 m+G3RzefzZLRx8nAma0c
 =GMfc
 -----END PGP SIGNATURE-----

Merge tag 'tty-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty / serial driver updates from Greg KH:
 "Here is the big set of TTY/Serial driver updates and cleanups for
  6.9-rc1. Included in here are:

   - more tty cleanups from Jiri

   - loads of 8250 driver cleanups from Andy

   - max310x driver updates

   - samsung serial driver updates

   - uart_prepare_sysrq_char() updates for many drivers

   - platform driver remove callback void cleanups

   - stm32 driver updates

   - other small tty/serial driver updates

  All of these have been in linux-next for a long time with no reported
  issues"

* tag 'tty-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (199 commits)
  dt-bindings: serial: stm32: add power-domains property
  serial: 8250_dw: Replace ACPI device check by a quirk
  serial: Lock console when calling into driver before registration
  serial: 8250_uniphier: Switch to use uart_read_port_properties()
  serial: 8250_tegra: Switch to use uart_read_port_properties()
  serial: 8250_pxa: Switch to use uart_read_port_properties()
  serial: 8250_omap: Switch to use uart_read_port_properties()
  serial: 8250_of: Switch to use uart_read_port_properties()
  serial: 8250_lpc18xx: Switch to use uart_read_port_properties()
  serial: 8250_ingenic: Switch to use uart_read_port_properties()
  serial: 8250_dw: Switch to use uart_read_port_properties()
  serial: 8250_bcm7271: Switch to use uart_read_port_properties()
  serial: 8250_bcm2835aux: Switch to use uart_read_port_properties()
  serial: 8250_aspeed_vuart: Switch to use uart_read_port_properties()
  serial: port: Introduce a common helper to read properties
  serial: core: Add UPIO_UNKNOWN constant for unknown port type
  serial: core: Move struct uart_port::quirks closer to possible values
  serial: sh-sci: Call sci_serial_{in,out}() directly
  serial: core: only stop transmit when HW fifo is empty
  serial: pch: Use uart_prepare_sysrq_char().
  ...
2024-03-21 12:44:10 -07:00
Linus Torvalds
6885d7263e Input updates for v6.9-rc0
- a new driver for Goodix Berlin I2C and SPI touch controllers
 
 - support for IQS7222D v1.1 and v1.2 in iqs7222 driver
 
 - support for IST3032C and IST3038B parts in Imagis touchscreen driver
 
 - support for touch keys for Imagis touchscreen controllers
 
 - support for Snakebyte GAMEPADs in xpad driver
 
 - various cleanups and conversions to yaml for device tree bindings
 
 - assorted fixes and cleanups
 
 - old Synaptics navpoint driver has been removed since the only board
   that used it (HP iPAQ hx4700) was removed a while ago.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZfUPyQAKCRBAj56VGEWX
 nItKAQCcZvRkO1ZpCxgOXY2/xrJYQ6BbAZAlfQX9bdz/MB/3BAEApDvbgqDb6G8b
 mQBnojvwkPB2YluN5KEGYF4gzS/f+QY=
 =n+Lg
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.9-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - a new driver for Goodix Berlin I2C and SPI touch controllers

 - support for IQS7222D v1.1 and v1.2 in iqs7222 driver

 - support for IST3032C and IST3038B parts in Imagis touchscreen driver

 - support for touch keys for Imagis touchscreen controllers

 - support for Snakebyte GAMEPADs in xpad driver

 - various cleanups and conversions to yaml for device tree bindings

 - assorted fixes and cleanups

 - old Synaptics navpoint driver has been removed since the only board
   that used it (HP iPAQ hx4700) was removed a while ago.

* tag 'input-for-v6.9-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (37 commits)
  Input: xpad - add support for Snakebyte GAMEPADs
  dt-bindings: input: samsung,s3c6410-keypad: convert to DT Schema
  Input: imagis - add touch key support
  dt-bindings: input: imagis: Document touch keys
  Input: imagis - use FIELD_GET where applicable
  Input: make input_class constant
  dt-bindings: input: atmel,captouch: convert bindings to YAML
  Input: iqs7222 - add support for IQS7222D v1.1 and v1.2
  dt-bindings: input: allwinner,sun4i-a10-lrad: drop redundant type from label
  Input: serio - make serio_bus const
  Input: synaptics-rmi4 - make rmi_bus_type const
  Input: xilinx_ps2 - fix kernel-doc for xps2_of_probe function
  input/touchscreen: imagis: add support for IST3032C
  dt-bindings: input/touchscreen: imagis: add compatible for IST3032C
  input/touchscreen: imagis: Add support for Imagis IST3038B
  dt-bindings: input/touchscreen: Add compatible for IST3038B
  input/touchscreen: imagis: Correct the maximum touch area value
  Input: leds - change config symbol dependency for audio mute trigger
  Input: ti_am335x_tsc - remove redundant assignment to variable config
  Input: xpad - sort xpad_device by vendor and product ID
  ...
2024-03-17 11:50:54 -07:00
Dmitry Torokhov
57ed9567e6 Merge branch 'next' into for-linus
Prepare input updates for 6.9 merge window.
2024-03-15 15:04:04 -07:00
Matt Scialabba
81c32343d0 Input: xpad - add support for Snakebyte GAMEPADs
Add Snakebyte GAMEPAD BASE X and Snakebyte GAMEPAD RGB X to the list
of supported devices.

Signed-off-by: Matt Scialabba <matt.git@fastmail.fm>
Link: https://lore.kernel.org/r/efbfb428-06b0-48f9-8701-db291c2a9d65@app.fastmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-15 12:02:36 -07:00
Linus Torvalds
6cdebf62a1 spi: Updates for v6.9
This release sees some exciting changes from David Lechner which
 implements some optimisations that have been talked about for a long
 time which allows client drivers to pre-prepare SPI messages for
 repeated or low latency use.  This lets us move work out of latency
 sensitive paths and avoid repeating work for frequently performed
 operations.  As well as being useful in itself this will also be used in
 future to allow controllers to directly trigger SPI operations (eg, from
 interrupts).
 
 Otherwise this release has mostly been focused on cleanups, plus a
 couple of new devices:
 
  - Support for pre-optimising messages.
  - A big set of updates from Uwe Kleine-König moving drivers to use APIs
    with more modern terminology for controllers.
  - Major overhaul of the s3c64xx driver.
  - Support for Google GS101 and Samsung Exynos850.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmXvHx0ACgkQJNaLcl1U
 h9ATVQf/WafEp7ddJ23bRaHZx/gBCMgv8N6mN7OBnzB2pMIGL56SPf9fGAmCUQKt
 mne6fDg6/RpydG/72TFppUjRFLN9CwoJjJfQIXMgOqYuPaMEnrj1wbcXar3MeeX2
 8hS1u7wKwhOuuwLmoqqMOTKyGUj2mHsBOTOo0vm4WM1s9IHhY5TG2clYv1A+KZbj
 kSHE5m7YnBLwimwu0+hsXnRNHZUGKVksQ/9t7AD7/7L8aPj9jPqu1EjTS1/6IDB0
 QDVyW7Z6hX7YoUx48gp+j/UFJ7ZyxTajy+0wvzPHou3KJARgFfNZWT2XvvYcpA0/
 yqcpbCUwZ1AETXHcmly7YwNpPV9LBg==
 =+Xw/
 -----END PGP SIGNATURE-----

Merge tag 'spi-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi updates from Mark Brown:
 "This release sees some exciting changes from David Lechner which
  implements some optimisations that have been talked about for a long
  time which allows client drivers to pre-prepare SPI messages for
  repeated or low latency use. This lets us move work out of latency
  sensitive paths and avoid repeating work for frequently performed
  operations. As well as being useful in itself this will also be used
  in future to allow controllers to directly trigger SPI operations (eg,
  from interrupts).

  Otherwise this release has mostly been focused on cleanups, plus a
  couple of new devices:

   - Support for pre-optimising messages

   - A big set of updates from Uwe Kleine-König moving drivers to use
     APIs with more modern terminology for controllers

   - Major overhaul of the s3c64xx driver

   - Support for Google GS101 and Samsung Exynos850"

* tag 'spi-v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (122 commits)
  spi: Introduce SPI_INVALID_CS and is_valid_cs()
  spi: Fix types of the last chip select storage variables
  spi: Consistently use BIT for cs_index_mask
  spi: Exctract spi_dev_check_cs() helper
  spi: Exctract spi_set_all_cs_unused() helper
  spi: s3c64xx: switch exynos850 to new port config data
  spi: s3c64xx: switch gs101 to new port config data
  spi: s3c64xx: deprecate fifo_lvl_mask, rx_lvl_offset and port_id
  spi: s3c64xx: get rid of the OF alias ID dependency
  spi: s3c64xx: introduce s3c64xx_spi_set_port_id()
  spi: s3c64xx: let the SPI core determine the bus number
  spi: s3c64xx: allow FIFO depth to be determined from the compatible
  spi: s3c64xx: retrieve the FIFO depth from the device tree
  spi: s3c64xx: determine the fifo depth only once
  spi: s3c64xx: allow full FIFO masks
  spi: s3c64xx: define a magic value
  spi: dt-bindings: introduce FIFO depth properties
  spi: axi-spi-engine: use struct_size() macro
  spi: axi-spi-engine: use __counted_by() attribute
  spi: axi-spi-engine: remove p from struct spi_engine_message_state
  ...
2024-03-13 11:07:37 -07:00
Duje Mihanović
2d77f70bb7 Input: imagis - add touch key support
IST3032C (and possibly some other models) has touch keys. Add support
for them to the imagis driver.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Link: https://lore.kernel.org/r/20240306-b4-imagis-keys-v3-3-2c429afa8420@skole.hr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-10 14:38:04 -07:00
Duje Mihanović
c0ca3dbd03 Input: imagis - use FIELD_GET where applicable
Instead of manually extracting certain bits from registers with binary
ANDs and shifts, the FIELD_GET macro can be used. With this in mind, the
*_SHIFT macros can be dropped.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Link: https://lore.kernel.org/r/20240306-b4-imagis-keys-v3-1-2c429afa8420@skole.hr
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-10 14:38:04 -07:00
Ricardo B. Marliere
a4735d40a5 Input: make input_class constant
Since commit 43a7206b09 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the input_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240305-class_cleanup-input-v1-1-0c3d950c25db@marliere.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-10 14:38:04 -07:00
Linus Torvalds
7a4f31c776 Input updates for v6.8-rc7
- a revert of endpoint checks in bcm5974 - the driver is being naughty
   and pokes at unclaimed USB interface, so the check fails. We need to
   fix the driver to claim both interfaces, and then re-implement the
   endpoints check
 
 - a fix to Synaptics RMI driver to avoid UAF on driver unload or device
   unbinding
 
 - a few new VID/PIDs added to xpad game controller driver
 
 - a change to gpio_keys_polled driver to quiet it when GPIO causes probe
   deferral.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZeqhHAAKCRBAj56VGEWX
 nNV/AQDOrCWfqrL932EV6/K45siU+sUeTVd2iRIlS3jg52DohgEA53uWXmmU0kvH
 Hkr6d/cng8X+BfOrO3N7y99Zhc0nlgs=
 =QQR8
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:

 - a revert of endpoint checks in bcm5974 - the driver is being naughty
   and pokes at unclaimed USB interface, so the check fails. We need to
   fix the driver to claim both interfaces, and then re-implement the
   endpoints check

 - a fix to Synaptics RMI driver to avoid UAF on driver unload or device
   unbinding

 - a few new VID/PIDs added to xpad game controller driver

 - a change to gpio_keys_polled driver to quiet it when GPIO causes
   probe deferral.

* tag 'input-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal
  Input: gpio_keys_polled - suppress deferred probe error for gpio
  Revert "Input: bcm5974 - check endpoint type before starting traffic"
  Input: xpad - add additional HyperX Controller Identifiers
2024-03-08 13:06:35 -08:00
Mathias Krause
fbf8d71742 Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal
Calling irq_domain_remove() will lead to freeing the IRQ domain
prematurely. The domain is still referenced and will be attempted to get
used via rmi_free_function_list() -> rmi_unregister_function() ->
irq_dispose_mapping() -> irq_get_irq_data()'s ->domain pointer.

With PaX's MEMORY_SANITIZE this will lead to an access fault when
attempting to dereference embedded pointers, as in Torsten's report that
was faulting on the 'domain->ops->unmap' test.

Fix this by releasing the IRQ domain only after all related IRQs have
been deactivated.

Fixes: 24d28e4f12 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Mathias Krause <minipli@grsecurity.net>
Link: https://lore.kernel.org/r/20240222142654.856566-1-minipli@grsecurity.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-07 15:29:52 -08:00
Jeff LaBundy
992cf65674 Input: iqs7222 - add support for IQS7222D v1.1 and v1.2
The vendor has introduced two new revisions with slightly different
memory maps; update the driver to support them.

Fixes: dd24e202ac ("Input: iqs7222 - add support for Azoteq IQS7222D")
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/ZelTRYX3fenMQuhF@nixie71
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-07 10:10:50 -08:00
Uwe Kleine-König
963465a331 Input: gpio_keys_polled - suppress deferred probe error for gpio
On a PC Engines APU our admins are faced with:

	$ dmesg | grep -c "gpio-keys-polled gpio-keys-polled: unable to claim gpio 0, err=-517"
	261

Such a message always appears when e.g. a new USB device is plugged in.

Suppress this message which considerably clutters the kernel log for
EPROBE_DEFER (i.e. -517).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20240305101042.10953-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-05 09:16:37 -08:00
Javier Carrasco
7105e92c60 Revert "Input: bcm5974 - check endpoint type before starting traffic"
This patch intended to fix an well-knonw issue in old drivers where the
endpoint type is taken for granted, which is often triggered by fuzzers.

That was the case for this driver [1], and although the fix seems to be
correct, it uncovered another issue that leads to a regression [2], if
the endpoints of the current interface are checked.

The driver makes use of endpoints that belong to a different interface
rather than the one it binds (it binds to the third interface, but also
accesses an endpoint from a different one). The driver should claim the
interfaces it requires, but that is still not the case.

Given that the regression is more severe than the issue found by
syzkaller, the best approach is reverting the patch that causes the
regression, and trying to fix the underlying problem before checking
the endpoint types again.

Note that reverting this patch will probably trigger the syzkaller bug
at some point.

This reverts commit 2b9c3eb32a.

Link: https://syzkaller.appspot.com/bug?extid=348331f63b034f89b622 [1]
Link: https://lore.kernel.org/linux-input/87sf161jjc.wl-tiwai@suse.de/ [2]

Fixes: 2b9c3eb32a ("Input: bcm5974 - check endpoint type before starting traffic")
Reported-by: Jacopo Radice <jacopo.radice@outlook.com>
Closes: https://bugzilla.suse.com/show_bug.cgi?id=1220030
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240305-revert_bcm5974_ep_check-v3-1-527198cf6499@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-05 09:16:08 -08:00
Ricardo B. Marliere
fbd5f5008f Input: serio - make serio_bus const
Now that the driver core can properly handle constant struct bus_type,
move the serio_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>
Link: https://lore.kernel.org/r/20240210-bus_cleanup-input2-v1-2-0daef7e034e0@marliere.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-03 15:06:58 -08:00
Ricardo B. Marliere
d1278c91fe Input: synaptics-rmi4 - make rmi_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the variable rmi_bus_type 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>
Link: https://lore.kernel.org/r/20240210-bus_cleanup-input2-v1-1-0daef7e034e0@marliere.net
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-03 15:06:58 -08:00
Yang Li
d49193be63 Input: xilinx_ps2 - fix kernel-doc for xps2_of_probe function
The existing comment block above the xps2_of_probe function
does not conform to the kernel-doc standard. This patch fixes the
documentation to match the expected kernel-doc format, which includes
a structured documentation header with param and return value.

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20240301092115.123092-1-yang.lee@linux.alibaba.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-03 15:02:55 -08:00
Karel Balej
90cb57a6c5 input/touchscreen: imagis: add support for IST3032C
IST3032C is a touchscreen chip used for instance in the
samsung,coreprimevelte smartphone, with which this was tested. Add the
chip specific information to the driver.

Reviewed-by: Markuss Broks <markuss.broks@gmail.com>
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Link: https://lore.kernel.org/r/20240301164659.13240-6-karelb@gimli.ms.mff.cuni.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-03 14:58:20 -08:00
Markuss Broks
10ad7d7a42 input/touchscreen: imagis: Add support for Imagis IST3038B
Imagis IST3038B is another variant of Imagis IST3038 IC, which has
a different register interface from IST3038C (possibly firmware defined).
This should also work for IST3044B (though untested), however other
variants using this interface/protocol(IST3026, IST3032, IST3026B,
IST3032B) have a different format for coordinates, and they'd need
additional effort to be supported by this driver.

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-4-karelb@gimli.ms.mff.cuni.cz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-03 14:58:20 -08:00
Markuss Broks
54a62ed17a 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>
2024-03-03 14:58:20 -08:00
Max Nguyen
dd50f771af Input: xpad - add additional HyperX Controller Identifiers
Add additional HyperX device identifiers to xpad_device and xpad_table.

Suggested-by: Chris Toledanes<chris.toledanes@hp.com>
Reviewed-by: Carl Ng <carl.ng@hp.com>
Signed-off-by: Max Nguyen <maxwell.nguyen@hp.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/44ad5ffa-76d8-4046-94ee-2ef171930ed2@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-03-03 14:46:20 -08:00
Heiner Kallweit
849c34e63c 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>
2024-03-03 14:46:06 -08:00
Colin Ian King
0f82d10802 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>
2024-02-09 10:53:24 -08:00
Brenton Simpson
18970d4f63 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>
2024-02-08 11:27:43 -08:00
Uwe Kleine-König
1245633c61
Input: synaptics-rmi4 - follow renaming of SPI "master" to "controller"
In commit 8caab75fd2 ("spi: Generalize SPI "master" to "controller"")
some functions and struct members were renamed. To not break all drivers
compatibility macros were provided.

To be able to remove these compatibility macros push the renaming into
this driver.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/b88413456c970a97319fa7e505768bf82966541b.1707324794.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 11:54:39 +00:00
Uwe Kleine-König
a78acec53b
Input: pxspad - follow renaming of SPI "master" to "controller"
In commit 8caab75fd2 ("spi: Generalize SPI "master" to "controller"")
some functions and struct members were renamed. To not break all drivers
compatibility macros were provided.

To be able to remove these compatibility macros push the renaming into
this driver.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/820fa151077dc192391d546aec35328680803f9f.1707324794.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-08 11:54:38 +00:00
Ricardo B. Marliere
d03f030115 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>
2024-02-06 13:57:02 -08:00
Greg Kroah-Hartman
a802f50d6e Merge 6.8-rc3 into tty-next
We need the tty/serial fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-04 06:21:02 -08:00
Linus Torvalds
eab5c86d24 Input updates for v6.8-rc2
- a fix for the fix to deal with newer laptops which get confused by the
   "GET ID" command when probing for PS/2 keyboards
 
 - a couple of tweaks to i8042 to handle Clevo NS70PU and Lifebook U728
   laptops
 
 - a change to bcm5974 to validate that the device has appropriate
   endpoints
 
 - an addition of new product ID to xpad driver to recognize Lenovo
   Legion Go controllers
 
 - a quirk to Goodix controller to deal with extra GPIO described in ACPI
   tables on some devices.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZb1FdAAKCRBAj56VGEWX
 nHR/AQD9mGrzGWRHBx1GdtUdz54DwdcIomfufomNUPUOHj96TwD+OOzNL4AtpMEh
 YVddZKrt24OP2zE1yXRjujMahEBJHwk=
 =4yCm
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - a fix for the fix to deal with newer laptops which get confused by
   the "GET ID" command when probing for PS/2 keyboards

 - a couple of tweaks to i8042 to handle Clevo NS70PU and Lifebook U728
   laptops

 - a change to bcm5974 to validate that the device has appropriate
   endpoints

 - an addition of new product ID to xpad driver to recognize Lenovo
   Legion Go controllers

 - a quirk to Goodix controller to deal with extra GPIO described in
   ACPI tables on some devices.

* tag 'input-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: i8042 - add Fujitsu Lifebook U728 to i8042 quirk table
  Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
  Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID
  Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
  Input: bcm5974 - check endpoint type before starting traffic
  Input: xpad - add Lenovo Legion Go controllers
  Input: goodix - accept ACPI resources with gpio_count == 3 && gpio_int_idx == 0
2024-02-02 12:52:44 -08:00
Szilard Fabian
4255447ad3 Input: i8042 - add Fujitsu Lifebook U728 to i8042 quirk table
Another Fujitsu-related patch.

In the initial boot stage the integrated keyboard of Fujitsu Lifebook U728
refuses to work and it's not possible to type for example a dm-crypt
passphrase without the help of an external keyboard.

i8042.nomux kernel parameter resolves this issue but using that a PS/2
mouse is detected. This input device is unused even when the i2c-hid-acpi
kernel module is blacklisted making the integrated ELAN touchpad
(04F3:3092) not working at all.

So this notebook uses a hid-over-i2c touchpad which is managed by the
i2c_designware input driver. Since you can't find a PS/2 mouse port on this
computer and you can't connect a PS/2 mouse to it even with an official
port replicator I think it's safe to not use the PS/2 mouse port at all.

Signed-off-by: Szilard Fabian <szfabian@bluemarch.art>
Link: https://lore.kernel.org/r/20240103014717.127307-2-szfabian@bluemarch.art
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2024-02-02 10:50:50 -08:00