Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-25 Thread Jon Hunter
On 24/05/18 22:21, Ulf Hansson wrote: ... OK, so this bit is a to-do as that is not yet exposed AFAICT. I see that you said 'although we need to extend it to cover cleanup of the earlier registered device, via calling device_unregister().' So if we do this then that would be fine. Let me cla

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-24 Thread Ulf Hansson
[...] >>> >>> * genpd_dev_pm_attach_by_id() - Attach a device to one of its PM domain. >>> * @dev: Device to attach. >>> * @index: The index of the PM domain. >>> >>> This naming and description is a bit misleading, because really it is not >>> attaching the device that is passed, but creating a n

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-24 Thread Jon Hunter
On 24/05/18 13:17, Ulf Hansson wrote: On 24 May 2018 at 11:36, Jon Hunter wrote: On 24/05/18 08:04, Ulf Hansson wrote: ... Any reason why we could not add a 'boolean' argument to the API to indicate whether the new device should be linked? I think that I prefer the API handles it, but I ca

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-24 Thread Ulf Hansson
On 24 May 2018 at 11:36, Jon Hunter wrote: > > On 24/05/18 08:04, Ulf Hansson wrote: > > ... > >>> Any reason why we could not add a 'boolean' argument to the API to >>> indicate >>> whether the new device should be linked? I think that I prefer the API >>> handles it, but I can see there could be

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-24 Thread Jon Hunter
On 24/05/18 08:04, Ulf Hansson wrote: ... Any reason why we could not add a 'boolean' argument to the API to indicate whether the new device should be linked? I think that I prefer the API handles it, but I can see there could be instances where drivers may wish to handle it themselves. Comi

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-24 Thread Ulf Hansson
On 23 May 2018 at 11:07, Jon Hunter wrote: > > On 23/05/18 07:12, Ulf Hansson wrote: > > ... > > >> Thanks for sending this. Believe it or not this has still been on my >> to-do list >> and so we definitely need a solution for Tegra. >> >> Looking at the above it appears that a

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-23 Thread Jon Hunter
On 23/05/18 10:47, Ulf Hansson wrote: On 23 May 2018 at 11:45, Jon Hunter wrote: On 23/05/18 10:33, Ulf Hansson wrote: On 23 May 2018 at 11:27, Rajendra Nayak wrote: On 05/23/2018 02:37 PM, Jon Hunter wrote: On 23/05/18 07:12, Ulf Hansson wrote: ... Thanks for sending this. Belie

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-23 Thread Ulf Hansson
On 23 May 2018 at 11:45, Jon Hunter wrote: > > On 23/05/18 10:33, Ulf Hansson wrote: >> >> On 23 May 2018 at 11:27, Rajendra Nayak wrote: >>> >>> >>> >>> On 05/23/2018 02:37 PM, Jon Hunter wrote: On 23/05/18 07:12, Ulf Hansson wrote: ... > Thanks for sending

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-23 Thread Jon Hunter
On 23/05/18 10:33, Ulf Hansson wrote: On 23 May 2018 at 11:27, Rajendra Nayak wrote: On 05/23/2018 02:37 PM, Jon Hunter wrote: On 23/05/18 07:12, Ulf Hansson wrote: ... Thanks for sending this. Believe it or not this has still been on my to-do list and so we definitely need a solution f

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-23 Thread Ulf Hansson
On 23 May 2018 at 11:27, Rajendra Nayak wrote: > > > On 05/23/2018 02:37 PM, Jon Hunter wrote: >> >> On 23/05/18 07:12, Ulf Hansson wrote: >> >> ... >> >>> Thanks for sending this. Believe it or not this has still been on my >>> to-do list >>> and so we definitely need a solution for

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-23 Thread Rajendra Nayak
On 05/23/2018 02:37 PM, Jon Hunter wrote: > > On 23/05/18 07:12, Ulf Hansson wrote: > > ... > >> Thanks for sending this. Believe it or not this has still been on my >> to-do list >> and so we definitely need a solution for Tegra. >> >> Looking at the above it appears that

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-23 Thread Jon Hunter
On 23/05/18 07:12, Ulf Hansson wrote: ... Thanks for sending this. Believe it or not this has still been on my to-do list and so we definitely need a solution for Tegra. Looking at the above it appears that additional power-domains exposed as devices to the client device. So I assume that thi

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-22 Thread Ulf Hansson
Rajendra, Jon, On 23 May 2018 at 06:51, Rajendra Nayak wrote: > > > On 05/23/2018 02:25 AM, Jon Hunter wrote: >> >> On 22/05/18 15:47, Ulf Hansson wrote: >>> [...] >>> > > +/** > + * genpd_dev_pm_attach_by_id() - Attach a device to one of its PM domain. > + * @dev: Device to attac

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-22 Thread Rajendra Nayak
On 05/23/2018 02:25 AM, Jon Hunter wrote: > > On 22/05/18 15:47, Ulf Hansson wrote: >> [...] >> +/** + * genpd_dev_pm_attach_by_id() - Attach a device to one of its PM domain. + * @dev: Device to attach. + * @index: The index of the PM domain. + * + * Parse dev

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-22 Thread Jon Hunter
On 22/05/18 15:47, Ulf Hansson wrote: [...] +/** + * genpd_dev_pm_attach_by_id() - Attach a device to one of its PM domain. + * @dev: Device to attach. + * @index: The index of the PM domain. + * + * Parse device's OF node to find a PM domain specifier at the provided @index. + * If such is f

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-22 Thread Ulf Hansson
[...] >> >> +/** >> + * genpd_dev_pm_attach_by_id() - Attach a device to one of its PM domain. >> + * @dev: Device to attach. >> + * @index: The index of the PM domain. >> + * >> + * Parse device's OF node to find a PM domain specifier at the provided >> @index. >> + * If such is found, allocates

Re: [PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-22 Thread Jon Hunter
Hi Ulf, On 18/05/18 11:31, Ulf Hansson wrote: > To support devices being partitioned across multiple PM domains, let's > start by extending genpd to cope with these configurations. > > More precisely, add a new exported function, genpd_dev_pm_attach_by_id(), > similar to genpd_dev_pm_attach(), bu

[PATCH 8/9] PM / Domains: Add support for multi PM domains per device to genpd

2018-05-18 Thread Ulf Hansson
To support devices being partitioned across multiple PM domains, let's start by extending genpd to cope with these configurations. More precisely, add a new exported function, genpd_dev_pm_attach_by_id(), similar to genpd_dev_pm_attach(), but the new function also allows the caller to provide an i