mbox series

[0/3] PM operations for software nodes

Message ID 20200825135951.53340-1-heikki.krogerus@linux.intel.com
Headers show
Series PM operations for software nodes | expand

Message

Heikki Krogerus Aug. 25, 2020, 1:59 p.m. UTC
Hi guys,

Unfortunately the last patch depends on this:
https://lore.kernel.org/linux-usb/20200821131101.81915-1-heikki.krogerus@linux.intel.com/

Would it be easiest that Felipe took care of these (assuming they are
acceptable)?

thanks,

Heikki Krogerus (3):
  software node: Power management operations for software nodes
  software node: Introduce device_add_software_node()
  usb: dwc3: pci: Register a software node for the dwc3 platform device

 drivers/base/power/common.c |   8 +-
 drivers/base/swnode.c       | 569 +++++++++++++++++++++++++++++++++++-
 drivers/usb/dwc3/dwc3-pci.c | 175 ++++++-----
 include/linux/property.h    |  13 +
 4 files changed, 666 insertions(+), 99 deletions(-)

Comments

Heikki Krogerus Sept. 16, 2020, 1:27 p.m. UTC | #1
+Sakari

On Tue, Aug 25, 2020 at 04:59:48PM +0300, Heikki Krogerus wrote:
> Hi guys,
> 
> Unfortunately the last patch depends on this:
> https://lore.kernel.org/linux-usb/20200821131101.81915-1-heikki.krogerus@linux.intel.com/
> 
> Would it be easiest that Felipe took care of these (assuming they are
> acceptable)?
> 
> thanks,
> 
> Heikki Krogerus (3):
>   software node: Power management operations for software nodes
>   software node: Introduce device_add_software_node()
>   usb: dwc3: pci: Register a software node for the dwc3 platform device
> 
>  drivers/base/power/common.c |   8 +-
>  drivers/base/swnode.c       | 569 +++++++++++++++++++++++++++++++++++-
>  drivers/usb/dwc3/dwc3-pci.c | 175 ++++++-----
>  include/linux/property.h    |  13 +
>  4 files changed, 666 insertions(+), 99 deletions(-)
> 
> -- 
> 2.28.0
Heikki Krogerus Sept. 28, 2020, 11:32 a.m. UTC | #2
On Fri, Sep 25, 2020 at 05:54:37PM +0200, Rafael J. Wysocki wrote:
> On Tue, Aug 25, 2020 at 3:59 PM Heikki Krogerus
> <heikki.krogerus@linux.intel.com> wrote:
> >
> > Adding separate PM operations vector for the software nodes.
> > The software node specific PM operations make it possible to
> > handle most PM related quirks separately in their own
> > functions instead of conditionally in the device driver's
> > generic PM functions (and in some cases all over the
> > driver). The software node specific PM operations will also
> > reduce the need to pass platform data in some cases, for
> > example from a core MFD driver to the child device drivers,
> > as from now on the core MFD driver will be able to implement
> > the PM quirks directly for the child devices without the
> > need to touch the drivers of those child devices.
> >
> > If a software node includes the PM operations, those PM
> > operations are always executed separately on top of the
> > other PM operations of the device, so the software node will
> > never replace any of the "normal" PM operations of the
> > device (including the PM domain's operations, class's or
> > bus's PM operations, the device drivers own operations, or
> > any other).
> 
> This isn't consistent with the code changes AFAICS.
> 
> The swnode PM operations are implemented as a PM domain ops, which
> means that they will be executed instead of any other existing ops
> rather than in addition to those.
> 
> For example, software_node_prepare() will skip bus type ops if they
> are present and there is no "primary" PM domain which seems not
> intended.

True. I thought the pm_generic_*() functions will take care of also
the bus ops, but of course they don't do that.

> Also some comments might help to understand the design.

OK.

thanks,