[PATCH] of: support an enumerated-bus compatible value

Stephen Warren swarren at wwwdotorg.org
Wed Jul 25 03:38:18 EST 2012


I don't recall us getting any real conclusion out of this thread. How
about I drop the enumerated-bus concept and just use simple-bus, and
have reg be 2 cells (addr, size) in the child nodes:

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

	regulator at 0 {
		compatible = "regulator-fixed";
		reg = <0 1>;
		regulator-name = "vdd_1v5";
		regulator-min-microvolt = <1500000>;
		regulator-max-microvolt = <1500000>;
		gpio = <&pmic 0 0>;
	};

	regulator at 1 {
		compatible = "regulator-fixed";
		reg = <1 1>;
		regulator-name = "vdd_1v2";
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <1200000>;
		gpio = <&pmic 1 0>;
		enable-active-high;
	};
};

That makes the child nodes' reg property slightly more complex since I
don't get to elide the size cell, but does mean that we don't have to
change anything (code or bindings) at all to make it work. I guess the
lack of any ranges property within the top-level regulators node makes
it clear enough that the bus/child address space is not part of the
parent CPU's address space.


More information about the devicetree-discuss mailing list