Thread (10 messages) 10 messages, 3 authors, 2017-09-11

[PATCH] clk: bulk: call of_clk_get() when id is NULL

From: aisheng.dong@nxp.com (A.s. Dong)
Date: 2017-08-31 07:12:06
Also in: linux-clk

-----Original Message-----
From: Shawn Guo [mailto:shawnguo at kernel.org]
Sent: Thursday, August 31, 2017 3:01 PM
To: A.s. Dong
Cc: Stephen Boyd; Michael Turquette; linux-clk at vger.kernel.org; linux-arm-
kernel at lists.infradead.org; Shawn Guo
Subject: Re: [PATCH] clk: bulk: call of_clk_get() when id is NULL

On Wed, Aug 30, 2017 at 03:31:38PM +0000, A.s. Dong wrote:
quoted
IMHO how about implement a of_clk_bulk_get() to handle this issue as
we already have a of_clk_get?
e.g.

int __must_check of_clk_bulk_get(struct device_node *np, int num_clks,
                              struct clk_bulk_data *clks) {
        for (i = 0; i < num_clks; i++) {
                clks[i].clk = of_clk_get(dev, clks[i].id);
The of_clk_get() takes clock index rather than name/id as the second
parameter.
You're right.
It's for only an idea demonstration, so sent too quick! :-)

Regards
Dong Aisheng
Shawn
quoted
...

}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help