Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: amdpt: add new device ID and 24-pin support

Add an ACPI HID(AMDIF031) and pin number in the pt_gpio_acpi_match.

Signed-off-by: Yuchang Hsu <Richard_Hsu@asmedia.com.tw>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>

authored by

Hsu Yuchang and committed by
Bartosz Golaszewski
2ac5eb84 1db9b241

+5 -3
+5 -3
drivers/gpio/gpio-amdpt.c
··· 14 14 #include <linux/platform_device.h> 15 15 16 16 #define PT_TOTAL_GPIO 8 17 + #define PT_TOTAL_GPIO_EX 24 17 18 18 19 /* PCI-E MMIO register offsets */ 19 20 #define PT_DIRECTION_REG 0x00 ··· 104 103 pt_gpio->gc.owner = THIS_MODULE; 105 104 pt_gpio->gc.request = pt_gpio_request; 106 105 pt_gpio->gc.free = pt_gpio_free; 107 - pt_gpio->gc.ngpio = PT_TOTAL_GPIO; 106 + pt_gpio->gc.ngpio = (uintptr_t)device_get_match_data(dev); 108 107 #if defined(CONFIG_OF_GPIO) 109 108 pt_gpio->gc.of_node = dev->of_node; 110 109 #endif ··· 134 133 } 135 134 136 135 static const struct acpi_device_id pt_gpio_acpi_match[] = { 137 - { "AMDF030", 0 }, 138 - { "AMDIF030", 0 }, 136 + { "AMDF030", PT_TOTAL_GPIO }, 137 + { "AMDIF030", PT_TOTAL_GPIO }, 138 + { "AMDIF031", PT_TOTAL_GPIO_EX }, 139 139 { }, 140 140 }; 141 141 MODULE_DEVICE_TABLE(acpi, pt_gpio_acpi_match);