lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 02/10] OPP: Add helpers for reading the binding properties
On 12-05-20, 15:53, Georgi Djakov wrote:
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c

> @@ -558,26 +580,13 @@ static struct dev_pm_opp *_opp_add_static_v2(struct opp_table *opp_table,
> if (!new_opp)
> return ERR_PTR(-ENOMEM);
>
> - ret = of_property_read_u64(np, "opp-hz", &rate);
> - if (ret < 0) {
> - /* "opp-hz" is optional for devices like power domains. */
> - if (!opp_table->is_genpd) {
> - dev_err(dev, "%s: opp-hz not found\n", __func__);
> - goto free_opp;
> - }
> -
> - rate_not_available = true;
> - } else {
> - /*
> - * Rate is defined as an unsigned long in clk API, and so
> - * casting explicitly to its type. Must be fixed once rate is 64
> - * bit guaranteed in clk API.
> - */
> - new_opp->rate = (unsigned long)rate;
> + ret = _read_opp_key(new_opp, np, &rate_not_available);
> + /* The key is optional for devices like power domains. */

Dropped this comment as key isn't optional for genpd as well as you
handled that in a later patch..

> + if (ret < 0 && !opp_table->is_genpd) {
> + dev_err(dev, "%s: opp key field not found\n", __func__);
> + goto free_opp;
> }

--
viresh

\
 
 \ /
  Last update: 2020-05-13 08:41    [W:0.117 / U:3.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site