Thread (38 messages) 38 messages, 5 authors, 2017-10-12
DORMANTno replies

[PATCH 11/11] ARM: dts: Add PCLK to the Aspeed watchdogs

From: Linus Walleij <hidden>
Date: 2017-10-12 07:35:42
Also in: linux-watchdog

On Thu, Oct 12, 2017 at 5:37 AM, Joel Stanley [off-list ref] wrote:
On Wed, Oct 11, 2017 at 4:09 AM, Linus Walleij [off-list ref] wrote:
quoted
Joel could you merge this through the Aspeed tree? I think
the compatible string is completely uncontroversial
(binding ACKed) to add and all should just work fine so we
can slap in "EXTCLK" later as well.
How do the clock-names work? I have been writing the aspeed clk driver
and updating the bindings without clock names, and instead using a
identifier in phandle to reference which clock the device wants.

eg:

 clocks = <&syscon 10>;
This works fine as long as there is just one clock.

clocks = <&syscon 10>, <&syscon 11>, <&syscon 12>;

becomes a problem, right?

clk_get() has this signature:
struct clk *clk_get(struct device *dev, const char *id);

So clk_get(dev, NULL); will return <&syscon 10>;

How to get the rest?

clocks = <&syscon 10>, <&syscon 11>, <&syscon 12>;
clock-names = "FOO", "BAR", "BAZ";

clk_get(dev, "BAR");

gets the second clock.

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