lkml.org 
[lkml]   [2019]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/6] opp: Handle target/min/max voltage in dev_pm_opp_adjust_voltage()
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
>

\
 
 \ /
  Last update: 2019-10-02 16:34    [W:0.096 / U:4.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site