diff mbox series

firmware: arm_scmi: clock: set rate_discrete

Message ID 20190522102912.1032-1-peng.fan@nxp.com (mailing list archive)
State Mainlined
Commit c0759b9b5d411ab27c479125cee9bae391a96436
Headers show
Series firmware: arm_scmi: clock: set rate_discrete | expand

Commit Message

Peng Fan May 22, 2019, 10:15 a.m. UTC
The rate_discrete needs to be assigned to clk->rate_discrete,
then scmi_clk_round_rate could get the value.

Fixes: 5f6c6430e904 ("firmware: arm_scmi: add initial support for clock protocol")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/firmware/arm_scmi/clock.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Sudeep Holla May 24, 2019, 2:26 p.m. UTC | #1
On Wed, May 22, 2019 at 10:15:21AM +0000, Peng Fan wrote:
> The rate_discrete needs to be assigned to clk->rate_discrete,
> then scmi_clk_round_rate could get the value.
>

Thanks for the fix, applied.

> Fixes: 5f6c6430e904 ("firmware: arm_scmi: add initial support for clock protocol")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/firmware/arm_scmi/clock.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c
> index 30fc04e28431..0a194af92438 100644
> --- a/drivers/firmware/arm_scmi/clock.c
> +++ b/drivers/firmware/arm_scmi/clock.c
> @@ -185,6 +185,8 @@ scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id,
>  	if (rate_discrete)
>  		clk->list.num_rates = tot_rate_cnt;
>  
> +	clk->rate_discrete = rate_discrete;
> +
>  err:
>  	scmi_xfer_put(handle, t);
>  	return ret;
> -- 
> 2.16.4
>
diff mbox series

Patch

diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c
index 30fc04e28431..0a194af92438 100644
--- a/drivers/firmware/arm_scmi/clock.c
+++ b/drivers/firmware/arm_scmi/clock.c
@@ -185,6 +185,8 @@  scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id,
 	if (rate_discrete)
 		clk->list.num_rates = tot_rate_cnt;
 
+	clk->rate_discrete = rate_discrete;
+
 err:
 	scmi_xfer_put(handle, t);
 	return ret;