Skip to content

Commit 180a8f1

Browse files
jwrdegoededtor
authored andcommitted
Input: goodix - accept ACPI resources with gpio_count == 3 && gpio_int_idx == 0
Some devices list 3 Gpio resources in the ACPI resource list for the touchscreen: 1. GpioInt resource pointing to the GPIO used for the interrupt 2. GpioIo resource pointing to the reset GPIO 3. GpioIo resource pointing to the GPIO used for the interrupt Note how the third extra GpioIo resource really is a duplicate of the GpioInt provided info. Ignore this extra GPIO, treating this setup the same as gpio_count == 2 && gpio_int_idx == 0 fixes the touchscreen not working on the Thunderbook Colossus W803 rugged tablet and likely also on the CyberBook_T116K. Reported-by: Maarten van der Schrieck Closes: https://gitlab.com/AdyaAdya/goodix-touchscreen-linux-driver/-/issues/22 Suggested-by: Maarten van der Schrieck Tested-by: Maarten van der Schrieck Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231223141650.10679-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 58f65f9 commit 180a8f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/input/touchscreen/goodix.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,8 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
884884
}
885885
}
886886

887-
if (ts->gpio_count == 2 && ts->gpio_int_idx == 0) {
887+
/* Some devices with gpio_int_idx 0 list a third unused GPIO */
888+
if ((ts->gpio_count == 2 || ts->gpio_count == 3) && ts->gpio_int_idx == 0) {
888889
ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
889890
gpio_mapping = acpi_goodix_int_first_gpios;
890891
} else if (ts->gpio_count == 2 && ts->gpio_int_idx == 1) {

0 commit comments

Comments
 (0)