Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1647550

Re: [PATCH 1/4] PM / OPP: Reorganize _generic_set_opp_regulator()

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/4] PM / OPP: Reorganize _generic_set_opp_regulator()
Date 2017-05-23 03:20 +0200
Message-ID <tK6Eq-4Jb-29@gated-at.bofh.it> (permalink)
References <tHZ4l-6Ti-9@gated-at.bofh.it> <tHZ4l-6Ti-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/17, Viresh Kumar wrote:
> The code was overly complicated here because of the limitations that we
> had with RCUs (Couldn't use opp-table and OPPs outside RCU protected
> section and can't call sleep-able routines from within that). But that
> is long gone now.
> 
> Reorganize _generic_set_opp_regulator() in order to avoid using "struct
> dev_pm_set_opp_data" and copying data into it for the case where
> opp_table->set_opp is not set.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/base/power/opp/core.c | 73 ++++++++++++++++++++-----------------------
>  1 file changed, 34 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
> index dae61720b314..402b9e86d77c 100644
> --- a/drivers/base/power/opp/core.c
> +++ b/drivers/base/power/opp/core.c
> @@ -543,17 +543,18 @@ _generic_set_opp_clk_only(struct device *dev, struct clk *clk,
>  	return ret;
>  }
>  
> -static int _generic_set_opp(struct dev_pm_set_opp_data *data)
> +static int _generic_set_opp_regulator(struct opp_table *opp_table,

Can opp_table be const?

> +				      struct device *dev,

Maybe dev too, but that looks like a ripple effect so maybe
in another patch.

> +				      unsigned long old_freq,
> +				      unsigned long freq,
> +				      struct dev_pm_opp_supply *old_supply,
> +				      struct dev_pm_opp_supply *new_supply)

Otherwise

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] PM / OPP: Reorganize _generic_set_opp_regulator() Viresh Kumar <viresh.kumar@linaro.org> - 2017-05-17 06:50 +0200
  Re: [PATCH 1/4] PM / OPP: Reorganize _generic_set_opp_regulator() Stephen Boyd <sboyd@codeaurora.org> - 2017-05-23 03:20 +0200

csiph-web