Message ID | 20190910123618.27985-2-s.nawrocki@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4,1/6] opp: Handle target/min/max voltage in dev_pm_opp_adjust_voltage() | expand |
On Tue, Sep 10, 2019 at 02:36:13PM +0200, Sylwester Nawrocki wrote: > To be squashed with patch "PM / OPP: Support adjusting OPP voltages > at runtime". > > Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > --- > Changes since v3: > - new patch > > drivers/opp/core.c | 10 ++++++++-- > include/linux/pm_opp.h | 3 ++- > 2 files changed, 10 insertions(+), 3 deletions(-) I'll take the ASV driver via samsung-soc but I see it depends on this one. Please provide me a stable tag with it or an Ack. Best regards, Krzysztof > > diff --git a/drivers/opp/core.c b/drivers/opp/core.c > index 407a07f29b12..4ebe5a6c280b 100644 > --- a/drivers/opp/core.c > +++ b/drivers/opp/core.c > @@ -2057,14 +2057,18 @@ static int _opp_set_availability(struct device *dev, unsigned long freq, > * dev_pm_opp_adjust_voltage() - helper to change the voltage of an OPP > * @dev: device for which we do this operation > * @freq: OPP frequency to adjust voltage of > - * @u_volt: new OPP voltage > + * @u_volt: new OPP target voltage > + * @u_volt_min: new OPP min voltage > + * @u_volt_max: new OPP max voltage > * > * Return: -EINVAL for bad pointers, -ENOMEM if no memory available for the > * copy operation, returns 0 if no modifcation was done OR modification was > * successful. > */ > int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, > - unsigned long u_volt) > + unsigned long u_volt, unsigned long u_volt_min, > + unsigned long u_volt_max) > + > { > struct opp_table *opp_table; > struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV); > @@ -2098,6 +2102,8 @@ int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, > goto adjust_unlock; > > opp->supplies->u_volt = u_volt; > + opp->supplies->u_volt_min = u_volt_min; > + opp->supplies->u_volt_max = u_volt_max; > > dev_pm_opp_get(opp); > mutex_unlock(&opp_table->lock); > diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h > index 86947d53e8c4..0ee1daafe6af 100644 > --- a/include/linux/pm_opp.h > +++ b/include/linux/pm_opp.h > @@ -113,7 +113,8 @@ void dev_pm_opp_remove(struct device *dev, unsigned long freq); > void dev_pm_opp_remove_all_dynamic(struct device *dev); > > int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, > - unsigned long u_volt); > + unsigned long u_volt, unsigned long u_volt_min, > + unsigned long u_volt_max); > > int dev_pm_opp_enable(struct device *dev, unsigned long freq); > > -- > 2.17.1 >
On 10/2/19 16:33, Krzysztof Kozlowski wrote: > On Tue, Sep 10, 2019 at 02:36:13PM +0200, Sylwester Nawrocki wrote: >> To be squashed with patch "PM / OPP: Support adjusting OPP voltages >> at runtime". >> >> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> >> --- >> >> drivers/opp/core.c | 10 ++++++++-- >> include/linux/pm_opp.h | 3 ++- >> 2 files changed, 10 insertions(+), 3 deletions(-) > > I'll take the ASV driver via samsung-soc but I see it depends on this > one. Please provide me a stable tag with it or an Ack. There is further dependency on patch "[PATCH v4 6/8] PM / OPP: Support adjusting OPP voltages at runtime" https://lore.kernel.org/linux-arm-kernel/1565703113-31479-7-git-send-email-andrew-sh.cheng@mediatek.com Viresh, what are your plans WRT to those patches?
On 02-10-19, 17:54, Sylwester Nawrocki wrote: > On 10/2/19 16:33, Krzysztof Kozlowski wrote: > > On Tue, Sep 10, 2019 at 02:36:13PM +0200, Sylwester Nawrocki wrote: > >> To be squashed with patch "PM / OPP: Support adjusting OPP voltages > >> at runtime". > >> > >> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> > >> --- > >> > >> drivers/opp/core.c | 10 ++++++++-- > >> include/linux/pm_opp.h | 3 ++- > >> 2 files changed, 10 insertions(+), 3 deletions(-) > > > > I'll take the ASV driver via samsung-soc but I see it depends on this > > one. Please provide me a stable tag with it or an Ack. > > There is further dependency on patch > "[PATCH v4 6/8] PM / OPP: Support adjusting OPP voltages at runtime" > https://lore.kernel.org/linux-arm-kernel/1565703113-31479-7-git-send-email-andrew-sh.cheng@mediatek.com > > Viresh, what are your plans WRT to those patches? I am waiting for Andrew to send me the next set of patches. You depend on only one of the patches ? In that case you can just pick that patch from his series, keep his authorship intact and make changes from 1/6 and send along with your series.
On 10/14/19 08:26, Viresh Kumar wrote: > I am waiting for Andrew to send me the next set of patches. You depend > on only one of the patches ? In that case you can just pick that patch > from his series, keep his authorship intact and make changes from 1/6 > and send along with your series. Yes, only that single patch. I will incorporate my changes then and resend, thank you.
diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 407a07f29b12..4ebe5a6c280b 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -2057,14 +2057,18 @@ static int _opp_set_availability(struct device *dev, unsigned long freq, * dev_pm_opp_adjust_voltage() - helper to change the voltage of an OPP * @dev: device for which we do this operation * @freq: OPP frequency to adjust voltage of - * @u_volt: new OPP voltage + * @u_volt: new OPP target voltage + * @u_volt_min: new OPP min voltage + * @u_volt_max: new OPP max voltage * * Return: -EINVAL for bad pointers, -ENOMEM if no memory available for the * copy operation, returns 0 if no modifcation was done OR modification was * successful. */ int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, - unsigned long u_volt) + unsigned long u_volt, unsigned long u_volt_min, + unsigned long u_volt_max) + { struct opp_table *opp_table; struct dev_pm_opp *tmp_opp, *opp = ERR_PTR(-ENODEV); @@ -2098,6 +2102,8 @@ int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, goto adjust_unlock; opp->supplies->u_volt = u_volt; + opp->supplies->u_volt_min = u_volt_min; + opp->supplies->u_volt_max = u_volt_max; dev_pm_opp_get(opp); mutex_unlock(&opp_table->lock); diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 86947d53e8c4..0ee1daafe6af 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -113,7 +113,8 @@ void dev_pm_opp_remove(struct device *dev, unsigned long freq); void dev_pm_opp_remove_all_dynamic(struct device *dev); int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq, - unsigned long u_volt); + unsigned long u_volt, unsigned long u_volt_min, + unsigned long u_volt_max); int dev_pm_opp_enable(struct device *dev, unsigned long freq);
To be squashed with patch "PM / OPP: Support adjusting OPP voltages at runtime". Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> --- Changes since v3: - new patch drivers/opp/core.c | 10 ++++++++-- include/linux/pm_opp.h | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) -- 2.17.1