android_kernel_sony_sdm845/drivers/input
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Douglas Anderson 6590d09b54 Input: elants_i2c - properly handle the reset GPIO when power is off
[ Upstream commit a85fbd6498441694475716a4d5c65f9d3e073faf ]

As can be seen in elants_i2c_power_off(), we want the reset GPIO
asserted when power is off. The reset GPIO is active low so we need
the reset line logic low when power is off to avoid leakage.

We have a problem, though, at probe time. At probe time we haven't
powered the regulators on yet but we have:

  devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);

While that _looks_ right, it turns out that it's not. The
GPIOD_OUT_LOW doesn't mean to init the GPIO to low. It means init the
GPIO to "not asserted". Since this is an active low GPIO that inits it
to be high.

Let's fix this to properly init the GPIO. Now after both probe and
power off the state of the GPIO is consistent (it's "asserted" or
level low).

Once we fix this, we can see that at power on time we no longer to
assert the reset GPIO as the first thing. The reset GPIO is _always_
asserted before powering on. Let's fix powering on to account for
this.

Fixes: afe10358e4 ("Input: elants_i2c - wire up regulator support")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20221117123805.1.I9959ac561dd6e1e8e1ce7085e4de6167b27c574f@changeid
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-07 12:07:17 +01:00
..
gameport
joystick Input: xpad - fix wireless 360 controller breaking after suspend 2022-10-26 13:15:36 +02:00
keyboard Input: hil_kbd - fix error return code in hil_dev_connect() 2021-07-20 16:21:04 +02:00
misc Input: sparcspkr - fix refcount leak in bbc_beep_probe 2022-06-14 16:52:33 +02:00
mouse Input: bcm5974 - set missing URB_NO_TRANSFER_DMA_MAP urb flag 2022-06-14 16:52:41 +02:00
rmi4 Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() 2020-06-03 08:16:39 +02:00
serio Input: i8042 - Fix misplaced backport of "add ASUS Zenbook Flip to noselftest list" 2022-02-16 12:43:52 +01:00
tablet Input: aiptek - properly check endpoint type 2022-03-23 09:00:34 +01:00
touchscreen Input: elants_i2c - properly handle the reset GPIO when power is off 2023-01-07 12:07:17 +01:00
apm-power.c
evbug.c
evdev.c Input: evdev - call input_flush_device() on release(), not flush() 2020-06-03 08:16:38 +02:00
ff-core.c Input: uinput - avoid FF flush when destroying device 2021-01-23 15:38:17 +01:00
ff-memless.c Input: ff-memless - kill timer in destroy() 2019-11-25 09:51:55 +01:00
input-compat.c
input-compat.h
input-leds.c Input: leds - fix out of bound access 2018-05-09 09:50:20 +02:00
input-mt.c
input-polldev.c
input.c Input: add bounds checking to input_set_capability() 2022-05-25 08:39:48 +02:00
joydev.c Input: joydev - prevent use of not validated data in JSIOCSBTNMAP ioctl 2021-07-20 16:20:56 +02:00
Kconfig
Makefile
matrix-keymap.c
mousedev.c Input: mousedev - fix implicit conversion warning 2018-04-08 12:12:43 +02:00
sparse-keymap.c