From: Hardik Prakash Date: Fri, 29 May 2026 10:08:36 +0000 (+0530) Subject: Revert "pinctrl-amd: enable IRQ for WACF2200 touchscreen on Lenovo Yoga 7 14AGP11" X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3f786abd23951f3f600a62fef42469d9200d5f52;p=thirdparty%2Flinux.git Revert "pinctrl-amd: enable IRQ for WACF2200 touchscreen on Lenovo Yoga 7 14AGP11" This reverts commit 3812a9e84265a5cdd90d29fe8d97a023e91fb945. The probe ordering fix in the following patch ensures amd_gpio_probe() completes before i2c-designware probes AMDI0010:02, allowing the existing amd_gpio_irq_enable() flow to work correctly. The manual IRQ restoration added by this patch is therefore no longer needed. Link: https://bugzilla.kernel.org/show_bug.cgi?id=221494 Signed-off-by: Hardik Prakash Reviewed-by: Mario Limonciello (AMD) Fixes: 3812a9e84265a ("pinctrl-amd: enable IRQ for WACF2200 touchscreen on Lenovo Yoga 7 14AGP11") Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index 64315b0edf2a..e3128b0045d2 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -40,39 +39,6 @@ static struct amd_gpio *pinctrl_dev; #endif -static const struct dmi_system_id amd_gpio_quirk_yoga7_14agp11[] = { - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_NAME, "83TD"), - DMI_MATCH(DMI_BOARD_NAME, "LNVNB161216"), - }, - }, - { } -}; - -static void amd_gpio_apply_quirks(struct amd_gpio *gpio_dev) -{ - const unsigned int pin = 157; /* WACF2200 GpioInt per ACPI _CRS */ - unsigned long flags; - u32 reg; - - if (!dmi_check_system(amd_gpio_quirk_yoga7_14agp11)) - return; - if (pin >= gpio_dev->gc.ngpio) - return; - - raw_spin_lock_irqsave(&gpio_dev->lock, flags); - reg = readl(gpio_dev->base + pin * 4); - reg |= BIT(INTERRUPT_ENABLE_OFF) | BIT(INTERRUPT_MASK_OFF); - writel(reg, gpio_dev->base + pin * 4); - raw_spin_unlock_irqrestore(&gpio_dev->lock, flags); - - dev_info(&gpio_dev->pdev->dev, - "Enabled IRQ for GPIO %u (Yoga 7 14AGP11 touchscreen)\n", - pin); -} - static int amd_gpio_get_direction(struct gpio_chip *gc, unsigned offset) { unsigned long flags; @@ -1253,7 +1219,6 @@ static int amd_gpio_probe(struct platform_device *pdev) /* Disable and mask interrupts */ amd_gpio_irq_init(gpio_dev); - amd_gpio_apply_quirks(gpio_dev); girq = &gpio_dev->gc.irq; gpio_irq_chip_set_chip(girq, &amd_gpio_irqchip);