* [PATCH v2] firmware: arm_scmi: pm: use DEFINE_SIMPLE_DEV_PM_OPS for pm struct
@ 2026-08-20 2:17 Li Jun
2026-08-20 5:10 ` Uwe Kleine-König
0 siblings, 1 reply; 2+ messages in thread
From: Li Jun @ 2026-08-20 2:17 UTC (permalink / raw)
To: lijun01, sudeep.holla, cristian.marussi, arm-scmi,
linux-arm-kernel
use DEFINE_SIMPLE_DEV_PM_OPS for scmi_dev_pm_ops,and add the value of
.freeze .thaw .poweroff .restore.if these address are null, may cause
error in s4.
Change:
-Replace SIMPLE_DEV_PM_OPS() in v1 with DEFINE_SIMPLE_DEV_PM_OPS() for pm.
Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
drivers/firmware/arm_scmi/bus.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index e060edbe7e83..c3af5eb549e1 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/device.h>
+#include <linux/pm.h>
#include "common.h"
@@ -361,10 +362,7 @@ static int scmi_pm_resume(struct device *dev)
return 0;
}
-static const struct dev_pm_ops scmi_dev_pm_ops = {
- .suspend = pm_sleep_ptr(scmi_pm_suspend),
- .resume = pm_sleep_ptr(scmi_pm_resume),
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(scmi_dev_pm_ops, scmi_pm_suspend, scmi_pm_resume);
const struct bus_type scmi_bus_type = {
.name = "scmi_protocol",
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2] firmware: arm_scmi: pm: use DEFINE_SIMPLE_DEV_PM_OPS for pm struct
2026-08-20 2:17 [PATCH v2] firmware: arm_scmi: pm: use DEFINE_SIMPLE_DEV_PM_OPS for pm struct Li Jun
@ 2026-08-20 5:10 ` Uwe Kleine-König
0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2026-08-20 5:10 UTC (permalink / raw)
To: Li Jun; +Cc: sudeep.holla, cristian.marussi, arm-scmi, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
On Thu, Aug 20, 2026 at 10:17:18AM +0800, Li Jun wrote:
> use DEFINE_SIMPLE_DEV_PM_OPS for scmi_dev_pm_ops,and add the value of
> .freeze .thaw .poweroff .restore.if these address are null, may cause
> error in s4.
>
> Change:
> -Replace SIMPLE_DEV_PM_OPS() in v1 with DEFINE_SIMPLE_DEV_PM_OPS() for pm.
>
> Signed-off-by: Li Jun <lijun01@kylinos.cn>
The things I wrote at
https://lore.kernel.org/all/aoaFlNcXC8zfS0j5@monoceros/ mostly apply
here, too.
TL;DR: Wrong placement of inter-revision changelog, missing
pm_sleep_ptr(), and maybe most prominently the request for patience to
start with a single patch and learn from the feedback for later patches.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-20 5:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 2:17 [PATCH v2] firmware: arm_scmi: pm: use DEFINE_SIMPLE_DEV_PM_OPS for pm struct Li Jun
2026-08-20 5:10 ` Uwe Kleine-König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox