mbox series

[0/4] PM / OPP: Fix helpers for shared OPP table cases

Message ID cover.1526988624.git.viresh.kumar@linaro.org
Headers show
Series PM / OPP: Fix helpers for shared OPP table cases | expand

Message

Viresh Kumar May 22, 2018, 11:34 a.m. UTC
Hi,

Ilia Lin found a usecase where his Qualcomm cpufreq driver needs to call
the helpers for all the CPUs, as the driver is unaware of their sharing
information. This series fixes his usecase and makes the driver not
worry about such things.

@Ilia: Can you please test this series along with your patches ?

--
viresh

Viresh Kumar (4):
  PM / OPP: Fix shared OPP table support in
    dev_pm_opp_set_supported_hw()
  PM / OPP: Fix shared OPP table support in dev_pm_opp_set_prop_name()
  PM / OPP: Fix shared OPP table support in dev_pm_opp_set_regulators()
  PM / OPP: Fix shared OPP table support in
    dev_pm_opp_register_set_opp_helper()

 drivers/opp/core.c | 93 ++++++++++++------------------------------------------
 1 file changed, 21 insertions(+), 72 deletions(-)

-- 
2.15.0.194.g9af6a3dea062

Comments

Sudeep Holla May 22, 2018, 1:07 p.m. UTC | #1
On Tue, May 22, 2018 at 05:04:05PM +0530, Viresh Kumar wrote:
> Hi,

> 

> Ilia Lin found a usecase where his Qualcomm cpufreq driver needs to call

> the helpers for all the CPUs, as the driver is unaware of their sharing

> information. 


I was hoping to teach the driver about the shared CPUs using existing
OPP helpers(e.g. dev_pm_opp_of_get_sharing_cpus)

--
Regards,
Sudeep
Viresh Kumar May 23, 2018, 5:04 a.m. UTC | #2
On 22-05-18, 14:07, Sudeep Holla wrote:
> On Tue, May 22, 2018 at 05:04:05PM +0530, Viresh Kumar wrote:

> > Hi,

> > 

> > Ilia Lin found a usecase where his Qualcomm cpufreq driver needs to call

> > the helpers for all the CPUs, as the driver is unaware of their sharing

> > information. 

> 

> I was hoping to teach the driver about the shared CPUs using existing

> OPP helpers(e.g. dev_pm_opp_of_get_sharing_cpus)


Right and that API is already there for everyone to use. The thing was
that in case of Ilia his driver doesn't really need to know about
that, but rather just set the supported-hw property for all the CPUs.
Why should we ask drivers to keep more core to get the sharing policy
first and then set the properties only once for a policy. That's not
right and so I came up with this series.

-- 
viresh