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