RE: [PATCH v2] gpio: amdptpci: add support for AMD PT PCI controller

From: Szuying Chen

Date: Mon Oct 19 2026 - 03:00:15 EST


Hi Markus,

>> This commit implements the new gpio-amdptpci driver to support the
>…

>See also:
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.3-rc7#n94

>> Signed-off-by: Szuying Chen <Chloe_Chen@xxxxxxxxxxxxxx>>
>> Co-authored-by: YD Tseng <Yd_Tseng@xxxxxxxxxxxxxx>>

>See also:
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.3-rc7#n502

>> v1->v2:
>…
>> ---
>…
>> drivers/gpio/gpio-amdptpci.c | 891
>> +++++++++++++++++++++++++++++++++++

>Please move patch version descriptions behind the marker line.
>https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.3-rc7#n793

I will correct the patch format in v3.
>…
>> +++ b/drivers/gpio/gpio-amdptpci.c
>> @@ -0,0 +1,891 @@
>…
>> +static int pt27_gpio_get_direction(struct gpio_chip *gc, unsigned int
>> +offset) {
>…
>> + raw_spin_lock_irqsave(&chip->lock, flags);
>> + val = pt27_rd32(chip, PT27_REG_DIR);
>> + raw_spin_unlock_irqrestore(&chip->lock, flags);
>…

>Under which circumstances would you become interested to apply a statement like “guard(raw_spinlock_irqsave)(&chip->>lock);”?
>https://elixir.bootlin.com/linux/v7.3-rc6/source/include/linux/spinlock.h#L594-L597

Thanks for the pointer. Simple lock/unlock sections like the one in
pt27_gpio_get_direction() are good candidates for guard(raw_spinlock_irqsave),
and we will use it where it fits in v3.

>Regards,
>Markus

thanks,

Best regards,
Chloe Chen
==================================================================================================================
This email and any attachments to it contain confidential information and are intended solely for the use of the individual to whom it
is addressed.If you are not the intended recipient or receive it accidentally, please immediately notify the sender by e-mail and delete
the message and any attachments from your computer system, and destroy all hard copies. If any, please be advised that any unauthorized
disclosure, copying, distribution or any action taken or omitted in reliance on this, is illegal and prohibited. Furthermore, any views
or opinions expressed are solely those of the author and do not represent those of ASMedia Technology Inc. Thank you for your cooperation.
==================================================================================================================