Thread (15 messages) 15 messages, 4 authors, 2013-09-23

Re: [PATCH V2 2/5] mfd: add support for AMS AS3722 PMIC

From: Lee Jones <hidden>
Date: 2013-09-20 12:39:39
Also in: linux-gpio, lkml

The AMS AS3722 is a compact system PMU suitable for mobile phones,
tablets etc. It has 4 DC/DC step-down regulators, 3 DC/DC step-down
controller, 11 LDOs, RTC, automatic battery, temperature and
over-current monitoring, 8 GPIOs, ADC and wathdog.

Add mfd core driver for the AS3722 to support core functionality.
<snip>
+Example:
+--------
+ams3722 {
+	compatible = "ams,as3722";
+	reg = <0x48>
+
+	interrupt-parent = <&intc>;
+	interrupt-controller;
+	#interrupt-cells = <2>;
+
+	gpio-controller;
+	#gpio-cells = <2>;
+
+	gpio {
+		/*
+		 * GPIO related properties
+		 * Refer document bindings/gpio/gpio-as3722.txt
+		 */
+	};
+
+	regulators {
+		/*
+		 * Regulator related properties
+		 * Refer document bindings/regulator/as3722-regulator.txt
+		 */
+	};
+};
I still don't think this is the way to go. If you can justify that
these sub-devices require their own node, then they should have a
compatible string. The MFD sub-system will then populate the of_node
for you and you can use/request them in the normal way.

To reiterate, Mark's issue was not the existence of the compatible
string, it was with the existence of the child nodes in general.

Personally I think the device should have sub-nodes. It's how  we
dealt with our DB8500 and AB8500 and it works very well. At the end of
the day these all-in-one chips do house very different devices. I see
no harm in describing them that way. I'm sure other OSes can make use
of the sub-devices in similar ways.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help