* [PATCH v3 0/2] Add LPS0 check() for pinctrl-amd
@ 2025-02-27 20:50 Mario Limonciello
2025-02-27 20:50 ` [PATCH v3 1/2] ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case Mario Limonciello
0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2025-02-27 20:50 UTC (permalink / raw)
To: mario.limonciello, Basavaraj.Natikar, linus.walleij, rafael,
Shyam-sundar.S-k
Cc: linux-acpi, linux-gpio
From: Mario Limonciello <mario.limonciello@amd.com>
During suspend the pinctrl_amd driver disables the interrupts for
any GPIOs that are not marked as wake sources.
This however does not prevent them from changing the wake status
bit during suspend, it just stops the system from waking.
If the system wakes from hardware sleep for another reason (such
as plugging in the AC adapter) this wake bits might be active.
This could potentially cause problems with going back to hardware
sleep. Add an extra debugging message when PM debugging is enabled
to help identify if this is happening.
Mario Limonciello (2):
ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
pinctrl: amd: Add an LPS0 check() callback
drivers/pinctrl/pinctrl-amd.c | 28 ++++++++++++++++++++++++++++
include/linux/acpi.h | 9 ++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v3 1/2] ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
2025-02-27 20:50 [PATCH v3 0/2] Add LPS0 check() for pinctrl-amd Mario Limonciello
@ 2025-02-27 20:50 ` Mario Limonciello
0 siblings, 0 replies; 2+ messages in thread
From: Mario Limonciello @ 2025-02-27 20:50 UTC (permalink / raw)
To: mario.limonciello, rafael; +Cc: kernel test robot, linux-acpi
From: Mario Limonciello <mario.limonciello@amd.com>
acpi_register_lps0_dev() and acpi_unregister_lps0_dev() may be used
in drivers that don't require CONFIG_SUSPEND or compile on !X86.
Add prototypes for those cases.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502191627.fRgoBwcZ-lkp@intel.com/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
v3:
* Add struct acpi_s2idle_dev_ops outside defines too
---
include/linux/acpi.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 4e495b29c640f..8d2abe5dede93 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1115,13 +1115,13 @@ void acpi_os_set_prepare_extended_sleep(int (*func)(u8 sleep_state,
acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state,
u32 val_a, u32 val_b);
-#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
struct acpi_s2idle_dev_ops {
struct list_head list_node;
void (*prepare)(void);
void (*check)(void);
void (*restore)(void);
};
+#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
int acpi_get_lps0_constraint(struct acpi_device *adev);
@@ -1130,6 +1130,13 @@ static inline int acpi_get_lps0_constraint(struct device *dev)
{
return ACPI_STATE_UNKNOWN;
}
+static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
+{
+ return -ENODEV;
+}
+static inline void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
+{
+}
#endif /* CONFIG_SUSPEND && CONFIG_X86 */
void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
#else
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-27 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 20:50 [PATCH v3 0/2] Add LPS0 check() for pinctrl-amd Mario Limonciello
2025-02-27 20:50 ` [PATCH v3 1/2] ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case Mario Limonciello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox