linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/20]  dt-bindings:iio:adc: Another set of yaml conversions.
@ 2020-09-09 17:59 Jonathan Cameron
  2020-09-09 17:59 ` [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml Jonathan Cameron
                   ` (19 more replies)
  0 siblings, 20 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Changes since V1:
- Fixed wrong file naming in the marvell,berlin2-adc header caught
  by Rob's scripts.
- Rolled in Martin's patch for amlogic,meson-saradc
- Changed maitainer for adi,ad7768-1 given Stefan's email address
  is bouncing.  I went with Michael Hennerich as the ADI catch all
  MAINTAINERS entry means this is his problem anyway.
- Fixed some white space issues and typos (yup I didn't run checkpatch
  on v1 :(
- Add tags where given

It is somewhat easier to do these all at once as then the yaml syntax
knowledge builds up and Rob once said he preferred to review them
in groups. Hence here are 20 binding conversions to enjoy.

There are 2 other bindings currently awaiting v2 review and it may
take a while to convert over the remaining IIO ADC ones as they
are mostly the complex cases. There are also quite a few drivers
that have undocumented bindings. I plan to do a sweep for those once
yaml conversions are finished.

For maintainers, I've mostly gone with the original author of the
txt file. If anyone wants to claim responsibility for any or
reject it then that is great.  I'll act as backup maintainer
for all of these by default anyway.

There are a few places I think we could look to tighten the binding
definitions if we wish. Hopefully this will be a good layer to build on.

Thanks,

Jonathan

Jonathan Cameron (20):
  dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml.
  dt-bindings:iio:adc:ti,twl4030-madc yaml conversion
  dt-bindings:iio:adc:st,stmpe-adc yaml conversion
  dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  dt-bindings:iio:adc:marvell,berlin2-adc yaml conversion
  dt-bindings:iio:adc:sprd,sc2720-adc yaml conversion.
  dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion
  dt-bindings:iio:adc:nuvoton,npcm750-adc yaml conversion
  dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion
  dt-bindings:iio:adc:lpc3220-adc yaml conversion
  dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion
  dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion
  dt-bindings:iio:adc:cosmic,10001-adc yaml conversion
  dt-bindings:iio:adc:adi,ad7949 yaml conversion
  dt-bindings:iio:adc:ad7768-1 yaml conversion
  dt-bindings:iio:adc:ti,ads1015 yaml conversion
  dt-bindings:iio:adc:holt,hi8435 yaml conversion
  dt-bindings:iio:adc:amlogic,meson-saradc yaml conversion
  dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion
  dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion

 .../devicetree/bindings/iio/adc/ad7949.txt    |  16 --
 .../bindings/iio/adc/adi,ad7768-1.txt         |  41 -----
 .../bindings/iio/adc/adi,ad7768-1.yaml        |  89 +++++++++++
 .../bindings/iio/adc/adi,ad7949.yaml          |  57 +++++++
 .../devicetree/bindings/iio/adc/ads1015.txt   |  73 ---------
 .../bindings/iio/adc/amlogic,meson-saradc.txt |  48 ------
 .../iio/adc/amlogic,meson-saradc.yaml         | 149 ++++++++++++++++++
 .../bindings/iio/adc/aspeed,ast2400-adc.yaml  |  54 +++++++
 .../bindings/iio/adc/aspeed_adc.txt           |  22 ---
 .../bindings/iio/adc/berlin2_adc.txt          |  19 ---
 .../bindings/iio/adc/cc10001_adc.txt          |  22 ---
 .../bindings/iio/adc/cosmic,10001-adc.yaml    |  59 +++++++
 .../devicetree/bindings/iio/adc/cpcap-adc.txt |  17 --
 .../bindings/iio/adc/da9150-gpadc.txt         |  16 --
 .../bindings/iio/adc/dlg,da9150-gpadc.yaml    |  33 ++++
 .../bindings/iio/adc/fsl,imx25-gcq.txt        |  57 -------
 .../bindings/iio/adc/fsl,imx25-gcq.yaml       | 129 +++++++++++++++
 .../bindings/iio/adc/fsl,imx7d-adc.yaml       |  62 ++++++++
 .../bindings/iio/adc/fsl,vf610-adc.yaml       |  81 ++++++++++
 .../devicetree/bindings/iio/adc/hi8435.txt    |  21 ---
 .../bindings/iio/adc/holt,hi8435.yaml         |  49 ++++++
 .../devicetree/bindings/iio/adc/imx7d-adc.txt |  24 ---
 .../bindings/iio/adc/lpc1850-adc.txt          |  20 ---
 .../bindings/iio/adc/lpc32xx-adc.txt          |  21 ---
 .../bindings/iio/adc/marvell,berlin2-adc.yaml |  50 ++++++
 .../bindings/iio/adc/motorola,cpcap-adc.yaml  |  51 ++++++
 .../bindings/iio/adc/nuvoton,nau7802.yaml     |  50 ++++++
 .../bindings/iio/adc/nuvoton,npcm-adc.txt     |  26 ---
 .../bindings/iio/adc/nuvoton,npcm750-adc.yaml |  64 ++++++++
 .../bindings/iio/adc/nuvoton-nau7802.txt      |  18 ---
 .../bindings/iio/adc/nxp,lpc1850-adc.yaml     |  61 +++++++
 .../bindings/iio/adc/nxp,lpc3220-adc.yaml     |  50 ++++++
 .../bindings/iio/adc/sprd,sc2720-adc.yaml     |  72 +++++++++
 .../bindings/iio/adc/sprd,sc27xx-adc.txt      |  40 -----
 .../bindings/iio/adc/st,stmpe-adc.yaml        |  45 ++++++
 .../devicetree/bindings/iio/adc/stmpe-adc.txt |  21 ---
 .../bindings/iio/adc/ti,ads1015.yaml          | 113 +++++++++++++
 .../bindings/iio/adc/ti,twl4030-madc.yaml     |  48 ++++++
 .../bindings/iio/adc/twl4030-madc.txt         |  24 ---
 .../devicetree/bindings/iio/adc/vf610-adc.txt |  36 -----
 40 files changed, 1366 insertions(+), 582 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/ad7949.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/ads1015.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/hi8435.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/marvell,berlin2-adc.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/sprd,sc27xx-adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,twl4030-madc.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/vf610-adc.txt

-- 
2.28.0


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

* [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml.
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:00   ` Rob Herring
  2020-09-15 20:45   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion Jonathan Cameron
                   ` (18 subsequent siblings)
  19 siblings, 2 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Fugang Duan,
	Shawn Guo, Sascha Hauer

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

A simple conversion of this freescale ADC binding from txt to yaml.
For maintainer I went with Fugang Duan as the original author of the
binding. Would be great to have confirmation of this.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Fugang Duan <B38611@freescale.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 .../bindings/iio/adc/fsl,vf610-adc.yaml       | 81 +++++++++++++++++++
 .../devicetree/bindings/iio/adc/vf610-adc.txt | 36 ---------
 2 files changed, 81 insertions(+), 36 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
new file mode 100644
index 000000000000..99b6b55fd0a3
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/fsl,vf610-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ADC found on Freescale vf610 and similar SoCs
+
+maintainers:
+  - Fugang Duan <B38611@freescale.com>
+
+description:
+  ADCs found on vf610/i.MX6slx and upward SoCs from Freescale.
+
+properties:
+  compatible:
+    const: fsl,vf610-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    description: ADC source clock (ipg clock)
+    maxItems: 1
+
+  clock-names:
+    const: adc
+
+  vref-supply:
+    description: ADC reference voltage supply.
+
+  fsl,adck-max-frequency:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 3
+    maxItems: 3
+    description: |
+      Maximum frequencies from datasheet operating requirements.
+      Three values necessary to cover the 3 conversion modes.
+      * Frequency in normal mode (ADLPC=0, ADHSC=0)
+      * Frequency in high-speed mode (ADLPC=0, ADHSC=1)
+      * Frequency in low-power mode (ADLPC=1, ADHSC=0)
+
+  min-sample-time:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Minimum sampling time in nanoseconds. This value has
+      to be chosen according to the conversion mode and the connected analog
+      source resistance (R_as) and capacitance (C_as). Refer the datasheet's
+      operating requirements. A safe default across a wide range of R_as and
+      C_as as well as conversion modes is 1000ns.
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - vref-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/vf610-clock.h>
+    adc@4003b000 {
+        compatible = "fsl,vf610-adc";
+        reg = <0x4003b000 0x1000>;
+        interrupts = <0 53 0x04>;
+        clocks = <&clks VF610_CLK_ADC0>;
+        clock-names = "adc";
+        fsl,adck-max-frequency = <30000000>, <40000000>, <20000000>;
+        vref-supply = <&reg_vcc_3v3_mcu>;
+        min-sample-time = <10000>;
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt b/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt
deleted file mode 100644
index 1aad0514e647..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/vf610-adc.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-Freescale vf610 Analog to Digital Converter bindings
-
-The devicetree bindings are for the new ADC driver written for
-vf610/i.MX6slx and upward SoCs from Freescale.
-
-Required properties:
-- compatible: Should contain "fsl,vf610-adc"
-- reg: Offset and length of the register set for the device
-- interrupts: Should contain the interrupt for the device
-- clocks: The clock is needed by the ADC controller, ADC clock source is ipg clock.
-- clock-names: Must contain "adc", matching entry in the clocks property.
-- vref-supply: The regulator supply ADC reference voltage.
-
-Recommended properties:
-- fsl,adck-max-frequency: Maximum frequencies according to datasheets operating
-  requirements. Three values are required, depending on conversion mode:
-  - Frequency in normal mode (ADLPC=0, ADHSC=0)
-  - Frequency in high-speed mode (ADLPC=0, ADHSC=1)
-  - Frequency in low-power mode (ADLPC=1, ADHSC=0)
-- min-sample-time: Minimum sampling time in nanoseconds. This value has
-  to be chosen according to the conversion mode and the connected analog
-  source resistance (R_as) and capacitance (C_as). Refer the datasheet's
-  operating requirements. A safe default across a wide range of R_as and
-  C_as as well as conversion modes is 1000ns.
-
-Example:
-adc0: adc@4003b000 {
-	compatible = "fsl,vf610-adc";
-	reg = <0x4003b000 0x1000>;
-	interrupts = <0 53 0x04>;
-	clocks = <&clks VF610_CLK_ADC0>;
-	clock-names = "adc";
-	fsl,adck-max-frequency = <30000000>, <40000000>,
-				<20000000>;
-	vref-supply = <&reg_vcc_3v3_mcu>;
-};
-- 
2.28.0


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

* [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
  2020-09-09 17:59 ` [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:01   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc " Jonathan Cameron
                   ` (17 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Sebastian Reichel

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Conversion from txt to yaml as part of a general move of IIO bindings
to the new format.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Sebastian Reichel <sre@kernel.org>
---
 .../bindings/iio/adc/ti,twl4030-madc.yaml     | 48 +++++++++++++++++++
 .../bindings/iio/adc/twl4030-madc.txt         | 24 ----------
 2 files changed, 48 insertions(+), 24 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,twl4030-madc.yaml b/Documentation/devicetree/bindings/iio/adc/ti,twl4030-madc.yaml
new file mode 100644
index 000000000000..6781ad2f0f51
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,twl4030-madc.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,twl4030-madc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MADC subsystem in the TWL4030 power module
+
+maintainers:
+  - Sebastian Reichel <sre@kernel.org>
+
+description:
+  The MADC subsystem in the TWL4030 consists of a 10-bit ADC
+  combined with a 16-input analog multiplexer.
+
+properties:
+  compatible:
+    const: ti,twl4030-madc
+
+  interrupts:
+    maxItems: 1
+
+  ti,system-uses-second-madc-irq:
+    type: boolean
+    description:
+      Set if the second madc irq register should be used, which is intended
+      to be used  by Co-Processors (e.g. a modem).
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - interrupts
+  - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    twl {
+        madc {
+            compatible = "ti,twl4030-madc";
+            interrupts = <3>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt b/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt
deleted file mode 100644
index 6bdd21404b57..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/twl4030-madc.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-* TWL4030 Monitoring Analog to Digital Converter (MADC)
-
-The MADC subsystem in the TWL4030 consists of a 10-bit ADC
-combined with a 16-input analog multiplexer.
-
-Required properties:
-  - compatible: Should contain "ti,twl4030-madc".
-  - interrupts: IRQ line for the MADC submodule.
-  - #io-channel-cells: Should be set to <1>.
-
-Optional properties:
-  - ti,system-uses-second-madc-irq: boolean, set if the second madc irq register
-				    should be used, which is intended to be used
-				    by Co-Processors (e.g. a modem).
-
-Example:
-
-&twl {
-	madc {
-		compatible = "ti,twl4030-madc";
-		interrupts = <3>;
-		#io-channel-cells = <1>;
-	};
-};
-- 
2.28.0


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

* [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
  2020-09-09 17:59 ` [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml Jonathan Cameron
  2020-09-09 17:59 ` [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:02   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 " Jonathan Cameron
                   ` (16 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Stefan Agner

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Conversion from freeform text to yaml.
One oddity in this binding is that, for historical reasons it requires
the node name to be stmpe_adc.  I've put that in the decription field
but I'm not sure if there is a better way to specify this?

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Stefan Agner <stefan@agner.ch>
---
 .../bindings/iio/adc/st,stmpe-adc.yaml        | 45 +++++++++++++++++++
 .../devicetree/bindings/iio/adc/stmpe-adc.txt | 21 ---------
 2 files changed, 45 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml
new file mode 100644
index 000000000000..9049c699152f
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/st,stmpe-adc.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/st,stmpe-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ADC on an STMPE multifunction device.
+
+maintainers:
+  - Stefan Agner <stefan@agner.ch>
+
+description:
+  This ADC forms part of an ST microelectronics STMPE multifunction device .
+  The ADC is shared with the STMPE touchscreen. As a result some ADC related
+  settings are specified in the parent node.
+  The node name myst be stmpe_adc and should be a child node of the stmpe node
+  to which it belongs.
+
+properties:
+  compatible:
+    const: st,stmpe-adc
+
+  st,norequest-mask:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Bitmask specifying which ADC channels should _not_ be
+      requestable due to different usage (e.g. touch).
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    stmpe {
+        stmpe_adc {
+            compatible = "st,stmpe-adc";
+            st,norequest-mask = <0x0F>; /* dont use ADC CH3-0 */
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt b/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt
deleted file mode 100644
index 480e66422625..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-STMPE ADC driver
-----------------
-
-Required properties:
- - compatible: "st,stmpe-adc"
-
-Optional properties:
-Note that the ADC is shared with the STMPE touchscreen. ADC related settings
-have to be done in the mfd.
-- st,norequest-mask: bitmask specifying which ADC channels should _not_ be
-  requestable due to different usage (e.g. touch)
-
-Node name must be stmpe_adc and should be child node of stmpe node to
-which it belongs.
-
-Example:
-
-	stmpe_adc {
-		compatible = "st,stmpe-adc";
-		st,norequest-mask = <0x0F>; /* dont use ADC CH3-0 */
-	};
-- 
2.28.0


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

* [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (2 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-10  2:32   ` Joel Stanley
  2020-09-15 19:03   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc " Jonathan Cameron
                   ` (15 subsequent siblings)
  19 siblings, 2 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Rick Altherr,
	Joel Stanley, Andrew Jeffery

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Simple txt to yaml conversion. Part of a general move to convert
all the IIO bindings over to yaml.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Rick Altherr <raltherr@google.com>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@aj.id.au>
---
 .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
 .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
 2 files changed, 54 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
new file mode 100644
index 000000000000..09018487d690
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ADC that forms part of an ASPEED server management processor.
+
+maintainers:
+  - Rick Altherr <raltherr@google.com>
+
+description:
+  This device is a 10-bit converter for 16 voltage channels.  All inputs are
+  single ended.
+
+properties:
+  compatible:
+    enum:
+      - aspeed,ast2400-adc
+      - aspeed,ast2500-adc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description:
+      Input clock used to derive the sample clock. Expected to be the
+      SoC's APB clock.
+
+  resets: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - resets
+  - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/aspeed-clock.h>
+    adc@1e6e9000 {
+        compatible = "aspeed,ast2400-adc";
+        reg = <0x1e6e9000 0xb0>;
+        clocks = <&syscon ASPEED_CLK_APB>;
+        resets = <&syscon ASPEED_RESET_ADC>;
+        #io-channel-cells = <1>;
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
deleted file mode 100644
index 034fc2ba100e..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Aspeed ADC
-
-This device is a 10-bit converter for 16 voltage channels.  All inputs are
-single ended.
-
-Required properties:
-- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
-- reg: memory window mapping address and length
-- clocks: Input clock used to derive the sample clock. Expected to be the
-          SoC's APB clock.
-- resets: Reset controller phandle
-- #io-channel-cells: Must be set to <1> to indicate channels are selected
-                     by index.
-
-Example:
-	adc@1e6e9000 {
-		compatible = "aspeed,ast2400-adc";
-		reg = <0x1e6e9000 0xb0>;
-		clocks = <&syscon ASPEED_CLK_APB>;
-		resets = <&syscon ASPEED_RESET_ADC>;
-		#io-channel-cells = <1>;
-	};
-- 
2.28.0


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

* [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (3 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:04   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc " Jonathan Cameron
                   ` (14 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Antoine Tenart

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Part of a general move of IIO bindings over to yaml.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 .../bindings/iio/adc/berlin2_adc.txt          | 19 -------
 .../bindings/iio/adc/marvell,berlin2-adc.yaml | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 19 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt b/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt
deleted file mode 100644
index 908334c6b07f..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/berlin2_adc.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-* Berlin Analog to Digital Converter (ADC)
-
-The Berlin ADC has 8 channels, with one connected to a temperature sensor.
-It is part of the system controller register set. The ADC node should be a
-sub-node of the system controller node.
-
-Required properties:
-- compatible: must be "marvell,berlin2-adc"
-- interrupts: the interrupts for the ADC and the temperature sensor
-- interrupt-names: should be "adc" and "tsen"
-
-Example:
-
-adc: adc {
-	compatible = "marvell,berlin2-adc";
-	interrupt-parent = <&sic>;
-	interrupts = <12>, <14>;
-	interrupt-names = "adc", "tsen";
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/marvell,berlin2-adc.yaml b/Documentation/devicetree/bindings/iio/adc/marvell,berlin2-adc.yaml
new file mode 100644
index 000000000000..b3b292fb1c59
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/marvell,berlin2-adc.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/marvell,berlin2-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Berlin 2 Analog to Digital Converter (ADC)
+
+maintainers:
+  - Antoine Tenart <antoine.tenart@free-electrons.com>
+
+description:
+  The Berlin ADC has 8 channels, with one connected to a temperature sensor.
+  It is part of the system controller register set. The ADC node should be a
+  sub-node of the system controller node.
+
+properties:
+  compatible:
+    const: marvell,berlin2-adc
+
+  interrupts:
+    minItems: 2
+    maxItems: 2
+
+  interrupt-names:
+    items:
+      - const: adc
+      - const: tsen
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - interrupts
+  - interrupt-names
+
+additionalProperties: false
+
+examples:
+  - |
+    sysctrl {
+        adc {
+            compatible = "marvell,berlin2-adc";
+            interrupt-parent = <&sic>;
+            interrupts = <12>, <14>;
+            interrupt-names = "adc", "tsen";
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc yaml conversion.
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (4 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:05   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 " Jonathan Cameron
                   ` (13 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Orson Zhai,
	Baolin Wang, Chunyan Zhang

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

I changed the name to reflect a specific part in line with normal
naming conventions. If there is a particularly strong reason to
keep the wild cards let me know.

Otherwise this was a fairly simple conversion as part of converting
all the IIO bindings to yaml.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Orson Zhai <orsonzhai@gmail.com>
Cc: Baolin Wang <baolin.wang7@gmail.com>
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
---
 .../bindings/iio/adc/sprd,sc2720-adc.yaml     | 72 +++++++++++++++++++
 .../bindings/iio/adc/sprd,sc27xx-adc.txt      | 40 -----------
 2 files changed, 72 insertions(+), 40 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml b/Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml
new file mode 100644
index 000000000000..caa3ee0b4b8c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/sprd,sc2720-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Spreadtrum SC27XX series PMICs ADC binding
+
+maintainers:
+  - Baolin Wang <baolin.wang7@gmail.com>
+
+description:
+  Supports the ADC found on these PMICs.
+
+properties:
+  compatible:
+    enum:
+      - sprd,sc2720-adc
+      - sprd,sc2721-adc
+      - sprd,sc2723-adc
+      - sprd,sc2730-adc
+      - sprd,sc2731-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  "#io-channel-cells":
+    const: 1
+
+  hwlocks:
+    maxItems: 1
+
+  nvmem-cells:
+    maxItems: 2
+
+  nvmem-cell-names:
+    items:
+      - const: big_scale_calib
+      - const: small_scale_calib
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#io-channel-cells"
+  - hwlocks
+  - nvmem-cells
+  - nvmem-cell-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    pmic {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        adc@480 {
+            compatible = "sprd,sc2731-adc";
+            reg = <0x480>;
+            interrupt-parent = <&sc2731_pmic>;
+            interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+            #io-channel-cells = <1>;
+            hwlocks = <&hwlock 4>;
+            nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
+            nvmem-cell-names = "big_scale_calib", "small_scale_calib";
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/sprd,sc27xx-adc.txt b/Documentation/devicetree/bindings/iio/adc/sprd,sc27xx-adc.txt
deleted file mode 100644
index b4daa15dcf15..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/sprd,sc27xx-adc.txt
+++ /dev/null
@@ -1,40 +0,0 @@
-Spreadtrum SC27XX series PMICs ADC binding
-
-Required properties:
-- compatible: Should be one of the following.
-	"sprd,sc2720-adc"
-	"sprd,sc2721-adc"
-	"sprd,sc2723-adc"
-	"sprd,sc2730-adc"
-	"sprd,sc2731-adc"
-- reg: The address offset of ADC controller.
-- interrupt-parent: The interrupt controller.
-- interrupts: The interrupt number for the ADC device.
-- #io-channel-cells: Number of cells in an IIO specifier.
-- hwlocks: Reference to a phandle of a hwlock provider node.
-- nvmem-cells: A phandle to the calibration cells provided by eFuse device.
-- nvmem-cell-names: Should be "big_scale_calib", "small_scale_calib".
-
-Example:
-
-	sc2731_pmic: pmic@0 {
-		compatible = "sprd,sc2731";
-		reg = <0>;
-		spi-max-frequency = <26000000>;
-		interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
-		interrupt-controller;
-		#interrupt-cells = <2>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		pmic_adc: adc@480 {
-			compatible = "sprd,sc2731-adc";
-			reg = <0x480>;
-			interrupt-parent = <&sc2731_pmic>;
-			interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
-			#io-channel-cells = <1>;
-			hwlocks = <&hwlock 4>;
-			nvmem-cells = <&adc_big_scale>, <&adc_small_scale>;
-			nvmem-cell-names = "big_scale_calib", "small_scale_calib";
-		};
-	};
-- 
2.28.0


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

* [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (5 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-09 19:19   ` Alexandre Belloni
  2020-09-15 19:06   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc " Jonathan Cameron
                   ` (12 subsequent siblings)
  19 siblings, 2 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Alexandre Belloni,
	Maxime Ripard

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

A simple conversion from txt file to yaml.  I added the #io-channel-cells
property as optional to allow the channels of this ADCs to be used
to provide services to other drivers, for example if an analog
accelerometer is connected.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 .../bindings/iio/adc/nuvoton,nau7802.yaml     | 50 +++++++++++++++++++
 .../bindings/iio/adc/nuvoton-nau7802.txt      | 18 -------
 2 files changed, 50 insertions(+), 18 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml
new file mode 100644
index 000000000000..bcd041ea28a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nuvoton,nau7802.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NAU7802 I2c Analog to Digital Converter (ADC)
+
+maintainers:
+  - Alexandre Belloni <alexandre.belloni@free-electrons.com>
+  - Maxime Ripard <maxime.ripard@free-electrons.com>
+
+properties:
+  compatible:
+    const: nuvoton,nau7802
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  nuvoton,vldo:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Internal reference voltage in millivolts to be configured.
+    minimum: 2400
+    maximum: 4500
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        nau7802@2a {
+            compatible = "nuvoton,nau7802";
+            reg = <0x2a>;
+            nuvoton,vldo = <3000>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt
deleted file mode 100644
index e9582e6fe350..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-* Nuvoton NAU7802 Analog to Digital Converter (ADC)
-
-Required properties:
-  - compatible: Should be "nuvoton,nau7802"
-  - reg: Should contain the ADC I2C address
-
-Optional properties:
-  - nuvoton,vldo: Internal reference voltage in millivolts to be
-    configured valid values are between 2400 mV and 4500 mV.
-  - interrupts: IRQ line for the ADC. If not used the driver will use
-    polling.
-
-Example:
-adc2: nau7802@2a {
-	compatible = "nuvoton,nau7802";
-	reg = <0x2a>;
-	nuvoton,vldo = <3000>;
-};
-- 
2.28.0


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

* [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (6 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:07   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc " Jonathan Cameron
                   ` (11 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Tomer Maimon

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Renamed the file to reflect the only compatible.
Added #io-channel-cells to make it easier to support consumers of the
ADC channels this device provides.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tomer Maimon <tmaimon77@gmail.com>
---
 .../bindings/iio/adc/nuvoton,npcm-adc.txt     | 26 --------
 .../bindings/iio/adc/nuvoton,npcm750-adc.yaml | 64 +++++++++++++++++++
 2 files changed, 64 insertions(+), 26 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt
deleted file mode 100644
index ef8eeec1a997..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Nuvoton NPCM Analog to Digital Converter (ADC)
-
-The NPCM ADC is a 10-bit converter for eight channel inputs.
-
-Required properties:
-- compatible: "nuvoton,npcm750-adc" for the NPCM7XX BMC.
-- reg: specifies physical base address and size of the registers.
-- interrupts: Contain the ADC interrupt with flags for falling edge.
-- resets : phandle to the reset control for this device.
-
-Optional properties:
-- clocks: phandle of ADC reference clock, in case the clock is not
-		  added the ADC will use the default ADC sample rate.
-- vref-supply: The regulator supply ADC reference voltage, in case the
-			   vref-supply is not added the ADC will use internal voltage
-			   reference.
-
-Example:
-
-adc: adc@f000c000 {
-	compatible = "nuvoton,npcm750-adc";
-	reg = <0xf000c000 0x8>;
-	interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&clk NPCM7XX_CLK_ADC>;
-	resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml
new file mode 100644
index 000000000000..001cf263b7d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nuvoton,npcm750-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NPCM BMC Analog to Digital Converter (ADC)
+
+maintainers:
+  - Tomer Maimon <tmaimon77@gmail.com>
+
+description:
+  The NPCM ADC is a 10-bit converter for eight channel inputs.
+
+properties:
+  compatible:
+    const: nuvoton,npcm750-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+    description: ADC interrupt, should be set for falling edge.
+
+  resets:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+    description: If not provided the defulat ADC sample rate will be used.
+
+  vref-supply:
+    description: If not supplied, the internal voltage reference will be used.
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h>
+    #include <dt-bindings/reset/nuvoton,npcm7xx-reset.h>
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@f000c000 {
+            compatible = "nuvoton,npcm750-adc";
+            reg = <0xf000c000 0x8>;
+            interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&clk NPCM7XX_CLK_ADC>;
+            resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>;
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (7 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:07   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc " Jonathan Cameron
                   ` (10 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Joachim Eastwood

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Most of the description in the original doc is effectively boilerplate
and does not bring much value so I have not carried it over into the yaml.

Added #io-channel-cells to simplify use of channels on this ADC by
consumer drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Joachim Eastwood <manabian@gmail.com>
---
 .../bindings/iio/adc/lpc1850-adc.txt          | 20 ------
 .../bindings/iio/adc/nxp,lpc1850-adc.yaml     | 61 +++++++++++++++++++
 2 files changed, 61 insertions(+), 20 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt b/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt
deleted file mode 100644
index 9ada5abd45fa..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-NXP LPC1850 ADC bindings
-
-Required properties:
-- compatible: Should be "nxp,lpc1850-adc"
-- reg: Offset and length of the register set for the ADC device
-- interrupts: The interrupt number for the ADC device
-- clocks: The root clock of the ADC controller
-- vref-supply: The regulator supply ADC reference voltage
-- resets: phandle to reset controller and line specifier
-
-Example:
-
-adc0: adc@400e3000 {
-	compatible = "nxp,lpc1850-adc";
-	reg = <0x400e3000 0x1000>;
-	interrupts = <17>;
-	clocks = <&ccu1 CLK_APB3_ADC0>;
-	vref-supply = <&reg_vdda>;
-	resets = <&rgu 40>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml
new file mode 100644
index 000000000000..6404fb73f8ed
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nxp,lpc1850-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP LPC1850 ADC bindings
+
+maintainers:
+  - Joachim Eastwood <manabian@gmail.com>
+
+description:
+  Supports the ADC found on the LPC1850 SoC.
+
+properties:
+  compatible:
+    const: nxp,lpc1850-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  vref-supply: true
+
+  resets:
+    maxItems: 1
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - vref-supply
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/lpc18xx-ccu.h>
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@400e3000 {
+            compatible = "nxp,lpc1850-adc";
+            reg = <0x400e3000 0x1000>;
+            interrupts = <17>;
+            clocks = <&ccu1 CLK_APB3_ADC0>;
+            vref-supply = <&reg_vdda>;
+            resets = <&rgu 40>;
+         };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (8 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:09   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc " Jonathan Cameron
                   ` (9 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Gregory Clement

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Renamed to remove the wild cards.  These go wrong far too often so
in general preferred to use the name of a specific part.  As this
binding only provides one compatible, I went with that.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Gregory Clement <gregory.clement@bootlin.com>
---
 .../bindings/iio/adc/lpc32xx-adc.txt          | 21 --------
 .../bindings/iio/adc/nxp,lpc3220-adc.yaml     | 50 +++++++++++++++++++
 2 files changed, 50 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt b/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt
deleted file mode 100644
index 3a1bc669bd51..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/lpc32xx-adc.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-* NXP LPC32xx SoC ADC controller
-
-Required properties:
-- compatible: must be "nxp,lpc3220-adc"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- interrupts: The ADC interrupt
-
-Optional:
- - vref-supply: The regulator supply ADC reference voltage, optional
-   for legacy reason, but highly encouraging to us in new device tree
-
-Example:
-
-	adc@40048000 {
-		compatible = "nxp,lpc3220-adc";
-		reg = <0x40048000 0x1000>;
-		interrupt-parent = <&mic>;
-		interrupts = <39 0>;
-		vref-supply = <&vcc>;
-	};
diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml
new file mode 100644
index 000000000000..2c5032be83bd
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/nxp,lpc3220-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP LPC3220 SoC ADC controller
+
+maintainers:
+  - Gregory Clement <gregory.clement@bootlin.com>
+
+description:
+  This hardware block has been used on several LPC32XX SoCs.
+
+properties:
+  compatible:
+    const: nxp,lpc3220-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  vref-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@40048000 {
+            compatible = "nxp,lpc3220-adc";
+            reg = <0x40048000 0x1000>;
+            interrupt-parent = <&mic>;
+            interrupts = <39 0>;
+            vref-supply = <&vcc>;
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (9 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:11   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc " Jonathan Cameron
                   ` (8 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Tony Lindgren

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Conversion from txt to yaml.
Slightly expanded example to give a bit more context.
Description lifted from the original driver commit.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 .../devicetree/bindings/iio/adc/cpcap-adc.txt | 17 -------
 .../bindings/iio/adc/motorola,cpcap-adc.yaml  | 51 +++++++++++++++++++
 2 files changed, 51 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt b/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
deleted file mode 100644
index ec04008e8f4f..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Motorola CPCAP PMIC ADC binding
-
-Required properties:
-- compatible: Should be "motorola,cpcap-adc" or "motorola,mapphone-cpcap-adc"
-- interrupts: The interrupt number for the ADC device
-- interrupt-names: Should be "adcdone"
-- #io-channel-cells: Number of cells in an IIO specifier
-
-Example:
-
-cpcap_adc: adc {
-	compatible = "motorola,mapphone-cpcap-adc";
-	interrupt-parent = <&cpcap>;
-	interrupts = <8 IRQ_TYPE_NONE>;
-	interrupt-names = "adcdone";
-	#io-channel-cells = <1>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
new file mode 100644
index 000000000000..7811c0abd5d0
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/motorola,cpcap-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Motorola CPCAP PMIC ADC binding
+
+maintainers:
+  - Tony Lindgren <tony@atomide.com>
+
+description:
+  On Motorola phones like droid 4 there is a custom CPCAP PMIC. This PMIC
+  has ADCs that are used for battery charging and USB PHY VBUS and ID pin
+  detection.
+
+properties:
+  compatible:
+    enum:
+      - motorola,cpcap-adc
+      - motorola,mapphone-cpcap-adc
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    const: adcdone
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - interrupts
+  - "#io-channel-cells"
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    pmic {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        adc {
+            compatible = "motorola,mapphone-cpcap-adc";
+            interrupt-parent = <&cpcap>;
+            interrupts = <8 IRQ_TYPE_NONE>;
+            interrupt-names = "adcdone";
+            #io-channel-cells = <1>;
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (10 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:12   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc " Jonathan Cameron
                   ` (7 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Adam Thomson

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This is a small part of an MFD so perhaps ultimately it makes more
sense to document it with that MFD binding rather than separately.

In the meantime it's a straightforward conversion from txt to yaml.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
---
 .../bindings/iio/adc/da9150-gpadc.txt         | 16 ---------
 .../bindings/iio/adc/dlg,da9150-gpadc.yaml    | 33 +++++++++++++++++++
 2 files changed, 33 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
deleted file mode 100644
index c07228da92ac..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Dialog Semiconductor DA9150 IIO GPADC bindings
-
-Required properties:
-- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC
-- #io-channel-cells: Should be set to <1>
-  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)
-
-For further information on GPADC channels, see device datasheet.
-
-
-Example:
-
-	gpadc: da9150-gpadc {
-		compatible = "dlg,da9150-gpadc";
-		#io-channel-cells = <1>;
-	};
diff --git a/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
new file mode 100644
index 000000000000..15c51d337108
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/dlg,da9150-gpadc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dialog Semiconductor DA9150 IIO GPADC
+
+maintainers:
+  - Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
+
+description:
+  This patch adds support for general purpose ADC within the
+  DA9150 Charger & Fuel-Gauge IC.
+
+properties:
+  compatible:
+    const: dlg,da9150-gpadc
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - "#io-channel-cells"
+
+examples:
+  - |
+    adc {
+        compatible = "dlg,da9150-gpadc";
+        #io-channel-cells = <1>;
+    };
+...
-- 
2.28.0


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

* [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (11 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:13   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 " Jonathan Cameron
                   ` (6 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Phani Movva

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

I don't really know much about this one, hence the binding is
a simple conversion of what was in the txt file.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Phani Movva <Phani.Movva@imgtec.com>
---
 .../bindings/iio/adc/cc10001_adc.txt          | 22 -------
 .../bindings/iio/adc/cosmic,10001-adc.yaml    | 59 +++++++++++++++++++
 2 files changed, 59 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt b/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt
deleted file mode 100644
index 904f76de9055..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-* Cosmic Circuits - Analog to Digital Converter (CC-10001-ADC)
-
-Required properties:
-  - compatible: Should be "cosmic,10001-adc"
-  - reg: Should contain adc registers location and length.
-  - clock-names: Should contain "adc".
-  - clocks: Should contain a clock specifier for each entry in clock-names
-  - vref-supply: The regulator supply ADC reference voltage.
-
-Optional properties:
-  - adc-reserved-channels: Bitmask of reserved channels,
-    i.e. channels that cannot be used by the OS.
-
-Example:
-adc: adc@18101600 {
-	compatible = "cosmic,10001-adc";
-	reg = <0x18101600 0x24>;
-	adc-reserved-channels = <0x2>;
-	clocks = <&adc_clk>;
-	clock-names = "adc";
-	vref-supply = <&reg_1v8>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml
new file mode 100644
index 000000000000..1c4838d4a547
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/cosmic,10001-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cosmic Circuits CC-10001 ADC
+
+maintainers:
+  - Phani Movva <Phani.Movva@imgtec.com>
+
+description:
+  Cosmic Circuits 10001 10-bit ADC device.
+
+properties:
+  compatible:
+    const: cosmic,10001-adc
+
+  reg:
+    maxItems: 1
+
+  adc-reserved-channels:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+       Bitmask of reserved channels, i.e. channels that cannot be
+       used by the OS.
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: adc
+
+  vref-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - vref-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    adc@18101600 {
+        compatible = "cosmic,10001-adc";
+        reg = <0x18101600 0x24>;
+        adc-reserved-channels = <0x2>;
+        clocks = <&adc_clk>;
+        clock-names = "adc";
+        vref-supply = <&reg_1v8>;
+    };
+...
-- 
2.28.0


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

* [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (12 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:13   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 " Jonathan Cameron
                   ` (5 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Charles-Antoine Couret

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Simple SPI driver. I've added the #io-channel-cells
as an optional parameter to allow use of this device as a provider
of ADC capabilities to other devices.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
---
 .../devicetree/bindings/iio/adc/ad7949.txt    | 16 ------
 .../bindings/iio/adc/adi,ad7949.yaml          | 57 +++++++++++++++++++
 2 files changed, 57 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.txt b/Documentation/devicetree/bindings/iio/adc/ad7949.txt
deleted file mode 100644
index c7f5057356b1..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ad7949.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-* Analog Devices AD7949/AD7682/AD7689
-
-Required properties:
- - compatible: Should be one of
-	* "adi,ad7949"
-	* "adi,ad7682"
-	* "adi,ad7689"
- - reg: spi chip select number for the device
- - vref-supply: The regulator supply for ADC reference voltage
-
-Example:
-adc@0 {
-	compatible = "adi,ad7949";
-	reg = <0>;
-	vref-supply = <&vdd_supply>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
new file mode 100644
index 000000000000..9b56bd4d5510
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7949.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7949/AD7682/AD7689 analog to digital converters
+
+maintainers:
+  - Charles-Antoine Couret <charles-antoine.couret@essensium.com>
+
+description: |
+  Specifications on the converters can be found at:
+    AD7949:
+      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7949.pdf
+    AD7682/AD7698:
+      https://www.analog.com/media/en/technical-documentation/data-sheets/AD7682_7689.pdf
+
+properties:
+  compatible:
+    enum:
+      - adi,ad7682
+      - adi,ad7689
+      - adi,ad7949
+
+  reg:
+    maxItems: 1
+
+  vref-supply:
+    description:
+      ADC reference voltage supply
+
+  spi-max-frequency: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - vref-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "adi,ad7949";
+            reg = <0>;
+            vref-supply = <&vdd_supply>;
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (13 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:15   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 " Jonathan Cameron
                   ` (4 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Michael Hennerich

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Fairly straight conversion.  The one oddity in the original binding
is that spi-cpha and spi-cpol were not marked as required, but were
in the example.  Looking at the datasheet, there isn't any documented
flexibility in the possible SPI modes, so I have moved these to requires.
For spi-max-frequency I have gone the other way.  I absolutely agree
that it is good to specify this in the dt-binding, but it's not
strictly required.

As Stefan's email is bouncing I have gone with Michael as maintainer
of this one as it falls under the ADI catch all entry in MAINTAINERS.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>
---
 .../bindings/iio/adc/adi,ad7768-1.txt         | 41 ---------
 .../bindings/iio/adc/adi,ad7768-1.yaml        | 89 +++++++++++++++++++
 2 files changed, 89 insertions(+), 41 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt
deleted file mode 100644
index 9f5b88cf680d..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-Analog Devices AD7768-1 ADC device driver
-
-Required properties for the AD7768-1:
-
-- compatible: Must be "adi,ad7768-1"
-- reg: SPI chip select number for the device
-- spi-max-frequency: Max SPI frequency to use
-	see: Documentation/devicetree/bindings/spi/spi-bus.txt
-- clocks: phandle to the master clock (mclk)
-	see: Documentation/devicetree/bindings/clock/clock-bindings.txt
-- clock-names: Must be "mclk".
-- interrupts: IRQ line for the ADC
-	see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
-- vref-supply: vref supply can be used as reference for conversion
-- adi,sync-in-gpios: must be the device tree identifier of the SYNC-IN pin. Enables
-	synchronization of multiple devices that require simultaneous sampling.
-	A pulse is always required if the configuration is changed in any way, for example
-	if the filter decimation rate changes. As the line is active low, it should
-	be marked GPIO_ACTIVE_LOW.
-
-Optional properties:
-
- - reset-gpios : GPIO spec for the RESET pin. If specified, it will be asserted during
-	driver probe. As the line is active low, it should be marked GPIO_ACTIVE_LOW.
-
-Example:
-
-	adc@0 {
-		compatible = "adi,ad7768-1";
-		reg = <0>;
-		spi-max-frequency = <2000000>;
-		spi-cpol;
-		spi-cpha;
-		vref-supply = <&adc_vref>;
-		interrupts = <25 IRQ_TYPE_EDGE_RISING>;
-		interrupt-parent = <&gpio>;
-		adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
-		reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
-		clocks = <&ad7768_mclk>;
-		clock-names = "mclk";
-	};
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
new file mode 100644
index 000000000000..d3733ad8785a
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7768-1 ADC device driver
+
+maintainers:
+  - Michael Hennerich <michael.hennerich@analog.com>
+
+description: |
+  Datasheet at:
+    https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
+
+properties:
+  compatible:
+    const: adi,ad7768-1
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: mclk
+
+  interrupts:
+    maxItems: 1
+
+  vref-supply:
+    description:
+      ADC reference voltage supply
+
+  adi,sync-in-gpios:
+    description:
+      Enables synchronization of multiple devices that require simultaneous
+      sampling. A pulse is always required if the configuration is changed
+      in any way, for example if the filter decimation rate changes.
+      As the line is active low, it should be marked GPIO_ACTIVE_LOW.
+
+  reset-gpios:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  spi-cpol: true
+  spi-cpha : true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - vref-supply
+  - spi-cpol
+  - spi-cpha
+  - adi,sync-in-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/gpio/gpio.h>
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "adi,ad7768-1";
+            reg = <0>;
+            spi-max-frequency = <2000000>;
+            spi-cpol;
+            spi-cpha;
+            vref-supply = <&adc_vref>;
+            interrupts = <25 IRQ_TYPE_EDGE_RISING>;
+            interrupt-parent = <&gpio>;
+            adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+            reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
+            clocks = <&ad7768_mclk>;
+            clock-names = "mclk";
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (14 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:16   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 " Jonathan Cameron
                   ` (3 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Dirk Eibach, Daniel Baluta

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This binding was moved over from hwmon some time ago so is a bit
unusual in terms of IIO bindings.  However, conversion was fairly
straight forwards.

I've listed both Dirk (who think wrote original binding) and Daniel
who added the IIO driver for this device.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
---
 .../devicetree/bindings/iio/adc/ads1015.txt   |  73 -----------
 .../bindings/iio/adc/ti,ads1015.yaml          | 113 ++++++++++++++++++
 2 files changed, 113 insertions(+), 73 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/ads1015.txt b/Documentation/devicetree/bindings/iio/adc/ads1015.txt
deleted file mode 100644
index 918a507d1159..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/ads1015.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-ADS1015 (I2C)
-
-This device is a 12-bit A-D converter with 4 inputs.
-
-The inputs can be used single ended or in certain differential combinations.
-
-For configuration all possible combinations are mapped to 8 channels:
-  0: Voltage over AIN0 and AIN1.
-  1: Voltage over AIN0 and AIN3.
-  2: Voltage over AIN1 and AIN3.
-  3: Voltage over AIN2 and AIN3.
-  4: Voltage over AIN0 and GND.
-  5: Voltage over AIN1 and GND.
-  6: Voltage over AIN2 and GND.
-  7: Voltage over AIN3 and GND.
-
-Each channel can be configured individually:
- - pga is the programmable gain amplifier (values are full scale)
-    0: +/- 6.144 V
-    1: +/- 4.096 V
-    2: +/- 2.048 V (default)
-    3: +/- 1.024 V
-    4: +/- 0.512 V
-    5: +/- 0.256 V
- - data_rate in samples per second
-    0: 128
-    1: 250
-    2: 490
-    3: 920
-    4: 1600 (default)
-    5: 2400
-    6: 3300
-
-1) The /ads1015 node
-
-  Required properties:
-
-   - compatible : must be "ti,ads1015"
-   - reg : I2C bus address of the device
-   - #address-cells : must be <1>
-   - #size-cells : must be <0>
-
-  The node contains child nodes for each channel that the platform uses.
-
-  Example ADS1015 node:
-
-    ads1015@49 {
-	    compatible = "ti,ads1015";
-	    reg = <0x49>;
-	    #address-cells = <1>;
-	    #size-cells = <0>;
-
-	    [ child node definitions... ]
-    }
-
-2) channel nodes
-
-  Required properties:
-
-   - reg : the channel number
-
-  Optional properties:
-
-   - ti,gain : the programmable gain amplifier setting
-   - ti,datarate : the converter data rate
-
-  Example ADS1015 channel node:
-
-    channel@4 {
-	    reg = <4>;
-	    ti,gain = <3>;
-	    ti,datarate = <5>;
-    };
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml
new file mode 100644
index 000000000000..c7c850b7ecc6
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml
@@ -0,0 +1,113 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,ads1015.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI ADS1015 4 channel I2C analog to digital converter
+
+maintainers:
+  - Dirk Eibach <eibach@gdsys.de>
+  - Daniel Baluta <daniel.baluta@nxp.com>
+
+description: |
+  Datasheet at: https://www.ti.com/lit/gpn/ads1015
+  Supports both single ended and differential channels.
+
+properties:
+  compatible:
+    const: ti,ads1015
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+patternProperties:
+  "^channel@[0-7]+$":
+    type: object
+    description:
+      Child nodes needed for each channel that the platform uses.
+
+    properties:
+      reg:
+        description: |
+          0: Voltage over AIN0 and AIN1.
+          1: Voltage over AIN0 and AIN3.
+          2: Voltage over AIN1 and AIN3.
+          3: Voltage over AIN2 and AIN3.
+          4: Voltage over AIN0 and GND.
+          5: Voltage over AIN1 and GND.
+          6: Voltage over AIN2 and GND.
+          7: Voltage over AIN3 and GND.
+        items:
+          - minimum: 0
+            maximum: 7
+
+      ti,gain:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        minimum: 0
+        maximum: 5
+        description: |
+          pga is the programmable gain amplifier (values are full scale)
+          0: +/- 6.144 V
+          1: +/- 4.096 V
+          2: +/- 2.048 V (default)
+          3: +/- 1.024 V
+          4: +/- 0.512 V
+          5: +/- 0.256 V
+
+      ti,datarate:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        minimum: 0
+        maximum: 6
+        description: |
+          Data acquisition rate in samples per second
+          0: 128
+          1: 250
+          2: 490
+          3: 920
+          4: 1600 (default)
+          5: 2400
+          6: 3300
+
+    required:
+      - reg
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@49 {
+            compatible = "ti,ads1015";
+            reg = <0x49>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+            channel@0 {
+              reg = <0>;
+            };
+            channel@4 {
+              reg = <4>;
+              ti,gain = <3>;
+              ti,datarate = <5>;
+            };
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (15 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:17   ` Rob Herring
  2020-09-09 17:59 ` [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc " Jonathan Cameron
                   ` (2 subsequent siblings)
  19 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio; +Cc: Rob Herring, devicetree, Jonathan Cameron, Vladimir Barinov

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Very simple binding.  I've changed the example to use the node
name threshold-detector@0 as sensor@0 seemed too generic.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
---
 .../devicetree/bindings/iio/adc/hi8435.txt    | 21 --------
 .../bindings/iio/adc/holt,hi8435.yaml         | 49 +++++++++++++++++++
 2 files changed, 49 insertions(+), 21 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/hi8435.txt b/Documentation/devicetree/bindings/iio/adc/hi8435.txt
deleted file mode 100644
index 3b0348c5e516..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/hi8435.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Holt Integrated Circuits HI-8435 threshold detector bindings
-
-Required properties:
- - compatible: should be "holt,hi8435"
- - reg: spi chip select number for the device
-
-Recommended properties:
- - spi-max-frequency: definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Optional properties:
- - gpios: GPIO used for controlling the reset pin
-
-Example:
-sensor@0 {
-	compatible = "holt,hi8435";
-	reg = <0>;
-	gpios = <&gpio6 1 0>;
-
-	spi-max-frequency = <1000000>;
-};
diff --git a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
new file mode 100644
index 000000000000..a35cf3876b86
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/holt,hi8435.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Holt Integrated Circuits HI-8435 SPI threshold detector
+
+maintainers:
+  - Vladimir Barinov <vladimir.barinov@cogentembedded.com>
+
+description: |
+  Datasheet: http://www.holtic.com/documents/427-hi-8435_v-rev-lpdf.do
+
+properties:
+  compatible:
+    const: holt,hi8435
+
+  reg:
+    maxItems: 1
+
+  gpios:
+    description:
+       GPIO used for controlling the reset pin
+
+  spi-max-frequency: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        threshold-detector@0 {
+            compatible = "holt,hi8435";
+            reg = <0>;
+            gpios = <&gpio6 1 0>;
+            spi-max-frequency = <1000000>;
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (16 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:23   ` Rob Herring
  2020-09-15 19:31   ` Martin Blumenstingl
  2020-09-09 17:59 ` [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc " Jonathan Cameron
  2020-09-09 17:59 ` [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq " Jonathan Cameron
  19 siblings, 2 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Martin Blumenstingl,
	Kevin Hilman, Neil Armstrong, Jerome Brunet

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This binding is non trivial due to the range of different parts
supported having several subtle quirks. Martin has helped
clarify some of them.

Note, I haven't restricted the amlogic,hhi-sysctrl to only
be present on the relevant parts if nvmem stuff also is, but
it would seem to be rather odd if it were otherwise.

Perhaps we look to make this binding more restrictive at a later date.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
---
 .../bindings/iio/adc/amlogic,meson-saradc.txt |  48 ------
 .../iio/adc/amlogic,meson-saradc.yaml         | 149 ++++++++++++++++++
 2 files changed, 149 insertions(+), 48 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt
deleted file mode 100644
index d57e9df25f4f..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-* Amlogic Meson SAR (Successive Approximation Register) A/D converter
-
-Required properties:
-- compatible:	depending on the SoC this should be one of:
-			- "amlogic,meson8-saradc" for Meson8
-			- "amlogic,meson8b-saradc" for Meson8b
-			- "amlogic,meson8m2-saradc" for Meson8m2
-			- "amlogic,meson-gxbb-saradc" for GXBB
-			- "amlogic,meson-gxl-saradc" for GXL
-			- "amlogic,meson-gxm-saradc" for GXM
-			- "amlogic,meson-axg-saradc" for AXG
-			- "amlogic,meson-g12a-saradc" for AXG
-		along with the generic "amlogic,meson-saradc"
-- reg:		the physical base address and length of the registers
-- interrupts:	the interrupt indicating end of sampling
-- clocks:	phandle and clock identifier (see clock-names)
-- clock-names:	mandatory clocks:
-			- "clkin" for the reference clock (typically XTAL)
-			- "core" for the SAR ADC core clock
-		optional clocks:
-			- "adc_clk" for the ADC (sampling) clock
-			- "adc_sel" for the ADC (sampling) clock mux
-- vref-supply:	the regulator supply for the ADC reference voltage
-- #io-channel-cells: must be 1, see ../iio-bindings.txt
-
-Optional properties:
-- amlogic,hhi-sysctrl:	phandle to the syscon which contains the 5th bit
-			of the TSC (temperature sensor coefficient) on
-			Meson8b and Meson8m2 (which used to calibrate the
-			temperature sensor)
-- nvmem-cells:		phandle to the temperature_calib eFuse cells
-- nvmem-cell-names:	if present (to enable the temperature sensor
-			calibration) this must contain "temperature_calib"
-
-
-Example:
-	saradc: adc@8680 {
-		compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
-		#io-channel-cells = <1>;
-		reg = <0x0 0x8680 0x0 0x34>;
-		interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
-		clocks = <&xtal>,
-			 <&clkc CLKID_SAR_ADC>,
-			 <&clkc CLKID_SANA>,
-			 <&clkc CLKID_SAR_ADC_CLK>,
-			 <&clkc CLKID_SAR_ADC_SEL>;
-		clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
-	};
diff --git a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml
new file mode 100644
index 000000000000..6d94bf76900e
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml
@@ -0,0 +1,149 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/amlogic,meson-saradc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Meson SAR (Successive Approximation Register) A/D converter
+
+maintainers:
+  - Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+
+description:
+  Binding covers a range of ADCs found on amlogic meson SoCs.
+
+properties:
+  compatible:
+    oneOf:
+      - const: amlogic,meson-saradc
+      - items:
+          - enum:
+              - amlogic,meson8-saradc
+              - amlogic,meson8b-saradc
+              - amlogic,meson8m2-saradc
+              - amlogic,meson-gxbb-saradc
+              - amlogic,meson-gxl-saradc
+              - amlogic,meson-gxm-saradc
+              - amlogic,meson-axg-saradc
+              - amlogic,meson-g12a-saradc
+          - const: amlogic,meson-saradc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description: Interrupt indicates end of sampling.
+    maxItems: 1
+
+  clocks: true
+
+  clock-names: true
+
+  vref-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+  amlogic,hhi-sysctrl:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Syscon which contains the 5th bit of the TSC (temperature sensor
+      coefficient) on Meson8b and Meson8m2 (which used to calibrate the
+      temperature sensor)
+
+  nvmem-cells:
+    description: phandle to the temperature_calib eFuse cells
+
+  nvmem-cell-names:
+    const: temperature_calib
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - amlogic,meson8-saradc
+              - amlogic,meson8b-saradc
+              - amlogic,meson8m2-saradc
+    then:
+      properties:
+        nvmem-cells: true
+        nvmem-cell-names: true
+        clock-names:
+          items:
+            - const: clkin
+            - const: core
+          minItems: 2
+        clocks:
+          minItems: 2
+    else:
+      properties:
+        nvmem-cells: false
+        mvmem-cel-names: false
+        clock-names:
+          items:
+            - const: clkin
+            - const: core
+            - const: adc_clk
+            - const: adc_sel
+          minItems: 4
+        clocks:
+          minItems: 4
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - amlogic,meson8b-saradc
+              - amlogic,meson8m2-saradc
+    then:
+      properties:
+        amlogic,hhi-sysctrl: true
+    else:
+      properties:
+        amlogic,hhi-sysctrl: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/gxbb-clkc.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+        adc@8680 {
+            compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
+            #io-channel-cells = <1>;
+            reg = <0x0 0x8680 0x0 0x34>;
+            interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
+            clocks = <&xtal>,
+                <&clkc CLKID_SAR_ADC>,
+                <&clkc CLKID_SAR_ADC_CLK>,
+                <&clkc CLKID_SAR_ADC_SEL>;
+            clock-names = "clkin", "core", "adc_clk", "adc_sel";
+        };
+        adc@9680 {
+            compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";
+            #io-channel-cells = <1>;
+            reg = <0x0 0x9680 0x0 0x34>;
+            interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
+            clocks = <&xtal>, <&clkc CLKID_SAR_ADC>;
+            clock-names = "clkin", "core";
+            nvmem-cells = <&tsens_caldata>;
+            nvmem-cell-names = "temperature_calib";
+            amlogic,hhi-sysctrl = <&hhi>;
+        };
+    };
+...
-- 
2.28.0


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

* [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (17 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:24   ` Rob Herring
  2020-09-16 10:27   ` Jonathan Cameron
  2020-09-09 17:59 ` [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq " Jonathan Cameron
  19 siblings, 2 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Haibo Chen, Shawn Guo,
	Sascha Hauer

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

A nice simple binding.  Only real different from txt is that I dropped
some descriptions where the naming of the parameter was self explanatory

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Haibo Chen <haibo.chen@freescale.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++
 .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------
 2 files changed, 62 insertions(+), 24 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
new file mode 100644
index 000000000000..dc5eacb38046
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/fsl,imx7d-adc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale ADC found on the imx7d SoC
+
+maintainers:
+  - Haibo Chen <haibo.chen@freescale.com>
+
+properties:
+  compatible:
+    const: fsl,imx7d-adc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: adc
+
+  vref-supply: true
+
+  "#io-channel-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - vref-supply
+  - "#io-channel-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/imx7d-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@30610000 {
+            compatible = "fsl,imx7d-adc";
+            reg = <0x30610000 0x10000>;
+            interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&clks IMX7D_ADC_ROOT_CLK>;
+            clock-names = "adc";
+            vref-supply = <&reg_vcc_3v3_mcu>;
+            #io-channel-cells = <1>;
+        };
+    };
+...
diff --git a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt b/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
deleted file mode 100644
index f1f3a552459b..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Freescale imx7d ADC bindings
-
-The devicetree bindings are for the ADC driver written for
-imx7d SoC.
-
-Required properties:
-- compatible: Should be "fsl,imx7d-adc"
-- reg: Offset and length of the register set for the ADC device
-- interrupts: The interrupt number for the ADC device
-- clocks: The root clock of the ADC controller
-- clock-names: Must contain "adc", matching entry in the clocks property
-- vref-supply: The regulator supply ADC reference voltage
-- #io-channel-cells: Must be 1 as per ../iio-bindings.txt
-
-Example:
-adc1: adc@30610000 {
-	compatible = "fsl,imx7d-adc";
-	reg = <0x30610000 0x10000>;
-	interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&clks IMX7D_ADC_ROOT_CLK>;
-	clock-names = "adc";
-	vref-supply = <&reg_vcc_3v3_mcu>;
-	#io-channel-cells = <1>;
-};
-- 
2.28.0


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

* [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion
  2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
                   ` (18 preceding siblings ...)
  2020-09-09 17:59 ` [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc " Jonathan Cameron
@ 2020-09-09 17:59 ` Jonathan Cameron
  2020-09-15 19:26   ` Rob Herring
  2020-09-16 10:33   ` Jonathan Cameron
  19 siblings, 2 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-09 17:59 UTC (permalink / raw)
  To: linux-iio
  Cc: Rob Herring, devicetree, Jonathan Cameron, Markus Pargmann,
	Shawn Guo, Sascha Hauer

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This binding has a few corners that would have been done different today
but hopefully the yaml schema captures the constraints correctly.

The child node names are not constrained hence the fairly open regexp.
I've also documented the defaults for the two references that the
driver seems to use and copied the value descriptions from the header
because I think they should be in the dt-binding itself.

This is part of a general effort to convert all the IIO bindings
over to yaml

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Markus Pargmann <mpa@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
---
 .../bindings/iio/adc/fsl,imx25-gcq.txt        |  57 --------
 .../bindings/iio/adc/fsl,imx25-gcq.yaml       | 129 ++++++++++++++++++
 2 files changed, 129 insertions(+), 57 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
deleted file mode 100644
index eebdcec3dab5..000000000000
--- a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-Freescale i.MX25 ADC GCQ device
-
-This is a generic conversion queue device that can convert any of the
-analog inputs using the ADC unit of the i.MX25.
-
-Required properties:
- - compatible: Should be "fsl,imx25-gcq".
- - reg: Should be the register range of the module.
- - interrupts: Should be the interrupt number of the module.
-   Typically this is <1>.
- - #address-cells: Should be <1> (setting for the subnodes)
- - #size-cells: Should be <0> (setting for the subnodes)
-
-Optional properties:
- - vref-ext-supply: The regulator supplying the ADC reference voltage.
-   Required when at least one subnode uses the this reference.
- - vref-xp-supply: The regulator supplying the ADC reference voltage on pin XP.
-   Required when at least one subnode uses this reference.
- - vref-yp-supply: The regulator supplying the ADC reference voltage on pin YP.
-   Required when at least one subnode uses this reference.
-
-Sub-nodes:
-Optionally you can define subnodes which define the reference voltage
-for the analog inputs.
-
-Required properties for subnodes:
- - reg: Should be the number of the analog input.
-     0: xp
-     1: yp
-     2: xn
-     3: yn
-     4: wiper
-     5: inaux0
-     6: inaux1
-     7: inaux2
-Optional properties for subnodes:
- - fsl,adc-refp: specifies the positive reference input as defined in
-     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
- - fsl,adc-refn: specifies the negative reference input as defined in
-     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
-
-Example:
-
-	adc: adc@50030800 {
-		compatible = "fsl,imx25-gcq";
-		reg = <0x50030800 0x60>;
-		interrupt-parent = <&tscadc>;
-		interrupts = <1>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		inaux@5 {
-			reg = <5>;
-			fsl,adc-refp = <MX25_ADC_REFP_INT>;
-			fsl,adc-refn = <MX25_ADC_REFN_NGND>;
-		};
-	};
diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
new file mode 100644
index 000000000000..6c4e3ef0862c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
@@ -0,0 +1,129 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/fsl,imx25-gcq.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale ADC GCQ device
+
+description:
+  This is a generic conversion queue device that can convert any of the
+  analog inputs using the ADC unit of the i.MX25.
+
+maintainers:
+  - Markus Pargmann <mpa@pengutronix.de>
+
+properties:
+  compatible:
+    const: fsl,imx25-gcq
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  vref-ext-supply:
+    description:
+      The regulator supplying the ADC reference voltage.
+      Required when at least one subnode uses the this reference.
+
+  vref-xp-supply:
+    description:
+      The regulator supplying the ADC reference voltage on pin XP.
+      Required when at least one subnode uses this reference.
+
+  vref-yp-supply:
+    description:
+      The regulator supplying the ADC reference voltage on pin YP.
+      Required when at least one subnode uses this reference.
+
+  "#io-channel-cells":
+    const: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - "#address-cells"
+  - "#size-cells"
+
+patternProperties:
+  "[a-z][a-z0-9]+@[0-9a-f]+$":
+    type: object
+    description:
+      Child nodes used to define the reference voltages used for each channel
+
+    properties:
+      reg:
+        description: |
+          Number of the analog input.
+          0: xp
+          1: yp
+          2: xn
+          3: yn
+          4: wiper
+          5: inaux0
+          6: inaux1
+          7: inaux2
+        items:
+          - minimum: 0
+            maximum: 7
+
+      fsl,adc-refp:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          Specifies the positive reference input as defined in
+          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
+          0: YP voltage reference
+          1: XP voltage reference
+          2: External voltage reference
+          3: Internal voltage reference (default)
+        minimum: 0
+        maximum: 3
+
+      fsl,adc-refn:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          Specifies the negative reference input as defined in
+          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
+          0: XN ground reference
+          1: YN ground reference
+          2: Internal ground reference
+          3: External ground reference (default)
+        minimum: 0
+        maximum: 3
+
+    required:
+      - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/iio/adc/fsl-imx25-gcq.h>
+    soc {
+        #address-cells = <1>;
+        #size-cells = <1>;
+        adc@50030800 {
+            compatible = "fsl,imx25-gcq";
+            reg = <0x50030800 0x60>;
+            interrupt-parent = <&tscadc>;
+            interrupts = <1>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            inaux@5 {
+                reg = <5>;
+                fsl,adc-refp = <MX25_ADC_REFP_INT>;
+                fsl,adc-refn = <MX25_ADC_REFN_NGND>;
+            };
+        };
+    };
+...
-- 
2.28.0


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

* Re: [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 " Jonathan Cameron
@ 2020-09-09 19:19   ` Alexandre Belloni
  2020-09-10  7:57     ` Jonathan Cameron
  2020-09-15 19:06   ` Rob Herring
  1 sibling, 1 reply; 74+ messages in thread
From: Alexandre Belloni @ 2020-09-09 19:19 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Jonathan Cameron, Maxime Ripard

Hi,

On 09/09/2020 18:59:33+0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> A simple conversion from txt file to yaml.  I added the #io-channel-cells
> property as optional to allow the channels of this ADCs to be used
> to provide services to other drivers, for example if an analog
> accelerometer is connected.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  .../bindings/iio/adc/nuvoton,nau7802.yaml     | 50 +++++++++++++++++++
>  .../bindings/iio/adc/nuvoton-nau7802.txt      | 18 -------
>  2 files changed, 50 insertions(+), 18 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml
> new file mode 100644
> index 000000000000..bcd041ea28a8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/nuvoton,nau7802.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Nuvoton NAU7802 I2c Analog to Digital Converter (ADC)
> +
> +maintainers:
> +  - Alexandre Belloni <alexandre.belloni@free-electrons.com>
> +  - Maxime Ripard <maxime.ripard@free-electrons.com>
> +

Sorry, I meant to reply earlier. Can you make that:

 - Alexandre Belloni <alexandre.belloni@bootlin.com>
 - Maxime Ripard <mripard@kernel.org>

Else, this seems good to me!

> +properties:
> +  compatible:
> +    const: nuvoton,nau7802
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  nuvoton,vldo:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      Internal reference voltage in millivolts to be configured.
> +    minimum: 2400
> +    maximum: 4500
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        nau7802@2a {
> +            compatible = "nuvoton,nau7802";
> +            reg = <0x2a>;
> +            nuvoton,vldo = <3000>;
> +        };
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt
> deleted file mode 100644
> index e9582e6fe350..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt
> +++ /dev/null
> @@ -1,18 +0,0 @@
> -* Nuvoton NAU7802 Analog to Digital Converter (ADC)
> -
> -Required properties:
> -  - compatible: Should be "nuvoton,nau7802"
> -  - reg: Should contain the ADC I2C address
> -
> -Optional properties:
> -  - nuvoton,vldo: Internal reference voltage in millivolts to be
> -    configured valid values are between 2400 mV and 4500 mV.
> -  - interrupts: IRQ line for the ADC. If not used the driver will use
> -    polling.
> -
> -Example:
> -adc2: nau7802@2a {
> -	compatible = "nuvoton,nau7802";
> -	reg = <0x2a>;
> -	nuvoton,vldo = <3000>;
> -};
> -- 
> 2.28.0
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 " Jonathan Cameron
@ 2020-09-10  2:32   ` Joel Stanley
  2020-09-16 10:36     ` Jonathan Cameron
  2020-09-15 19:03   ` Rob Herring
  1 sibling, 1 reply; 74+ messages in thread
From: Joel Stanley @ 2020-09-10  2:32 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Jonathan Cameron,
	Rick Altherr, Andrew Jeffery

On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Simple txt to yaml conversion. Part of a general move to convert
> all the IIO bindings over to yaml.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Rick Altherr <raltherr@google.com>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>

Acked-by: Joel Stanley <joel@jms.id.au>


> ---
>  .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
>  .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
>  2 files changed, 54 insertions(+), 22 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> new file mode 100644
> index 000000000000..09018487d690
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml

This naming doesn't make sense, as the bindings are for the ast2500
too (and they also apply for the ast2600).

> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ADC that forms part of an ASPEED server management processor.
> +
> +maintainers:
> +  - Rick Altherr <raltherr@google.com>
> +
> +description:
> +  This device is a 10-bit converter for 16 voltage channels.  All inputs are
> +  single ended.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - aspeed,ast2400-adc
> +      - aspeed,ast2500-adc
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    description:
> +      Input clock used to derive the sample clock. Expected to be the
> +      SoC's APB clock.
> +
> +  resets: true
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - resets
> +  - "#io-channel-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/aspeed-clock.h>
> +    adc@1e6e9000 {
> +        compatible = "aspeed,ast2400-adc";
> +        reg = <0x1e6e9000 0xb0>;
> +        clocks = <&syscon ASPEED_CLK_APB>;
> +        resets = <&syscon ASPEED_RESET_ADC>;
> +        #io-channel-cells = <1>;
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> deleted file mode 100644
> index 034fc2ba100e..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -Aspeed ADC
> -
> -This device is a 10-bit converter for 16 voltage channels.  All inputs are
> -single ended.
> -
> -Required properties:
> -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> -- reg: memory window mapping address and length
> -- clocks: Input clock used to derive the sample clock. Expected to be the
> -          SoC's APB clock.
> -- resets: Reset controller phandle
> -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> -                     by index.
> -
> -Example:
> -       adc@1e6e9000 {
> -               compatible = "aspeed,ast2400-adc";
> -               reg = <0x1e6e9000 0xb0>;
> -               clocks = <&syscon ASPEED_CLK_APB>;
> -               resets = <&syscon ASPEED_RESET_ADC>;
> -               #io-channel-cells = <1>;
> -       };
> --
> 2.28.0
>

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

* Re: [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion
  2020-09-09 19:19   ` Alexandre Belloni
@ 2020-09-10  7:57     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-10  7:57 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Jonathan Cameron, linux-iio, Rob Herring, devicetree, Maxime Ripard

On Wed, 9 Sep 2020 21:19:23 +0200
Alexandre Belloni <alexandre.belloni@bootlin.com> wrote:

> Hi,
> 
> On 09/09/2020 18:59:33+0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > A simple conversion from txt file to yaml.  I added the #io-channel-cells
> > property as optional to allow the channels of this ADCs to be used
> > to provide services to other drivers, for example if an analog
> > accelerometer is connected.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >  .../bindings/iio/adc/nuvoton,nau7802.yaml     | 50 +++++++++++++++++++
> >  .../bindings/iio/adc/nuvoton-nau7802.txt      | 18 -------
> >  2 files changed, 50 insertions(+), 18 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml
> > new file mode 100644
> > index 000000000000..bcd041ea28a8
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,nau7802.yaml
> > @@ -0,0 +1,50 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/nuvoton,nau7802.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Nuvoton NAU7802 I2c Analog to Digital Converter (ADC)
> > +
> > +maintainers:
> > +  - Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > +  - Maxime Ripard <maxime.ripard@free-electrons.com>
> > +  
> 
> Sorry, I meant to reply earlier. Can you make that:
> 
>  - Alexandre Belloni <alexandre.belloni@bootlin.com>
>  - Maxime Ripard <mripard@kernel.org>
> 
> Else, this seems good to me!

Will do. If I don't do a v3 for other reasons I'll change that
whilst applying.

Thanks,

Jonathan

> 
> > +properties:
> > +  compatible:
> > +    const: nuvoton,nau7802
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  nuvoton,vldo:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description:
> > +      Internal reference voltage in millivolts to be configured.
> > +    minimum: 2400
> > +    maximum: 4500
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +        nau7802@2a {
> > +            compatible = "nuvoton,nau7802";
> > +            reg = <0x2a>;
> > +            nuvoton,vldo = <3000>;
> > +        };
> > +    };
> > +...
> > diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt
> > deleted file mode 100644
> > index e9582e6fe350..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/nuvoton-nau7802.txt
> > +++ /dev/null
> > @@ -1,18 +0,0 @@
> > -* Nuvoton NAU7802 Analog to Digital Converter (ADC)
> > -
> > -Required properties:
> > -  - compatible: Should be "nuvoton,nau7802"
> > -  - reg: Should contain the ADC I2C address
> > -
> > -Optional properties:
> > -  - nuvoton,vldo: Internal reference voltage in millivolts to be
> > -    configured valid values are between 2400 mV and 4500 mV.
> > -  - interrupts: IRQ line for the ADC. If not used the driver will use
> > -    polling.
> > -
> > -Example:
> > -adc2: nau7802@2a {
> > -	compatible = "nuvoton,nau7802";
> > -	reg = <0x2a>;
> > -	nuvoton,vldo = <3000>;
> > -};
> > -- 
> > 2.28.0
> >   
> 



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

* Re: [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml.
  2020-09-09 17:59 ` [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml Jonathan Cameron
@ 2020-09-15 19:00   ` Rob Herring
  2020-09-15 20:45   ` Rob Herring
  1 sibling, 0 replies; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:00 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Jonathan Cameron, Fugang Duan, linux-iio, devicetree,
	Sascha Hauer, Shawn Guo

On Wed, 09 Sep 2020 18:59:27 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> A simple conversion of this freescale ADC binding from txt to yaml.
> For maintainer I went with Fugang Duan as the original author of the
> binding. Would be great to have confirmation of this.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Fugang Duan <B38611@freescale.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  .../bindings/iio/adc/fsl,vf610-adc.yaml       | 81 +++++++++++++++++++
>  .../devicetree/bindings/iio/adc/vf610-adc.txt | 36 ---------
>  2 files changed, 81 insertions(+), 36 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion Jonathan Cameron
@ 2020-09-15 19:01   ` Rob Herring
  2020-09-19 13:42     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:01 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, linux-iio, Sebastian Reichel, Jonathan Cameron

On Wed, 09 Sep 2020 18:59:28 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Conversion from txt to yaml as part of a general move of IIO bindings
> to the new format.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Acked-by: Sebastian Reichel <sre@kernel.org>
> ---
>  .../bindings/iio/adc/ti,twl4030-madc.yaml     | 48 +++++++++++++++++++
>  .../bindings/iio/adc/twl4030-madc.txt         | 24 ----------
>  2 files changed, 48 insertions(+), 24 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc " Jonathan Cameron
@ 2020-09-15 19:02   ` Rob Herring
  2020-09-19 13:44     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:02 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: devicetree, Stefan Agner, linux-iio, Jonathan Cameron

On Wed, 09 Sep 2020 18:59:29 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Conversion from freeform text to yaml.
> One oddity in this binding is that, for historical reasons it requires
> the node name to be stmpe_adc.  I've put that in the decription field
> but I'm not sure if there is a better way to specify this?
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Stefan Agner <stefan@agner.ch>
> ---
>  .../bindings/iio/adc/st,stmpe-adc.yaml        | 45 +++++++++++++++++++
>  .../devicetree/bindings/iio/adc/stmpe-adc.txt | 21 ---------
>  2 files changed, 45 insertions(+), 21 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 " Jonathan Cameron
  2020-09-10  2:32   ` Joel Stanley
@ 2020-09-15 19:03   ` Rob Herring
  1 sibling, 0 replies; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:03 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, Jonathan Cameron, Rick Altherr,
	Joel Stanley, Andrew Jeffery

On Wed, Sep 09, 2020 at 06:59:30PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Simple txt to yaml conversion. Part of a general move to convert
> all the IIO bindings over to yaml.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Rick Altherr <raltherr@google.com>
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Andrew Jeffery <andrew@aj.id.au>
> ---
>  .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
>  .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
>  2 files changed, 54 insertions(+), 22 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> new file mode 100644
> index 000000000000..09018487d690
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ADC that forms part of an ASPEED server management processor.
> +
> +maintainers:
> +  - Rick Altherr <raltherr@google.com>
> +
> +description:
> +  This device is a 10-bit converter for 16 voltage channels.  All inputs are
> +  single ended.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - aspeed,ast2400-adc
> +      - aspeed,ast2500-adc
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    description:
> +      Input clock used to derive the sample clock. Expected to be the
> +      SoC's APB clock.
> +
> +  resets: true

maxItems: 1

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - resets
> +  - "#io-channel-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/aspeed-clock.h>
> +    adc@1e6e9000 {
> +        compatible = "aspeed,ast2400-adc";
> +        reg = <0x1e6e9000 0xb0>;
> +        clocks = <&syscon ASPEED_CLK_APB>;
> +        resets = <&syscon ASPEED_RESET_ADC>;
> +        #io-channel-cells = <1>;
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> deleted file mode 100644
> index 034fc2ba100e..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -Aspeed ADC
> -
> -This device is a 10-bit converter for 16 voltage channels.  All inputs are
> -single ended.
> -
> -Required properties:
> -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> -- reg: memory window mapping address and length
> -- clocks: Input clock used to derive the sample clock. Expected to be the
> -          SoC's APB clock.
> -- resets: Reset controller phandle
> -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> -                     by index.
> -
> -Example:
> -	adc@1e6e9000 {
> -		compatible = "aspeed,ast2400-adc";
> -		reg = <0x1e6e9000 0xb0>;
> -		clocks = <&syscon ASPEED_CLK_APB>;
> -		resets = <&syscon ASPEED_RESET_ADC>;
> -		#io-channel-cells = <1>;
> -	};
> -- 
> 2.28.0
> 

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

* Re: [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc " Jonathan Cameron
@ 2020-09-15 19:04   ` Rob Herring
  2020-09-19 13:55     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:04 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Cameron, Antoine Tenart, devicetree

On Wed, 09 Sep 2020 18:59:31 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Part of a general move of IIO bindings over to yaml.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
> ---
>  .../bindings/iio/adc/berlin2_adc.txt          | 19 -------
>  .../bindings/iio/adc/marvell,berlin2-adc.yaml | 50 +++++++++++++++++++
>  2 files changed, 50 insertions(+), 19 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc yaml conversion.
  2020-09-09 17:59 ` [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc " Jonathan Cameron
@ 2020-09-15 19:05   ` Rob Herring
  2020-09-19 13:57     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:05 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Baolin Wang, Chunyan Zhang, Jonathan Cameron, linux-iio,
	Orson Zhai, devicetree

On Wed, 09 Sep 2020 18:59:32 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> I changed the name to reflect a specific part in line with normal
> naming conventions. If there is a particularly strong reason to
> keep the wild cards let me know.
> 
> Otherwise this was a fairly simple conversion as part of converting
> all the IIO bindings to yaml.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Acked-by: Orson Zhai <orsonzhai@gmail.com>
> Cc: Baolin Wang <baolin.wang7@gmail.com>
> Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> ---
>  .../bindings/iio/adc/sprd,sc2720-adc.yaml     | 72 +++++++++++++++++++
>  .../bindings/iio/adc/sprd,sc27xx-adc.txt      | 40 -----------
>  2 files changed, 72 insertions(+), 40 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 " Jonathan Cameron
  2020-09-09 19:19   ` Alexandre Belloni
@ 2020-09-15 19:06   ` Rob Herring
  2020-09-19 14:01     ` Jonathan Cameron
  1 sibling, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:06 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Maxime Ripard, Alexandre Belloni, linux-iio, Jonathan Cameron,
	devicetree

On Wed, 09 Sep 2020 18:59:33 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> A simple conversion from txt file to yaml.  I added the #io-channel-cells
> property as optional to allow the channels of this ADCs to be used
> to provide services to other drivers, for example if an analog
> accelerometer is connected.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  .../bindings/iio/adc/nuvoton,nau7802.yaml     | 50 +++++++++++++++++++
>  .../bindings/iio/adc/nuvoton-nau7802.txt      | 18 -------
>  2 files changed, 50 insertions(+), 18 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc " Jonathan Cameron
@ 2020-09-15 19:07   ` Rob Herring
  2020-09-19 14:03     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:07 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: devicetree, linux-iio, Jonathan Cameron, Tomer Maimon

On Wed, 09 Sep 2020 18:59:34 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Renamed the file to reflect the only compatible.
> Added #io-channel-cells to make it easier to support consumers of the
> ADC channels this device provides.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Tomer Maimon <tmaimon77@gmail.com>
> ---
>  .../bindings/iio/adc/nuvoton,npcm-adc.txt     | 26 --------
>  .../bindings/iio/adc/nuvoton,npcm750-adc.yaml | 64 +++++++++++++++++++
>  2 files changed, 64 insertions(+), 26 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc " Jonathan Cameron
@ 2020-09-15 19:07   ` Rob Herring
  2020-09-19 14:20     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:07 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Joachim Eastwood, Jonathan Cameron, linux-iio, devicetree

On Wed, 09 Sep 2020 18:59:35 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Most of the description in the original doc is effectively boilerplate
> and does not bring much value so I have not carried it over into the yaml.
> 
> Added #io-channel-cells to simplify use of channels on this ADC by
> consumer drivers.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Joachim Eastwood <manabian@gmail.com>
> ---
>  .../bindings/iio/adc/lpc1850-adc.txt          | 20 ------
>  .../bindings/iio/adc/nxp,lpc1850-adc.yaml     | 61 +++++++++++++++++++
>  2 files changed, 61 insertions(+), 20 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc " Jonathan Cameron
@ 2020-09-15 19:09   ` Rob Herring
  2020-09-19 14:22     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:09 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Gregory Clement, devicetree, Jonathan Cameron

On Wed, 09 Sep 2020 18:59:36 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Renamed to remove the wild cards.  These go wrong far too often so
> in general preferred to use the name of a specific part.  As this
> binding only provides one compatible, I went with that.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Gregory Clement <gregory.clement@bootlin.com>
> ---
>  .../bindings/iio/adc/lpc32xx-adc.txt          | 21 --------
>  .../bindings/iio/adc/nxp,lpc3220-adc.yaml     | 50 +++++++++++++++++++
>  2 files changed, 50 insertions(+), 21 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc " Jonathan Cameron
@ 2020-09-15 19:11   ` Rob Herring
  2020-09-19 14:25     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:11 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, devicetree, Jonathan Cameron, Tony Lindgren

On Wed, Sep 09, 2020 at 06:59:37PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Conversion from txt to yaml.
> Slightly expanded example to give a bit more context.
> Description lifted from the original driver commit.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Tony Lindgren <tony@atomide.com>
> ---
>  .../devicetree/bindings/iio/adc/cpcap-adc.txt | 17 -------
>  .../bindings/iio/adc/motorola,cpcap-adc.yaml  | 51 +++++++++++++++++++
>  2 files changed, 51 insertions(+), 17 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt b/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
> deleted file mode 100644
> index ec04008e8f4f..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -Motorola CPCAP PMIC ADC binding
> -
> -Required properties:
> -- compatible: Should be "motorola,cpcap-adc" or "motorola,mapphone-cpcap-adc"
> -- interrupts: The interrupt number for the ADC device
> -- interrupt-names: Should be "adcdone"
> -- #io-channel-cells: Number of cells in an IIO specifier
> -
> -Example:
> -
> -cpcap_adc: adc {
> -	compatible = "motorola,mapphone-cpcap-adc";
> -	interrupt-parent = <&cpcap>;
> -	interrupts = <8 IRQ_TYPE_NONE>;
> -	interrupt-names = "adcdone";
> -	#io-channel-cells = <1>;
> -};
> diff --git a/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
> new file mode 100644
> index 000000000000..7811c0abd5d0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/motorola,cpcap-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Motorola CPCAP PMIC ADC binding
> +
> +maintainers:
> +  - Tony Lindgren <tony@atomide.com>
> +
> +description:
> +  On Motorola phones like droid 4 there is a custom CPCAP PMIC. This PMIC
> +  has ADCs that are used for battery charging and USB PHY VBUS and ID pin
> +  detection.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - motorola,cpcap-adc
> +      - motorola,mapphone-cpcap-adc
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupt-names:
> +    const: adcdone
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - interrupts
> +  - "#io-channel-cells"

additionalProperties: false

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc " Jonathan Cameron
@ 2020-09-15 19:12   ` Rob Herring
  2020-09-19 14:57     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:12 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, devicetree, Jonathan Cameron, Adam Thomson

On Wed, Sep 09, 2020 at 06:59:38PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This is a small part of an MFD so perhaps ultimately it makes more
> sense to document it with that MFD binding rather than separately.
> 
> In the meantime it's a straightforward conversion from txt to yaml.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> ---
>  .../bindings/iio/adc/da9150-gpadc.txt         | 16 ---------
>  .../bindings/iio/adc/dlg,da9150-gpadc.yaml    | 33 +++++++++++++++++++
>  2 files changed, 33 insertions(+), 16 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
> deleted file mode 100644
> index c07228da92ac..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -Dialog Semiconductor DA9150 IIO GPADC bindings
> -
> -Required properties:
> -- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC
> -- #io-channel-cells: Should be set to <1>
> -  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)
> -
> -For further information on GPADC channels, see device datasheet.
> -
> -
> -Example:
> -
> -	gpadc: da9150-gpadc {
> -		compatible = "dlg,da9150-gpadc";
> -		#io-channel-cells = <1>;
> -	};
> diff --git a/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
> new file mode 100644
> index 000000000000..15c51d337108
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
> @@ -0,0 +1,33 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/dlg,da9150-gpadc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Dialog Semiconductor DA9150 IIO GPADC
> +
> +maintainers:
> +  - Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> +
> +description:
> +  This patch adds support for general purpose ADC within the
> +  DA9150 Charger & Fuel-Gauge IC.
> +
> +properties:
> +  compatible:
> +    const: dlg,da9150-gpadc
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - "#io-channel-cells"

additionalProperties...

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +examples:
> +  - |
> +    adc {
> +        compatible = "dlg,da9150-gpadc";
> +        #io-channel-cells = <1>;
> +    };
> +...
> -- 
> 2.28.0
> 

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

* Re: [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc " Jonathan Cameron
@ 2020-09-15 19:13   ` Rob Herring
  2020-09-19 14:07     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:13 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Jonathan Cameron, devicetree, Phani Movva, linux-iio

On Wed, 09 Sep 2020 18:59:39 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> I don't really know much about this one, hence the binding is
> a simple conversion of what was in the txt file.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Phani Movva <Phani.Movva@imgtec.com>
> ---
>  .../bindings/iio/adc/cc10001_adc.txt          | 22 -------
>  .../bindings/iio/adc/cosmic,10001-adc.yaml    | 59 +++++++++++++++++++
>  2 files changed, 59 insertions(+), 22 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 " Jonathan Cameron
@ 2020-09-15 19:13   ` Rob Herring
  2020-09-19 14:59     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:13 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Charles-Antoine Couret, Jonathan Cameron, devicetree

On Wed, 09 Sep 2020 18:59:40 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Simple SPI driver. I've added the #io-channel-cells
> as an optional parameter to allow use of this device as a provider
> of ADC capabilities to other devices.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
> ---
>  .../devicetree/bindings/iio/adc/ad7949.txt    | 16 ------
>  .../bindings/iio/adc/adi,ad7949.yaml          | 57 +++++++++++++++++++
>  2 files changed, 57 insertions(+), 16 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 " Jonathan Cameron
@ 2020-09-15 19:15   ` Rob Herring
  2020-09-19 15:01     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:15 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Michael Hennerich, linux-iio, Jonathan Cameron

On Wed, 09 Sep 2020 18:59:41 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Fairly straight conversion.  The one oddity in the original binding
> is that spi-cpha and spi-cpol were not marked as required, but were
> in the example.  Looking at the datasheet, there isn't any documented
> flexibility in the possible SPI modes, so I have moved these to requires.
> For spi-max-frequency I have gone the other way.  I absolutely agree
> that it is good to specify this in the dt-binding, but it's not
> strictly required.
> 
> As Stefan's email is bouncing I have gone with Michael as maintainer
> of this one as it falls under the ADI catch all entry in MAINTAINERS.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> ---
>  .../bindings/iio/adc/adi,ad7768-1.txt         | 41 ---------
>  .../bindings/iio/adc/adi,ad7768-1.yaml        | 89 +++++++++++++++++++
>  2 files changed, 89 insertions(+), 41 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 " Jonathan Cameron
@ 2020-09-15 19:16   ` Rob Herring
  2020-09-19 14:12     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:16 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Jonathan Cameron, Daniel Baluta, Dirk Eibach, devicetree

On Wed, 09 Sep 2020 18:59:42 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This binding was moved over from hwmon some time ago so is a bit
> unusual in terms of IIO bindings.  However, conversion was fairly
> straight forwards.
> 
> I've listed both Dirk (who think wrote original binding) and Daniel
> who added the IIO driver for this device.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Dirk Eibach <eibach@gdsys.de>
> Cc: Daniel Baluta <daniel.baluta@nxp.com>
> ---
>  .../devicetree/bindings/iio/adc/ads1015.txt   |  73 -----------
>  .../bindings/iio/adc/ti,ads1015.yaml          | 113 ++++++++++++++++++
>  2 files changed, 113 insertions(+), 73 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 yaml conversion
  2020-09-09 17:59 ` [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 " Jonathan Cameron
@ 2020-09-15 19:17   ` Rob Herring
  2020-09-19 15:03     ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:17 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, Jonathan Cameron, Vladimir Barinov

On Wed, Sep 09, 2020 at 06:59:43PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Very simple binding.  I've changed the example to use the node
> name threshold-detector@0 as sensor@0 seemed too generic.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> ---
>  .../devicetree/bindings/iio/adc/hi8435.txt    | 21 --------
>  .../bindings/iio/adc/holt,hi8435.yaml         | 49 +++++++++++++++++++
>  2 files changed, 49 insertions(+), 21 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/hi8435.txt b/Documentation/devicetree/bindings/iio/adc/hi8435.txt
> deleted file mode 100644
> index 3b0348c5e516..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/hi8435.txt
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -Holt Integrated Circuits HI-8435 threshold detector bindings
> -
> -Required properties:
> - - compatible: should be "holt,hi8435"
> - - reg: spi chip select number for the device
> -
> -Recommended properties:
> - - spi-max-frequency: definition as per
> -		Documentation/devicetree/bindings/spi/spi-bus.txt
> -
> -Optional properties:
> - - gpios: GPIO used for controlling the reset pin
> -
> -Example:
> -sensor@0 {
> -	compatible = "holt,hi8435";
> -	reg = <0>;
> -	gpios = <&gpio6 1 0>;
> -
> -	spi-max-frequency = <1000000>;
> -};
> diff --git a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
> new file mode 100644
> index 000000000000..a35cf3876b86
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/holt,hi8435.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Holt Integrated Circuits HI-8435 SPI threshold detector
> +
> +maintainers:
> +  - Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> +
> +description: |
> +  Datasheet: http://www.holtic.com/documents/427-hi-8435_v-rev-lpdf.do
> +
> +properties:
> +  compatible:
> +    const: holt,hi8435
> +
> +  reg:
> +    maxItems: 1
> +
> +  gpios:
> +    description:
> +       GPIO used for controlling the reset pin

maxItems: 1

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +  spi-max-frequency: true
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        threshold-detector@0 {
> +            compatible = "holt,hi8435";
> +            reg = <0>;
> +            gpios = <&gpio6 1 0>;
> +            spi-max-frequency = <1000000>;
> +        };
> +    };
> +...
> -- 
> 2.28.0
> 

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

* Re: [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc " Jonathan Cameron
@ 2020-09-15 19:23   ` Rob Herring
  2020-09-15 19:31   ` Martin Blumenstingl
  1 sibling, 0 replies; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:23 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, Jonathan Cameron, Martin Blumenstingl,
	Kevin Hilman, Neil Armstrong, Jerome Brunet

On Wed, Sep 09, 2020 at 06:59:44PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This binding is non trivial due to the range of different parts
> supported having several subtle quirks. Martin has helped
> clarify some of them.
> 
> Note, I haven't restricted the amlogic,hhi-sysctrl to only
> be present on the relevant parts if nvmem stuff also is, but
> it would seem to be rather odd if it were otherwise.
> 
> Perhaps we look to make this binding more restrictive at a later date.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  .../bindings/iio/adc/amlogic,meson-saradc.txt |  48 ------
>  .../iio/adc/amlogic,meson-saradc.yaml         | 149 ++++++++++++++++++
>  2 files changed, 149 insertions(+), 48 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt
> deleted file mode 100644
> index d57e9df25f4f..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt
> +++ /dev/null
> @@ -1,48 +0,0 @@
> -* Amlogic Meson SAR (Successive Approximation Register) A/D converter
> -
> -Required properties:
> -- compatible:	depending on the SoC this should be one of:
> -			- "amlogic,meson8-saradc" for Meson8
> -			- "amlogic,meson8b-saradc" for Meson8b
> -			- "amlogic,meson8m2-saradc" for Meson8m2
> -			- "amlogic,meson-gxbb-saradc" for GXBB
> -			- "amlogic,meson-gxl-saradc" for GXL
> -			- "amlogic,meson-gxm-saradc" for GXM
> -			- "amlogic,meson-axg-saradc" for AXG
> -			- "amlogic,meson-g12a-saradc" for AXG
> -		along with the generic "amlogic,meson-saradc"
> -- reg:		the physical base address and length of the registers
> -- interrupts:	the interrupt indicating end of sampling
> -- clocks:	phandle and clock identifier (see clock-names)
> -- clock-names:	mandatory clocks:
> -			- "clkin" for the reference clock (typically XTAL)
> -			- "core" for the SAR ADC core clock
> -		optional clocks:
> -			- "adc_clk" for the ADC (sampling) clock
> -			- "adc_sel" for the ADC (sampling) clock mux
> -- vref-supply:	the regulator supply for the ADC reference voltage
> -- #io-channel-cells: must be 1, see ../iio-bindings.txt
> -
> -Optional properties:
> -- amlogic,hhi-sysctrl:	phandle to the syscon which contains the 5th bit
> -			of the TSC (temperature sensor coefficient) on
> -			Meson8b and Meson8m2 (which used to calibrate the
> -			temperature sensor)
> -- nvmem-cells:		phandle to the temperature_calib eFuse cells
> -- nvmem-cell-names:	if present (to enable the temperature sensor
> -			calibration) this must contain "temperature_calib"
> -
> -
> -Example:
> -	saradc: adc@8680 {
> -		compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
> -		#io-channel-cells = <1>;
> -		reg = <0x0 0x8680 0x0 0x34>;
> -		interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
> -		clocks = <&xtal>,
> -			 <&clkc CLKID_SAR_ADC>,
> -			 <&clkc CLKID_SANA>,
> -			 <&clkc CLKID_SAR_ADC_CLK>,
> -			 <&clkc CLKID_SAR_ADC_SEL>;
> -		clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
> -	};
> diff --git a/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml
> new file mode 100644
> index 000000000000..6d94bf76900e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.yaml
> @@ -0,0 +1,149 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/amlogic,meson-saradc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Meson SAR (Successive Approximation Register) A/D converter
> +
> +maintainers:
> +  - Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> +
> +description:
> +  Binding covers a range of ADCs found on amlogic meson SoCs.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: amlogic,meson-saradc
> +      - items:
> +          - enum:
> +              - amlogic,meson8-saradc
> +              - amlogic,meson8b-saradc
> +              - amlogic,meson8m2-saradc
> +              - amlogic,meson-gxbb-saradc
> +              - amlogic,meson-gxl-saradc
> +              - amlogic,meson-gxm-saradc
> +              - amlogic,meson-axg-saradc
> +              - amlogic,meson-g12a-saradc
> +          - const: amlogic,meson-saradc
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description: Interrupt indicates end of sampling.
> +    maxItems: 1
> +
> +  clocks: true
> +
> +  clock-names: true

Since the names are the same, I prefer to have a schema that covers both 
cases here and then...

> +
> +  vref-supply: true
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +  amlogic,hhi-sysctrl:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      Syscon which contains the 5th bit of the TSC (temperature sensor
> +      coefficient) on Meson8b and Meson8m2 (which used to calibrate the
> +      temperature sensor)
> +
> +  nvmem-cells:
> +    description: phandle to the temperature_calib eFuse cells

maxItems: 1

> +
> +  nvmem-cell-names:
> +    const: temperature_calib
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - amlogic,meson8-saradc
> +              - amlogic,meson8b-saradc
> +              - amlogic,meson8m2-saradc
> +    then:
> +      properties:
> +        nvmem-cells: true
> +        nvmem-cell-names: true

You can drop these 2.

> +        clock-names:
> +          items:
> +            - const: clkin
> +            - const: core
> +          minItems: 2
> +        clocks:
> +          minItems: 2

This case just needs 'maxItems: 2' for clock-names and clocks.

> +    else:
> +      properties:
> +        nvmem-cells: false
> +        mvmem-cel-names: false
> +        clock-names:
> +          items:
> +            - const: clkin
> +            - const: core
> +            - const: adc_clk
> +            - const: adc_sel
> +          minItems: 4

And just minItems here.

> +        clocks:
> +          minItems: 4
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - amlogic,meson8b-saradc
> +              - amlogic,meson8m2-saradc
> +    then:
> +      properties:
> +        amlogic,hhi-sysctrl: true
> +    else:
> +      properties:
> +        amlogic,hhi-sysctrl: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - "#io-channel-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/clock/gxbb-clkc.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    soc {
> +        #address-cells = <2>;
> +        #size-cells = <2>;
> +        adc@8680 {
> +            compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
> +            #io-channel-cells = <1>;
> +            reg = <0x0 0x8680 0x0 0x34>;
> +            interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
> +            clocks = <&xtal>,
> +                <&clkc CLKID_SAR_ADC>,
> +                <&clkc CLKID_SAR_ADC_CLK>,
> +                <&clkc CLKID_SAR_ADC_SEL>;
> +            clock-names = "clkin", "core", "adc_clk", "adc_sel";
> +        };
> +        adc@9680 {
> +            compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";
> +            #io-channel-cells = <1>;
> +            reg = <0x0 0x9680 0x0 0x34>;
> +            interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
> +            clocks = <&xtal>, <&clkc CLKID_SAR_ADC>;
> +            clock-names = "clkin", "core";
> +            nvmem-cells = <&tsens_caldata>;
> +            nvmem-cell-names = "temperature_calib";
> +            amlogic,hhi-sysctrl = <&hhi>;
> +        };
> +    };
> +...
> -- 
> 2.28.0
> 

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

* Re: [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc " Jonathan Cameron
@ 2020-09-15 19:24   ` Rob Herring
  2020-09-16 10:27   ` Jonathan Cameron
  1 sibling, 0 replies; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:24 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Shawn Guo, Haibo Chen, linux-iio, devicetree, Jonathan Cameron,
	Sascha Hauer

On Wed, 09 Sep 2020 18:59:45 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> A nice simple binding.  Only real different from txt is that I dropped
> some descriptions where the naming of the parameter was self explanatory
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Haibo Chen <haibo.chen@freescale.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++
>  .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------
>  2 files changed, 62 insertions(+), 24 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion
  2020-09-09 17:59 ` [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq " Jonathan Cameron
@ 2020-09-15 19:26   ` Rob Herring
  2020-09-16 10:33   ` Jonathan Cameron
  1 sibling, 0 replies; 74+ messages in thread
From: Rob Herring @ 2020-09-15 19:26 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, Jonathan Cameron, Markus Pargmann,
	Shawn Guo, Sascha Hauer

On Wed, Sep 09, 2020 at 06:59:46PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This binding has a few corners that would have been done different today
> but hopefully the yaml schema captures the constraints correctly.
> 
> The child node names are not constrained hence the fairly open regexp.
> I've also documented the defaults for the two references that the
> driver seems to use and copied the value descriptions from the header
> because I think they should be in the dt-binding itself.
> 
> This is part of a general effort to convert all the IIO bindings
> over to yaml
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Markus Pargmann <mpa@pengutronix.de>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  .../bindings/iio/adc/fsl,imx25-gcq.txt        |  57 --------
>  .../bindings/iio/adc/fsl,imx25-gcq.yaml       | 129 ++++++++++++++++++
>  2 files changed, 129 insertions(+), 57 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> deleted file mode 100644
> index eebdcec3dab5..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> +++ /dev/null
> @@ -1,57 +0,0 @@
> -Freescale i.MX25 ADC GCQ device
> -
> -This is a generic conversion queue device that can convert any of the
> -analog inputs using the ADC unit of the i.MX25.
> -
> -Required properties:
> - - compatible: Should be "fsl,imx25-gcq".
> - - reg: Should be the register range of the module.
> - - interrupts: Should be the interrupt number of the module.
> -   Typically this is <1>.
> - - #address-cells: Should be <1> (setting for the subnodes)
> - - #size-cells: Should be <0> (setting for the subnodes)
> -
> -Optional properties:
> - - vref-ext-supply: The regulator supplying the ADC reference voltage.
> -   Required when at least one subnode uses the this reference.
> - - vref-xp-supply: The regulator supplying the ADC reference voltage on pin XP.
> -   Required when at least one subnode uses this reference.
> - - vref-yp-supply: The regulator supplying the ADC reference voltage on pin YP.
> -   Required when at least one subnode uses this reference.
> -
> -Sub-nodes:
> -Optionally you can define subnodes which define the reference voltage
> -for the analog inputs.
> -
> -Required properties for subnodes:
> - - reg: Should be the number of the analog input.
> -     0: xp
> -     1: yp
> -     2: xn
> -     3: yn
> -     4: wiper
> -     5: inaux0
> -     6: inaux1
> -     7: inaux2
> -Optional properties for subnodes:
> - - fsl,adc-refp: specifies the positive reference input as defined in
> -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> - - fsl,adc-refn: specifies the negative reference input as defined in
> -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> -
> -Example:
> -
> -	adc: adc@50030800 {
> -		compatible = "fsl,imx25-gcq";
> -		reg = <0x50030800 0x60>;
> -		interrupt-parent = <&tscadc>;
> -		interrupts = <1>;
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		inaux@5 {
> -			reg = <5>;
> -			fsl,adc-refp = <MX25_ADC_REFP_INT>;
> -			fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> new file mode 100644
> index 000000000000..6c4e3ef0862c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> @@ -0,0 +1,129 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/fsl,imx25-gcq.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale ADC GCQ device
> +
> +description:
> +  This is a generic conversion queue device that can convert any of the
> +  analog inputs using the ADC unit of the i.MX25.
> +
> +maintainers:
> +  - Markus Pargmann <mpa@pengutronix.de>
> +
> +properties:
> +  compatible:
> +    const: fsl,imx25-gcq
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  vref-ext-supply:
> +    description:
> +      The regulator supplying the ADC reference voltage.
> +      Required when at least one subnode uses the this reference.
> +
> +  vref-xp-supply:
> +    description:
> +      The regulator supplying the ADC reference voltage on pin XP.
> +      Required when at least one subnode uses this reference.
> +
> +  vref-yp-supply:
> +    description:
> +      The regulator supplying the ADC reference voltage on pin YP.
> +      Required when at least one subnode uses this reference.
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - "#address-cells"
> +  - "#size-cells"
> +
> +patternProperties:
> +  "[a-z][a-z0-9]+@[0-9a-f]+$":
> +    type: object
> +    description:
> +      Child nodes used to define the reference voltages used for each channel
> +
> +    properties:
> +      reg:
> +        description: |
> +          Number of the analog input.
> +          0: xp
> +          1: yp
> +          2: xn
> +          3: yn
> +          4: wiper
> +          5: inaux0
> +          6: inaux1
> +          7: inaux2
> +        items:
> +          - minimum: 0
> +            maximum: 7
> +
> +      fsl,adc-refp:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: |
> +          Specifies the positive reference input as defined in
> +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> +          0: YP voltage reference
> +          1: XP voltage reference
> +          2: External voltage reference
> +          3: Internal voltage reference (default)
> +        minimum: 0
> +        maximum: 3
> +
> +      fsl,adc-refn:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: |
> +          Specifies the negative reference input as defined in
> +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> +          0: XN ground reference
> +          1: YN ground reference
> +          2: Internal ground reference
> +          3: External ground reference (default)
> +        minimum: 0
> +        maximum: 3
> +
> +    required:
> +      - reg

Each level needs 'additionalProperties':

       additionalProperties: false

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> +    soc {
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        adc@50030800 {
> +            compatible = "fsl,imx25-gcq";
> +            reg = <0x50030800 0x60>;
> +            interrupt-parent = <&tscadc>;
> +            interrupts = <1>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            inaux@5 {
> +                reg = <5>;
> +                fsl,adc-refp = <MX25_ADC_REFP_INT>;
> +                fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> +            };
> +        };
> +    };
> +...
> -- 
> 2.28.0
> 

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

* Re: [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc " Jonathan Cameron
  2020-09-15 19:23   ` Rob Herring
@ 2020-09-15 19:31   ` Martin Blumenstingl
  1 sibling, 0 replies; 74+ messages in thread
From: Martin Blumenstingl @ 2020-09-15 19:31 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Jonathan Cameron,
	Kevin Hilman, Neil Armstrong, Jerome Brunet

Hi Jonathan,

On Wed, Sep 9, 2020 at 8:02 PM Jonathan Cameron <jic23@kernel.org> wrote:
[...]
> +description:
> +  Binding covers a range of ADCs found on amlogic meson SoCs.
Amlogic Meson for consistency please
(found while going through Rob's feedback - sorry for not finding this
nit-pick earlier)


Best regards,
Martin

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

* Re: [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml.
  2020-09-09 17:59 ` [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml Jonathan Cameron
  2020-09-15 19:00   ` Rob Herring
@ 2020-09-15 20:45   ` Rob Herring
  2020-09-16 10:34     ` Jonathan Cameron
  1 sibling, 1 reply; 74+ messages in thread
From: Rob Herring @ 2020-09-15 20:45 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: open list:IIO SUBSYSTEM AND DRIVERS, devicetree,
	Jonathan Cameron, Fugang Duan, Shawn Guo, Sascha Hauer

On Wed, Sep 9, 2020 at 12:02 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> A simple conversion of this freescale ADC binding from txt to yaml.
> For maintainer I went with Fugang Duan as the original author of the
> binding. Would be great to have confirmation of this.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Fugang Duan <B38611@freescale.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  .../bindings/iio/adc/fsl,vf610-adc.yaml       | 81 +++++++++++++++++++
>  .../devicetree/bindings/iio/adc/vf610-adc.txt | 36 ---------
>  2 files changed, 81 insertions(+), 36 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> new file mode 100644
> index 000000000000..99b6b55fd0a3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> @@ -0,0 +1,81 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/fsl,vf610-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ADC found on Freescale vf610 and similar SoCs
> +
> +maintainers:
> +  - Fugang Duan <B38611@freescale.com>

I assume you got a bunch of bounces on this series, too? Looks like 1,
4, 7, 9, 13, 16, 19, and 20 bounced. Please fix those addresses before
applying.

Rob

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

* Re: [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion
  2020-09-09 17:59 ` [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc " Jonathan Cameron
  2020-09-15 19:24   ` Rob Herring
@ 2020-09-16 10:27   ` Jonathan Cameron
  2020-09-19 14:14     ` Jonathan Cameron
  1 sibling, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-16 10:27 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Haibo Chen, Shawn Guo, Sascha Hauer

On Wed, 9 Sep 2020 18:59:45 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> A nice simple binding.  Only real different from txt is that I dropped
> some descriptions where the naming of the parameter was self explanatory
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Haibo Chen <haibo.chen@freescale.com>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
Update Haibo Chen's email address. I'll also fix it whilst applying the
patch if this version goes in!

Thanks,

Jonathan

> ---
>  .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++
>  .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------
>  2 files changed, 62 insertions(+), 24 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
> new file mode 100644
> index 000000000000..dc5eacb38046
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
> @@ -0,0 +1,62 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/fsl,imx7d-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale ADC found on the imx7d SoC
> +
> +maintainers:
> +  - Haibo Chen <haibo.chen@freescale.com>
> +
> +properties:
> +  compatible:
> +    const: fsl,imx7d-adc
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: adc
> +
> +  vref-supply: true
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - vref-supply
> +  - "#io-channel-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/clock/imx7d-clock.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    soc {
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        adc@30610000 {
> +            compatible = "fsl,imx7d-adc";
> +            reg = <0x30610000 0x10000>;
> +            interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
> +            clocks = <&clks IMX7D_ADC_ROOT_CLK>;
> +            clock-names = "adc";
> +            vref-supply = <&reg_vcc_3v3_mcu>;
> +            #io-channel-cells = <1>;
> +        };
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt b/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
> deleted file mode 100644
> index f1f3a552459b..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -Freescale imx7d ADC bindings
> -
> -The devicetree bindings are for the ADC driver written for
> -imx7d SoC.
> -
> -Required properties:
> -- compatible: Should be "fsl,imx7d-adc"
> -- reg: Offset and length of the register set for the ADC device
> -- interrupts: The interrupt number for the ADC device
> -- clocks: The root clock of the ADC controller
> -- clock-names: Must contain "adc", matching entry in the clocks property
> -- vref-supply: The regulator supply ADC reference voltage
> -- #io-channel-cells: Must be 1 as per ../iio-bindings.txt
> -
> -Example:
> -adc1: adc@30610000 {
> -	compatible = "fsl,imx7d-adc";
> -	reg = <0x30610000 0x10000>;
> -	interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
> -	clocks = <&clks IMX7D_ADC_ROOT_CLK>;
> -	clock-names = "adc";
> -	vref-supply = <&reg_vcc_3v3_mcu>;
> -	#io-channel-cells = <1>;
> -};



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

* Re: [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion
  2020-09-09 17:59 ` [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq " Jonathan Cameron
  2020-09-15 19:26   ` Rob Herring
@ 2020-09-16 10:33   ` Jonathan Cameron
  2020-09-16 10:38     ` Jonathan Cameron
  1 sibling, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-16 10:33 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Shawn Guo, Sascha Hauer,
	Markus Pargmann

On Wed, 9 Sep 2020 18:59:46 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This binding has a few corners that would have been done different today
> but hopefully the yaml schema captures the constraints correctly.
> 
> The child node names are not constrained hence the fairly open regexp.
> I've also documented the defaults for the two references that the
> driver seems to use and copied the value descriptions from the header
> because I think they should be in the dt-binding itself.
> 
> This is part of a general effort to convert all the IIO bindings
> over to yaml
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Markus Pargmann <mpa@pengutronix.de>
> Cc: Shawn Guo <shawnguo@kernel.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>

Update Markus' email address.  If Markus is fine with it, I'll update in
the maintainers line in the binding as well.
Hope this is the same Markus Pargmann!

This address is from a 2016 thread, so may well bounce as well :(


Thanks,

Jonathan


> ---
>  .../bindings/iio/adc/fsl,imx25-gcq.txt        |  57 --------
>  .../bindings/iio/adc/fsl,imx25-gcq.yaml       | 129 ++++++++++++++++++
>  2 files changed, 129 insertions(+), 57 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> deleted file mode 100644
> index eebdcec3dab5..000000000000
> --- a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> +++ /dev/null
> @@ -1,57 +0,0 @@
> -Freescale i.MX25 ADC GCQ device
> -
> -This is a generic conversion queue device that can convert any of the
> -analog inputs using the ADC unit of the i.MX25.
> -
> -Required properties:
> - - compatible: Should be "fsl,imx25-gcq".
> - - reg: Should be the register range of the module.
> - - interrupts: Should be the interrupt number of the module.
> -   Typically this is <1>.
> - - #address-cells: Should be <1> (setting for the subnodes)
> - - #size-cells: Should be <0> (setting for the subnodes)
> -
> -Optional properties:
> - - vref-ext-supply: The regulator supplying the ADC reference voltage.
> -   Required when at least one subnode uses the this reference.
> - - vref-xp-supply: The regulator supplying the ADC reference voltage on pin XP.
> -   Required when at least one subnode uses this reference.
> - - vref-yp-supply: The regulator supplying the ADC reference voltage on pin YP.
> -   Required when at least one subnode uses this reference.
> -
> -Sub-nodes:
> -Optionally you can define subnodes which define the reference voltage
> -for the analog inputs.
> -
> -Required properties for subnodes:
> - - reg: Should be the number of the analog input.
> -     0: xp
> -     1: yp
> -     2: xn
> -     3: yn
> -     4: wiper
> -     5: inaux0
> -     6: inaux1
> -     7: inaux2
> -Optional properties for subnodes:
> - - fsl,adc-refp: specifies the positive reference input as defined in
> -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> - - fsl,adc-refn: specifies the negative reference input as defined in
> -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> -
> -Example:
> -
> -	adc: adc@50030800 {
> -		compatible = "fsl,imx25-gcq";
> -		reg = <0x50030800 0x60>;
> -		interrupt-parent = <&tscadc>;
> -		interrupts = <1>;
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -
> -		inaux@5 {
> -			reg = <5>;
> -			fsl,adc-refp = <MX25_ADC_REFP_INT>;
> -			fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> new file mode 100644
> index 000000000000..6c4e3ef0862c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> @@ -0,0 +1,129 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/fsl,imx25-gcq.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale ADC GCQ device
> +
> +description:
> +  This is a generic conversion queue device that can convert any of the
> +  analog inputs using the ADC unit of the i.MX25.
> +
> +maintainers:
> +  - Markus Pargmann <mpa@pengutronix.de>
> +
> +properties:
> +  compatible:
> +    const: fsl,imx25-gcq
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  vref-ext-supply:
> +    description:
> +      The regulator supplying the ADC reference voltage.
> +      Required when at least one subnode uses the this reference.
> +
> +  vref-xp-supply:
> +    description:
> +      The regulator supplying the ADC reference voltage on pin XP.
> +      Required when at least one subnode uses this reference.
> +
> +  vref-yp-supply:
> +    description:
> +      The regulator supplying the ADC reference voltage on pin YP.
> +      Required when at least one subnode uses this reference.
> +
> +  "#io-channel-cells":
> +    const: 1
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - "#address-cells"
> +  - "#size-cells"
> +
> +patternProperties:
> +  "[a-z][a-z0-9]+@[0-9a-f]+$":
> +    type: object
> +    description:
> +      Child nodes used to define the reference voltages used for each channel
> +
> +    properties:
> +      reg:
> +        description: |
> +          Number of the analog input.
> +          0: xp
> +          1: yp
> +          2: xn
> +          3: yn
> +          4: wiper
> +          5: inaux0
> +          6: inaux1
> +          7: inaux2
> +        items:
> +          - minimum: 0
> +            maximum: 7
> +
> +      fsl,adc-refp:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: |
> +          Specifies the positive reference input as defined in
> +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> +          0: YP voltage reference
> +          1: XP voltage reference
> +          2: External voltage reference
> +          3: Internal voltage reference (default)
> +        minimum: 0
> +        maximum: 3
> +
> +      fsl,adc-refn:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: |
> +          Specifies the negative reference input as defined in
> +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> +          0: XN ground reference
> +          1: YN ground reference
> +          2: Internal ground reference
> +          3: External ground reference (default)
> +        minimum: 0
> +        maximum: 3
> +
> +    required:
> +      - reg
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> +    soc {
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        adc@50030800 {
> +            compatible = "fsl,imx25-gcq";
> +            reg = <0x50030800 0x60>;
> +            interrupt-parent = <&tscadc>;
> +            interrupts = <1>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            inaux@5 {
> +                reg = <5>;
> +                fsl,adc-refp = <MX25_ADC_REFP_INT>;
> +                fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> +            };
> +        };
> +    };
> +...



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

* Re: [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml.
  2020-09-15 20:45   ` Rob Herring
@ 2020-09-16 10:34     ` Jonathan Cameron
  2020-09-17  2:24       ` Andy Duan
  0 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-16 10:34 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jonathan Cameron, open list:IIO SUBSYSTEM AND DRIVERS,
	devicetree, Shawn Guo, Sascha Hauer, fugang.duan

On Tue, 15 Sep 2020 14:45:58 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, Sep 9, 2020 at 12:02 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > A simple conversion of this freescale ADC binding from txt to yaml.
> > For maintainer I went with Fugang Duan as the original author of the
> > binding. Would be great to have confirmation of this.
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Fugang Duan <B38611@freescale.com>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  .../bindings/iio/adc/fsl,vf610-adc.yaml       | 81 +++++++++++++++++++
> >  .../devicetree/bindings/iio/adc/vf610-adc.txt | 36 ---------
> >  2 files changed, 81 insertions(+), 36 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > new file mode 100644
> > index 000000000000..99b6b55fd0a3
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > @@ -0,0 +1,81 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/fsl,vf610-adc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ADC found on Freescale vf610 and similar SoCs
> > +
> > +maintainers:
> > +  - Fugang Duan <B38611@freescale.com>  
> 
> I assume you got a bunch of bounces on this series, too? Looks like 1,
> 4, 7, 9, 13, 16, 19, and 20 bounced. Please fix those addresses before
> applying.

Yup. I missed them on v1, but have saved the set for v2 to be able to
fix those I can.

for some I can make a reasonable stab at a suitable maintainer
as covered by a catch all.  For the others if I can't find a newer address
I'll cover them myself until someone else steps up.
I think that's just 9 and 13.  For 4 I didn't get a bounce but can add that
to my list!

For this particular one looks like fugang duan is still active but now
with an NXP address so I'll update that. I've changed the cc on this
mail.

Thanks,

Jonathan


> 
> Rob



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

* Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-10  2:32   ` Joel Stanley
@ 2020-09-16 10:36     ` Jonathan Cameron
  2020-09-16 12:39       ` Joel Stanley
  0 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-16 10:36 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Jonathan Cameron, linux-iio, Rob Herring, devicetree,
	Rick Altherr, Andrew Jeffery

On Thu, 10 Sep 2020 02:32:19 +0000
Joel Stanley <joel@jms.id.au> wrote:

> On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Simple txt to yaml conversion. Part of a general move to convert
> > all the IIO bindings over to yaml.
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Rick Altherr <raltherr@google.com>
> > Cc: Joel Stanley <joel@jms.id.au>
> > Cc: Andrew Jeffery <andrew@aj.id.au>  
> 
> Acked-by: Joel Stanley <joel@jms.id.au>
> 
> 
> > ---
> >  .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
> >  .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
> >  2 files changed, 54 insertions(+), 22 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> > new file mode 100644
> > index 000000000000..09018487d690
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml  
> 
> This naming doesn't make sense, as the bindings are for the ast2500
> too (and they also apply for the ast2600).

Convention is to name after a supported device and not use
wild cards or generic names because the chances of it going
wrong in future is far too high. Will every aspeed adc look the same?
Seems impossible to predict so best we can do safely is to pick a
part number.

There are enormous numbers of examples of this in dt bindings and
for that matter driver naming.

Thanks,

Jonathan


> 
> > @@ -0,0 +1,54 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ADC that forms part of an ASPEED server management processor.
> > +
> > +maintainers:
> > +  - Rick Altherr <raltherr@google.com>
> > +
> > +description:
> > +  This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > +  single ended.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - aspeed,ast2400-adc
> > +      - aspeed,ast2500-adc
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    description:
> > +      Input clock used to derive the sample clock. Expected to be the
> > +      SoC's APB clock.
> > +
> > +  resets: true
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - clocks
> > +  - resets
> > +  - "#io-channel-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/clock/aspeed-clock.h>
> > +    adc@1e6e9000 {
> > +        compatible = "aspeed,ast2400-adc";
> > +        reg = <0x1e6e9000 0xb0>;
> > +        clocks = <&syscon ASPEED_CLK_APB>;
> > +        resets = <&syscon ASPEED_RESET_ADC>;
> > +        #io-channel-cells = <1>;
> > +    };
> > +...
> > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > deleted file mode 100644
> > index 034fc2ba100e..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > +++ /dev/null
> > @@ -1,22 +0,0 @@
> > -Aspeed ADC
> > -
> > -This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > -single ended.
> > -
> > -Required properties:
> > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> > -- reg: memory window mapping address and length
> > -- clocks: Input clock used to derive the sample clock. Expected to be the
> > -          SoC's APB clock.
> > -- resets: Reset controller phandle
> > -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> > -                     by index.
> > -
> > -Example:
> > -       adc@1e6e9000 {
> > -               compatible = "aspeed,ast2400-adc";
> > -               reg = <0x1e6e9000 0xb0>;
> > -               clocks = <&syscon ASPEED_CLK_APB>;
> > -               resets = <&syscon ASPEED_RESET_ADC>;
> > -               #io-channel-cells = <1>;
> > -       };
> > --
> > 2.28.0
> >  



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

* Re: [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion
  2020-09-16 10:33   ` Jonathan Cameron
@ 2020-09-16 10:38     ` Jonathan Cameron
  2020-09-19 14:19       ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-16 10:38 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Shawn Guo, Sascha Hauer

On Wed, 16 Sep 2020 11:33:31 +0100
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Wed, 9 Sep 2020 18:59:46 +0100
> Jonathan Cameron <jic23@kernel.org> wrote:
> 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This binding has a few corners that would have been done different today
> > but hopefully the yaml schema captures the constraints correctly.
> > 
> > The child node names are not constrained hence the fairly open regexp.
> > I've also documented the defaults for the two references that the
> > driver seems to use and copied the value descriptions from the header
> > because I think they should be in the dt-binding itself.
> > 
> > This is part of a general effort to convert all the IIO bindings
> > over to yaml
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Markus Pargmann <mpa@pengutronix.de>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>  
> 
> Update Markus' email address.  If Markus is fine with it, I'll update in
> the maintainers line in the binding as well.
> Hope this is the same Markus Pargmann!
> 
> This address is from a 2016 thread, so may well bounce as well :(

Bounced as well.

Shawn / Sascha any suggestions for a suitable maintainer on this, or
a more recent address for Markus?

If not I'll pick it up I'll put myself in there and we can update it
when someone steps up in then future.

Jonathan

> 
> 
> Thanks,
> 
> Jonathan
> 
> 
> > ---
> >  .../bindings/iio/adc/fsl,imx25-gcq.txt        |  57 --------
> >  .../bindings/iio/adc/fsl,imx25-gcq.yaml       | 129 ++++++++++++++++++
> >  2 files changed, 129 insertions(+), 57 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> > deleted file mode 100644
> > index eebdcec3dab5..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> > +++ /dev/null
> > @@ -1,57 +0,0 @@
> > -Freescale i.MX25 ADC GCQ device
> > -
> > -This is a generic conversion queue device that can convert any of the
> > -analog inputs using the ADC unit of the i.MX25.
> > -
> > -Required properties:
> > - - compatible: Should be "fsl,imx25-gcq".
> > - - reg: Should be the register range of the module.
> > - - interrupts: Should be the interrupt number of the module.
> > -   Typically this is <1>.
> > - - #address-cells: Should be <1> (setting for the subnodes)
> > - - #size-cells: Should be <0> (setting for the subnodes)
> > -
> > -Optional properties:
> > - - vref-ext-supply: The regulator supplying the ADC reference voltage.
> > -   Required when at least one subnode uses the this reference.
> > - - vref-xp-supply: The regulator supplying the ADC reference voltage on pin XP.
> > -   Required when at least one subnode uses this reference.
> > - - vref-yp-supply: The regulator supplying the ADC reference voltage on pin YP.
> > -   Required when at least one subnode uses this reference.
> > -
> > -Sub-nodes:
> > -Optionally you can define subnodes which define the reference voltage
> > -for the analog inputs.
> > -
> > -Required properties for subnodes:
> > - - reg: Should be the number of the analog input.
> > -     0: xp
> > -     1: yp
> > -     2: xn
> > -     3: yn
> > -     4: wiper
> > -     5: inaux0
> > -     6: inaux1
> > -     7: inaux2
> > -Optional properties for subnodes:
> > - - fsl,adc-refp: specifies the positive reference input as defined in
> > -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > - - fsl,adc-refn: specifies the negative reference input as defined in
> > -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > -
> > -Example:
> > -
> > -	adc: adc@50030800 {
> > -		compatible = "fsl,imx25-gcq";
> > -		reg = <0x50030800 0x60>;
> > -		interrupt-parent = <&tscadc>;
> > -		interrupts = <1>;
> > -		#address-cells = <1>;
> > -		#size-cells = <0>;
> > -
> > -		inaux@5 {
> > -			reg = <5>;
> > -			fsl,adc-refp = <MX25_ADC_REFP_INT>;
> > -			fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> > -		};
> > -	};
> > diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> > new file mode 100644
> > index 000000000000..6c4e3ef0862c
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> > @@ -0,0 +1,129 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/fsl,imx25-gcq.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale ADC GCQ device
> > +
> > +description:
> > +  This is a generic conversion queue device that can convert any of the
> > +  analog inputs using the ADC unit of the i.MX25.
> > +
> > +maintainers:
> > +  - Markus Pargmann <mpa@pengutronix.de>
> > +
> > +properties:
> > +  compatible:
> > +    const: fsl,imx25-gcq
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  vref-ext-supply:
> > +    description:
> > +      The regulator supplying the ADC reference voltage.
> > +      Required when at least one subnode uses the this reference.
> > +
> > +  vref-xp-supply:
> > +    description:
> > +      The regulator supplying the ADC reference voltage on pin XP.
> > +      Required when at least one subnode uses this reference.
> > +
> > +  vref-yp-supply:
> > +    description:
> > +      The regulator supplying the ADC reference voltage on pin YP.
> > +      Required when at least one subnode uses this reference.
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 0
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - "#address-cells"
> > +  - "#size-cells"
> > +
> > +patternProperties:
> > +  "[a-z][a-z0-9]+@[0-9a-f]+$":
> > +    type: object
> > +    description:
> > +      Child nodes used to define the reference voltages used for each channel
> > +
> > +    properties:
> > +      reg:
> > +        description: |
> > +          Number of the analog input.
> > +          0: xp
> > +          1: yp
> > +          2: xn
> > +          3: yn
> > +          4: wiper
> > +          5: inaux0
> > +          6: inaux1
> > +          7: inaux2
> > +        items:
> > +          - minimum: 0
> > +            maximum: 7
> > +
> > +      fsl,adc-refp:
> > +        $ref: /schemas/types.yaml#/definitions/uint32
> > +        description: |
> > +          Specifies the positive reference input as defined in
> > +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > +          0: YP voltage reference
> > +          1: XP voltage reference
> > +          2: External voltage reference
> > +          3: Internal voltage reference (default)
> > +        minimum: 0
> > +        maximum: 3
> > +
> > +      fsl,adc-refn:
> > +        $ref: /schemas/types.yaml#/definitions/uint32
> > +        description: |
> > +          Specifies the negative reference input as defined in
> > +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > +          0: XN ground reference
> > +          1: YN ground reference
> > +          2: Internal ground reference
> > +          3: External ground reference (default)
> > +        minimum: 0
> > +        maximum: 3
> > +
> > +    required:
> > +      - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > +    soc {
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +        adc@50030800 {
> > +            compatible = "fsl,imx25-gcq";
> > +            reg = <0x50030800 0x60>;
> > +            interrupt-parent = <&tscadc>;
> > +            interrupts = <1>;
> > +            #address-cells = <1>;
> > +            #size-cells = <0>;
> > +
> > +            inaux@5 {
> > +                reg = <5>;
> > +                fsl,adc-refp = <MX25_ADC_REFP_INT>;
> > +                fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> > +            };
> > +        };
> > +    };
> > +...  
> 



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

* Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-16 10:36     ` Jonathan Cameron
@ 2020-09-16 12:39       ` Joel Stanley
  2020-09-16 14:17         ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Joel Stanley @ 2020-09-16 12:39 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Jonathan Cameron, linux-iio, Rob Herring, devicetree,
	Rick Altherr, Andrew Jeffery

On Wed, 16 Sep 2020 at 10:38, Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
>
> On Thu, 10 Sep 2020 02:32:19 +0000
> Joel Stanley <joel@jms.id.au> wrote:
>
> > On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron <jic23@kernel.org> wrote:
> > >
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > >
> > > Simple txt to yaml conversion. Part of a general move to convert
> > > all the IIO bindings over to yaml.
> > >
> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Cc: Rick Altherr <raltherr@google.com>
> > > Cc: Joel Stanley <joel@jms.id.au>
> > > Cc: Andrew Jeffery <andrew@aj.id.au>
> >
> > Acked-by: Joel Stanley <joel@jms.id.au>
> >
> >
> > > ---
> > >  .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
> > >  .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
> > >  2 files changed, 54 insertions(+), 22 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> > > new file mode 100644
> > > index 000000000000..09018487d690
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> >
> > This naming doesn't make sense, as the bindings are for the ast2500
> > too (and they also apply for the ast2600).
>
> Convention is to name after a supported device and not use
> wild cards or generic names because the chances of it going
> wrong in future is far too high. Will every aspeed adc look the same?
> Seems impossible to predict so best we can do safely is to pick a
> part number.

It already supports three different generations of SoC, which I was
bringing to your attention. Therefore having the name '2400' is
already incorrect.

>
> There are enormous numbers of examples of this in dt bindings and
> for that matter driver naming.
>
> Thanks,
>
> Jonathan
>
>
> >
> > > @@ -0,0 +1,54 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: ADC that forms part of an ASPEED server management processor.
> > > +
> > > +maintainers:
> > > +  - Rick Altherr <raltherr@google.com>
> > > +
> > > +description:
> > > +  This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > +  single ended.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - aspeed,ast2400-adc
> > > +      - aspeed,ast2500-adc
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  clocks:
> > > +    description:
> > > +      Input clock used to derive the sample clock. Expected to be the
> > > +      SoC's APB clock.
> > > +
> > > +  resets: true
> > > +
> > > +  "#io-channel-cells":
> > > +    const: 1
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +  - clocks
> > > +  - resets
> > > +  - "#io-channel-cells"
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    #include <dt-bindings/clock/aspeed-clock.h>
> > > +    adc@1e6e9000 {
> > > +        compatible = "aspeed,ast2400-adc";
> > > +        reg = <0x1e6e9000 0xb0>;
> > > +        clocks = <&syscon ASPEED_CLK_APB>;
> > > +        resets = <&syscon ASPEED_RESET_ADC>;
> > > +        #io-channel-cells = <1>;
> > > +    };
> > > +...
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > deleted file mode 100644
> > > index 034fc2ba100e..000000000000
> > > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > +++ /dev/null
> > > @@ -1,22 +0,0 @@
> > > -Aspeed ADC
> > > -
> > > -This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > -single ended.
> > > -
> > > -Required properties:
> > > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> > > -- reg: memory window mapping address and length
> > > -- clocks: Input clock used to derive the sample clock. Expected to be the
> > > -          SoC's APB clock.
> > > -- resets: Reset controller phandle
> > > -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> > > -                     by index.
> > > -
> > > -Example:
> > > -       adc@1e6e9000 {
> > > -               compatible = "aspeed,ast2400-adc";
> > > -               reg = <0x1e6e9000 0xb0>;
> > > -               clocks = <&syscon ASPEED_CLK_APB>;
> > > -               resets = <&syscon ASPEED_RESET_ADC>;
> > > -               #io-channel-cells = <1>;
> > > -       };
> > > --
> > > 2.28.0
> > >
>
>

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

* Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-16 12:39       ` Joel Stanley
@ 2020-09-16 14:17         ` Jonathan Cameron
  2020-09-19 13:47           ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-16 14:17 UTC (permalink / raw)
  To: Joel Stanley
  Cc: Jonathan Cameron, linux-iio, Rob Herring, devicetree,
	Rick Altherr, Andrew Jeffery

On Wed, 16 Sep 2020 12:39:36 +0000
Joel Stanley <joel@jms.id.au> wrote:

> On Wed, 16 Sep 2020 at 10:38, Jonathan Cameron
> <Jonathan.Cameron@huawei.com> wrote:
> >
> > On Thu, 10 Sep 2020 02:32:19 +0000
> > Joel Stanley <joel@jms.id.au> wrote:
> >  
> > > On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron <jic23@kernel.org> wrote:  
> > > >
> > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > >
> > > > Simple txt to yaml conversion. Part of a general move to convert
> > > > all the IIO bindings over to yaml.
> > > >
> > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > Cc: Rick Altherr <raltherr@google.com>
> > > > Cc: Joel Stanley <joel@jms.id.au>
> > > > Cc: Andrew Jeffery <andrew@aj.id.au>  
> > >
> > > Acked-by: Joel Stanley <joel@jms.id.au>
> > >
> > >  
> > > > ---
> > > >  .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
> > > >  .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
> > > >  2 files changed, 54 insertions(+), 22 deletions(-)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> > > > new file mode 100644
> > > > index 000000000000..09018487d690
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml  
> > >
> > > This naming doesn't make sense, as the bindings are for the ast2500
> > > too (and they also apply for the ast2600).  
> >
> > Convention is to name after a supported device and not use
> > wild cards or generic names because the chances of it going
> > wrong in future is far too high. Will every aspeed adc look the same?
> > Seems impossible to predict so best we can do safely is to pick a
> > part number.  
> 
> It already supports three different generations of SoC, which I was
> bringing to your attention. Therefore having the name '2400' is
> already incorrect.

I'm happy to change it to a specific part number of your choice but you
have to chose one.  The file name is not a list of all the parts supported.

There are bindings that attach to hundreds of different part numbers but the
file is named after a specific one.  Normally the first part supported
is the one chosen (because the binding is normally written at that time).

Jonathan

> 
> >
> > There are enormous numbers of examples of this in dt bindings and
> > for that matter driver naming.
> >
> > Thanks,
> >
> > Jonathan
> >
> >  
> > >  
> > > > @@ -0,0 +1,54 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: ADC that forms part of an ASPEED server management processor.
> > > > +
> > > > +maintainers:
> > > > +  - Rick Altherr <raltherr@google.com>
> > > > +
> > > > +description:
> > > > +  This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > > +  single ended.
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    enum:
> > > > +      - aspeed,ast2400-adc
> > > > +      - aspeed,ast2500-adc
> > > > +
> > > > +  reg:
> > > > +    maxItems: 1
> > > > +
> > > > +  clocks:
> > > > +    description:
> > > > +      Input clock used to derive the sample clock. Expected to be the
> > > > +      SoC's APB clock.
> > > > +
> > > > +  resets: true
> > > > +
> > > > +  "#io-channel-cells":
> > > > +    const: 1
> > > > +
> > > > +required:
> > > > +  - compatible
> > > > +  - reg
> > > > +  - clocks
> > > > +  - resets
> > > > +  - "#io-channel-cells"
> > > > +
> > > > +additionalProperties: false
> > > > +
> > > > +examples:
> > > > +  - |
> > > > +    #include <dt-bindings/clock/aspeed-clock.h>
> > > > +    adc@1e6e9000 {
> > > > +        compatible = "aspeed,ast2400-adc";
> > > > +        reg = <0x1e6e9000 0xb0>;
> > > > +        clocks = <&syscon ASPEED_CLK_APB>;
> > > > +        resets = <&syscon ASPEED_RESET_ADC>;
> > > > +        #io-channel-cells = <1>;
> > > > +    };
> > > > +...
> > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > > deleted file mode 100644
> > > > index 034fc2ba100e..000000000000
> > > > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > > +++ /dev/null
> > > > @@ -1,22 +0,0 @@
> > > > -Aspeed ADC
> > > > -
> > > > -This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > > -single ended.
> > > > -
> > > > -Required properties:
> > > > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> > > > -- reg: memory window mapping address and length
> > > > -- clocks: Input clock used to derive the sample clock. Expected to be the
> > > > -          SoC's APB clock.
> > > > -- resets: Reset controller phandle
> > > > -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> > > > -                     by index.
> > > > -
> > > > -Example:
> > > > -       adc@1e6e9000 {
> > > > -               compatible = "aspeed,ast2400-adc";
> > > > -               reg = <0x1e6e9000 0xb0>;
> > > > -               clocks = <&syscon ASPEED_CLK_APB>;
> > > > -               resets = <&syscon ASPEED_RESET_ADC>;
> > > > -               #io-channel-cells = <1>;
> > > > -       };
> > > > --
> > > > 2.28.0
> > > >  
> >
> >  



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

* RE: [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml.
  2020-09-16 10:34     ` Jonathan Cameron
@ 2020-09-17  2:24       ` Andy Duan
  2020-09-19 13:33         ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Andy Duan @ 2020-09-17  2:24 UTC (permalink / raw)
  To: Jonathan Cameron, Rob Herring
  Cc: Jonathan Cameron, open list:IIO SUBSYSTEM AND DRIVERS,
	devicetree, Shawn Guo, Sascha Hauer

From: Jonathan Cameron <Jonathan.Cameron@Huawei.com> Sent: Wednesday, September 16, 2020 6:34 PM
> On Tue, 15 Sep 2020 14:45:58 -0600
> Rob Herring <robh@kernel.org> wrote:
> 
> > On Wed, Sep 9, 2020 at 12:02 PM Jonathan Cameron <jic23@kernel.org>
> wrote:
> > >
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > >
> > > A simple conversion of this freescale ADC binding from txt to yaml.
> > > For maintainer I went with Fugang Duan as the original author of the
> > > binding. Would be great to have confirmation of this.
> > >
> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Cc: Fugang Duan <B38611@freescale.com>
> > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > > ---
> > >  .../bindings/iio/adc/fsl,vf610-adc.yaml       | 81
> +++++++++++++++++++
> > >  .../devicetree/bindings/iio/adc/vf610-adc.txt | 36 ---------
> > >  2 files changed, 81 insertions(+), 36 deletions(-)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > > b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > > new file mode 100644
> > > index 000000000000..99b6b55fd0a3
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > > @@ -0,0 +1,81 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2
> > > +---
> > > +$id:
> > > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fde
> > >
> +vicetree.org%2Fschemas%2Fiio%2Fadc%2Ffsl%2Cvf610-adc.yaml%23&amp;da
> > >
> +ta=02%7C01%7Cfugang.duan%40nxp.com%7C750fcd8ebdf34af6655308d85a2
> c41
> > >
> +8d%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63735849344455
> 0580&
> > >
> +amp;sdata=SwRIWqN5caXEUZBTmnjKKHJKAZ1FQ03s1Gdpf%2FTyXzE%3D&am
> p;rese
> > > +rved=0
> > > +$schema:
> > > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fde
> > >
> +vicetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=02%7C01%7Cfug
> an
> > >
> +g.duan%40nxp.com%7C750fcd8ebdf34af6655308d85a2c418d%7C686ea1d3bc
> 2b4
> > >
> +c6fa92cd99c5c301635%7C0%7C0%7C637358493444550580&amp;sdata=c4To
> ZCOG
> > > +iPM0XbxCnLGJEEXvnMvFKqSgg3gtLeDYACI%3D&amp;reserved=0
> > > +
> > > +title: ADC found on Freescale vf610 and similar SoCs
> > > +
> > > +maintainers:
> > > +  - Fugang Duan <B38611@freescale.com>
> >
> > I assume you got a bunch of bounces on this series, too? Looks like 1,
> > 4, 7, 9, 13, 16, 19, and 20 bounced. Please fix those addresses before
> > applying.
> 
> Yup. I missed them on v1, but have saved the set for v2 to be able to fix those I
> can.
> 
> for some I can make a reasonable stab at a suitable maintainer as covered by a
> catch all.  For the others if I can't find a newer address I'll cover them myself
> until someone else steps up.
> I think that's just 9 and 13.  For 4 I didn't get a bounce but can add that to my
> list!
> 
> For this particular one looks like fugang duan is still active but now with an NXP
> address so I'll update that. I've changed the cc on this mail.
> 
> Thanks,
> 
> Jonathan

Thanks, Jonathan.

For the patch, it looks good.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
> 
> 
> >
> > Rob
> 


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

* Re: [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml.
  2020-09-17  2:24       ` Andy Duan
@ 2020-09-19 13:33         ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 13:33 UTC (permalink / raw)
  To: Andy Duan
  Cc: Jonathan Cameron, Rob Herring,
	open list:IIO SUBSYSTEM AND DRIVERS, devicetree, Shawn Guo,
	Sascha Hauer

On Thu, 17 Sep 2020 02:24:36 +0000
Andy Duan <fugang.duan@nxp.com> wrote:

> From: Jonathan Cameron <Jonathan.Cameron@Huawei.com> Sent: Wednesday, September 16, 2020 6:34 PM
> > On Tue, 15 Sep 2020 14:45:58 -0600
> > Rob Herring <robh@kernel.org> wrote:
> >   
> > > On Wed, Sep 9, 2020 at 12:02 PM Jonathan Cameron <jic23@kernel.org>  
> > wrote:  
> > > >
> > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > >
> > > > A simple conversion of this freescale ADC binding from txt to yaml.
> > > > For maintainer I went with Fugang Duan as the original author of the
> > > > binding. Would be great to have confirmation of this.
> > > >
> > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > Cc: Fugang Duan <B38611@freescale.com>
> > > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > > > ---
> > > >  .../bindings/iio/adc/fsl,vf610-adc.yaml       | 81  
> > +++++++++++++++++++  
> > > >  .../devicetree/bindings/iio/adc/vf610-adc.txt | 36 ---------
> > > >  2 files changed, 81 insertions(+), 36 deletions(-)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > > > b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > > > new file mode 100644
> > > > index 000000000000..99b6b55fd0a3
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/iio/adc/fsl,vf610-adc.yaml
> > > > @@ -0,0 +1,81 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2
> > > > +---
> > > > +$id:
> > > > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fde
> > > >  
> > +vicetree.org%2Fschemas%2Fiio%2Fadc%2Ffsl%2Cvf610-adc.yaml%23&amp;da  
> > > >  
> > +ta=02%7C01%7Cfugang.duan%40nxp.com%7C750fcd8ebdf34af6655308d85a2
> > c41  
> > > >  
> > +8d%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63735849344455
> > 0580&  
> > > >  
> > +amp;sdata=SwRIWqN5caXEUZBTmnjKKHJKAZ1FQ03s1Gdpf%2FTyXzE%3D&am
> > p;rese  
> > > > +rved=0
> > > > +$schema:
> > > > +https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fde
> > > >  
> > +vicetree.org%2Fmeta-schemas%2Fcore.yaml%23&amp;data=02%7C01%7Cfug
> > an  
> > > >  
> > +g.duan%40nxp.com%7C750fcd8ebdf34af6655308d85a2c418d%7C686ea1d3bc
> > 2b4  
> > > >  
> > +c6fa92cd99c5c301635%7C0%7C0%7C637358493444550580&amp;sdata=c4To
> > ZCOG  
> > > > +iPM0XbxCnLGJEEXvnMvFKqSgg3gtLeDYACI%3D&amp;reserved=0
> > > > +
> > > > +title: ADC found on Freescale vf610 and similar SoCs
> > > > +
> > > > +maintainers:
> > > > +  - Fugang Duan <B38611@freescale.com>  
> > >
> > > I assume you got a bunch of bounces on this series, too? Looks like 1,
> > > 4, 7, 9, 13, 16, 19, and 20 bounced. Please fix those addresses before
> > > applying.  
> > 
> > Yup. I missed them on v1, but have saved the set for v2 to be able to fix those I
> > can.
> > 
> > for some I can make a reasonable stab at a suitable maintainer as covered by a
> > catch all.  For the others if I can't find a newer address I'll cover them myself
> > until someone else steps up.
> > I think that's just 9 and 13.  For 4 I didn't get a bounce but can add that to my
> > list!
> > 
> > For this particular one looks like fugang duan is still active but now with an NXP
> > address so I'll update that. I've changed the cc on this mail.
> > 
> > Thanks,
> > 
> > Jonathan  
> 
> Thanks, Jonathan.
> 
> For the patch, it looks good.
> 
> Reviewed-by: Fugang Duan <fugang.duan@nxp.com>

I've updated the maintainer address to the one you have for this tag
and applied to the togreg branch of iio.git, pushing out as testing
for the autobuilders to perhaps poke at it.

Thanks,

Jonathan

> > 
> >   
> > >
> > > Rob  
> >   
> 


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

* Re: [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion
  2020-09-15 19:01   ` Rob Herring
@ 2020-09-19 13:42     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 13:42 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-iio, Sebastian Reichel, Jonathan Cameron

On Tue, 15 Sep 2020 13:01:08 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:28 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Conversion from txt to yaml as part of a general move of IIO bindings
> > to the new format.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Acked-by: Sebastian Reichel <sre@kernel.org>
Applied. Thanks,

Jonathan

> > ---
> >  .../bindings/iio/adc/ti,twl4030-madc.yaml     | 48 +++++++++++++++++++
> >  .../bindings/iio/adc/twl4030-madc.txt         | 24 ----------
> >  2 files changed, 48 insertions(+), 24 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc yaml conversion
  2020-09-15 19:02   ` Rob Herring
@ 2020-09-19 13:44     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 13:44 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, Stefan Agner, linux-iio, Jonathan Cameron

On Tue, 15 Sep 2020 13:02:00 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:29 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Conversion from freeform text to yaml.
> > One oddity in this binding is that, for historical reasons it requires
> > the node name to be stmpe_adc.  I've put that in the decription field
> > but I'm not sure if there is a better way to specify this?
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Stefan Agner <stefan@agner.ch>
> > ---
> >  .../bindings/iio/adc/st,stmpe-adc.yaml        | 45 +++++++++++++++++++
> >  .../devicetree/bindings/iio/adc/stmpe-adc.txt | 21 ---------
> >  2 files changed, 45 insertions(+), 21 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>

Applied,  Thanks,

Jonathan

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

* Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-16 14:17         ` Jonathan Cameron
@ 2020-09-19 13:47           ` Jonathan Cameron
  2020-09-19 13:52             ` Jonathan Cameron
  0 siblings, 1 reply; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 13:47 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Joel Stanley, linux-iio, Rob Herring, devicetree, Rick Altherr,
	Andrew Jeffery

On Wed, 16 Sep 2020 15:17:51 +0100
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Wed, 16 Sep 2020 12:39:36 +0000
> Joel Stanley <joel@jms.id.au> wrote:
> 
> > On Wed, 16 Sep 2020 at 10:38, Jonathan Cameron
> > <Jonathan.Cameron@huawei.com> wrote:  
> > >
> > > On Thu, 10 Sep 2020 02:32:19 +0000
> > > Joel Stanley <joel@jms.id.au> wrote:
> > >    
> > > > On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron <jic23@kernel.org> wrote:    
> > > > >
> > > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > >
> > > > > Simple txt to yaml conversion. Part of a general move to convert
> > > > > all the IIO bindings over to yaml.
> > > > >
> > > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > > Cc: Rick Altherr <raltherr@google.com>
> > > > > Cc: Joel Stanley <joel@jms.id.au>
> > > > > Cc: Andrew Jeffery <andrew@aj.id.au>    
> > > >
> > > > Acked-by: Joel Stanley <joel@jms.id.au>
> > > >
> > > >    
> > > > > ---
> > > > >  .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
> > > > >  .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
> > > > >  2 files changed, 54 insertions(+), 22 deletions(-)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> > > > > new file mode 100644
> > > > > index 000000000000..09018487d690
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml    
> > > >
> > > > This naming doesn't make sense, as the bindings are for the ast2500
> > > > too (and they also apply for the ast2600).    
> > >
> > > Convention is to name after a supported device and not use
> > > wild cards or generic names because the chances of it going
> > > wrong in future is far too high. Will every aspeed adc look the same?
> > > Seems impossible to predict so best we can do safely is to pick a
> > > part number.    
> > 
> > It already supports three different generations of SoC, which I was
> > bringing to your attention. Therefore having the name '2400' is
> > already incorrect.  
> 
> I'm happy to change it to a specific part number of your choice but you
> have to chose one.  The file name is not a list of all the parts supported.
> 
> There are bindings that attach to hundreds of different part numbers but the
> file is named after a specific one.  Normally the first part supported
> is the one chosen (because the binding is normally written at that time).
> 
If we later decide to rename this then fair enough, but for now I've
applied the patch as it stands to the togreg branch of iio.git and
pushed out as testing for the autobuilders to possibly poke at it.

Note I made the change Rob pointed out whilst applying.

Thanks,

Jonathan

> Jonathan
> 
> >   
> > >
> > > There are enormous numbers of examples of this in dt bindings and
> > > for that matter driver naming.
> > >
> > > Thanks,
> > >
> > > Jonathan
> > >
> > >    
> > > >    
> > > > > @@ -0,0 +1,54 @@
> > > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > > > +%YAML 1.2
> > > > > +---
> > > > > +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > +
> > > > > +title: ADC that forms part of an ASPEED server management processor.
> > > > > +
> > > > > +maintainers:
> > > > > +  - Rick Altherr <raltherr@google.com>
> > > > > +
> > > > > +description:
> > > > > +  This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > > > +  single ended.
> > > > > +
> > > > > +properties:
> > > > > +  compatible:
> > > > > +    enum:
> > > > > +      - aspeed,ast2400-adc
> > > > > +      - aspeed,ast2500-adc
> > > > > +
> > > > > +  reg:
> > > > > +    maxItems: 1
> > > > > +
> > > > > +  clocks:
> > > > > +    description:
> > > > > +      Input clock used to derive the sample clock. Expected to be the
> > > > > +      SoC's APB clock.
> > > > > +
> > > > > +  resets: true
> > > > > +
> > > > > +  "#io-channel-cells":
> > > > > +    const: 1
> > > > > +
> > > > > +required:
> > > > > +  - compatible
> > > > > +  - reg
> > > > > +  - clocks
> > > > > +  - resets
> > > > > +  - "#io-channel-cells"
> > > > > +
> > > > > +additionalProperties: false
> > > > > +
> > > > > +examples:
> > > > > +  - |
> > > > > +    #include <dt-bindings/clock/aspeed-clock.h>
> > > > > +    adc@1e6e9000 {
> > > > > +        compatible = "aspeed,ast2400-adc";
> > > > > +        reg = <0x1e6e9000 0xb0>;
> > > > > +        clocks = <&syscon ASPEED_CLK_APB>;
> > > > > +        resets = <&syscon ASPEED_RESET_ADC>;
> > > > > +        #io-channel-cells = <1>;
> > > > > +    };
> > > > > +...
> > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > > > deleted file mode 100644
> > > > > index 034fc2ba100e..000000000000
> > > > > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > > > +++ /dev/null
> > > > > @@ -1,22 +0,0 @@
> > > > > -Aspeed ADC
> > > > > -
> > > > > -This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > > > -single ended.
> > > > > -
> > > > > -Required properties:
> > > > > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> > > > > -- reg: memory window mapping address and length
> > > > > -- clocks: Input clock used to derive the sample clock. Expected to be the
> > > > > -          SoC's APB clock.
> > > > > -- resets: Reset controller phandle
> > > > > -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> > > > > -                     by index.
> > > > > -
> > > > > -Example:
> > > > > -       adc@1e6e9000 {
> > > > > -               compatible = "aspeed,ast2400-adc";
> > > > > -               reg = <0x1e6e9000 0xb0>;
> > > > > -               clocks = <&syscon ASPEED_CLK_APB>;
> > > > > -               resets = <&syscon ASPEED_RESET_ADC>;
> > > > > -               #io-channel-cells = <1>;
> > > > > -       };
> > > > > --
> > > > > 2.28.0
> > > > >    
> > >
> > >    
> 
> 


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

* Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
  2020-09-19 13:47           ` Jonathan Cameron
@ 2020-09-19 13:52             ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 13:52 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Joel Stanley, linux-iio, Rob Herring, devicetree, Rick Altherr,
	Andrew Jeffery

On Sat, 19 Sep 2020 14:47:04 +0100
Jonathan Cameron <jic23@kernel.org> wrote:

> On Wed, 16 Sep 2020 15:17:51 +0100
> Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:
> 
> > On Wed, 16 Sep 2020 12:39:36 +0000
> > Joel Stanley <joel@jms.id.au> wrote:
> >   
> > > On Wed, 16 Sep 2020 at 10:38, Jonathan Cameron
> > > <Jonathan.Cameron@huawei.com> wrote:    
> > > >
> > > > On Thu, 10 Sep 2020 02:32:19 +0000
> > > > Joel Stanley <joel@jms.id.au> wrote:
> > > >      
> > > > > On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron <jic23@kernel.org> wrote:      
> > > > > >
> > > > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > > >
> > > > > > Simple txt to yaml conversion. Part of a general move to convert
> > > > > > all the IIO bindings over to yaml.
> > > > > >
> > > > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > > > > Cc: Rick Altherr <raltherr@google.com>
> > > > > > Cc: Joel Stanley <joel@jms.id.au>
> > > > > > Cc: Andrew Jeffery <andrew@aj.id.au>      
> > > > >
> > > > > Acked-by: Joel Stanley <joel@jms.id.au>
> > > > >
> > > > >      
> > > > > > ---
> > > > > >  .../bindings/iio/adc/aspeed,ast2400-adc.yaml  | 54 +++++++++++++++++++
> > > > > >  .../bindings/iio/adc/aspeed_adc.txt           | 22 --------
> > > > > >  2 files changed, 54 insertions(+), 22 deletions(-)
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> > > > > > new file mode 100644
> > > > > > index 000000000000..09018487d690
> > > > > > --- /dev/null
> > > > > > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml      
> > > > >
> > > > > This naming doesn't make sense, as the bindings are for the ast2500
> > > > > too (and they also apply for the ast2600).      
> > > >
> > > > Convention is to name after a supported device and not use
> > > > wild cards or generic names because the chances of it going
> > > > wrong in future is far too high. Will every aspeed adc look the same?
> > > > Seems impossible to predict so best we can do safely is to pick a
> > > > part number.      
> > > 
> > > It already supports three different generations of SoC, which I was
> > > bringing to your attention. Therefore having the name '2400' is
> > > already incorrect.    
> > 
> > I'm happy to change it to a specific part number of your choice but you
> > have to chose one.  The file name is not a list of all the parts supported.
> > 
> > There are bindings that attach to hundreds of different part numbers but the
> > file is named after a specific one.  Normally the first part supported
> > is the one chosen (because the binding is normally written at that time).
> >   
> If we later decide to rename this then fair enough, but for now I've
> applied the patch as it stands to the togreg branch of iio.git and
> pushed out as testing for the autobuilders to possibly poke at it.
> 
> Note I made the change Rob pointed out whilst applying.
Gah. I forgot that Rick's email address is bouncing. 
I've switched the listed maintainer to Joel.  Hope that's fine with
you Joel.  If not we change it to someone more appropriate or fall back
to me.

thanks,

Jonathan

> 
> Thanks,
> 
> Jonathan
> 
> > Jonathan
> >   
> > >     
> > > >
> > > > There are enormous numbers of examples of this in dt bindings and
> > > > for that matter driver naming.
> > > >
> > > > Thanks,
> > > >
> > > > Jonathan
> > > >
> > > >      
> > > > >      
> > > > > > @@ -0,0 +1,54 @@
> > > > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > > > > +%YAML 1.2
> > > > > > +---
> > > > > > +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> > > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > > +
> > > > > > +title: ADC that forms part of an ASPEED server management processor.
> > > > > > +
> > > > > > +maintainers:
> > > > > > +  - Rick Altherr <raltherr@google.com>
> > > > > > +
> > > > > > +description:
> > > > > > +  This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > > > > +  single ended.
> > > > > > +
> > > > > > +properties:
> > > > > > +  compatible:
> > > > > > +    enum:
> > > > > > +      - aspeed,ast2400-adc
> > > > > > +      - aspeed,ast2500-adc
> > > > > > +
> > > > > > +  reg:
> > > > > > +    maxItems: 1
> > > > > > +
> > > > > > +  clocks:
> > > > > > +    description:
> > > > > > +      Input clock used to derive the sample clock. Expected to be the
> > > > > > +      SoC's APB clock.
> > > > > > +
> > > > > > +  resets: true
> > > > > > +
> > > > > > +  "#io-channel-cells":
> > > > > > +    const: 1
> > > > > > +
> > > > > > +required:
> > > > > > +  - compatible
> > > > > > +  - reg
> > > > > > +  - clocks
> > > > > > +  - resets
> > > > > > +  - "#io-channel-cells"
> > > > > > +
> > > > > > +additionalProperties: false
> > > > > > +
> > > > > > +examples:
> > > > > > +  - |
> > > > > > +    #include <dt-bindings/clock/aspeed-clock.h>
> > > > > > +    adc@1e6e9000 {
> > > > > > +        compatible = "aspeed,ast2400-adc";
> > > > > > +        reg = <0x1e6e9000 0xb0>;
> > > > > > +        clocks = <&syscon ASPEED_CLK_APB>;
> > > > > > +        resets = <&syscon ASPEED_RESET_ADC>;
> > > > > > +        #io-channel-cells = <1>;
> > > > > > +    };
> > > > > > +...
> > > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > > > > deleted file mode 100644
> > > > > > index 034fc2ba100e..000000000000
> > > > > > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > > > > +++ /dev/null
> > > > > > @@ -1,22 +0,0 @@
> > > > > > -Aspeed ADC
> > > > > > -
> > > > > > -This device is a 10-bit converter for 16 voltage channels.  All inputs are
> > > > > > -single ended.
> > > > > > -
> > > > > > -Required properties:
> > > > > > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> > > > > > -- reg: memory window mapping address and length
> > > > > > -- clocks: Input clock used to derive the sample clock. Expected to be the
> > > > > > -          SoC's APB clock.
> > > > > > -- resets: Reset controller phandle
> > > > > > -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> > > > > > -                     by index.
> > > > > > -
> > > > > > -Example:
> > > > > > -       adc@1e6e9000 {
> > > > > > -               compatible = "aspeed,ast2400-adc";
> > > > > > -               reg = <0x1e6e9000 0xb0>;
> > > > > > -               clocks = <&syscon ASPEED_CLK_APB>;
> > > > > > -               resets = <&syscon ASPEED_RESET_ADC>;
> > > > > > -               #io-channel-cells = <1>;
> > > > > > -       };
> > > > > > --
> > > > > > 2.28.0
> > > > > >      
> > > >
> > > >      
> > 
> >   
> 


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

* Re: [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc yaml conversion
  2020-09-15 19:04   ` Rob Herring
@ 2020-09-19 13:55     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 13:55 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-iio, Jonathan Cameron, Antoine Tenart, devicetree

On Tue, 15 Sep 2020 13:04:27 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:31 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Part of a general move of IIO bindings over to yaml.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Antoine Tenart <antoine.tenart@free-electrons.com>
> > ---
> >  .../bindings/iio/adc/berlin2_adc.txt          | 19 -------
> >  .../bindings/iio/adc/marvell,berlin2-adc.yaml | 50 +++++++++++++++++++
> >  2 files changed, 50 insertions(+), 19 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>

Applied,

Thanks,

Jonathan

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

* Re: [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc yaml conversion.
  2020-09-15 19:05   ` Rob Herring
@ 2020-09-19 13:57     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 13:57 UTC (permalink / raw)
  To: Rob Herring
  Cc: Baolin Wang, Chunyan Zhang, Jonathan Cameron, linux-iio,
	Orson Zhai, devicetree

On Tue, 15 Sep 2020 13:05:22 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:32 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > I changed the name to reflect a specific part in line with normal
> > naming conventions. If there is a particularly strong reason to
> > keep the wild cards let me know.
> > 
> > Otherwise this was a fairly simple conversion as part of converting
> > all the IIO bindings to yaml.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Acked-by: Orson Zhai <orsonzhai@gmail.com>
> > Cc: Baolin Wang <baolin.wang7@gmail.com>
> > Cc: Chunyan Zhang <zhang.lyra@gmail.com>
> > ---
> >  .../bindings/iio/adc/sprd,sc2720-adc.yaml     | 72 +++++++++++++++++++
> >  .../bindings/iio/adc/sprd,sc27xx-adc.txt      | 40 -----------
> >  2 files changed, 72 insertions(+), 40 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied.  Thanks,

Jonathan



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

* Re: [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 yaml conversion
  2020-09-15 19:06   ` Rob Herring
@ 2020-09-19 14:01     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:01 UTC (permalink / raw)
  To: Rob Herring
  Cc: Maxime Ripard, Alexandre Belloni, linux-iio, Jonathan Cameron,
	devicetree

On Tue, 15 Sep 2020 13:06:16 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:33 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > A simple conversion from txt file to yaml.  I added the #io-channel-cells
> > property as optional to allow the channels of this ADCs to be used
> > to provide services to other drivers, for example if an analog
> > accelerometer is connected.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >  .../bindings/iio/adc/nuvoton,nau7802.yaml     | 50 +++++++++++++++++++
> >  .../bindings/iio/adc/nuvoton-nau7802.txt      | 18 -------
> >  2 files changed, 50 insertions(+), 18 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied with updated email addresses as Alexandre requested.

Thanks,

Jonathan



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

* Re: [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc yaml conversion
  2020-09-15 19:07   ` Rob Herring
@ 2020-09-19 14:03     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:03 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, linux-iio, Jonathan Cameron, Tomer Maimon

On Tue, 15 Sep 2020 13:07:24 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:34 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Renamed the file to reflect the only compatible.
> > Added #io-channel-cells to make it easier to support consumers of the
> > ADC channels this device provides.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Tomer Maimon <tmaimon77@gmail.com>
> > ---
> >  .../bindings/iio/adc/nuvoton,npcm-adc.txt     | 26 --------
> >  .../bindings/iio/adc/nuvoton,npcm750-adc.yaml | 64 +++++++++++++++++++
> >  2 files changed, 64 insertions(+), 26 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to possible poke at it.

Thanks,

Jonathan

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

* Re: [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc yaml conversion
  2020-09-15 19:13   ` Rob Herring
@ 2020-09-19 14:07     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:07 UTC (permalink / raw)
  To: Rob Herring; +Cc: Jonathan Cameron, devicetree, Phani Movva, linux-iio

On Tue, 15 Sep 2020 13:13:17 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:39 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > I don't really know much about this one, hence the binding is
> > a simple conversion of what was in the txt file.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Phani Movva <Phani.Movva@imgtec.com>
> > ---
> >  .../bindings/iio/adc/cc10001_adc.txt          | 22 -------
> >  .../bindings/iio/adc/cosmic,10001-adc.yaml    | 59 +++++++++++++++++++
> >  2 files changed, 59 insertions(+), 22 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
For this one. I don't have an address for Phani Movva that works so
I have listed myself as maintainer for the binding until someone else
steps up.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to possibly poke at it.

Thanks,

Jonathan


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

* Re: [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 yaml conversion
  2020-09-15 19:16   ` Rob Herring
@ 2020-09-19 14:12     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:12 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-iio, Jonathan Cameron, Daniel Baluta, devicetree

On Tue, 15 Sep 2020 13:16:58 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:42 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This binding was moved over from hwmon some time ago so is a bit
> > unusual in terms of IIO bindings.  However, conversion was fairly
> > straight forwards.
> > 
> > I've listed both Dirk (who think wrote original binding) and Daniel
> > who added the IIO driver for this device.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Dirk Eibach <eibach@gdsys.de>
> > Cc: Daniel Baluta <daniel.baluta@nxp.com>
> > ---
> >  .../devicetree/bindings/iio/adc/ads1015.txt   |  73 -----------
> >  .../bindings/iio/adc/ti,ads1015.yaml          | 113 ++++++++++++++++++
> >  2 files changed, 113 insertions(+), 73 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Dropped Dirk as maintainer on this one as I don't have an up to date
address.  That leaves Daniel as the sole listed maintainer.

Hope that's fine!

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to maybe run some tests on it.

Thanks,

Jonathan


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

* Re: [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc yaml conversion
  2020-09-16 10:27   ` Jonathan Cameron
@ 2020-09-19 14:14     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:14 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Haibo Chen, Shawn Guo, Sascha Hauer

On Wed, 16 Sep 2020 11:27:21 +0100
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Wed, 9 Sep 2020 18:59:45 +0100
> Jonathan Cameron <jic23@kernel.org> wrote:
> 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > A nice simple binding.  Only real different from txt is that I dropped
> > some descriptions where the naming of the parameter was self explanatory
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Haibo Chen <haibo.chen@freescale.com>
> > Cc: Shawn Guo <shawnguo@kernel.org>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>  
> Update Haibo Chen's email address. I'll also fix it whilst applying the
> patch if this version goes in!
Applied with that updated address for Haibo Chen.

thanks,

Jonathan

> 
> Thanks,
> 
> Jonathan
> 
> > ---
> >  .../bindings/iio/adc/fsl,imx7d-adc.yaml       | 62 +++++++++++++++++++
> >  .../devicetree/bindings/iio/adc/imx7d-adc.txt | 24 -------
> >  2 files changed, 62 insertions(+), 24 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
> > new file mode 100644
> > index 000000000000..dc5eacb38046
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx7d-adc.yaml
> > @@ -0,0 +1,62 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/fsl,imx7d-adc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale ADC found on the imx7d SoC
> > +
> > +maintainers:
> > +  - Haibo Chen <haibo.chen@freescale.com>
> > +
> > +properties:
> > +  compatible:
> > +    const: fsl,imx7d-adc
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: adc
> > +
> > +  vref-supply: true
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +  - clocks
> > +  - clock-names
> > +  - vref-supply
> > +  - "#io-channel-cells"
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    #include <dt-bindings/clock/imx7d-clock.h>
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +    soc {
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +        adc@30610000 {
> > +            compatible = "fsl,imx7d-adc";
> > +            reg = <0x30610000 0x10000>;
> > +            interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
> > +            clocks = <&clks IMX7D_ADC_ROOT_CLK>;
> > +            clock-names = "adc";
> > +            vref-supply = <&reg_vcc_3v3_mcu>;
> > +            #io-channel-cells = <1>;
> > +        };
> > +    };
> > +...
> > diff --git a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt b/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
> > deleted file mode 100644
> > index f1f3a552459b..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/imx7d-adc.txt
> > +++ /dev/null
> > @@ -1,24 +0,0 @@
> > -Freescale imx7d ADC bindings
> > -
> > -The devicetree bindings are for the ADC driver written for
> > -imx7d SoC.
> > -
> > -Required properties:
> > -- compatible: Should be "fsl,imx7d-adc"
> > -- reg: Offset and length of the register set for the ADC device
> > -- interrupts: The interrupt number for the ADC device
> > -- clocks: The root clock of the ADC controller
> > -- clock-names: Must contain "adc", matching entry in the clocks property
> > -- vref-supply: The regulator supply ADC reference voltage
> > -- #io-channel-cells: Must be 1 as per ../iio-bindings.txt
> > -
> > -Example:
> > -adc1: adc@30610000 {
> > -	compatible = "fsl,imx7d-adc";
> > -	reg = <0x30610000 0x10000>;
> > -	interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
> > -	clocks = <&clks IMX7D_ADC_ROOT_CLK>;
> > -	clock-names = "adc";
> > -	vref-supply = <&reg_vcc_3v3_mcu>;
> > -	#io-channel-cells = <1>;
> > -};  
> 
> 


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

* Re: [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq yaml conversion
  2020-09-16 10:38     ` Jonathan Cameron
@ 2020-09-19 14:19       ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:19 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Rob Herring, devicetree, Shawn Guo, Sascha Hauer

On Wed, 16 Sep 2020 11:38:22 +0100
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Wed, 16 Sep 2020 11:33:31 +0100
> Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:
> 
> > On Wed, 9 Sep 2020 18:59:46 +0100
> > Jonathan Cameron <jic23@kernel.org> wrote:
> >   
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > 
> > > This binding has a few corners that would have been done different today
> > > but hopefully the yaml schema captures the constraints correctly.
> > > 
> > > The child node names are not constrained hence the fairly open regexp.
> > > I've also documented the defaults for the two references that the
> > > driver seems to use and copied the value descriptions from the header
> > > because I think they should be in the dt-binding itself.
> > > 
> > > This is part of a general effort to convert all the IIO bindings
> > > over to yaml
> > > 
> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Cc: Markus Pargmann <mpa@pengutronix.de>
> > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > Cc: Sascha Hauer <s.hauer@pengutronix.de>    
> > 
> > Update Markus' email address.  If Markus is fine with it, I'll update in
> > the maintainers line in the binding as well.
> > Hope this is the same Markus Pargmann!
> > 
> > This address is from a 2016 thread, so may well bounce as well :(  
> 
> Bounced as well.
> 
> Shawn / Sascha any suggestions for a suitable maintainer on this, or
> a more recent address for Markus?
> 
> If not I'll pick it up I'll put myself in there and we can update it
> when someone steps up in then future.
> 
I've put myself as the maintainer for now, but more than happy if someone
else makes more sense!

Also made the change Rob pointed out to mark the child nodes as not having
any additional properties.

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to probably ignore it.

Thanks,

Jonathan

> Jonathan
> 
> > 
> > 
> > Thanks,
> > 
> > Jonathan
> > 
> >   
> > > ---
> > >  .../bindings/iio/adc/fsl,imx25-gcq.txt        |  57 --------
> > >  .../bindings/iio/adc/fsl,imx25-gcq.yaml       | 129 ++++++++++++++++++
> > >  2 files changed, 129 insertions(+), 57 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> > > deleted file mode 100644
> > > index eebdcec3dab5..000000000000
> > > --- a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.txt
> > > +++ /dev/null
> > > @@ -1,57 +0,0 @@
> > > -Freescale i.MX25 ADC GCQ device
> > > -
> > > -This is a generic conversion queue device that can convert any of the
> > > -analog inputs using the ADC unit of the i.MX25.
> > > -
> > > -Required properties:
> > > - - compatible: Should be "fsl,imx25-gcq".
> > > - - reg: Should be the register range of the module.
> > > - - interrupts: Should be the interrupt number of the module.
> > > -   Typically this is <1>.
> > > - - #address-cells: Should be <1> (setting for the subnodes)
> > > - - #size-cells: Should be <0> (setting for the subnodes)
> > > -
> > > -Optional properties:
> > > - - vref-ext-supply: The regulator supplying the ADC reference voltage.
> > > -   Required when at least one subnode uses the this reference.
> > > - - vref-xp-supply: The regulator supplying the ADC reference voltage on pin XP.
> > > -   Required when at least one subnode uses this reference.
> > > - - vref-yp-supply: The regulator supplying the ADC reference voltage on pin YP.
> > > -   Required when at least one subnode uses this reference.
> > > -
> > > -Sub-nodes:
> > > -Optionally you can define subnodes which define the reference voltage
> > > -for the analog inputs.
> > > -
> > > -Required properties for subnodes:
> > > - - reg: Should be the number of the analog input.
> > > -     0: xp
> > > -     1: yp
> > > -     2: xn
> > > -     3: yn
> > > -     4: wiper
> > > -     5: inaux0
> > > -     6: inaux1
> > > -     7: inaux2
> > > -Optional properties for subnodes:
> > > - - fsl,adc-refp: specifies the positive reference input as defined in
> > > -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > > - - fsl,adc-refn: specifies the negative reference input as defined in
> > > -     <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > > -
> > > -Example:
> > > -
> > > -	adc: adc@50030800 {
> > > -		compatible = "fsl,imx25-gcq";
> > > -		reg = <0x50030800 0x60>;
> > > -		interrupt-parent = <&tscadc>;
> > > -		interrupts = <1>;
> > > -		#address-cells = <1>;
> > > -		#size-cells = <0>;
> > > -
> > > -		inaux@5 {
> > > -			reg = <5>;
> > > -			fsl,adc-refp = <MX25_ADC_REFP_INT>;
> > > -			fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> > > -		};
> > > -	};
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> > > new file mode 100644
> > > index 000000000000..6c4e3ef0862c
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/fsl,imx25-gcq.yaml
> > > @@ -0,0 +1,129 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/adc/fsl,imx25-gcq.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Freescale ADC GCQ device
> > > +
> > > +description:
> > > +  This is a generic conversion queue device that can convert any of the
> > > +  analog inputs using the ADC unit of the i.MX25.
> > > +
> > > +maintainers:
> > > +  - Markus Pargmann <mpa@pengutronix.de>
> > > +
> > > +properties:
> > > +  compatible:
> > > +    const: fsl,imx25-gcq
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  interrupts:
> > > +    maxItems: 1
> > > +
> > > +  vref-ext-supply:
> > > +    description:
> > > +      The regulator supplying the ADC reference voltage.
> > > +      Required when at least one subnode uses the this reference.
> > > +
> > > +  vref-xp-supply:
> > > +    description:
> > > +      The regulator supplying the ADC reference voltage on pin XP.
> > > +      Required when at least one subnode uses this reference.
> > > +
> > > +  vref-yp-supply:
> > > +    description:
> > > +      The regulator supplying the ADC reference voltage on pin YP.
> > > +      Required when at least one subnode uses this reference.
> > > +
> > > +  "#io-channel-cells":
> > > +    const: 1
> > > +
> > > +  "#address-cells":
> > > +    const: 1
> > > +
> > > +  "#size-cells":
> > > +    const: 0
> > > +
> > > +required:
> > > +  - compatible
> > > +  - reg
> > > +  - interrupts
> > > +  - "#address-cells"
> > > +  - "#size-cells"
> > > +
> > > +patternProperties:
> > > +  "[a-z][a-z0-9]+@[0-9a-f]+$":
> > > +    type: object
> > > +    description:
> > > +      Child nodes used to define the reference voltages used for each channel
> > > +
> > > +    properties:
> > > +      reg:
> > > +        description: |
> > > +          Number of the analog input.
> > > +          0: xp
> > > +          1: yp
> > > +          2: xn
> > > +          3: yn
> > > +          4: wiper
> > > +          5: inaux0
> > > +          6: inaux1
> > > +          7: inaux2
> > > +        items:
> > > +          - minimum: 0
> > > +            maximum: 7
> > > +
> > > +      fsl,adc-refp:
> > > +        $ref: /schemas/types.yaml#/definitions/uint32
> > > +        description: |
> > > +          Specifies the positive reference input as defined in
> > > +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > > +          0: YP voltage reference
> > > +          1: XP voltage reference
> > > +          2: External voltage reference
> > > +          3: Internal voltage reference (default)
> > > +        minimum: 0
> > > +        maximum: 3
> > > +
> > > +      fsl,adc-refn:
> > > +        $ref: /schemas/types.yaml#/definitions/uint32
> > > +        description: |
> > > +          Specifies the negative reference input as defined in
> > > +          <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > > +          0: XN ground reference
> > > +          1: YN ground reference
> > > +          2: Internal ground reference
> > > +          3: External ground reference (default)
> > > +        minimum: 0
> > > +        maximum: 3
> > > +
> > > +    required:
> > > +      - reg
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > +  - |
> > > +    #include <dt-bindings/iio/adc/fsl-imx25-gcq.h>
> > > +    soc {
> > > +        #address-cells = <1>;
> > > +        #size-cells = <1>;
> > > +        adc@50030800 {
> > > +            compatible = "fsl,imx25-gcq";
> > > +            reg = <0x50030800 0x60>;
> > > +            interrupt-parent = <&tscadc>;
> > > +            interrupts = <1>;
> > > +            #address-cells = <1>;
> > > +            #size-cells = <0>;
> > > +
> > > +            inaux@5 {
> > > +                reg = <5>;
> > > +                fsl,adc-refp = <MX25_ADC_REFP_INT>;
> > > +                fsl,adc-refn = <MX25_ADC_REFN_NGND>;
> > > +            };
> > > +        };
> > > +    };
> > > +...    
> >   
> 
> 


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

* Re: [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion
  2020-09-15 19:07   ` Rob Herring
@ 2020-09-19 14:20     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:20 UTC (permalink / raw)
  To: Rob Herring; +Cc: Joachim Eastwood, Jonathan Cameron, linux-iio, devicetree

On Tue, 15 Sep 2020 13:07:50 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:35 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Most of the description in the original doc is effectively boilerplate
> > and does not bring much value so I have not carried it over into the yaml.
> > 
> > Added #io-channel-cells to simplify use of channels on this ADC by
> > consumer drivers.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Joachim Eastwood <manabian@gmail.com>
> > ---
> >  .../bindings/iio/adc/lpc1850-adc.txt          | 20 ------
> >  .../bindings/iio/adc/nxp,lpc1850-adc.yaml     | 61 +++++++++++++++++++
> >  2 files changed, 61 insertions(+), 20 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied.  Thanks,

Jonathan



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

* Re: [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc yaml conversion
  2020-09-15 19:09   ` Rob Herring
@ 2020-09-19 14:22     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:22 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-iio, Gregory Clement, devicetree, Jonathan Cameron

On Tue, 15 Sep 2020 13:09:33 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:36 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Renamed to remove the wild cards.  These go wrong far too often so
> > in general preferred to use the name of a specific part.  As this
> > binding only provides one compatible, I went with that.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Gregory Clement <gregory.clement@bootlin.com>
> > ---
> >  .../bindings/iio/adc/lpc32xx-adc.txt          | 21 --------
> >  .../bindings/iio/adc/nxp,lpc3220-adc.yaml     | 50 +++++++++++++++++++
> >  2 files changed, 50 insertions(+), 21 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied,

thanks,

Jonathan


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

* Re: [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc yaml conversion
  2020-09-15 19:11   ` Rob Herring
@ 2020-09-19 14:25     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:25 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-iio, devicetree, Jonathan Cameron, Tony Lindgren

On Tue, 15 Sep 2020 13:11:01 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, Sep 09, 2020 at 06:59:37PM +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Conversion from txt to yaml.
> > Slightly expanded example to give a bit more context.
> > Description lifted from the original driver commit.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> > ---
> >  .../devicetree/bindings/iio/adc/cpcap-adc.txt | 17 -------
> >  .../bindings/iio/adc/motorola,cpcap-adc.yaml  | 51 +++++++++++++++++++
> >  2 files changed, 51 insertions(+), 17 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt b/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
> > deleted file mode 100644
> > index ec04008e8f4f..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt
> > +++ /dev/null
> > @@ -1,17 +0,0 @@
> > -Motorola CPCAP PMIC ADC binding
> > -
> > -Required properties:
> > -- compatible: Should be "motorola,cpcap-adc" or "motorola,mapphone-cpcap-adc"
> > -- interrupts: The interrupt number for the ADC device
> > -- interrupt-names: Should be "adcdone"
> > -- #io-channel-cells: Number of cells in an IIO specifier
> > -
> > -Example:
> > -
> > -cpcap_adc: adc {
> > -	compatible = "motorola,mapphone-cpcap-adc";
> > -	interrupt-parent = <&cpcap>;
> > -	interrupts = <8 IRQ_TYPE_NONE>;
> > -	interrupt-names = "adcdone";
> > -	#io-channel-cells = <1>;
> > -};
> > diff --git a/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
> > new file mode 100644
> > index 000000000000..7811c0abd5d0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml
> > @@ -0,0 +1,51 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/motorola,cpcap-adc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Motorola CPCAP PMIC ADC binding
> > +
> > +maintainers:
> > +  - Tony Lindgren <tony@atomide.com>
> > +
> > +description:
> > +  On Motorola phones like droid 4 there is a custom CPCAP PMIC. This PMIC
> > +  has ADCs that are used for battery charging and USB PHY VBUS and ID pin
> > +  detection.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - motorola,cpcap-adc
> > +      - motorola,mapphone-cpcap-adc
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  interrupt-names:
> > +    const: adcdone
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - interrupts
> > +  - "#io-channel-cells"  
> 
> additionalProperties: false
Done
> 
> With that,
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied.  Thanks

Jonathan


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

* Re: [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc yaml conversion
  2020-09-15 19:12   ` Rob Herring
@ 2020-09-19 14:57     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:57 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-iio, devicetree, Jonathan Cameron, Adam Thomson

On Tue, 15 Sep 2020 13:12:30 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, Sep 09, 2020 at 06:59:38PM +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This is a small part of an MFD so perhaps ultimately it makes more
> > sense to document it with that MFD binding rather than separately.
> > 
> > In the meantime it's a straightforward conversion from txt to yaml.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> > ---
> >  .../bindings/iio/adc/da9150-gpadc.txt         | 16 ---------
> >  .../bindings/iio/adc/dlg,da9150-gpadc.yaml    | 33 +++++++++++++++++++
> >  2 files changed, 33 insertions(+), 16 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt b/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
> > deleted file mode 100644
> > index c07228da92ac..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/da9150-gpadc.txt
> > +++ /dev/null
> > @@ -1,16 +0,0 @@
> > -Dialog Semiconductor DA9150 IIO GPADC bindings
> > -
> > -Required properties:
> > -- compatible: "dlg,da9150-gpadc" for DA9150 IIO GPADC
> > -- #io-channel-cells: Should be set to <1>
> > -  (See Documentation/devicetree/bindings/iio/iio-bindings.txt for further info)
> > -
> > -For further information on GPADC channels, see device datasheet.
> > -
> > -
> > -Example:
> > -
> > -	gpadc: da9150-gpadc {
> > -		compatible = "dlg,da9150-gpadc";
> > -		#io-channel-cells = <1>;
> > -	};
> > diff --git a/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
> > new file mode 100644
> > index 000000000000..15c51d337108
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/dlg,da9150-gpadc.yaml
> > @@ -0,0 +1,33 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/dlg,da9150-gpadc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Dialog Semiconductor DA9150 IIO GPADC
> > +
> > +maintainers:
> > +  - Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> > +
> > +description:
> > +  This patch adds support for general purpose ADC within the
> > +  DA9150 Charger & Fuel-Gauge IC.
> > +
> > +properties:
> > +  compatible:
> > +    const: dlg,da9150-gpadc
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - "#io-channel-cells"  
> 
> additionalProperties...
> 
One day I'll remember to check this in all my patches! Sorry about that.
Fixed.
> With that,
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied
> 
> > +
> > +examples:
> > +  - |
> > +    adc {
> > +        compatible = "dlg,da9150-gpadc";
> > +        #io-channel-cells = <1>;
> > +    };
> > +...
> > -- 
> > 2.28.0
> >   


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

* Re: [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 yaml conversion
  2020-09-15 19:13   ` Rob Herring
@ 2020-09-19 14:59     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 14:59 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-iio, Charles-Antoine Couret, Jonathan Cameron, devicetree

On Tue, 15 Sep 2020 13:13:50 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:40 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Simple SPI driver. I've added the #io-channel-cells
> > as an optional parameter to allow use of this device as a provider
> > of ADC capabilities to other devices.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Charles-Antoine Couret <charles-antoine.couret@essensium.com>
> > ---
> >  .../devicetree/bindings/iio/adc/ad7949.txt    | 16 ------
> >  .../bindings/iio/adc/adi,ad7949.yaml          | 57 +++++++++++++++++++
> >  2 files changed, 57 insertions(+), 16 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied,

Thanks,

Jonathan


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

* Re: [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 yaml conversion
  2020-09-15 19:15   ` Rob Herring
@ 2020-09-19 15:01     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 15:01 UTC (permalink / raw)
  To: Rob Herring; +Cc: devicetree, Michael Hennerich, linux-iio, Jonathan Cameron

On Tue, 15 Sep 2020 13:15:05 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, 09 Sep 2020 18:59:41 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Fairly straight conversion.  The one oddity in the original binding
> > is that spi-cpha and spi-cpol were not marked as required, but were
> > in the example.  Looking at the datasheet, there isn't any documented
> > flexibility in the possible SPI modes, so I have moved these to requires.
> > For spi-max-frequency I have gone the other way.  I absolutely agree
> > that it is good to specify this in the dt-binding, but it's not
> > strictly required.
> > 
> > As Stefan's email is bouncing I have gone with Michael as maintainer
> > of this one as it falls under the ADI catch all entry in MAINTAINERS.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> > ---
> >  .../bindings/iio/adc/adi,ad7768-1.txt         | 41 ---------
> >  .../bindings/iio/adc/adi,ad7768-1.yaml        | 89 +++++++++++++++++++
> >  2 files changed, 89 insertions(+), 41 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied,  thanks,

Jonathan


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

* Re: [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 yaml conversion
  2020-09-15 19:17   ` Rob Herring
@ 2020-09-19 15:03     ` Jonathan Cameron
  0 siblings, 0 replies; 74+ messages in thread
From: Jonathan Cameron @ 2020-09-19 15:03 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-iio, devicetree, Jonathan Cameron, Vladimir Barinov

On Tue, 15 Sep 2020 13:17:59 -0600
Rob Herring <robh@kernel.org> wrote:

> On Wed, Sep 09, 2020 at 06:59:43PM +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Very simple binding.  I've changed the example to use the node
> > name threshold-detector@0 as sensor@0 seemed too generic.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> > ---
> >  .../devicetree/bindings/iio/adc/hi8435.txt    | 21 --------
> >  .../bindings/iio/adc/holt,hi8435.yaml         | 49 +++++++++++++++++++
> >  2 files changed, 49 insertions(+), 21 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/hi8435.txt b/Documentation/devicetree/bindings/iio/adc/hi8435.txt
> > deleted file mode 100644
> > index 3b0348c5e516..000000000000
> > --- a/Documentation/devicetree/bindings/iio/adc/hi8435.txt
> > +++ /dev/null
> > @@ -1,21 +0,0 @@
> > -Holt Integrated Circuits HI-8435 threshold detector bindings
> > -
> > -Required properties:
> > - - compatible: should be "holt,hi8435"
> > - - reg: spi chip select number for the device
> > -
> > -Recommended properties:
> > - - spi-max-frequency: definition as per
> > -		Documentation/devicetree/bindings/spi/spi-bus.txt
> > -
> > -Optional properties:
> > - - gpios: GPIO used for controlling the reset pin
> > -
> > -Example:
> > -sensor@0 {
> > -	compatible = "holt,hi8435";
> > -	reg = <0>;
> > -	gpios = <&gpio6 1 0>;
> > -
> > -	spi-max-frequency = <1000000>;
> > -};
> > diff --git a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
> > new file mode 100644
> > index 000000000000..a35cf3876b86
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/holt,hi8435.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Holt Integrated Circuits HI-8435 SPI threshold detector
> > +
> > +maintainers:
> > +  - Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> > +
> > +description: |
> > +  Datasheet: http://www.holtic.com/documents/427-hi-8435_v-rev-lpdf.do
> > +
> > +properties:
> > +  compatible:
> > +    const: holt,hi8435
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  gpios:
> > +    description:
> > +       GPIO used for controlling the reset pin  
> 
> maxItems: 1
done
> 
> With that,
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied.

Thanks,

Jonathan

> 
> > +
> > +  spi-max-frequency: true
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    spi {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +        threshold-detector@0 {
> > +            compatible = "holt,hi8435";
> > +            reg = <0>;
> > +            gpios = <&gpio6 1 0>;
> > +            spi-max-frequency = <1000000>;
> > +        };
> > +    };
> > +...
> > -- 
> > 2.28.0
> >   


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

end of thread, other threads:[~2020-09-19 15:03 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml Jonathan Cameron
2020-09-15 19:00   ` Rob Herring
2020-09-15 20:45   ` Rob Herring
2020-09-16 10:34     ` Jonathan Cameron
2020-09-17  2:24       ` Andy Duan
2020-09-19 13:33         ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion Jonathan Cameron
2020-09-15 19:01   ` Rob Herring
2020-09-19 13:42     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc " Jonathan Cameron
2020-09-15 19:02   ` Rob Herring
2020-09-19 13:44     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 " Jonathan Cameron
2020-09-10  2:32   ` Joel Stanley
2020-09-16 10:36     ` Jonathan Cameron
2020-09-16 12:39       ` Joel Stanley
2020-09-16 14:17         ` Jonathan Cameron
2020-09-19 13:47           ` Jonathan Cameron
2020-09-19 13:52             ` Jonathan Cameron
2020-09-15 19:03   ` Rob Herring
2020-09-09 17:59 ` [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc " Jonathan Cameron
2020-09-15 19:04   ` Rob Herring
2020-09-19 13:55     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc " Jonathan Cameron
2020-09-15 19:05   ` Rob Herring
2020-09-19 13:57     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 " Jonathan Cameron
2020-09-09 19:19   ` Alexandre Belloni
2020-09-10  7:57     ` Jonathan Cameron
2020-09-15 19:06   ` Rob Herring
2020-09-19 14:01     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc " Jonathan Cameron
2020-09-15 19:07   ` Rob Herring
2020-09-19 14:03     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc " Jonathan Cameron
2020-09-15 19:07   ` Rob Herring
2020-09-19 14:20     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc " Jonathan Cameron
2020-09-15 19:09   ` Rob Herring
2020-09-19 14:22     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc " Jonathan Cameron
2020-09-15 19:11   ` Rob Herring
2020-09-19 14:25     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc " Jonathan Cameron
2020-09-15 19:12   ` Rob Herring
2020-09-19 14:57     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc " Jonathan Cameron
2020-09-15 19:13   ` Rob Herring
2020-09-19 14:07     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 " Jonathan Cameron
2020-09-15 19:13   ` Rob Herring
2020-09-19 14:59     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 " Jonathan Cameron
2020-09-15 19:15   ` Rob Herring
2020-09-19 15:01     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 " Jonathan Cameron
2020-09-15 19:16   ` Rob Herring
2020-09-19 14:12     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 " Jonathan Cameron
2020-09-15 19:17   ` Rob Herring
2020-09-19 15:03     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc " Jonathan Cameron
2020-09-15 19:23   ` Rob Herring
2020-09-15 19:31   ` Martin Blumenstingl
2020-09-09 17:59 ` [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc " Jonathan Cameron
2020-09-15 19:24   ` Rob Herring
2020-09-16 10:27   ` Jonathan Cameron
2020-09-19 14:14     ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq " Jonathan Cameron
2020-09-15 19:26   ` Rob Herring
2020-09-16 10:33   ` Jonathan Cameron
2020-09-16 10:38     ` Jonathan Cameron
2020-09-19 14:19       ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).