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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 12, 2017 at 5:37 AM, Joel Stanley <joel@xxxxxxxxx> wrote:
> On Wed, Oct 11, 2017 at 4:09 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux