mbox series

[0/3] PM / Domains: Enable name based lookup at attach

Message ID 20180629110432.5179-1-ulf.hansson@linaro.org
Headers show
Series PM / Domains: Enable name based lookup at attach | expand

Message

Ulf Hansson June 29, 2018, 11:04 a.m. UTC
Recently we added support to manage multiple PM domains per device. Consumer
drivers were provided an API, dev_pm_domain_attach_by_id() to associate its
device with one of its PM domain, by using an index.

Let's extend this to allow the association to be done using a name based
lookup, which follows the similar concept as for other resource types, such as
clocks for example.

Ulf Hansson (3):
  PM / Domains: dt: Add a power-domain-names property
  PM / Domains: Introduce option to attach a device by name to genpd
  PM / Domains: Introduce dev_pm_domain_attach_by_name()

 .../bindings/power/power_domain.txt           |  8 +++++++
 drivers/base/power/common.c                   | 17 +++++++++++++
 drivers/base/power/domain.c                   | 24 +++++++++++++++++++
 include/linux/pm_domain.h                     | 15 ++++++++++++
 4 files changed, 64 insertions(+)

-- 
2.17.1

Comments

Rajendra Nayak July 2, 2018, 6:20 a.m. UTC | #1
On 06/29/2018 04:34 PM, Ulf Hansson wrote:
> Recently we added support to manage multiple PM domains per device. Consumer

> drivers were provided an API, dev_pm_domain_attach_by_id() to associate its

> device with one of its PM domain, by using an index.

> 

> Let's extend this to allow the association to be done using a name based

> lookup, which follows the similar concept as for other resource types, such as

> clocks for example.


Updated [1] to use dev_pm_domain_attach_by_name() instead of dev_pm_domain_attach_by_id()
Everything works as expected.

Tested-by: Rajendra Nayak <rnayak@codeaurora.org>


[1] https://patchwork.kernel.org/patch/10496107/
 
> 

> Ulf Hansson (3):

>   PM / Domains: dt: Add a power-domain-names property

>   PM / Domains: Introduce option to attach a device by name to genpd

>   PM / Domains: Introduce dev_pm_domain_attach_by_name()

> 

>  .../bindings/power/power_domain.txt           |  8 +++++++

>  drivers/base/power/common.c                   | 17 +++++++++++++

>  drivers/base/power/domain.c                   | 24 +++++++++++++++++++

>  include/linux/pm_domain.h                     | 15 ++++++++++++

>  4 files changed, 64 insertions(+)

> 


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
Viresh Kumar July 2, 2018, 7:08 a.m. UTC | #2
On 29-06-18, 13:04, Ulf Hansson wrote:
> Recently we added support to manage multiple PM domains per device. Consumer

> drivers were provided an API, dev_pm_domain_attach_by_id() to associate its

> device with one of its PM domain, by using an index.

> 

> Let's extend this to allow the association to be done using a name based

> lookup, which follows the similar concept as for other resource types, such as

> clocks for example.

> 

> Ulf Hansson (3):

>   PM / Domains: dt: Add a power-domain-names property

>   PM / Domains: Introduce option to attach a device by name to genpd

>   PM / Domains: Introduce dev_pm_domain_attach_by_name()


Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>


-- 
viresh
Rafael J. Wysocki July 11, 2018, 9:43 a.m. UTC | #3
On Monday, July 9, 2018 1:38:38 PM CEST Ulf Hansson wrote:
> On 9 July 2018 at 12:06, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:

> > On Monday, July 2, 2018 9:08:06 AM CEST Viresh Kumar wrote:

> >> On 29-06-18, 13:04, Ulf Hansson wrote:

> >> > Recently we added support to manage multiple PM domains per device. Consumer

> >> > drivers were provided an API, dev_pm_domain_attach_by_id() to associate its

> >> > device with one of its PM domain, by using an index.

> >> >

> >> > Let's extend this to allow the association to be done using a name based

> >> > lookup, which follows the similar concept as for other resource types, such as

> >> > clocks for example.

> >> >

> >> > Ulf Hansson (3):

> >> >   PM / Domains: dt: Add a power-domain-names property

> >> >   PM / Domains: Introduce option to attach a device by name to genpd

> >> >   PM / Domains: Introduce dev_pm_domain_attach_by_name()

> >>

> >> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>

> >>

> >>

> >

> > Do we need Rob to ACK the binding change?

> >

> 

> Normally, yes, however, the change to binding is trivial and the

> concept of using a names property isn't something new. I would be

> highly surprised if he would object.

> 

> I say apply it.


OK, applied along with the other two.

Thanks!