* [PATCH v2] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
@ 2025-04-14 20:35 Mario Limonciello
2025-04-15 13:34 ` Linus Walleij
0 siblings, 1 reply; 5+ messages in thread
From: Mario Limonciello @ 2025-04-14 20:35 UTC (permalink / raw)
To: Rafael J . Wysocki
Cc: Linus Walleij, open list:PIN CONTROL SUBSYSTEM, open list,
linux-acpi, Basavaraj Natikar, Shyam Sundar S K,
Mario Limonciello, kernel test robot
From: Mario Limonciello <mario.limonciello@amd.com>
`pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
`CONFIG_PM_SLEEP` so the functions that use it need the same scope.
Adjust checks to look for both, and while updating make it CONFIG_SUSPEND
instead as that's what the acpi header uses.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v2:
Use CONFIG_SUSPEND instead of CONFIG_PM_SLEEP
---
drivers/pinctrl/pinctrl-amd.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index b6fafed79b289..60252830ff410 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -37,7 +37,9 @@
#include "pinctrl-utils.h"
#include "pinctrl-amd.h"
+#ifdef CONFIG_SUSPEND
static struct amd_gpio *pinctrl_dev;
+#endif
static int amd_gpio_get_direction(struct gpio_chip *gc, unsigned offset)
{
@@ -892,7 +894,7 @@ static void amd_gpio_irq_init(struct amd_gpio *gpio_dev)
}
}
-#ifdef CONFIG_PM_SLEEP
+#ifdef CONFIG_SUSPEND
static bool amd_gpio_should_save(struct amd_gpio *gpio_dev, unsigned int pin)
{
const struct pin_desc *pd = pin_desc_get(gpio_dev->pctrl, pin);
@@ -1143,7 +1145,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
if (gpio_dev->irq < 0)
return gpio_dev->irq;
-#ifdef CONFIG_PM_SLEEP
+#ifdef CONFIG_SUSPEND
gpio_dev->saved_regs = devm_kcalloc(&pdev->dev, amd_pinctrl_desc.npins,
sizeof(*gpio_dev->saved_regs),
GFP_KERNEL);
@@ -1209,7 +1211,7 @@ static int amd_gpio_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, gpio_dev);
acpi_register_wakeup_handler(gpio_dev->irq, amd_gpio_check_wake, gpio_dev);
-#ifdef CONFIG_ACPI
+#if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
acpi_register_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
#endif
@@ -1230,7 +1232,7 @@ static void amd_gpio_remove(struct platform_device *pdev)
gpiochip_remove(&gpio_dev->gc);
acpi_unregister_wakeup_handler(amd_gpio_check_wake, gpio_dev);
-#ifdef CONFIG_ACPI
+#if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND)
acpi_unregister_lps0_dev(&pinctrl_amd_s2idle_dev_ops);
#endif
}
@@ -1249,7 +1251,7 @@ static struct platform_driver amd_gpio_driver = {
.driver = {
.name = "amd_gpio",
.acpi_match_table = ACPI_PTR(amd_gpio_acpi_match),
-#ifdef CONFIG_PM_SLEEP
+#ifdef CONFIG_SUSPEND
.pm = &amd_gpio_pm_ops,
#endif
},
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
2025-04-14 20:35 [PATCH v2] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops' Mario Limonciello
@ 2025-04-15 13:34 ` Linus Walleij
2025-04-15 13:37 ` Mario Limonciello
2025-04-15 13:37 ` Rafael J. Wysocki
0 siblings, 2 replies; 5+ messages in thread
From: Linus Walleij @ 2025-04-15 13:34 UTC (permalink / raw)
To: Mario Limonciello
Cc: Rafael J . Wysocki, open list:PIN CONTROL SUBSYSTEM, open list,
linux-acpi, Basavaraj Natikar, Shyam Sundar S K,
Mario Limonciello, kernel test robot
On Mon, Apr 14, 2025 at 10:35 PM Mario Limonciello <superm1@kernel.org> wrote:
> From: Mario Limonciello <mario.limonciello@amd.com>
>
> `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
> `CONFIG_PM_SLEEP` so the functions that use it need the same scope.
>
> Adjust checks to look for both, and while updating make it CONFIG_SUSPEND
> instead as that's what the acpi header uses.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> v2:
> Use CONFIG_SUSPEND instead of CONFIG_PM_SLEEP
This seems to be based on the previous fixes merged by Rafael?
Do I need to rebase on -rc2 or something to merge this patch?
Or can Rafael queue this too?
In that case:
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
2025-04-15 13:34 ` Linus Walleij
@ 2025-04-15 13:37 ` Mario Limonciello
2025-04-15 13:37 ` Rafael J. Wysocki
1 sibling, 0 replies; 5+ messages in thread
From: Mario Limonciello @ 2025-04-15 13:37 UTC (permalink / raw)
To: Linus Walleij
Cc: Rafael J . Wysocki, open list:PIN CONTROL SUBSYSTEM, open list,
linux-acpi, Basavaraj Natikar, Shyam Sundar S K,
Mario Limonciello, kernel test robot
On 4/15/2025 8:34 AM, Linus Walleij wrote:
> On Mon, Apr 14, 2025 at 10:35 PM Mario Limonciello <superm1@kernel.org> wrote:
>
>> From: Mario Limonciello <mario.limonciello@amd.com>
>>
>> `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
>> `CONFIG_PM_SLEEP` so the functions that use it need the same scope.
>>
>> Adjust checks to look for both, and while updating make it CONFIG_SUSPEND
>> instead as that's what the acpi header uses.
>>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>> ---
>> v2:
>> Use CONFIG_SUSPEND instead of CONFIG_PM_SLEEP
>
> This seems to be based on the previous fixes merged by Rafael?
>
> Do I need to rebase on -rc2 or something to merge this patch?
>
> Or can Rafael queue this too?
> In that case:
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Yours,
> Linus Walleij
Yeah; I think Rafael should take it as the other patches are in his
tree. No other pinctrl-amd stuff planned this cycle that I know about.
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
2025-04-15 13:34 ` Linus Walleij
2025-04-15 13:37 ` Mario Limonciello
@ 2025-04-15 13:37 ` Rafael J. Wysocki
2025-04-24 20:07 ` Rafael J. Wysocki
1 sibling, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2025-04-15 13:37 UTC (permalink / raw)
To: Linus Walleij
Cc: Mario Limonciello, Rafael J . Wysocki,
open list:PIN CONTROL SUBSYSTEM, open list, linux-acpi,
Basavaraj Natikar, Shyam Sundar S K, Mario Limonciello,
kernel test robot
On Tue, Apr 15, 2025 at 3:34 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Apr 14, 2025 at 10:35 PM Mario Limonciello <superm1@kernel.org> wrote:
>
> > From: Mario Limonciello <mario.limonciello@amd.com>
> >
> > `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
> > `CONFIG_PM_SLEEP` so the functions that use it need the same scope.
> >
> > Adjust checks to look for both, and while updating make it CONFIG_SUSPEND
> > instead as that's what the acpi header uses.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
> > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > ---
> > v2:
> > Use CONFIG_SUSPEND instead of CONFIG_PM_SLEEP
>
> This seems to be based on the previous fixes merged by Rafael?
>
> Do I need to rebase on -rc2 or something to merge this patch?
>
> Or can Rafael queue this too?
I can.
> In that case:
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops'
2025-04-15 13:37 ` Rafael J. Wysocki
@ 2025-04-24 20:07 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2025-04-24 20:07 UTC (permalink / raw)
To: Mario Limonciello
Cc: Linus Walleij, Rafael J . Wysocki,
open list:PIN CONTROL SUBSYSTEM, open list, linux-acpi,
Basavaraj Natikar, Shyam Sundar S K, Mario Limonciello,
kernel test robot
On Tue, Apr 15, 2025 at 3:37 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Tue, Apr 15, 2025 at 3:34 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> >
> > On Mon, Apr 14, 2025 at 10:35 PM Mario Limonciello <superm1@kernel.org> wrote:
> >
> > > From: Mario Limonciello <mario.limonciello@amd.com>
> > >
> > > `pinctrl_amd_s2idle_dev_ops` is hidden under both `CONFIG_ACPI` and
> > > `CONFIG_PM_SLEEP` so the functions that use it need the same scope.
> > >
> > > Adjust checks to look for both, and while updating make it CONFIG_SUSPEND
> > > instead as that's what the acpi header uses.
> > >
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202504100420.88UPkUTU-lkp@intel.com/
> > > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > > ---
> > > v2:
> > > Use CONFIG_SUSPEND instead of CONFIG_PM_SLEEP
> >
> > This seems to be based on the previous fixes merged by Rafael?
> >
> > Do I need to rebase on -rc2 or something to merge this patch?
> >
> > Or can Rafael queue this too?
>
> I can.
>
> > In that case:
> > Acked-by: Linus Walleij <linus.walleij@linaro.org>
Applied as 6.16 material, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-24 20:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 20:35 [PATCH v2] pinctrl: amd: Fix use of undeclared identifier 'pinctrl_amd_s2idle_dev_ops' Mario Limonciello
2025-04-15 13:34 ` Linus Walleij
2025-04-15 13:37 ` Mario Limonciello
2025-04-15 13:37 ` Rafael J. Wysocki
2025-04-24 20:07 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox