]> git.itanic.dy.fi Git - linux-stable/commit
platform/x86: x86-android-tablets: Fix keyboard touchscreen on Lenovo Yogabook1 X90
authorHans de Goede <hdegoede@redhat.com>
Fri, 16 Feb 2024 20:17:18 +0000 (21:17 +0100)
committerHans de Goede <hdegoede@redhat.com>
Tue, 20 Feb 2024 13:35:35 +0000 (14:35 +0100)
commitbd8905d70944aae5063fd91c667e6f846ee92718
tree8fbff775a710925d4c57fd09f3bb602f6a5892fa
parent76d41fb063338781e936765b7ed74224215ca178
platform/x86: x86-android-tablets: Fix keyboard touchscreen on Lenovo Yogabook1 X90

After commit 4014ae236b1d ("platform/x86: x86-android-tablets: Stop using
gpiolib private APIs") the touchscreen in the keyboard half of
the Lenovo Yogabook1 X90 stopped working with the following error:

 Goodix-TS i2c-goodix_ts: error -EBUSY: Failed to get irq GPIO

The problem is that when getting the IRQ for instantiated i2c_client-s
from a GPIO (rather then using an IRQ directly from the IOAPIC),
x86_acpi_irq_helper_get() now properly requests the GPIO, which disallows
other drivers from requesting it. Normally this is a good thing, but
the goodix touchscreen also uses the IRQ as an output during reset
to select which of its 2 possible I2C addresses should be used.

Add a new free_gpio flag to struct x86_acpi_irq_data to deal with this
and release the GPIO after getting the IRQ in this special case.

Fixes: 4014ae236b1d ("platform/x86: x86-android-tablets: Stop using gpiolib private APIs")
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240216201721.239791-2-hdegoede@redhat.com
drivers/platform/x86/x86-android-tablets/core.c
drivers/platform/x86/x86-android-tablets/lenovo.c
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h