All of lore.kernel.org
 help / color / mirror / Atom feed
From: emilio@elopez.com.ar (Emilio López)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] clk: fixed-rate: use full DT node name
Date: Sat, 15 Feb 2014 12:18:00 -0300	[thread overview]
Message-ID: <52FF8528.2020404@elopez.com.ar> (raw)
In-Reply-To: <1392358613-19962-1-git-send-email-swarren@wwwdotorg.org>

Hello Stephen,

El 14/02/14 03:16, Stephen Warren escribi?:
> clk-fixed-rate currently names clocks according to a node's name without
> the unit address. When faced with the legal and technically correct DT
> structure below, this causes rgistration attempts for 3 clocks with the
> same name, 2 of which fail.
>
> 	clocks {
> 		compatible = "simple-bus";
> 		#address-cells = <1>;
> 		#size-cells = <0>;
>
> 		clk_mmc: clock at 0 {
> 			compatible = "fixed-clock";
> 			reg = <0>;
> ...
> 		clk_i2c: clock at 1 {
> 			compatible = "fixed-clock";
> 			reg = <1>;
> ...
> 		clk_spi: clock at 2 {
> 			compatible = "fixed-clock";
> 			reg = <2>;
> ...
>
> Solve this by naming the clocks after the full node name rather than the
> short version (e.g. /clocks/clock at 0).

An alternative that doesn't require any change in the driver would be to 
use the optional but recommended clock-output-names property from the 
common clock binding.

Your DT would then look something like the following

 > ...
 > 		clk_mmc: clk at 0 {
 > 			compatible = "fixed-clock";
 > 			clock-output-names = "mmc";
 > ...
 > 		clk_i2c: clk at 1 {
 > 			compatible = "fixed-clock";
 > 			clock-output-names = "i2c";
 > ...
 > 		clk_spi: clk at 2 {
 > 			compatible = "fixed-clock";
 > 			clock-output-names = "spi";
 > ...

Cheers,

Emilio

WARNING: multiple messages have this Message-ID (diff)
From: "Emilio López" <emilio-0Z03zUJReD5OxF6Tv1QG9Q@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Mike Turquette
	<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 1/2] clk: fixed-rate: use full DT node name
Date: Sat, 15 Feb 2014 12:18:00 -0300	[thread overview]
Message-ID: <52FF8528.2020404@elopez.com.ar> (raw)
In-Reply-To: <1392358613-19962-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

Hello Stephen,

El 14/02/14 03:16, Stephen Warren escribió:
> clk-fixed-rate currently names clocks according to a node's name without
> the unit address. When faced with the legal and technically correct DT
> structure below, this causes rgistration attempts for 3 clocks with the
> same name, 2 of which fail.
>
> 	clocks {
> 		compatible = "simple-bus";
> 		#address-cells = <1>;
> 		#size-cells = <0>;
>
> 		clk_mmc: clock@0 {
> 			compatible = "fixed-clock";
> 			reg = <0>;
> ...
> 		clk_i2c: clock@1 {
> 			compatible = "fixed-clock";
> 			reg = <1>;
> ...
> 		clk_spi: clock@2 {
> 			compatible = "fixed-clock";
> 			reg = <2>;
> ...
>
> Solve this by naming the clocks after the full node name rather than the
> short version (e.g. /clocks/clock@0).

An alternative that doesn't require any change in the driver would be to 
use the optional but recommended clock-output-names property from the 
common clock binding.

Your DT would then look something like the following

 > ...
 > 		clk_mmc: clk@0 {
 > 			compatible = "fixed-clock";
 > 			clock-output-names = "mmc";
 > ...
 > 		clk_i2c: clk@1 {
 > 			compatible = "fixed-clock";
 > 			clock-output-names = "i2c";
 > ...
 > 		clk_spi: clk@2 {
 > 			compatible = "fixed-clock";
 > 			clock-output-names = "spi";
 > ...

Cheers,

Emilio
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-02-15 15:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14  6:16 [PATCH 1/2] clk: fixed-rate: use full DT node name Stephen Warren
2014-02-14  6:16 ` Stephen Warren
2014-02-14  6:16 ` [PATCH 2/2] ARM: bcm2835: fix clock DT node names Stephen Warren
2014-02-14  6:16   ` Stephen Warren
2014-02-14 10:39   ` Mark Rutland
2014-02-14 10:39     ` Mark Rutland
2014-02-14 10:35 ` [PATCH 1/2] clk: fixed-rate: use full DT node name Mark Rutland
2014-02-14 10:35   ` Mark Rutland
2014-02-14 16:43   ` Stephen Warren
2014-02-14 16:43     ` Stephen Warren
2014-02-18 11:23     ` Mark Rutland
2014-02-18 11:23       ` Mark Rutland
2014-02-18 17:34       ` Stephen Warren
2014-02-18 17:34         ` Stephen Warren
2014-02-14 16:43   ` Stephen Warren
2014-02-14 16:43     ` Stephen Warren
2014-02-15 15:18 ` Emilio López [this message]
2014-02-15 15:18   ` Emilio López

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FF8528.2020404@elopez.com.ar \
    --to=emilio@elopez.com.ar \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.