lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB8459B53FEFB119A446473268884EA@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Tue, 8 Jul 2025 01:32:15 +0000
From: Peng Fan <peng.fan@....com>
To: Sudeep Holla <sudeep.holla@....com>
CC: Cristian Marussi <cristian.marussi@....com>, "arm-scmi@...r.kernel.org"
	<arm-scmi@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Ranjani Vaidyanathan
	<ranjani.vaidyanathan@....com>, Chuck Cannon <chuck.cannon@....com>
Subject: RE: [PATCH v2 1/2] firmware: arm_scmi: bus: Add pm ops

> Subject: Re: [PATCH v2 1/2] firmware: arm_scmi: bus: Add pm ops
> 
> On Fri, Jul 04, 2025 at 11:09:35AM +0800, Peng Fan wrote:
> > Take platform_pm_ops as reference. Add pm ops for scmi_bus_type,
> then
> > the scmi devices under scmi bus could have their own hooks for
> > suspend, resume function.
> >
> > Signed-off-by: Peng Fan <peng.fan@....com>
> > ---
> >  drivers/firmware/arm_scmi/bus.c | 33
> > +++++++++++++++++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> >
> > diff --git a/drivers/firmware/arm_scmi/bus.c
> > b/drivers/firmware/arm_scmi/bus.c index
> >
> 1adef03894751dae9bb752b8c7f86e5d01c5d4fd..b6ade837ecea34f14
> 7fc1b734c55
> > eafecca5ae0c 100644
> > --- a/drivers/firmware/arm_scmi/bus.c
> > +++ b/drivers/firmware/arm_scmi/bus.c
> > @@ -323,6 +323,38 @@ static struct attribute
> > *scmi_device_attributes_attrs[] = {  };
> > ATTRIBUTE_GROUPS(scmi_device_attributes);
> >
> > +#ifdef CONFIG_SUSPEND
> > +static int scmi_pm_suspend(struct device *dev) {
> > +	const struct device_driver *drv = dev->driver;
> > +
> > +	if (drv && drv->pm && drv->pm->suspend)
> > +		return drv->pm->suspend(dev);
> > +
> > +	return 0;
> > +}
> > +
> > +static int scmi_pm_resume(struct device *dev) {
> > +	const struct device_driver *drv = dev->driver;
> > +
> > +	if (drv && drv->pm && drv->pm->resume)
> > +		return drv->pm->resume(dev);
> > +
> > +	return 0;
> > +}
> > +
> > +static const struct dev_pm_ops scmi_dev_pm_ops = {
> > +	.suspend = scmi_pm_suspend,
> 
> I have use pm_sleep_ptr() and removed the below NULL based struct.
> Have a look at for-next/scmi/updates and let me know if you are happy
> with that.

Thanks for the cleanup. Seems kernel build bot report a failure, not
sure related to this macro or else, I am still trying to see what happens.

Thanks,
Peng.

> 
> --
> Regards,
> Sudeep


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ