soundwire: master: enable pm runtime
Bard Liao
maintainerPATCH 1/1 soundwire: master: enable pm runtime
We should enable pm runtime.
--- drivers/soundwire/master.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/soundwire/master.c +2 -0
@@ -154,6 +154,7 @@ int sdw_master_device_add(struct sdw_bus *bus, struct device *parent, bus->dev = &md->dev; bus->md = md; +pm_runtime_enable (&bus->md->dev); device_register_err:return ret; }
@@ -166,6 +167,7 @@ int sdw_master_device_add(struct sdw_bus *bus, struct device *parent,*/ int sdw_master_device_del (struct sdw_bus *bus) { +pm_runtime_disable (&bus->md->dev);device_unregister (bus->dev);return 0 ;
Signature · 1 line
2.17.1
Quoted 1 line · Bard Liao
We should enable pm runtime.
Because why?
Please read the documentation about how to write good changelog comments...
greg k-h
Quoted 13 lines
-----Original Message-----
From: Greg KH <[email protected]>
Sent: Friday, July 24, 2020 4:32 PM
To: Bard Liao <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Kale, Sanyog R <[email protected]>; Lin, Mengdong <[email protected]>; Liao, Bard <[email protected]>
Subject: Re: [PATCH] soundwire: master: enable pm runtime
Quoted 4 lines
Quoted 1 line · Bard Liao
We should enable pm runtime.
Because why?
The hierarchy of soundwire devices is platform device -> M device -> S device. A S device is physically attached on the platform device. So the platform device should be resumed when a S device is resumed. As the bridge of platform device and S device, we have to implement runtime pm on M driver. We have set runtime pm ops in M driver already, but still need to enable runtime pm.
Quoted 3 lines
Please read the documentation about how to write good changelog comments...
Sure. I will update the changelog in next version. Thanks for the advice.
Quoted 2 lines
greg k-h