Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-31 Thread Quentin Perret
On Thursday 31 Jan 2019 at 12:56:33 (+0530), Viresh Kumar wrote: > On 30-01-19, 17:05, Quentin Perret wrote: > > +static int __maybe_unused _get_cpu_power(unsigned long *mW, unsigned long > > *kHz, > > +int cpu) > > +{ > > + struct device *cpu_dev; > > +

Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-31 Thread Quentin Perret
Hi Matthias, On Wednesday 30 Jan 2019 at 11:07:03 (-0800), Matthias Kaehlcke wrote: > > diff --git a/drivers/opp/of.c b/drivers/opp/of.c > > index 06f0f632ec47..4c8bf172e9ed 100644 > > --- a/drivers/opp/of.c > > +++ b/drivers/opp/of.c > > @@ -20,6 +20,7 @@ > > #include > > #include > >

Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-31 Thread Viresh Kumar
On 31-01-19, 09:34, Quentin Perret wrote: > On Thursday 31 Jan 2019 at 12:52:09 (+0530), Viresh Kumar wrote: > > On 30-01-19, 11:07, Matthias Kaehlcke wrote: > > > On Wed, Jan 30, 2019 at 05:05:02PM +, Quentin Perret wrote: > > > > +static int __maybe_unused _get_cpu_power(unsigned long *mW,

Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-31 Thread Quentin Perret
On Thursday 31 Jan 2019 at 12:52:09 (+0530), Viresh Kumar wrote: > On 30-01-19, 11:07, Matthias Kaehlcke wrote: > > On Wed, Jan 30, 2019 at 05:05:02PM +, Quentin Perret wrote: > > > +static int __maybe_unused _get_cpu_power(unsigned long *mW, unsigned > > > long *kHz, > > > +

Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-30 Thread Viresh Kumar
On 30-01-19, 17:05, Quentin Perret wrote: > +static int __maybe_unused _get_cpu_power(unsigned long *mW, unsigned long > *kHz, > + int cpu) > +{ > + struct device *cpu_dev; > + struct dev_pm_opp *opp; > + struct device_node *np; > + unsigned

Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-30 Thread Viresh Kumar
On 30-01-19, 11:07, Matthias Kaehlcke wrote: > On Wed, Jan 30, 2019 at 05:05:02PM +, Quentin Perret wrote: > > +static int __maybe_unused _get_cpu_power(unsigned long *mW, unsigned long > > *kHz, > > +int cpu) > > why __maybe_unused? Yeah, it isn't

Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-30 Thread Matthias Kaehlcke
Hi Quentin, On Wed, Jan 30, 2019 at 05:05:02PM +, Quentin Perret wrote: > The Energy Model (EM) framework provides an API to let drivers register > the active power of CPUs. The drivers are expected to provide a callback > method which estimates the power consumed by a CPU at each available >

[PATCH v2 1/5] PM / OPP: Introduce a power estimation helper

2019-01-30 Thread Quentin Perret
The Energy Model (EM) framework provides an API to let drivers register the active power of CPUs. The drivers are expected to provide a callback method which estimates the power consumed by a CPU at each available performance levels. How exactly this should be implemented, however, depends on the