linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: hym8563: add optional clock-output-names property
@ 2014-05-18 22:40 Heiko Stübner
  2014-06-02 21:33 ` Mike Turquette
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Stübner @ 2014-05-18 22:40 UTC (permalink / raw)
  To: Alessandro Zummo, Andrew Morton
  Cc: Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell,
	devicetree, linux-kernel, rtc-linux, Mike Turquette, Rob Herring

This enables the setting of a custom clock name for the clock provided by
the hym8563 rtc.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt | 3 +++
 drivers/rtc/rtc-hym8563.c                               | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
index 31406fd..5c199ee 100644
--- a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
+++ b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
@@ -9,6 +9,9 @@ Required properties:
 - interrupts: rtc alarm/event interrupt
 - #clock-cells: the value should be 0
 
+Optional properties:
+- clock-output-names: From common clock binding
+
 Example:
 
 hym8563: hym8563@51 {
diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
index e5f13c4..6442b5b 100644
--- a/drivers/rtc/rtc-hym8563.c
+++ b/drivers/rtc/rtc-hym8563.c
@@ -418,6 +418,9 @@ static struct clk *hym8563_clkout_register_clk(struct hym8563 *hym8563)
 	init.num_parents = 0;
 	hym8563->clkout_hw.init = &init;
 
+	/* optional override of the clockname */
+	of_property_read_string(node, "clock-output-names", &init.name);
+
 	/* register the clock */
 	clk = clk_register(&client->dev, &hym8563->clkout_hw);
 
-- 
1.9.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: hym8563: add optional clock-output-names property
  2014-05-18 22:40 [PATCH] rtc: hym8563: add optional clock-output-names property Heiko Stübner
@ 2014-06-02 21:33 ` Mike Turquette
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Turquette @ 2014-06-02 21:33 UTC (permalink / raw)
  To: Heiko Stübner, Alessandro Zummo, Andrew Morton
  Cc: Pawel Moll, Mark Rutland, Stephen Warren, Ian Campbell,
	devicetree, linux-kernel, rtc-linux, Rob Herring

Quoting Heiko Stübner (2014-05-18 15:40:07)
> This enables the setting of a custom clock name for the clock provided by
> the hym8563 rtc.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>

Annoying nitpick: would be nice to see the example updated to use
clock-output-names. But it's not a deal breaker.

Reviewed-by: Mike Turquette <mturquette@linaro.org>

Regards,
Mike

> ---
>  Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt | 3 +++
>  drivers/rtc/rtc-hym8563.c                               | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
> index 31406fd..5c199ee 100644
> --- a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
> +++ b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt
> @@ -9,6 +9,9 @@ Required properties:
>  - interrupts: rtc alarm/event interrupt
>  - #clock-cells: the value should be 0
>  
> +Optional properties:
> +- clock-output-names: From common clock binding
> +
>  Example:
>  
>  hym8563: hym8563@51 {
> diff --git a/drivers/rtc/rtc-hym8563.c b/drivers/rtc/rtc-hym8563.c
> index e5f13c4..6442b5b 100644
> --- a/drivers/rtc/rtc-hym8563.c
> +++ b/drivers/rtc/rtc-hym8563.c
> @@ -418,6 +418,9 @@ static struct clk *hym8563_clkout_register_clk(struct hym8563 *hym8563)
>         init.num_parents = 0;
>         hym8563->clkout_hw.init = &init;
>  
> +       /* optional override of the clockname */
> +       of_property_read_string(node, "clock-output-names", &init.name);
> +
>         /* register the clock */
>         clk = clk_register(&client->dev, &hym8563->clkout_hw);
>  
> -- 
> 1.9.0
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-02 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-18 22:40 [PATCH] rtc: hym8563: add optional clock-output-names property Heiko Stübner
2014-06-02 21:33 ` Mike Turquette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).