Skip to content

Commit

Permalink
input: goodix: Support output-only reset lines
Browse files Browse the repository at this point in the history
Although the motivation behind initialising the reset GPIO as an input
is sound, it prevents the driver from being used with an output-only
GPIO controller. Fall back to trying to create it as an output.

See: https://forums.raspberrypi.com/viewtopic.php?t=361103

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
  • Loading branch information
pelwell committed Dec 8, 2023
1 parent e01f00b commit 7271277
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/input/touchscreen/goodix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,8 @@ static int goodix_get_gpio_config(struct goodix_ts_data *ts)

/* Get the reset line GPIO pin number */
gpiod = devm_gpiod_get_optional(dev, GOODIX_GPIO_RST_NAME, ts->gpiod_rst_flags);
if (IS_ERR(gpiod))
gpiod = devm_gpiod_get_optional(dev, GOODIX_GPIO_RST_NAME, GPIOD_OUT);
if (IS_ERR(gpiod)) {
error = PTR_ERR(gpiod);
if (error != -EPROBE_DEFER)
Expand Down

0 comments on commit 7271277

Please sign in to comment.