]> git.baikalelectronics.ru Git - kernel.git/commit
Input: atmel_mxt_ts - fix up inverted RESET handler
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 10 Nov 2020 02:00:06 +0000 (18:00 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 18 Nov 2020 02:14:08 +0000 (18:14 -0800)
commitc7f3b6d0f8265a02de9ccd0d1311d4a5e2b74ec2
tree66cffabe3ce1272d13568207b21e2438e7acb5df
parentad81afe4d1492ed78162b455899cb635cadfeb02
Input: atmel_mxt_ts - fix up inverted RESET handler

This driver uses GPIO descriptors to drive the touchscreen RESET line. In
the existing device trees this has in conflict with intution been flagged
as GPIO_ACTIVE_HIGH and the driver then applies the reverse action by
driving the line low (setting to 0) to enter reset state and driving the
line high (setting to 1) to get out of reset state.

The correct way to handle active low GPIO lines is to provide the
GPIO_ACTIVE_LOW in the device tree (thus properly describing the hardware)
and letting the GPIO framework invert the assertion (driving high) to a
low level and vice versa.

This is considered a bug since the device trees are incorrectly
mis-specifying the line as active high.

Fix the driver and all device trees specifying a reset line.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Philippe Schenker <philippe.schenker@toradex.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201104153032.1387747-1-linus.walleij@linaro.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
arch/arm/boot/dts/imx53-ppd.dts
arch/arm/boot/dts/imx6dl-colibri-eval-v3.dts
arch/arm/boot/dts/imx6q-apalis-eval.dts
arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts
arch/arm/boot/dts/imx6q-apalis-ixora.dts
arch/arm/boot/dts/imx7-colibri-aster.dtsi
arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi
arch/arm/boot/dts/motorola-mapphone-common.dtsi
arch/arm/boot/dts/s5pv210-aries.dtsi
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts
drivers/input/touchscreen/atmel_mxt_ts.c