public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
* [PATCHv3 0/8] at91_adc: documentation and device tree cleanups
@ 2014-03-10 19:17 Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 1/8] Documentation: dt: iio: improve atmel-adc documentation Alexandre Belloni
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

The first patch synchronise the documentation with the actual code and correct
the example.

The second patch move the documentation to the correct location (under iio/adc)

The remaining patches correct the device trees that are using the adc, mainly
removing unused properties and making the binding compliant with the ePAPR.

Changes in v3:
 - also remove the useless atmel,adc-clock-rate

Changes in v2:
 - add #address-cells, #size-cells and a reg for each trigger to comply to the
   ePAPR instead of removing the unit-address.
 - also correct the atmel,adc-use-external-triggers property name in the
   documentation and in the device tree that got it wrong.

Alexandre Belloni (8):
  Documentation: dt: iio: improve atmel-adc documentation
  Documentation: dt: iio: move arm/atmel-adc.txt to iio/adc/at91_adc.txt
  ARM: at91/dt: at91-ariag25: remove useless adc properties
  ARM: at91/dt: at91sam9260: remove useless adc properties
  ARM: at91/dt: at91sam9g45: remove useless adc properties
  ARM: at91/dt: at91sam9x5: remove useless adc properties
  ARM: at91/dt: sama5d3: remove useless adc properties
  ARM: at91/dt: at91-cosino: remove useless adc properties

 .../devicetree/bindings/arm/atmel-adc.txt          | 81 ---------------------
 .../devicetree/bindings/iio/adc/at91_adc.txt       | 82 ++++++++++++++++++++++
 arch/arm/boot/dts/at91-ariag25.dts                 |  1 -
 arch/arm/boot/dts/at91-cosino.dtsi                 |  1 -
 arch/arm/boot/dts/at91-cosino_mega2560.dts         |  1 -
 arch/arm/boot/dts/at91sam9260.dtsi                 | 11 +--
 arch/arm/boot/dts/at91sam9g45.dtsi                 | 11 +--
 arch/arm/boot/dts/at91sam9x5.dtsi                  | 13 ++--
 arch/arm/boot/dts/sama5d3.dtsi                     | 13 ++--
 arch/arm/boot/dts/sama5d3xdm.dtsi                  |  1 -
 10 files changed, 108 insertions(+), 107 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/atmel-adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/at91_adc.txt

-- 
1.8.3.2

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

* [PATCHv3 1/8] Documentation: dt: iio: improve atmel-adc documentation
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 2/8] Documentation: dt: iio: move arm/atmel-adc.txt to iio/adc/at91_adc.txt Alexandre Belloni
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

This corrects the example by adding #address-cells, #size-cells and a reg for
each trigger to comply to the ePAPR, as suggested by Mark Rutland in
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/234184.html

Also, it removes the properties that are not used anymore, to stop propagating
them.
Also fixes atmel,adc-use-external-triggers property name.

Finally, fixes a few typos.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
---
 .../devicetree/bindings/arm/atmel-adc.txt          | 33 +++++++++++-----------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/atmel-adc.txt b/Documentation/devicetree/bindings/arm/atmel-adc.txt
index d1061469f63d..82061c7e4fea 100644
--- a/Documentation/devicetree/bindings/arm/atmel-adc.txt
+++ b/Documentation/devicetree/bindings/arm/atmel-adc.txt
@@ -5,32 +5,32 @@ Required properties:
     <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5"
   - reg: Should contain ADC registers location and length
   - interrupts: Should contain the IRQ line for the ADC
-  - atmel,adc-channels-used: Bitmask of the channels muxed and enable for this
+  - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this
     device
   - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
     defined in the datasheet
   - atmel,adc-vref: Reference voltage in millivolts for the conversions
-  - atmel,adc-res: List of resolution in bits supported by the ADC. List size
+  - atmel,adc-res: List of resolutions in bits supported by the ADC. List size
 		   must be two at least.
   - atmel,adc-res-names: Contains one identifier string for each resolution
 			 in atmel,adc-res property. "lowres" and "highres"
 			 identifiers are required.
 
 Optional properties:
-  - atmel,adc-use-external: Boolean to enable of external triggers
+  - atmel,adc-use-external-triggers: Boolean to enable the external triggers
   - atmel,adc-use-res: String corresponding to an identifier from
 		       atmel,adc-res-names property. If not specified, the highest
 		       resolution will be used.
   - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion
   - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds
-  - atmel,adc-ts-wires: Number of touch screen wires. Should be 4 or 5. If this
-                        value is set, then adc driver will enable touch screen
+  - atmel,adc-ts-wires: Number of touchscreen wires. Should be 4 or 5. If this
+                        value is set, then the adc driver will enable touchscreen
                         support.
-    NOTE: when adc touch screen enabled, the adc hardware trigger will be
-          disabled. Since touch screen will occupied the trigger register.
+    NOTE: when adc touchscreen is enabled, the adc hardware trigger will be
+          disabled. Since touchscreen will occupy the trigger register.
   - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It
-                                     make touch detect more precision.
- 
+                                     makes touch detection more precise.
+
 Optional trigger Nodes:
   - Required properties:
     * trigger-name: Name of the trigger exposed to the user
@@ -41,40 +41,41 @@ Optional trigger Nodes:
 
 Examples:
 adc0: adc at fffb0000 {
+	#address-cells = <1>;
+	#size-cells = <0>;
 	compatible = "atmel,at91sam9260-adc";
 	reg = <0xfffb0000 0x100>;
-	interrupts = <20 4>;
-	atmel,adc-channel-base = <0x30>;
+	interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
 	atmel,adc-channels-used = <0xff>;
-	atmel,adc-drdy-mask = <0x10000>;
-	atmel,adc-num-channels = <8>;
 	atmel,adc-startup-time = <40>;
-	atmel,adc-status-register = <0x1c>;
-	atmel,adc-trigger-register = <0x08>;
-	atmel,adc-use-external;
+	atmel,adc-use-external-triggers;
 	atmel,adc-vref = <3300>;
 	atmel,adc-res = <8 10>;
 	atmel,adc-res-names = "lowres", "highres";
 	atmel,adc-use-res = "lowres";
 
 	trigger at 0 {
+		reg = <0>;
 		trigger-name = "external-rising";
 		trigger-value = <0x1>;
 		trigger-external;
 	};
 	trigger at 1 {
+		reg = <1>;
 		trigger-name = "external-falling";
 		trigger-value = <0x2>;
 		trigger-external;
 	};
 
 	trigger at 2 {
+		reg = <2>;
 		trigger-name = "external-any";
 		trigger-value = <0x3>;
 		trigger-external;
 	};
 
 	trigger at 3 {
+		reg = <3>;
 		trigger-name = "continuous";
 		trigger-value = <0x6>;
 	};
-- 
1.8.3.2

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

* [PATCHv3 2/8] Documentation: dt: iio: move arm/atmel-adc.txt to iio/adc/at91_adc.txt
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 1/8] Documentation: dt: iio: improve atmel-adc documentation Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 3/8] ARM: at91/dt: at91-ariag25: remove useless adc properties Alexandre Belloni
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
---
 .../devicetree/bindings/arm/atmel-adc.txt          | 82 ----------------------
 .../devicetree/bindings/iio/adc/at91_adc.txt       | 82 ++++++++++++++++++++++
 2 files changed, 82 insertions(+), 82 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/atmel-adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/at91_adc.txt

diff --git a/Documentation/devicetree/bindings/arm/atmel-adc.txt b/Documentation/devicetree/bindings/arm/atmel-adc.txt
deleted file mode 100644
index 82061c7e4fea..000000000000
--- a/Documentation/devicetree/bindings/arm/atmel-adc.txt
+++ /dev/null
@@ -1,82 +0,0 @@
-* AT91's Analog to Digital Converter (ADC)
-
-Required properties:
-  - compatible: Should be "atmel,<chip>-adc"
-    <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5"
-  - reg: Should contain ADC registers location and length
-  - interrupts: Should contain the IRQ line for the ADC
-  - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this
-    device
-  - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
-    defined in the datasheet
-  - atmel,adc-vref: Reference voltage in millivolts for the conversions
-  - atmel,adc-res: List of resolutions in bits supported by the ADC. List size
-		   must be two at least.
-  - atmel,adc-res-names: Contains one identifier string for each resolution
-			 in atmel,adc-res property. "lowres" and "highres"
-			 identifiers are required.
-
-Optional properties:
-  - atmel,adc-use-external-triggers: Boolean to enable the external triggers
-  - atmel,adc-use-res: String corresponding to an identifier from
-		       atmel,adc-res-names property. If not specified, the highest
-		       resolution will be used.
-  - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion
-  - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds
-  - atmel,adc-ts-wires: Number of touchscreen wires. Should be 4 or 5. If this
-                        value is set, then the adc driver will enable touchscreen
-                        support.
-    NOTE: when adc touchscreen is enabled, the adc hardware trigger will be
-          disabled. Since touchscreen will occupy the trigger register.
-  - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It
-                                     makes touch detection more precise.
-
-Optional trigger Nodes:
-  - Required properties:
-    * trigger-name: Name of the trigger exposed to the user
-    * trigger-value: Value to put in the Trigger register
-      to activate this trigger
-  - Optional properties:
-    * trigger-external: Is the trigger an external trigger?
-
-Examples:
-adc0: adc at fffb0000 {
-	#address-cells = <1>;
-	#size-cells = <0>;
-	compatible = "atmel,at91sam9260-adc";
-	reg = <0xfffb0000 0x100>;
-	interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
-	atmel,adc-channels-used = <0xff>;
-	atmel,adc-startup-time = <40>;
-	atmel,adc-use-external-triggers;
-	atmel,adc-vref = <3300>;
-	atmel,adc-res = <8 10>;
-	atmel,adc-res-names = "lowres", "highres";
-	atmel,adc-use-res = "lowres";
-
-	trigger at 0 {
-		reg = <0>;
-		trigger-name = "external-rising";
-		trigger-value = <0x1>;
-		trigger-external;
-	};
-	trigger at 1 {
-		reg = <1>;
-		trigger-name = "external-falling";
-		trigger-value = <0x2>;
-		trigger-external;
-	};
-
-	trigger at 2 {
-		reg = <2>;
-		trigger-name = "external-any";
-		trigger-value = <0x3>;
-		trigger-external;
-	};
-
-	trigger at 3 {
-		reg = <3>;
-		trigger-name = "continuous";
-		trigger-value = <0x6>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/at91_adc.txt b/Documentation/devicetree/bindings/iio/adc/at91_adc.txt
new file mode 100644
index 000000000000..82061c7e4fea
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/at91_adc.txt
@@ -0,0 +1,82 @@
+* AT91's Analog to Digital Converter (ADC)
+
+Required properties:
+  - compatible: Should be "atmel,<chip>-adc"
+    <chip> can be "at91sam9260", "at91sam9g45" or "at91sam9x5"
+  - reg: Should contain ADC registers location and length
+  - interrupts: Should contain the IRQ line for the ADC
+  - atmel,adc-channels-used: Bitmask of the channels muxed and enabled for this
+    device
+  - atmel,adc-startup-time: Startup Time of the ADC in microseconds as
+    defined in the datasheet
+  - atmel,adc-vref: Reference voltage in millivolts for the conversions
+  - atmel,adc-res: List of resolutions in bits supported by the ADC. List size
+		   must be two at least.
+  - atmel,adc-res-names: Contains one identifier string for each resolution
+			 in atmel,adc-res property. "lowres" and "highres"
+			 identifiers are required.
+
+Optional properties:
+  - atmel,adc-use-external-triggers: Boolean to enable the external triggers
+  - atmel,adc-use-res: String corresponding to an identifier from
+		       atmel,adc-res-names property. If not specified, the highest
+		       resolution will be used.
+  - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion
+  - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds
+  - atmel,adc-ts-wires: Number of touchscreen wires. Should be 4 or 5. If this
+                        value is set, then the adc driver will enable touchscreen
+                        support.
+    NOTE: when adc touchscreen is enabled, the adc hardware trigger will be
+          disabled. Since touchscreen will occupy the trigger register.
+  - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It
+                                     makes touch detection more precise.
+
+Optional trigger Nodes:
+  - Required properties:
+    * trigger-name: Name of the trigger exposed to the user
+    * trigger-value: Value to put in the Trigger register
+      to activate this trigger
+  - Optional properties:
+    * trigger-external: Is the trigger an external trigger?
+
+Examples:
+adc0: adc at fffb0000 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	compatible = "atmel,at91sam9260-adc";
+	reg = <0xfffb0000 0x100>;
+	interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
+	atmel,adc-channels-used = <0xff>;
+	atmel,adc-startup-time = <40>;
+	atmel,adc-use-external-triggers;
+	atmel,adc-vref = <3300>;
+	atmel,adc-res = <8 10>;
+	atmel,adc-res-names = "lowres", "highres";
+	atmel,adc-use-res = "lowres";
+
+	trigger at 0 {
+		reg = <0>;
+		trigger-name = "external-rising";
+		trigger-value = <0x1>;
+		trigger-external;
+	};
+	trigger at 1 {
+		reg = <1>;
+		trigger-name = "external-falling";
+		trigger-value = <0x2>;
+		trigger-external;
+	};
+
+	trigger at 2 {
+		reg = <2>;
+		trigger-name = "external-any";
+		trigger-value = <0x3>;
+		trigger-external;
+	};
+
+	trigger at 3 {
+		reg = <3>;
+		trigger-name = "continuous";
+		trigger-value = <0x6>;
+	};
+};
-- 
1.8.3.2

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

* [PATCHv3 3/8] ARM: at91/dt: at91-ariag25: remove useless adc properties
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 1/8] Documentation: dt: iio: improve atmel-adc documentation Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 2/8] Documentation: dt: iio: move arm/atmel-adc.txt to iio/adc/at91_adc.txt Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 4/8] ARM: at91/dt: at91sam9260: " Alexandre Belloni
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the properties that are not used anymore by the at91_adc driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
Cc: Douglas Gilbert <dgilbert@interlog•com>
---
 arch/arm/boot/dts/at91-ariag25.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/at91-ariag25.dts b/arch/arm/boot/dts/at91-ariag25.dts
index cce45f5177f9..55ab6180e350 100644
--- a/arch/arm/boot/dts/at91-ariag25.dts
+++ b/arch/arm/boot/dts/at91-ariag25.dts
@@ -129,7 +129,6 @@
 			adc0: adc at f804c000 {
 				status = "okay";
 				atmel,adc-channels-used = <0xf>;
-				atmel,adc-num-channels = <4>;
 			};
 
 			dbgu: serial at fffff200 {
-- 
1.8.3.2

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

* [PATCHv3 4/8] ARM: at91/dt: at91sam9260: remove useless adc properties
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
                   ` (2 preceding siblings ...)
  2014-03-10 19:17 ` [PATCHv3 3/8] ARM: at91/dt: at91-ariag25: remove useless adc properties Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 5/8] ARM: at91/dt: at91sam9g45: " Alexandre Belloni
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the properties that are not used anymore by the at91_adc driver.

Also, add #address-cells, #size-cells and a reg for each trigger to comply to
the ePAPR.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
---
 arch/arm/boot/dts/at91sam9260.dtsi | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 997901f7ed73..366fc2cbcd64 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -608,37 +608,38 @@
 			};
 
 			adc0: adc at fffe0000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "atmel,at91sam9260-adc";
 				reg = <0xfffe0000 0x100>;
 				interrupts = <5 IRQ_TYPE_LEVEL_HIGH 0>;
 				atmel,adc-use-external-triggers;
 				atmel,adc-channels-used = <0xf>;
 				atmel,adc-vref = <3300>;
-				atmel,adc-num-channels = <4>;
 				atmel,adc-startup-time = <15>;
-				atmel,adc-channel-base = <0x30>;
-				atmel,adc-drdy-mask = <0x10000>;
-				atmel,adc-status-register = <0x1c>;
-				atmel,adc-trigger-register = <0x04>;
 				atmel,adc-res = <8 10>;
 				atmel,adc-res-names = "lowres", "highres";
 				atmel,adc-use-res = "highres";
 
 				trigger at 0 {
+					reg = <0>;
 					trigger-name = "timer-counter-0";
 					trigger-value = <0x1>;
 				};
 				trigger at 1 {
+					reg = <1>;
 					trigger-name = "timer-counter-1";
 					trigger-value = <0x3>;
 				};
 
 				trigger at 2 {
+					reg = <2>;
 					trigger-name = "timer-counter-2";
 					trigger-value = <0x5>;
 				};
 
 				trigger at 3 {
+					reg = <3>;
 					trigger-name = "external";
 					trigger-value = <0x13>;
 					trigger-external;
-- 
1.8.3.2

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

* [PATCHv3 5/8] ARM: at91/dt: at91sam9g45: remove useless adc properties
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
                   ` (3 preceding siblings ...)
  2014-03-10 19:17 ` [PATCHv3 4/8] ARM: at91/dt: at91sam9260: " Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 6/8] ARM: at91/dt: at91sam9x5: " Alexandre Belloni
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the properties that are not used anymore by the at91_adc driver.

Also, add #address-cells, #size-cells and a reg for each trigger to comply to
the ePAPR.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
---
 arch/arm/boot/dts/at91sam9g45.dtsi | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index cbcc058b26b4..dc4fb7d99902 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -632,40 +632,41 @@
 			};
 
 			adc0: adc at fffb0000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "atmel,at91sam9260-adc";
 				reg = <0xfffb0000 0x100>;
 				interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
 				atmel,adc-use-external-triggers;
 				atmel,adc-channels-used = <0xff>;
 				atmel,adc-vref = <3300>;
-				atmel,adc-num-channels = <8>;
 				atmel,adc-startup-time = <40>;
-				atmel,adc-channel-base = <0x30>;
-				atmel,adc-drdy-mask = <0x10000>;
-				atmel,adc-status-register = <0x1c>;
-				atmel,adc-trigger-register = <0x08>;
 				atmel,adc-res = <8 10>;
 				atmel,adc-res-names = "lowres", "highres";
 				atmel,adc-use-res = "highres";
 
 				trigger at 0 {
+					reg = <0>;
 					trigger-name = "external-rising";
 					trigger-value = <0x1>;
 					trigger-external;
 				};
 				trigger at 1 {
+					reg = <1>;
 					trigger-name = "external-falling";
 					trigger-value = <0x2>;
 					trigger-external;
 				};
 
 				trigger at 2 {
+					reg = <2>;
 					trigger-name = "external-any";
 					trigger-value = <0x3>;
 					trigger-external;
 				};
 
 				trigger at 3 {
+					reg = <3>;
 					trigger-name = "continuous";
 					trigger-value = <0x6>;
 				};
-- 
1.8.3.2

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

* [PATCHv3 6/8] ARM: at91/dt: at91sam9x5: remove useless adc properties
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
                   ` (4 preceding siblings ...)
  2014-03-10 19:17 ` [PATCHv3 5/8] ARM: at91/dt: at91sam9g45: " Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 7/8] ARM: at91/dt: sama5d3: " Alexandre Belloni
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the properties that are not used anymore by the at91_adc driver and fix
the atmel,adc-use-external-triggers property name.

Also, add #address-cells, #size-cells and a reg for each trigger to comply to
the ePAPR.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
---
 arch/arm/boot/dts/at91sam9x5.dtsi | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 174219de92fa..8ef774a045d2 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -621,41 +621,42 @@
 			};
 
 			adc0: adc at f804c000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "atmel,at91sam9260-adc";
 				reg = <0xf804c000 0x100>;
 				interrupts = <19 IRQ_TYPE_LEVEL_HIGH 0>;
-				atmel,adc-use-external;
+				atmel,adc-use-external-triggers;
 				atmel,adc-channels-used = <0xffff>;
 				atmel,adc-vref = <3300>;
-				atmel,adc-num-channels = <12>;
 				atmel,adc-startup-time = <40>;
-				atmel,adc-channel-base = <0x50>;
-				atmel,adc-drdy-mask = <0x1000000>;
-				atmel,adc-status-register = <0x30>;
-				atmel,adc-trigger-register = <0xc0>;
 				atmel,adc-res = <8 10>;
 				atmel,adc-res-names = "lowres", "highres";
 				atmel,adc-use-res = "highres";
 
 				trigger at 0 {
+					reg = <0>;
 					trigger-name = "external-rising";
 					trigger-value = <0x1>;
 					trigger-external;
 				};
 
 				trigger at 1 {
+					reg = <1>;
 					trigger-name = "external-falling";
 					trigger-value = <0x2>;
 					trigger-external;
 				};
 
 				trigger at 2 {
+					reg = <2>;
 					trigger-name = "external-any";
 					trigger-value = <0x3>;
 					trigger-external;
 				};
 
 				trigger at 3 {
+					reg = <3>;
 					trigger-name = "continuous";
 					trigger-value = <0x6>;
 				};
-- 
1.8.3.2

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

* [PATCHv3 7/8] ARM: at91/dt: sama5d3: remove useless adc properties
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
                   ` (5 preceding siblings ...)
  2014-03-10 19:17 ` [PATCHv3 6/8] ARM: at91/dt: at91sam9x5: " Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-10 19:17 ` [PATCHv3 8/8] ARM: at91/dt: at91-cosino: " Alexandre Belloni
  2014-03-12 18:19 ` [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Nicolas Ferre
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the properties that are not used anymore by the at91_adc driver and fix
the atmel,adc-use-external-triggers property name.

Also, add #address-cells, #size-cells and a reg for each trigger to comply to
the ePAPR.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
---
 arch/arm/boot/dts/sama5d3.dtsi    | 13 +++++++------
 arch/arm/boot/dts/sama5d3xdm.dtsi |  1 -
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi
index 26d7ed510c96..73ad828296b2 100644
--- a/arch/arm/boot/dts/sama5d3.dtsi
+++ b/arch/arm/boot/dts/sama5d3.dtsi
@@ -239,6 +239,8 @@
 			};
 
 			adc0: adc at f8018000 {
+				#address-cells = <1>;
+				#size-cells = <0>;
 				compatible = "atmel,at91sam9x5-adc";
 				reg = <0xf8018000 0x100>;
 				interrupts = <29 IRQ_TYPE_LEVEL_HIGH 5>;
@@ -261,35 +263,34 @@
 				clocks = <&adc_clk>,
 					 <&adc_op_clk>;
 				clock-names = "adc_clk", "adc_op_clk";
-				atmel,adc-channel-base = <0x50>;
 				atmel,adc-channels-used = <0xfff>;
-				atmel,adc-drdy-mask = <0x1000000>;
-				atmel,adc-num-channels = <12>;
 				atmel,adc-startup-time = <40>;
-				atmel,adc-status-register = <0x30>;
-				atmel,adc-trigger-register = <0xc0>;
-				atmel,adc-use-external;
+				atmel,adc-use-external-triggers;
 				atmel,adc-vref = <3000>;
 				atmel,adc-res = <10 12>;
 				atmel,adc-res-names = "lowres", "highres";
 				status = "disabled";
 
 				trigger at 0 {
+					reg = <0>;
 					trigger-name = "external-rising";
 					trigger-value = <0x1>;
 					trigger-external;
 				};
 				trigger at 1 {
+					reg = <1>;
 					trigger-name = "external-falling";
 					trigger-value = <0x2>;
 					trigger-external;
 				};
 				trigger at 2 {
+					reg = <2>;
 					trigger-name = "external-any";
 					trigger-value = <0x3>;
 					trigger-external;
 				};
 				trigger at 3 {
+					reg = <3>;
 					trigger-name = "continuous";
 					trigger-value = <0x6>;
 				};
diff --git a/arch/arm/boot/dts/sama5d3xdm.dtsi b/arch/arm/boot/dts/sama5d3xdm.dtsi
index 0b8f5d106ff2..035ab72b3990 100644
--- a/arch/arm/boot/dts/sama5d3xdm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xdm.dtsi
@@ -23,7 +23,6 @@
 			};
 
 			adc0: adc at f8018000 {
-				atmel,adc-clock-rate = <1000000>;
 				atmel,adc-ts-wires = <4>;
 				atmel,adc-ts-pressure-threshold = <10000>;
 				status = "okay";
-- 
1.8.3.2

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

* [PATCHv3 8/8] ARM: at91/dt: at91-cosino: remove useless adc properties
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
                   ` (6 preceding siblings ...)
  2014-03-10 19:17 ` [PATCHv3 7/8] ARM: at91/dt: sama5d3: " Alexandre Belloni
@ 2014-03-10 19:17 ` Alexandre Belloni
  2014-03-12 18:19 ` [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Nicolas Ferre
  8 siblings, 0 replies; 10+ messages in thread
From: Alexandre Belloni @ 2014-03-10 19:17 UTC (permalink / raw)
  To: linux-arm-kernel

Remove the properties that are not used anymore by the at91_adc driver.

Cc: Rodolfo Giometti <giometti@linux•it>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons•com>
---
 arch/arm/boot/dts/at91-cosino.dtsi         | 1 -
 arch/arm/boot/dts/at91-cosino_mega2560.dts | 1 -
 2 files changed, 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91-cosino.dtsi b/arch/arm/boot/dts/at91-cosino.dtsi
index 2093c4d7cd6a..df4b78695695 100644
--- a/arch/arm/boot/dts/at91-cosino.dtsi
+++ b/arch/arm/boot/dts/at91-cosino.dtsi
@@ -64,7 +64,6 @@
 			};
 
 			adc0: adc at f804c000 {
-				atmel,adc-clock-rate = <1000000>;
 				atmel,adc-ts-wires = <4>;
 				atmel,adc-ts-pressure-threshold = <10000>;
 				status = "okay";
diff --git a/arch/arm/boot/dts/at91-cosino_mega2560.dts b/arch/arm/boot/dts/at91-cosino_mega2560.dts
index f9415dd11f17..a542d5837a17 100644
--- a/arch/arm/boot/dts/at91-cosino_mega2560.dts
+++ b/arch/arm/boot/dts/at91-cosino_mega2560.dts
@@ -27,7 +27,6 @@
 			};
 
 			adc0: adc at f804c000 {
-				atmel,adc-clock-rate = <1000000>;
 				atmel,adc-ts-wires = <4>;
 				atmel,adc-ts-pressure-threshold = <10000>;
 				status = "okay";
-- 
1.8.3.2

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

* [PATCHv3 0/8] at91_adc: documentation and device tree cleanups
  2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
                   ` (7 preceding siblings ...)
  2014-03-10 19:17 ` [PATCHv3 8/8] ARM: at91/dt: at91-cosino: " Alexandre Belloni
@ 2014-03-12 18:19 ` Nicolas Ferre
  8 siblings, 0 replies; 10+ messages in thread
From: Nicolas Ferre @ 2014-03-12 18:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 10/03/2014 20:17, Alexandre Belloni :
> The first patch synchronise the documentation with the actual code and correct
> the example.
> 
> The second patch move the documentation to the correct location (under iio/adc)
> 
> The remaining patches correct the device trees that are using the adc, mainly
> removing unused properties and making the binding compliant with the ePAPR.

On the whole series:

Acked-by: Nicolas Ferre <nicolas.ferre@atmel•com>

and stacked on at91-3.15-dt.

I think that the little modifications to the documentation can also go
the arm-soc way: there is no fundamental change to the binding, only
more coherence added.

Bye,

> Changes in v3:
>  - also remove the useless atmel,adc-clock-rate
> 
> Changes in v2:
>  - add #address-cells, #size-cells and a reg for each trigger to comply to the
>    ePAPR instead of removing the unit-address.
>  - also correct the atmel,adc-use-external-triggers property name in the
>    documentation and in the device tree that got it wrong.
> 
> Alexandre Belloni (8):
>   Documentation: dt: iio: improve atmel-adc documentation
>   Documentation: dt: iio: move arm/atmel-adc.txt to iio/adc/at91_adc.txt
>   ARM: at91/dt: at91-ariag25: remove useless adc properties
>   ARM: at91/dt: at91sam9260: remove useless adc properties
>   ARM: at91/dt: at91sam9g45: remove useless adc properties
>   ARM: at91/dt: at91sam9x5: remove useless adc properties
>   ARM: at91/dt: sama5d3: remove useless adc properties
>   ARM: at91/dt: at91-cosino: remove useless adc properties
> 
>  .../devicetree/bindings/arm/atmel-adc.txt          | 81 ---------------------
>  .../devicetree/bindings/iio/adc/at91_adc.txt       | 82 ++++++++++++++++++++++
>  arch/arm/boot/dts/at91-ariag25.dts                 |  1 -
>  arch/arm/boot/dts/at91-cosino.dtsi                 |  1 -
>  arch/arm/boot/dts/at91-cosino_mega2560.dts         |  1 -
>  arch/arm/boot/dts/at91sam9260.dtsi                 | 11 +--
>  arch/arm/boot/dts/at91sam9g45.dtsi                 | 11 +--
>  arch/arm/boot/dts/at91sam9x5.dtsi                  | 13 ++--
>  arch/arm/boot/dts/sama5d3.dtsi                     | 13 ++--
>  arch/arm/boot/dts/sama5d3xdm.dtsi                  |  1 -
>  10 files changed, 108 insertions(+), 107 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/atmel-adc.txt
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/at91_adc.txt
> 


-- 
Nicolas Ferre

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

end of thread, other threads:[~2014-03-12 18:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-10 19:17 [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 1/8] Documentation: dt: iio: improve atmel-adc documentation Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 2/8] Documentation: dt: iio: move arm/atmel-adc.txt to iio/adc/at91_adc.txt Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 3/8] ARM: at91/dt: at91-ariag25: remove useless adc properties Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 4/8] ARM: at91/dt: at91sam9260: " Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 5/8] ARM: at91/dt: at91sam9g45: " Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 6/8] ARM: at91/dt: at91sam9x5: " Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 7/8] ARM: at91/dt: sama5d3: " Alexandre Belloni
2014-03-10 19:17 ` [PATCHv3 8/8] ARM: at91/dt: at91-cosino: " Alexandre Belloni
2014-03-12 18:19 ` [PATCHv3 0/8] at91_adc: documentation and device tree cleanups Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox