Thread (1 message) 1 message, 1 author, 2014-02-15

[PATCH 1/2] clk: fixed-rate: use full DT node name

From: emilio@elopez.com.ar (Emilio López)
Date: 2014-02-15 15:18:00
Also in: linux-devicetree

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help