Thread (12 messages) flat view 12 messages, 4 authors, 2016-07-14

[PATCH v4 1/7] mfd: ac100: Add device tree bindings for X-Powers AC100 codec/RTC combo IC

From: Lee Jones <hidden>
Date: 2016-07-01 08:40:04
Also in: linux-clk, linux-devicetree, linux-rtc, lkml

On Thu, 30 Jun 2016, Chen-Yu Tsai wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Chen-Yu Tsai <redacted>
---
Changes since v3:

  - Fixed device node names and added labels.
  - Added clock output from codec and input to rtc.

Changes since v2:

  - Fix interrupt line for ac100_codec in provided example.

---
 Documentation/devicetree/bindings/mfd/ac100.txt | 49 +++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/ac100.txt
diff --git a/Documentation/devicetree/bindings/mfd/ac100.txt b/Documentation/devicetree/bindings/mfd/ac100.txt
new file mode 100644
index 000000000000..31e6f9cc41bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ac100.txt
@@ -0,0 +1,49 @@
+X-Powers AC100 Codec/RTC IC device tree bindings
Nit: Device Tree
+AC100 is a audio codec and RTC subsystem combo IC. The 2 parts are
+separated, including power supplies and interrupt lines, but share
+a common register address space and host interface.
+
+Required properties:
+- compatible: "x-powers,ac100"
+- reg: The I2C slave address or RSB hardware address for the chip
+- sub-nodes:
+  - codec
+    - compatible: "x-powers,ac100-codec"
+    - interrupt-parent: The parent interrupt controller
+    - interrupts: SoC NMI / GPIO interrupt connected to the IRQ_AUDIO pin
+    - #clock-cells: shall be 0
Nit: Shall
+    - clock-output-names: "4M_adda"
+    - see clock/clock-bindings.txt for common clock bindings
    - compatible:           "x-powers,ac100-codec"
    - interrupt-parent:	    The parent interrupt controller
    - interrupts: 	    SoC NMI / GPIO interrupt connected to the IRQ_AUDIO pin
    - #clock-cells:   	    shall be 0
    - clock-output-names:   "4M_adda"

    - see clock/clock-bindings.txt for common clock bindings

Don't you think these are easier to read when they're separated?
+  - rtc
+    - compatible: "x-powers,ac100-rtc"
+    - interrupt-parent: The parent interrupt controller
+    - interrupts: SoC NMI / GPIO interrupt connected to the IRQ_RTC pin
+    - clocks: A phandle to the codec's "4M_adda" clock
+    - #clock-cells: shall be 1
Nit: Shall
+    - clock-output-names: "cko1_rtc", "cko2_rtc", "cko3_rtc"
+    - see clock/clock-bindings.txt for common clock bindings
Same here.
+Example:
+
+ac100: codec at e89 {
+	compatible = "x-powers,ac100";
+	reg = <0xe89>;
+
+	ac100_codec: codec {
+		compatible = "x-powers,ac100-codec";
+		interrupt-parent = <&r_pio>;
+		interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
+		#clock-cells = <0>;
+		clock-output-names = "4M_adda";
+	};
+
+	ac100_rtc: rtc {
+		compatible = "x-powers,ac100-rtc";
+		interrupt-parent = <&nmi_intc>;
+		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		clocks = <&ac100_codec>;
+		#clock-cells = <1>;
+		clock-output-names = "cko1_rtc", "cko2_rtc", "cko3_rtc";
+	};
+};
-- 
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