All of lore.kernel.org
 help / color / mirror / Atom feed
* #size-cells = <0> in a bus node, and kernel messages complaining about this
@ 2012-06-27 21:26 Stephen Warren
       [not found] ` <4FEB7A8E.1090409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Warren @ 2012-06-27 21:26 UTC (permalink / raw)
  To: Grant Likely, Rob Herring; +Cc: devicetree-discuss

I believe I've seen the following construct bandied about as the correct
way of representing a bunch of nodes that have the same name (since they
represent the same type of object) within device-tree.

	regulators {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <0>;

		regulator@0 {
			compatible = "regulator-fixed";
			reg = <0>;
...
		};

		regulator@1 {
			compatible = "regulator-fixed";
			reg = <1>;
...
		};
	};

However, when the kernel parses that, it issues messages such as:

prom_parse: Bad cell count for /regulators/regulator@0
prom_parse: Bad cell count for /regulators/regulator@1

The message is issued when #size-cells==0. Is the response simply "don't
do that", and so I should set #size-cells=1, and add a fake size cell in
the reg property too?

Given the number of hits on '#size-cells = <0>' in the kernel source
tree, it seems like I must be missing something here; it's quite widely
used. I guess the warning is probably only emitted when the node with
#size-cells=0 is a bus, and so the children are enumerated to
instantiated devices; perhaps that's why this hasn't been raised before?

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

end of thread, other threads:[~2012-06-29  2:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27 21:26 #size-cells = <0> in a bus node, and kernel messages complaining about this Stephen Warren
     [not found] ` <4FEB7A8E.1090409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28  0:57   ` Mitch Bradley
     [not found]     ` <4FEBABE0.2050503-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-06-28 17:50       ` Stephen Warren
     [not found]         ` <4FEC994A.4030507-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28 18:21           ` Mitch Bradley
     [not found]             ` <4FECA092.60307-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-06-28 18:49               ` Mitch Bradley
     [not found]                 ` <4FECA72F.9080601-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-06-28 20:28                   ` Mitch Bradley
     [not found]                     ` <4FECBE5B.1090300-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-06-28 20:51                       ` Stephen Warren
     [not found]                         ` <4FECC3D5.2030507-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28 20:58                           ` Mitch Bradley
     [not found]                             ` <4FECC569.1000108-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2012-06-28 22:02                               ` Stephen Warren
     [not found]                                 ` <4FECD461.9030802-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28 22:22                                   ` Mitch Bradley
2012-06-29  2:38           ` David Gibson

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.