linux/drivers/input/misc
Jeff LaBundy a2add51331 Input: iqs7222 - preserve system status register
Some register groups reserve a byte at the end of their continuous
address space. Depending on the variant of silicon, this field may
share the same memory space as the lower byte of the system status
register (0x10).

In these cases, caching the reserved byte and writing it later may
effectively reset the device depending on what happened in between
the read and write operations.

Solve this problem by avoiding any access to this last byte within
offending register groups. This method replaces a workaround which
attempted to write the reserved byte with up-to-date contents, but
left a small window in which updates by the device could have been
clobbered.

Now that the driver does not touch these reserved bytes, the order
in which the device's registers are written no longer matters, and
they can be written in their natural order. The new method is also
much more generic, and can be more easily extended to new variants
of silicon with different register maps.

As part of this change, the register read and write functions must
be gently updated to support byte access instead of word access.

Fixes: 2e70ef525b ("Input: iqs7222 - acknowledge reset before writing registers")
Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/Z85Alw+d9EHKXx2e@nixie71
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2025-03-09 23:12:07 -07:00
..
88pm80x_onkey.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
88pm860x_onkey.c
88pm886-onkey.c input: Add onkey driver for Marvell 88PM886 PMIC 2024-06-28 15:41:20 +01:00
ab8500-ponkey.c
ad714x-i2c.c Input: drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-13 15:43:19 -07:00
ad714x-spi.c Input: ad714x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS() 2023-01-27 14:49:52 -08:00
ad714x.c Input: ad714x - use guard notation when acquiring mutex 2024-10-03 09:10:35 -07:00
ad714x.h Input: ad714x - unify dev_pm_ops using EXPORT_SIMPLE_DEV_PM_OPS() 2023-01-27 14:49:52 -08:00
adxl34x-i2c.c Input: adxl34x - switch to using managed resources 2024-06-11 11:17:44 -07:00
adxl34x-spi.c Input: adxl34x - switch to using managed resources 2024-06-11 11:17:44 -07:00
adxl34x.c Input: adxl34x - switch to using "guard" notation 2024-06-11 11:17:52 -07:00
adxl34x.h Input: adxl34x - switch to using managed resources 2024-06-11 11:17:44 -07:00
apanel.c Input: drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-13 15:43:19 -07:00
ariel-pwrbutton.c
arizona-haptics.c
atc260x-onkey.c
ati_remote2.c Input: ati_remote2 - use guard notation when acquiring mutex 2024-10-03 09:10:35 -07:00
atlas_btns.c Input: atlas - drop owner assignment 2024-04-08 16:16:55 +02:00
atmel_captouch.c Input: drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-13 15:43:19 -07:00
axp20x-pek.c Input: axp20x-pek - avoid needless newline removal 2023-09-30 09:35:31 -07:00
bma150.c Input: drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-13 15:43:19 -07:00
cm109.c Input: cm109 - use guard notation when acquiring mutex and spinlock 2024-10-03 09:10:35 -07:00
cma3000_d0x_i2c.c Input: drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-13 15:43:19 -07:00
cma3000_d0x.c Input: cma3000_d0x - use guard notation when acquiring mutex 2024-10-03 09:10:35 -07:00
cma3000_d0x.h
cobalt_btns.c
cpcap-pwrbutton.c Input: cpcap-pwrbutton - replace GPLv2 boilerplate with SPDX 2023-07-05 14:50:00 -07:00
cs40l50-vibra.c Input: cs40l50 - fix wrong usage of INIT_WORK() 2024-11-07 21:54:44 -08:00
da7280.c Input: da7280 - use guard notation when acquiring mutex and spinlock 2024-10-03 09:10:35 -07:00
da9052_onkey.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
da9055_onkey.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
da9063_onkey.c Input: da9063_onkey - avoid explicitly setting input's parent 2024-01-04 12:02:20 -08:00
drv260x.c Input: drv260x - use guard notation when acquiring mutex 2024-10-03 09:10:36 -07:00
drv2665.c Input: drv2665 - use guard notation when acquiring mutex 2024-10-03 09:10:36 -07:00
drv2667.c Input: drv2667 - use guard notation when acquiring mutex 2024-10-03 09:10:36 -07:00
e3x0-button.c Input: e3x0-button - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2023-01-09 20:25:21 -08:00
gpio_decoder.c
gpio-beeper.c
gpio-vibra.c Input: Explicitly include correct DT includes 2023-07-17 10:03:07 -07:00
hisi_powerkey.c
hp_sdc_rtc.c Input: hp_sdc_rtc - mark an unused function as __maybe_unused 2023-02-21 13:57:40 -08:00
ibm-panel.c Input: ibm-panel - use guard notation when acquiring spinlock 2024-10-03 09:10:36 -07:00
ideapad_slidebar.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
ims-pcu.c Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
iqs269a.c Input: iqs269a - use cleanup facility for fwnodes 2024-10-03 09:10:37 -07:00
iqs626a.c Input: iqs626a - use cleanup facility for fwnodes 2024-10-03 09:10:37 -07:00
iqs7222.c Input: iqs7222 - preserve system status register 2025-03-09 23:12:07 -07:00
Kconfig Merge branch 'ib-mfd-input-regulator-6.11' into ibs-for-mfd-merged 2024-07-04 17:06:42 +01:00
keyspan_remote.c
kxtj9.c Input: kxtj9 - use guard notation when acquiring mutex/disabling irq 2024-10-03 09:10:36 -07:00
m68kspkr.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
Makefile Merge branch 'ib-mfd-input-regulator-6.11' into ibs-for-mfd-merged 2024-07-04 17:06:42 +01:00
max8925_onkey.c Input: max8925_onkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2023-01-09 20:25:21 -08:00
max8997_haptic.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
max77650-onkey.c
max77693-haptic.c Input: Use str_enable_disable-like helpers 2025-01-14 13:41:41 -08:00
mc13783-pwrbutton.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
mma8450.c Input: mma8450 - add chip ID check in probe 2024-12-17 11:11:46 -08:00
nxp-bbnsm-pwrkey.c Input: bbnsm_pwrkey - add remove hook 2024-12-16 09:34:16 -08:00
palmas-pwrbutton.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
pcap_keys.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
pcf8574_keypad.c Input: drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-13 15:43:19 -07:00
pcf50633-input.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
pcspkr.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
pm8xxx-vibrator.c input: pm8xxx-vibrator: add new SPMI vibrator support 2024-04-17 15:27:12 -07:00
pm8941-pwrkey.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
pmic8xxx-pwrkey.c Input: Explicitly include correct DT includes 2023-07-17 10:03:07 -07:00
powermate.c Input: powermate - use guard notation when acquiring spinlock 2024-10-03 09:10:37 -07:00
pwm-beeper.c Input: pwm-beeper - use guard notation when acquiring spinlock 2024-10-03 09:10:37 -07:00
pwm-vibra.c pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() 2023-12-20 16:07:04 +01:00
rave-sp-pwrbutton.c
rb532_button.c
regulator-haptic.c Input: Use str_enable_disable-like helpers 2025-01-14 13:41:41 -08:00
retu-pwrbutton.c
rk805-pwrkey.c
rotary_encoder.c Input: rotary_encoder - use guard notation when acquiring mutex 2024-10-03 09:10:38 -07:00
rt5120-pwrkey.c
sc27xx-vibra.c
sgi_btns.c Input: add missing MODULE_DESCRIPTION() macros 2024-06-09 14:38:48 -07:00
soc_button_array.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
sparcspkr.c Input: sparcspkr - use cleanup facility for device_node 2024-10-22 13:58:39 -07:00
stpmic1_onkey.c Input: stpmic1_onekey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2023-01-09 20:25:23 -08:00
tps65218-pwrbutton.c
tps65219-pwrbutton.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
twl4030-pwrbutton.c Input: twl4030-pwrbutton - fix kernel-doc warning 2024-07-11 09:57:58 -07:00
twl4030-vibra.c Input: twl4030-vibra - use cleanup facility for device_node 2024-10-19 21:21:40 -07:00
twl6040-vibra.c Input: twl6040-vibra - use cleanup facility for device_node 2024-10-19 21:21:39 -07:00
uinput.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
wistron_btns.c Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
wm831x-on.c Input: switch back to struct platform_driver::remove() 2024-10-15 11:43:25 -07:00
xen-kbdfront.c
yealink.c Input: correct typos in multiple comments across misc drivers 2024-09-30 08:00:16 -07:00
yealink.h