linux/drivers/hid/i2c-hid
Fei Shao cfe5e5d87e HID: i2c-hid: goodix: Add support for "goodix,no-reset-during-suspend" property
[ Upstream commit 7607f12ba7 ]

In the beginning, commit 18eeef46d3 ("HID: i2c-hid: goodix: Tie the
reset line to true state of the regulator") introduced a change to tie
the reset line of the Goodix touchscreen to the state of the regulator
to fix a power leakage issue in suspend.

After some time, the change was deemed unnecessary and was reverted in
commit 557e05fa9f ("HID: i2c-hid: goodix: Stop tying the reset line to
the regulator") due to difficulties in managing regulator notifiers for
designs like Evoker, which provides a second power rail to touchscreen.

However, the revert caused a power regression on another Chromebook
device Steelix in the field, which has a dedicated always-on regulator
for touchscreen and was covered by the workaround in the first commit.

To address both cases, this patch adds the support for the new
"goodix,no-reset-during-suspend" property in the driver:
- When set to true, the driver does not assert the reset GPIO during
  power-down.
  Instead, the GPIO will be asserted during power-up to ensure the
  touchscreen always has a clean start and consistent behavior after
  resuming.
  This is for designs with a dedicated always-on regulator.
- When set to false or unset, the driver uses the original control flow
  and asserts GPIO and disables regulators normally.
  This is for the two-regulator and shared-regulator designs.

Signed-off-by: Fei Shao <fshao@chromium.org>
Suggested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-08-23 17:32:27 +02:00
..
i2c-hid-acpi.c HID: i2c-hid: acpi: Unify ACPI ID tables format 2023-01-18 10:06:01 +01:00
i2c-hid-core.c Merge branch 'for-6.3/multitouch' into for-linus 2023-02-22 10:39:05 +01:00
i2c-hid-dmi-quirks.c HID: retain initial quirks set up when creating HID devices 2023-02-09 14:24:30 +01:00
i2c-hid-of-elan.c HID: i2c: use simple i2c probe 2022-10-18 16:13:25 +02:00
i2c-hid-of-goodix.c HID: i2c-hid: goodix: Add support for "goodix,no-reset-during-suspend" property 2023-08-23 17:32:27 +02:00
i2c-hid-of.c HID: i2c-hid-of: Add reset GPIO support to i2c-hid-of 2023-04-13 16:27:42 +02:00
i2c-hid.h HID: multitouch: Add quirks for flipped axes 2023-01-18 10:08:51 +01:00
Kconfig HID: i2c-hid-of: Allow using i2c-hid-of on non OF platforms 2023-04-13 16:27:42 +02:00
Makefile HID: i2c-hid: elan: Add support for Elan eKTH6915 i2c-hid touchscreens 2022-06-08 11:46:23 +02:00