diff mbox series

[v2,03/20] dt-bindings:iio:adc:st,stmpe-adc yaml conversion

Message ID 20200909175946.395313-4-jic23@kernel.org
State New
Headers show
Series dt-bindings:iio:adc: Another set of yaml conversions. | expand

Commit Message

Jonathan Cameron Sept. 9, 2020, 5:59 p.m. UTC
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(-)

-- 
2.28.0

Comments

Rob Herring (Arm) Sept. 15, 2020, 7:02 p.m. UTC | #1
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>
Jonathan Cameron Sept. 19, 2020, 1:44 p.m. UTC | #2
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
diff mbox series

Patch

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 */
-	};