Skip to content

Commit

Permalink
rtc: ac100: support clock-output-names in device tree binding
Browse files Browse the repository at this point in the history
The ac100 device tree binding specifies the usage of clock-output-names
to specify the names of its 3 clock outputs. This is needed for orphan
clock resolution, when the ac100 is probed much later than any clocks
that consume any of its outputs. This wasn't supported by the driver.

Add support for this.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Chen-Yu Tsai authored and Alexandre Belloni committed Aug 31, 2016
1 parent 1bc40cb commit 637cac7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/rtc/rtc-ac100.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ static int ac100_rtc_register_clks(struct ac100_rtc_dev *chip)
.flags = 0,
};

of_property_read_string_index(np, "clock-output-names",
i, &init.name);
clk->regmap = chip->regmap;
clk->offset = AC100_CLKOUT_CTRL1 + i;
clk->hw.init = &init;
Expand Down

0 comments on commit 637cac7

Please sign in to comment.