Skip to contentSkip to conversation

Input: goodix - Accept ACPI resources with gpio_count == 3 && gpio_int_idx == 0

PATCH Applied Hans de Goede 2 participants 2 messages Dec 23, 2023 – Jan 19, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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
Suggested-by Maarten van der Schrieck
Tested-by Maarten van der Schrieck

---
Note Maarten has requested for their email to not be made public.

---
 drivers/input/touchscreen/goodix.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/touchscreen/goodix.c +2 -1
index af32fbe57b63..b068ff8afbc9 100644
@@ -884,7 +884,8 @@ static int goodix_add_acpi_gpio_mappings(struct goodix_ts_data *ts)
 		}
 	}
 
-	if (ts->gpio_count == 2 && ts->gpio_int_idx == 0) {
+	/* Some devices with gpio_int_idx 0 list a third unused GPIO */
+	if ((ts->gpio_count == 2 || ts->gpio_count == 3) && ts->gpio_int_idx == 0) {
 		ts->irq_pin_access_method = IRQ_PIN_ACCESS_ACPI_GPIO;
 		gpio_mapping = acpi_goodix_int_first_gpios;
 	} else if (ts->gpio_count == 2 && ts->gpio_int_idx == 1) {
Signature · 1 line
2.41.0
maintainer Applied
#1 lore raw
Quoted 14 lines · Hans de Goede

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.

Quoted 5 lines
Reported-by Maarten van der Schrieck
Suggested-by Maarten van der Schrieck
Tested-by Maarten van der Schrieck

Applied, thank you.

Signature · 1 line
Dmitry