linux/drivers/input
Hans de Goede cec4c3810b Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state
[ Upstream commit e479187748a8f151a85116a7091c599b121fdea5 ]

Some buggy BIOS-es bring up the touchscreen-controller in a stuck
state where it blocks the I2C bus. Specifically this happens on
the Jumper EZpad 7 tablet model.

After much poking at this problem I have found that the following steps
are necessary to unstuck the chip / bus:

1. Turn off the Silead chip.
2. Try to do an I2C transfer with the chip, this will fail in response to
   which the I2C-bus-driver will call: i2c_recover_bus() which will unstuck
   the I2C-bus. Note the unstuck-ing of the I2C bus only works if we first
   drop the chip of the bus by turning it off.
3. Turn the chip back on.

On the x86/ACPI systems were this problem is seen, step 1. and 3. require
making ACPI calls and dealing with ACPI Power Resources. This commit adds
a workaround which runtime-suspends the chip to turn it off, leaving it up
to the ACPI subsystem to deal with all the ACPI specific details.

There is no good way to detect this bug, so the workaround gets activated
by a new "silead,stuck-controller-bug" boolean device-property. Since this
is only used on x86/ACPI, this will be set by model specific device-props
set by drivers/platform/x86/touchscreen_dmi.c. Therefor this new
device-property is not documented in the DT-bindings.

Dmesg will contain the following messages on systems where the workaround
is activated:

[   54.309029] silead_ts i2c-MSSL1680:00: [Firmware Bug]: Stuck I2C bus: please ignore the next 'controller timed out' error
[   55.373593] i2c_designware 808622C1:04: controller timed out
[   55.582186] silead_ts i2c-MSSL1680:00: Silead chip ID: 0x80360000

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210405202745.16777-1-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-22 11:38:28 +02:00
..
gameport
joystick Input: xpad - add support for PowerA Enhanced Wired Controller for Xbox Series X|S 2021-03-04 10:26:41 +01:00
keyboard Input: nspire-keypad - enable interrupts only when opened 2021-04-21 12:56:13 +02:00
misc Input: cm109 - do not stomp on control URB 2020-12-16 10:56:57 +01:00
mouse Input: elantech - fix protocol errors for some trackpoints in SMBus mode 2021-03-07 12:20:41 +01:00
rmi4
serio Input: i8042 - fix Pegatron C15B ID entry 2021-04-21 12:56:15 +02:00
tablet
touchscreen Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state 2021-05-22 11:38:28 +02:00
Kconfig
Makefile
apm-power.c
evbug.c
evdev.c
ff-core.c
ff-memless.c
input-compat.c
input-compat.h
input-leds.c
input-mt.c
input-polldev.c
input-poller.c
input-poller.h
input.c
joydev.c Input: joydev - prevent potential read overflow in ioctl 2021-03-04 10:26:41 +01:00
matrix-keymap.c
mousedev.c
sparse-keymap.c