diff mbox

[v4,4/8] MFD: ti_am335x_tscadc: add device tree binding information

Message ID 1358999112-31192-5-git-send-email-rachna@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Patil, Rachna Jan. 24, 2013, 3:45 a.m. UTC
From: "Patil, Rachna" <rachna@ti.com>

Signed-off-by: Patil, Rachna <rachna@ti.com>
---
Changes in v4:
	Subnodes and their properties documentation added.
	Non-standard properties prefixed with vendor name.

 .../devicetree/bindings/mfd/ti_am335x_tscadc.txt   |   52 ++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt

Comments

Peter Korsgaard Jan. 27, 2013, 2:11 p.m. UTC | #1
>>>>> "P" == Patil, Rachna <rachna@ti.com> writes:

Hi,

 P> From: "Patil, Rachna" <rachna@ti.com>
 P> Signed-off-by: Patil, Rachna <rachna@ti.com>
 P> ---
 P> Changes in v4:
 P> 	Subnodes and their properties documentation added.
 P> 	Non-standard properties prefixed with vendor name.

 P>  .../devicetree/bindings/mfd/ti_am335x_tscadc.txt   |   52 ++++++++++++++++++++
 P>  1 file changed, 52 insertions(+)
 P>  create mode 100644 Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt

 P> diff --git a/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt b/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt
 P> new file mode 100644
 P> index 0000000..0100771
 P> --- /dev/null
 P> +++ b/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt
 P> @@ -0,0 +1,52 @@
 P> +Texas Instruments - TSC / ADC multi-functional device
 P> +
 P> +ti_tscadc is a multi-function device with touchscreen and ADC on chip.
 P> +This document describes the binding for mfd device.
 P> +
 P> +Required properties:
 P> +- compatible: "ti,ti-tscadc"

That's a very generic name (and double ti). How about ti,am3352-tsadc
instead?

No pinmux?


 P> +Sub-node device required properties:
 P> +tsc:
 P> +- ti,wires:  4/5/8 wire touchscreen support on the platform.
 P> +- ti,x-plate-resistance: X plate resistance.

In what kind of units?


 P> +- ti,steps-to-configure: A step is configured to read a single co-ordinate value,
 P> +			can be applied more number of times for better results.

So it is some kind of averaging? Doesn't tslib do that for you already?
Is there any limit to how many steps you can/will handle?


 P> +- ti,wire-config: Order for connecting wires on touchscreen.

ti,wires seems redundant given ti,wire-config (E.G. number of elements
in array). It is not clear to me what the magic values in wire-config
mean?

 P> +
 P> +adc:
 P> +- ti,adc-channels: Number of ADC channels used.

Is there ever any use case for this being something else than 8 -
ti,wires?
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt b/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt
new file mode 100644
index 0000000..0100771
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/ti_am335x_tscadc.txt
@@ -0,0 +1,52 @@ 
+Texas Instruments - TSC / ADC multi-functional device
+
+ti_tscadc is a multi-function device with touchscreen and ADC on chip.
+This document describes the binding for mfd device.
+
+Required properties:
+- compatible: "ti,ti-tscadc"
+- reg: Specifies the address of MFD block
+- interrupts: IRQ line connected to the main SoC
+- interrupt-parent: The parent interrupt controller
+
+Optional properties:
+- ti,hwmods: Hardware information related to TSC/ADC MFD device
+
+Sub-nodes:
+Device			Description
+------			-----------
+tsc			Touchscreen
+adc			Analog to digital converter
+
+Sub-node device required properties:
+tsc:
+- ti,wires:  4/5/8 wire touchscreen support on the platform.
+- ti,x-plate-resistance: X plate resistance.
+- ti,steps-to-configure: A step is configured to read a single co-ordinate value,
+			can be applied more number of times for better results.
+- ti,wire-config: Order for connecting wires on touchscreen.
+
+adc:
+- ti,adc-channels: Number of ADC channels used.
+
+Example:
+
+	tscadc: tscadc@44e0d000 {
+		compatible = "ti,ti-tscadc";
+		reg = <0x44e0d000 0x1000>;
+
+		interrupt-parent = <&intc>;
+		interrupts = <16>;
+		ti,hwmods = "adc_tsc";
+
+		tsc {
+			ti,wires = <4>;
+			ti,x-plate-resistance = <200>;
+			ti,steps-to-configure = <5>;
+			ti,wire-config = <0x00 0x11 0x22 0x33>;
+		};
+
+		adc {
+			ti,adc-channels = <4>;
+		};
+	};