* [PATCH v4] gpio: amdpt: add new device ID and 24-pin support
@ 2021-12-10 9:03 Yuchang Hsu
2021-12-10 11:32 ` Andy Shevchenko
2021-12-13 14:05 ` Bartosz Golaszewski
0 siblings, 2 replies; 4+ messages in thread
From: Yuchang Hsu @ 2021-12-10 9:03 UTC (permalink / raw)
To: linus.walleij, brgl, Richard_Hsu, andriy.shevchenko
Cc: linux-gpio, linux-kernel, Yd_Tseng, Cindy1_Hsu, Andrew_Su
From: Hsu Yuchang <Richard_Hsu@asmedia.com.tw>
Add an ACPI HID(AMDIF031) and pin number in the pt_gpio_acpi_match.
Signed-off-by: Yuchang Hsu <Richard_Hsu@asmedia.com.tw>
---
Reposition and modify the changelog
drivers/gpio/gpio-amdpt.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
index bbf53e289141..13f4e2af3800 100644
--- a/drivers/gpio/gpio-amdpt.c
+++ b/drivers/gpio/gpio-amdpt.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#define PT_TOTAL_GPIO 8
+#define PT_TOTAL_GPIO_EX 24
/* PCI-E MMIO register offsets */
#define PT_DIRECTION_REG 0x00
@@ -103,7 +104,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
pt_gpio->gc.owner = THIS_MODULE;
pt_gpio->gc.request = pt_gpio_request;
pt_gpio->gc.free = pt_gpio_free;
- pt_gpio->gc.ngpio = PT_TOTAL_GPIO;
+ pt_gpio->gc.ngpio = (uintptr_t)device_get_match_data(dev);
#if defined(CONFIG_OF_GPIO)
pt_gpio->gc.of_node = dev->of_node;
#endif
@@ -133,8 +134,9 @@ static int pt_gpio_remove(struct platform_device *pdev)
}
static const struct acpi_device_id pt_gpio_acpi_match[] = {
- { "AMDF030", 0 },
- { "AMDIF030", 0 },
+ { "AMDF030", PT_TOTAL_GPIO },
+ { "AMDIF030", PT_TOTAL_GPIO },
+ { "AMDIF031", PT_TOTAL_GPIO_EX },
{ },
};
MODULE_DEVICE_TABLE(acpi, pt_gpio_acpi_match);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4] gpio: amdpt: add new device ID and 24-pin support
2021-12-10 9:03 [PATCH v4] gpio: amdpt: add new device ID and 24-pin support Yuchang Hsu
@ 2021-12-10 11:32 ` Andy Shevchenko
[not found] ` <3dd07ebd15f6450a8efa73402b22ffa8@asmedia.com.tw>
2021-12-13 14:05 ` Bartosz Golaszewski
1 sibling, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2021-12-10 11:32 UTC (permalink / raw)
To: Yuchang Hsu
Cc: linus.walleij, brgl, Richard_Hsu, linux-gpio, linux-kernel,
Yd_Tseng, Cindy1_Hsu, Andrew_Su
On Fri, Dec 10, 2021 at 05:03:15PM +0800, Yuchang Hsu wrote:
> From: Hsu Yuchang <Richard_Hsu@asmedia.com.tw>
>
> Add an ACPI HID(AMDIF031) and pin number in the pt_gpio_acpi_match.
Very well!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Yuchang Hsu <Richard_Hsu@asmedia.com.tw>
> ---
> Reposition and modify the changelog
> drivers/gpio/gpio-amdpt.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
> index bbf53e289141..13f4e2af3800 100644
> --- a/drivers/gpio/gpio-amdpt.c
> +++ b/drivers/gpio/gpio-amdpt.c
> @@ -14,6 +14,7 @@
> #include <linux/platform_device.h>
>
> #define PT_TOTAL_GPIO 8
> +#define PT_TOTAL_GPIO_EX 24
>
> /* PCI-E MMIO register offsets */
> #define PT_DIRECTION_REG 0x00
> @@ -103,7 +104,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
> pt_gpio->gc.owner = THIS_MODULE;
> pt_gpio->gc.request = pt_gpio_request;
> pt_gpio->gc.free = pt_gpio_free;
> - pt_gpio->gc.ngpio = PT_TOTAL_GPIO;
> + pt_gpio->gc.ngpio = (uintptr_t)device_get_match_data(dev);
> #if defined(CONFIG_OF_GPIO)
> pt_gpio->gc.of_node = dev->of_node;
> #endif
> @@ -133,8 +134,9 @@ static int pt_gpio_remove(struct platform_device *pdev)
> }
>
> static const struct acpi_device_id pt_gpio_acpi_match[] = {
> - { "AMDF030", 0 },
> - { "AMDIF030", 0 },
> + { "AMDF030", PT_TOTAL_GPIO },
> + { "AMDIF030", PT_TOTAL_GPIO },
> + { "AMDIF031", PT_TOTAL_GPIO_EX },
> { },
> };
> MODULE_DEVICE_TABLE(acpi, pt_gpio_acpi_match);
> --
> 2.30.2
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] gpio: amdpt: add new device ID and 24-pin support
2021-12-10 9:03 [PATCH v4] gpio: amdpt: add new device ID and 24-pin support Yuchang Hsu
2021-12-10 11:32 ` Andy Shevchenko
@ 2021-12-13 14:05 ` Bartosz Golaszewski
1 sibling, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2021-12-13 14:05 UTC (permalink / raw)
To: Yuchang Hsu
Cc: Linus Walleij, Richard_Hsu, Andy Shevchenko,
open list:GPIO SUBSYSTEM, Linux Kernel Mailing List, Yd_Tseng,
Cindy1_Hsu, Andrew_Su
On Fri, Dec 10, 2021 at 10:03 AM Yuchang Hsu <saraon640529@gmail.com> wrote:
>
> From: Hsu Yuchang <Richard_Hsu@asmedia.com.tw>
>
> Add an ACPI HID(AMDIF031) and pin number in the pt_gpio_acpi_match.
>
> Signed-off-by: Yuchang Hsu <Richard_Hsu@asmedia.com.tw>
> ---
> Reposition and modify the changelog
> drivers/gpio/gpio-amdpt.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-amdpt.c b/drivers/gpio/gpio-amdpt.c
> index bbf53e289141..13f4e2af3800 100644
> --- a/drivers/gpio/gpio-amdpt.c
> +++ b/drivers/gpio/gpio-amdpt.c
> @@ -14,6 +14,7 @@
> #include <linux/platform_device.h>
>
> #define PT_TOTAL_GPIO 8
> +#define PT_TOTAL_GPIO_EX 24
>
> /* PCI-E MMIO register offsets */
> #define PT_DIRECTION_REG 0x00
> @@ -103,7 +104,7 @@ static int pt_gpio_probe(struct platform_device *pdev)
> pt_gpio->gc.owner = THIS_MODULE;
> pt_gpio->gc.request = pt_gpio_request;
> pt_gpio->gc.free = pt_gpio_free;
> - pt_gpio->gc.ngpio = PT_TOTAL_GPIO;
> + pt_gpio->gc.ngpio = (uintptr_t)device_get_match_data(dev);
> #if defined(CONFIG_OF_GPIO)
> pt_gpio->gc.of_node = dev->of_node;
> #endif
> @@ -133,8 +134,9 @@ static int pt_gpio_remove(struct platform_device *pdev)
> }
>
> static const struct acpi_device_id pt_gpio_acpi_match[] = {
> - { "AMDF030", 0 },
> - { "AMDIF030", 0 },
> + { "AMDF030", PT_TOTAL_GPIO },
> + { "AMDIF030", PT_TOTAL_GPIO },
> + { "AMDIF031", PT_TOTAL_GPIO_EX },
> { },
> };
> MODULE_DEVICE_TABLE(acpi, pt_gpio_acpi_match);
> --
> 2.30.2
>
Applied, thanks!
Bart
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v4] gpio: amdpt: add new device ID and 24-pin support
[not found] ` <3dd07ebd15f6450a8efa73402b22ffa8@asmedia.com.tw>
@ 2022-01-04 14:04 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-01-04 14:04 UTC (permalink / raw)
To: Richard Hsu(許育彰), linux-gpio
Cc: Yuchang Hsu, Yd Tseng(曾裕達),
Cindy1 Hsu(許凱茵),
Andrew Su(蘇俊源)
On Mon, Jan 03, 2022 at 02:42:00AM +0000, Richard Hsu(許育彰) wrote:
> Hi Andy!
> I need to wait for new kernel for this patch or I still need to do something later.
Please, do not top post and do not send this kind of messages privately (Cc ML back).
To answer your question:
$ git tag --contains 2ac5eb840f1da
next-20211223
next-20211224
next-20220104
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Friday, December 10, 2021 7:33 PM
> On Fri, Dec 10, 2021 at 05:03:15PM +0800, Yuchang Hsu wrote:
> > From: Hsu Yuchang <Richard_Hsu@asmedia.com.tw>
> >
> > Add an ACPI HID(AMDIF031) and pin number in the pt_gpio_acpi_match.
>
> Very well!
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-04 14:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 9:03 [PATCH v4] gpio: amdpt: add new device ID and 24-pin support Yuchang Hsu
2021-12-10 11:32 ` Andy Shevchenko
[not found] ` <3dd07ebd15f6450a8efa73402b22ffa8@asmedia.com.tw>
2022-01-04 14:04 ` Andy Shevchenko
2021-12-13 14:05 ` Bartosz Golaszewski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.