All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents.
@ 2021-06-27 16:32 Jonathan Cameron
  2021-06-27 16:32 ` [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document Jonathan Cameron
                   ` (15 more replies)
  0 siblings, 16 replies; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree
  Cc: Jonathan Cameron, Lars-Peter Clausen, Ricardo Ribalda,
	Michael Hennerich, Gwenhael Goavec-Merou, Michael Welling

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

We have quite a few drivers in IIO that date back to the days of platform
data.  Many of them either worked out of the box with device tree
due to the spi core using the spi_device_id to match against
device tree compatibles, or were updated to use newer interfaces in the
intervening years.  As such, they mostly 'work' with device tree but
can have some slightly odd quirks (particularly around naming of supplies).
As we have no way of knowing what is out in the wild, we need to support
these interesting bits of regulator naming.

I would ultimately like all such bindings to be documented both to facilitate
automated check of device trees and to make things easier for people trying
to write device tree files using these devices.

This series fills in the majority of the absent bindings for DACs.
There are some outstanding
* max517 - some platform data configuration needs porting over to device tree.
* m62332 - this passes a consumer mapping in as platform data and will need
  careful porting over the dt way of doing that.

There is one 'fixlet' in here for the driver to deal with a case were the
code was intended to allow the presence of a regulator to dictate whether
an internal reference was used, but did not use the optional regulator
get.

I've mostly nominated maintainers based on original authorship + where
I was feeling guilty or couldn't find anyone still active I've listed myself.

I got bored half way through of producing brief descriptions of
the devices so stopped doing so. If anyone wants to provide one for these
parts I'm happy to add it!

Future series will cover the c. 40 bindings that I've identified as missing
for other types of devices.  I've also kept notes of easy cleanups in
drivers spotted whilst working these out, so will probably follow up with
those soon as well.

Note I haven't tested all of these so there may well be errors or elements
I've missed.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ricardo Ribalda <ribalda@kernel.org>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Cc: Michael Welling <mwelling@ieee.org>

Jonathan Cameron (15):
  dt-bindings: iio: dac: adi,ad5421: Add missing binding document.
  dt-bindings: iio: dac: adi,ad5064: Document bindings for many
    different DACs
  dt-bindings: iio: dac: adi,ad5360: Add missing binding document
  dt-bindings: iio: dac: ad5380: Add missing binding document
  dt-bindings: iio: dac: ad5446: Add missing binding document
  dt-bindings: iio: dac: ad5449: Add missing binding document.
  dt-bindings: iio: dac: ad5504: Add missing binding document
  iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
  dt-bindings: iio: dac: ad5624r: Add missing binding document
  dt-bindings: iio: dac: ad5686 and ad5696: Add missing binding
    document.
  dt-bindings: iio: dac: ad5761: Add missing binding doc.
  dt-bindings: iio: dac: adi,ad5764: Add missing binding document
  dt-bindings: iio: dac: adi,ad5791: Add missing bindings document
  dt-bindings: iio: dac: adi,ad8801: Add missing binding document.
  dt-bindings: iio: dac: microchip,mcp4922: Add missing binding document

 .../bindings/iio/dac/adi,ad5064.yaml          | 268 ++++++++++++++++++
 .../bindings/iio/dac/adi,ad5360.yaml          |  79 ++++++
 .../bindings/iio/dac/adi,ad5380.yaml          |  70 +++++
 .../bindings/iio/dac/adi,ad5421.yaml          |  51 ++++
 .../bindings/iio/dac/adi,ad5446.yaml          | 105 +++++++
 .../bindings/iio/dac/adi,ad5449.yaml          |  97 +++++++
 .../bindings/iio/dac/adi,ad5504.yaml          |  50 ++++
 .../bindings/iio/dac/adi,ad5624r.yaml         |  47 +++
 .../bindings/iio/dac/adi,ad5686.yaml          |  75 +++++
 .../bindings/iio/dac/adi,ad5761.yaml          |  60 ++++
 .../bindings/iio/dac/adi,ad5764.yaml          |  62 ++++
 .../bindings/iio/dac/adi,ad5791.yaml          |  52 ++++
 .../bindings/iio/dac/adi,ad8801.yaml          |  60 ++++
 .../bindings/iio/dac/microchip,mcp4922.yaml   |  46 +++
 drivers/iio/dac/ad5624r_spi.c                 |  18 +-
 15 files changed, 1139 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml
 create mode 100644 Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml

-- 
2.32.0


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

* [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document.
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:47   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 02/15] dt-bindings: iio: dac: adi,ad5064: Document bindings for many different DACs Jonathan Cameron
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Lars-Peter Clausen

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

This is documented what is currently the case.  There are a number
of things that could be added, but I don't feel the binding elements
are obvious enough to document without a driver implementation to
verify they are good choices.

These include
* Range
* Regulators, both input and potentially output (if the loop being
  driven is ever described).

I've listed Lars and myself as maintainers of the binding, but if
anyone else wants to be added they would be most welcome!

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 .../bindings/iio/dac/adi,ad5421.yaml          | 51 +++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml
new file mode 100644
index 000000000000..188f656617e3
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5421.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5421 DAC
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+description: |
+  AD5421 is designed for us in loop-powered, 4 mA to 20 mA smart transmitter
+  applications. It provides a 16-bit DAC, current amplifier, voltage regulator
+  to drive the loop and a voltage reference.
+
+properties:
+  compatible:
+    const: adi,ad5421
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+    description: Fault signal.
+
+  spi-max-frequency: true
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dac@0 {
+            compatible = "adi,ad5421";
+            reg = <0>;
+            spi-max-frequency = <30000000>;
+            interrupts = <55 IRQ_TYPE_LEVEL_HIGH>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 02/15] dt-bindings: iio: dac: adi,ad5064: Document bindings for many different DACs
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
  2021-06-27 16:32 ` [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:49   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 03/15] dt-bindings: iio: dac: adi,ad5360: Add missing binding document Jonathan Cameron
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Lars-Peter Clausen

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

Note this is documenting bindings that have effectively existing ever
since this driver was merged. The naming conventions for the ADI
parts are inconsistent on the data sheets which has lead to a mixture
of -X and -reference voltage part naming.  We could attempt to clean this
up, but as we are stuck supporting the existing binding it is probably
not worthwhile.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 .../bindings/iio/dac/adi,ad5064.yaml          | 268 ++++++++++++++++++
 1 file changed, 268 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml
new file mode 100644
index 000000000000..05ed4e0ec364
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml
@@ -0,0 +1,268 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5064.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5064 and similar DACs
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+description: |
+   A range of similar DAC devices with between 1 and 12 channels. Some parts
+   have internal references, others require a single shared external reference
+   and the remainder have a separate reference pin for each DAC.
+
+properties:
+  compatible:
+    oneOf:
+      - description: I2C devics
+        enum:
+          - adi,ad5024
+          - adi,ad5025
+          - adi,ad5044
+          - adi,ad5045
+          - adi,ad5064
+          - adi,ad5064-1
+          - adi,ad5065
+          - adi,ad5628-1
+          - adi,ad5628-2
+          - adi,ad5648-1
+          - adi,ad5648-2
+          - adi,ad5666-1
+          - adi,ad5666-2
+          - adi,ad5668-1
+          - adi,ad5668-2
+          - adi,ad5668-3
+      - description: SPI devices
+        enum:
+          - adi,ad5625
+          - adi,ad5625r-1v25
+          - adi,ad5625r-2v5
+          - adi,ad5627
+          - adi,ad5627r-1v25
+          - adi,ad5627r-2v5
+          - adi,ad5629-1
+          - adi,ad5629-2
+          - adi,ad5629-3
+          - adi,ad5645r-1v25
+          - adi,ad5645r-2v5
+          - adi,ad5665
+          - adi,ad5665r-1v25
+          - adi,ad5665r-2v5
+          - adi,ad5667
+          - adi,ad5667r-1v25
+          - adi,ad5667r-2v5
+          - adi,ad5669-1
+          - adi,ad5669-2
+          - adi,ad5669-3
+          - lltc,ltc2606
+          - lltc,ltc2607
+          - lltc,ltc2609
+          - lltc,ltc2616
+          - lltc,ltc2617
+          - lltc,ltc2619
+          - lltc,ltc2626
+          - lltc,ltc2627
+          - lltc,ltc2629
+          - lltc,ltc2631-l12
+          - lltc,ltc2631-h12
+          - lltc,ltc2631-l10
+          - lltc,ltc2631-h10
+          - lltc,ltc2631-l8
+          - lltc,ltc2631-h8
+          - lltc,ltc2633-l12
+          - lltc,ltc2633-h12
+          - lltc,ltc2633-l10
+          - lltc,ltc2633-h10
+          - lltc,ltc2633-l8
+          - lltc,ltc2633-h8
+          - lltc,ltc2635-l12
+          - lltc,ltc2635-h12
+          - lltc,ltc2635-l10
+          - lltc,ltc2635-h10
+          - lltc,ltc2635-l8
+          - lltc,ltc2635-h8
+
+  reg:
+    maxItems: 1
+
+  vrefA-supply: true
+  vrefB-supply: true
+  vrefC-supply: true
+  vrefD-supply: true
+  vref-supply: true
+
+  spi-max-frequency: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - # Shared external vref, no internal reference
+    if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5064-1
+              - adi,ad5625
+              - adi,ad5627
+              - adi,ad5665
+              - adi,ad5667
+              - lltc,ltc2606
+              - lltc,ltc2607
+              - lltc,ltc2616
+              - lltc,ltc2617
+              - lltc,ltc2626
+              - lltc,ltc2627
+    then:
+      properties:
+        vref-supply: true
+        vrefA-supply: false
+        vrefB-supply: false
+        vrefC-supply: false
+        vrefD-supply: false
+      required:
+        - vref-supply
+  - # Shared external vref, internal reference available
+    if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5625r-1v25
+              - adi,ad5625r-2v5
+              - adi,ad5627r-1v25
+              - adi,ad5627r-2v5
+              - adi,ad5628-1
+              - adi,ad5628-2
+              - adi,ad5629-1
+              - adi,ad5629-2
+              - adi,ad5629-3
+              - adi,ad5645r-1v25
+              - adi,ad5645r-2v5
+              - adi,ad5647r-1v25
+              - adi,ad5647r-2v5
+              - adi,ad5648-1
+              - adi,ad5648-2
+              - adi,ad5665r-1v25
+              - adi,ad5665r-2v5
+              - adi,ad5666-1
+              - adi,ad5666-2
+              - adi,ad5667r-1v25
+              - adi,ad5667r-2v5
+              - adi,ad5668-1
+              - adi,ad5668-2
+              - adi,ad5668-3
+              - adi,ad5669-1
+              - adi,ad5669-2
+              - adi,ad5669-3
+              - lltc,ltc2631-l12
+              - lltc,ltc2631-h12
+              - lltc,ltc2631-l10
+              - lltc,ltc2631-h10
+              - lltc,ltc2631-l8
+              - lltc,ltc2631-h8
+              - lltc,ltc2633-l12
+              - lltc,ltc2633-h12
+              - lltc,ltc2633-l10
+              - lltc,ltc2633-h10
+              - lltc,ltc2633-l8
+              - lltc,ltc2633-h8
+              - lltc,ltc2635-l12
+              - lltc,ltc2635-h12
+              - lltc,ltc2635-l10
+              - lltc,ltc2635-h10
+              - lltc,ltc2635-l8
+              - lltc,ltc2635-h8
+    then:
+      properties:
+        vref-supply: true
+        vrefA-supply: false
+        vrefB-supply: false
+        vrefC-supply: false
+        vrefD-supply: false
+  - # 4 input devices, separate vrefs, no internal reference
+    if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5024
+              - adi,ad5044
+              - adi,ad5064
+              - lltc,ltc2609
+              - lltc,ltc2619
+              - lltc,ltc2629
+    then:
+      properties:
+        vrefA-supply: true
+        vrefB-supply: true
+        vrefC-supply: true
+        vrefD-supply: true
+        vref-supply: false
+      required:
+        - vrefA-supply
+        - vrefB-supply
+        - vrefC-supply
+        - vrefD-supply
+  - # 2 input devices, separate vrefs, no internal reference
+    if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5025
+              - adi,ad5045
+              - adi,ad5065
+    then:
+      properties:
+        vrefA-supply: true
+        vrefB-supply: true
+        vrefC-supply: false
+        vrefD-supply: false
+        vref-supply: false
+      required:
+        - vrefA-supply
+        - vrefB-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5625";
+            vref-supply = <&dac_vref>;
+        };
+    };
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5625r-1v25";
+        };
+    };
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@42 {
+            reg = <0x42>;
+            compatible = "adi,ad5024";
+            vrefA-supply = <&dac_vref>;
+            vrefB-supply = <&dac_vref>;
+            vrefC-supply = <&dac_vref2>;
+            vrefD-supply = <&dac_vref2>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 03/15] dt-bindings: iio: dac: adi,ad5360: Add missing binding document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
  2021-06-27 16:32 ` [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document Jonathan Cameron
  2021-06-27 16:32 ` [PATCH 02/15] dt-bindings: iio: dac: adi,ad5064: Document bindings for many different DACs Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:50   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 04/15] dt-bindings: iio: dac: ad5380: " Jonathan Cameron
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Lars-Peter Clausen

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

Bindings for the family of many channel DACs.  Fairly straight forward
with just a differing number of voltage references (an extra one
for the 40 channel ad4371)

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 .../bindings/iio/dac/adi,ad5360.yaml          | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml
new file mode 100644
index 000000000000..0d8fb56f4b09
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5360.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5360 and similar DACs
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+  compatible:
+    enum:
+      - adi,ad5360
+      - adi,ad5361
+      - adi,ad5363
+      - adi,ad5370
+      - adi,ad5371
+      - adi,ad5372
+      - adi,ad5373
+
+  reg:
+    maxItems: 1
+
+  vref0-supply: true
+  vref1-supply: true
+  vref2-supply: true
+
+  spi-max-frequency: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - vref0-supply
+  - vref1-supply
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5360
+              - adi,ad5361
+              - adi,ad5363
+              - adi,ad5370
+              - adi,ad5372
+              - adi,ad5373
+    then:
+      properties:
+        vref2-supply: false
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5371
+      then:
+        required:
+          - vref2-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5371";
+            vref0-supply = <&dac_vref0>;
+            vref1-supply = <&dac_vref1>;
+            vref2-supply = <&dac_vref2>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 04/15] dt-bindings: iio: dac: ad5380: Add missing binding document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (2 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 03/15] dt-bindings: iio: dac: adi,ad5360: Add missing binding document Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:54   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 05/15] dt-bindings: iio: dac: ad5446: " Jonathan Cameron
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Lars-Peter Clausen

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

A simple binding for this particular DAC familly.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 .../bindings/iio/dac/adi,ad5380.yaml          | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
new file mode 100644
index 000000000000..d599b418a020
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5380.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5380 and similar DACs
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+description: |
+  DAC devices supporting both SPI and I2C interfaces.
+properties:
+  compatible:
+    enum:
+      - adi,ad5380-3
+      - adi,ad5380-5
+      - adi,ad5381-3
+      - adi,ad5381-5
+      - adi,ad5382-3
+      - adi,ad5382-5
+      - adi,ad5383-3
+      - adi,ad5383-5
+      - adi,ad5384-3
+      - adi,ad5384-5
+      - adi,ad5390-3
+      - adi,ad5390-5
+      - adi,ad5391-3
+      - adi,ad5391-5
+      - adi,ad5392-3
+      - adi,ad5392-5
+
+  reg:
+    maxItems: 1
+
+  vref-supply:
+    description:
+      If not supplied devices will use internal regulators.
+
+  spi-max-frequency: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+           reg = <0>;
+           compatible = "adi,ad5390-5";
+           vref-supply = <&dacvref>;
+        };
+    };
+  - |
+    i2c {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       dac@42 {
+          reg = <0x42>;
+          compatible = "adi,ad5380-3";
+       };
+    };
+...
-- 
2.32.0


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

* [PATCH 05/15] dt-bindings: iio: dac: ad5446: Add missing binding document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (3 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 04/15] dt-bindings: iio: dac: ad5380: " Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-01 14:02   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 06/15] dt-bindings: iio: dac: ad5449: " Jonathan Cameron
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Lars-Peter Clausen

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

Binding is a little stricter than the Linux driver.

It requires vcc-supply to be present for devices that don't have
an internal reference, whereas the driver just prints a message and
carries on.  Given this means that it is impossible to establish
a scaling of the output channel, let us make it required in the binding
schema.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 .../bindings/iio/dac/adi,ad5446.yaml          | 105 ++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
new file mode 100644
index 000000000000..e0a0def20c8c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5446.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Single channel DACs similar to the AD5446
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+  compatible:
+    oneOf:
+      - description: I2C devices
+        enum:
+          - adi,ad5602
+          - adi,ad5612
+          - adi,ad5622
+      - description: SPI devices
+        enum:
+          - adi,ad5300
+          - adi,ad5310
+          - adi,ad5320
+          - adi,ad5444
+          - adi,ad5446
+          - adi,ad5450
+          - adi,ad5451
+          - adi,ad5452
+          - adi,ad5453
+          - adi,ad5512a
+          - adi,ad5541a
+          - adi,ad5542a
+          - adi,ad5543
+          - adi,ad5553
+          - adi,ad5600
+          - adi,ad5601
+          - adi,ad5611
+          - adi,ad5621
+          - adi,ad5641
+          - adi,ad5620-2500
+          - adi,ad5620-1250
+          - adi,ad5640-2500
+          - adi,ad5640-1250
+          - adi,ad5660-2500
+          - adi,ad5660-1250
+          - adi,ad5662
+          - ti,dac081s101
+          - ti,dac101s101
+          - ti,dac121s101
+          - ti,dac7512
+
+  reg:
+    maxItems: 1
+
+  vcc-supply: true
+
+  spi-max-frequency: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+# Ensure the scaling can be established for devices with no internal reference.
+allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              enum:
+                - adi,ad5620-2500
+                - adi,ad5620-1250
+                - adi,ad5640-2500
+                - adi,ad5640-1250
+                - adi,ad5660-2500
+                - adi,ad5660-1250
+    then:
+      required:
+        - vcc-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5620-2500";
+        };
+    };
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@42 {
+            reg = <0x42>;
+            compatible = "adi,ad5602";
+            vcc-supply = <&vcc_dac>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 06/15] dt-bindings: iio: dac: ad5449: Add missing binding document.
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (4 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 05/15] dt-bindings: iio: dac: ad5446: " Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:55   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 07/15] dt-bindings: iio: dac: ad5504: " Jonathan Cameron
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Lars-Peter Clausen

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

Documenting existing binding, so little flexibility available.
2 channel devices that require separate reference voltages.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 .../bindings/iio/dac/adi,ad5449.yaml          | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml
new file mode 100644
index 000000000000..044332c97743
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5449.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5449 and similar DACs
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+description:
+  Family of multiplying DACs from Analog Devices
+
+properties:
+  compatible:
+    enum:
+      - adi,ad5415
+      - adi,ad5426
+      - adi,ad5429
+      - adi,ad5432
+      - adi,ad5439
+      - adi,ad5443
+      - adi,ad5449
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  VREF-supply: true
+  VREFA-supply: true
+  VREFB-supply: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5415
+              - adi,ad5426
+              - adi,ad5432
+    then:
+      properties:
+        VREF-supply: true
+        VREFA-supply: false
+        VREFB-supply: false
+      required:
+        - VREF-supply
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5429
+              - adi,ad5439
+              - adi,ad5449
+    then:
+      properties:
+        VREF-supply: false
+        VREFA-supply: true
+        VREFB-supply: true
+      required:
+        - VREFA-supply
+        - VREFB-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5415";
+            VREF-supply = <&dac_ref>;
+        };
+    };
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5429";
+            VREFA-supply = <&dac_refA>;
+            VREFB-supply = <&dac_refB>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 07/15] dt-bindings: iio: dac: ad5504: Add missing binding document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (5 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 06/15] dt-bindings: iio: dac: ad5449: " Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:55   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator Jonathan Cameron
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron

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

Binding for this high voltage DAC with temperature event signal.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 .../bindings/iio/dac/adi,ad5504.yaml          | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml
new file mode 100644
index 000000000000..9c2c038683b4
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5504.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5501 and AD5504 DACs
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+description:
+  High voltage (up to 60V) DACs with temperature sensor alarm function
+
+properties:
+  compatible:
+    enum:
+      - adi,ad5501
+      - adi,ad5504
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    description: Used for temperature alarm.
+    maxItems: 1
+
+  vcc-supply: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5504";
+            vcc-supply = <&dac_vcc>;
+            interrupts = <55 IRQ_TYPE_EDGE_FALLING>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (6 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 07/15] dt-bindings: iio: dac: ad5504: " Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-06-27 17:29     ` kernel test robot
  2021-06-27 18:53     ` kernel test robot
  2021-06-27 16:32 ` [PATCH 09/15] dt-bindings: iio: dac: ad5624r: Add missing binding document Jonathan Cameron
                   ` (7 subsequent siblings)
  15 siblings, 2 replies; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron

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

The naming of the regulator is problematic.  VCC is usually a supply
voltage whereas these devices have a separate VREF pin.

Secondly, the regulator core might have provided a stub regulator if
a real regulator wasn't provided. That would in turn have failed to
provide a voltage when queried. So reality was that there was no way
to use the internal reference.

In order to avoid breaking any dts out in the wild, make sure to fallback
to the original vcc naming if vref is not available.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/dac/ad5624r_spi.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio/dac/ad5624r_spi.c
index 9bde86982912..b4888c8c14a2 100644
--- a/drivers/iio/dac/ad5624r_spi.c
+++ b/drivers/iio/dac/ad5624r_spi.c
@@ -229,7 +229,7 @@ static int ad5624r_probe(struct spi_device *spi)
 	if (!indio_dev)
 		return -ENOMEM;
 	st = iio_priv(indio_dev);
-	st->reg = devm_regulator_get(&spi->dev, "vcc");
+	st->reg = devm_regulator_get_optional(&spi->dev, "vref");
 	if (!IS_ERR(st->reg)) {
 		ret = regulator_enable(st->reg);
 		if (ret)
@@ -240,6 +240,22 @@ static int ad5624r_probe(struct spi_device *spi)
 			goto error_disable_reg;
 
 		voltage_uv = ret;
+	} else {
+		if (PTR_ERR(st->reg) != -ENODEV) {
+			return PTR_ERR(st->reg);
+		/* Backwards compatibility. This naming is not correct */
+		st->reg = devm_regulator_get_optional(&spi->dev, "vcc");
+		if (!IS_ERR(st->reg)) {
+			ret = regulator_enable(st->reg);
+			if (ret)
+				return ret;
+
+			ret = regulator_get_voltage(st->reg);
+			if (ret < 0)
+				goto error_disable_reg;
+
+			voltage_uv = ret;
+		}
 	}
 
 	spi_set_drvdata(spi, indio_dev);
-- 
2.32.0


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

* [PATCH 09/15] dt-bindings: iio: dac: ad5624r: Add missing binding document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (7 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:56   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 10/15] dt-bindings: iio: dac: ad5686 and ad5696: " Jonathan Cameron
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron

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

Simple binding, with optional vref.
Note that the Linux driver does support vcc-supply for historical
reasons, but lets not let that get into any bindings that are checked
going forwards.  Hence I have deliberately not documented it.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 .../bindings/iio/dac/adi,ad5624r.yaml         | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml
new file mode 100644
index 000000000000..330383b85eeb
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5624r.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5624r and similar DACs
+
+maintainers:
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+  compatible:
+    enum:
+      - adi,ad5624r3
+      - adi,ad5644r3
+      - adi,ad5664r3
+      - adi,ad5624r5
+      - adi,ad5644r5
+      - adi,ad5664r5
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vref-supply:
+    description: If not present, internal reference will be used.
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5624r3";
+            vref-supply = <&vref>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 10/15] dt-bindings: iio: dac: ad5686 and ad5696: Add missing binding document.
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (8 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 09/15] dt-bindings: iio: dac: ad5624r: Add missing binding document Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:57   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc Jonathan Cameron
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron

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

The use of vcc-supply for the reference voltage is unsual and should
probably be deprecated as there is an explicit VREF pin on at least
some of these parts.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 .../bindings/iio/dac/adi,ad5686.yaml          | 75 +++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
new file mode 100644
index 000000000000..5c26441eae9f
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5686.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5360 and similar DACs
+
+maintainers:
+  - Michael Hennerich <michael.hennerich@analog.com>
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+  compatible:
+    oneOf:
+      - description: SPI devices
+        enum:
+          - adi,ad5310r
+          - adi,ad5672r
+          - adi,ad5674r
+          - adi,ad5676
+          - adi,ad5676r
+          - adi,ad5679r
+          - adi,ad5681r
+          - adi,ad5682r
+          - adi,ad5683
+          - adi,ad5683r
+          - adi,ad5684
+          - adi,ad5684r
+          - adi,ad5685r
+          - adi,ad5686
+          - adi,ad5686r
+      - description: I2C devices
+        enum:
+          - adi,ad5311r
+          - adi,ad5338r
+          - adi,ad5671r
+          - adi,ad5675r
+          - adi,ad5691r
+          - adi,ad5692r
+          - adi,ad5693
+          - adi,ad5693r
+          - adi,ad5694
+          - adi,ad5694r
+          - adi,ad5695r
+          - adi,ad5696
+          - adi,ad5696r
+
+
+  reg:
+    maxItems: 1
+
+  vcc-supply:
+    description: If not supplied the internal reference is used.
+
+  spi-max-frequency: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        dac@0 {
+            reg = <0>;
+            compatible = "adi,ad5310r";
+            vcc-supply = <&dac_vref0>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc.
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (9 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 10/15] dt-bindings: iio: dac: ad5686 and ad5696: " Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:58   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 12/15] dt-bindings: iio: dac: adi,ad5764: Add missing binding document Jonathan Cameron
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Ricardo Ribalda

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

Straight forward binding with vref optional for those part with internal
regulators, but required for those without.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Ricardo Ribalda <ribalda@kernel.org>
---
 .../bindings/iio/dac/adi,ad5761.yaml          | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml
new file mode 100644
index 000000000000..7f95a9ed55fe
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5761.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5761 and similar DACs
+
+maintainers:
+  - Ricardo Ribalda <ribalda@kernel.org>
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+
+  compatible:
+    enum:
+      - adi,ad5721
+      - adi,ad5721r
+      - adi,ad5761
+      - adi,ad5761r
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vref-supply:
+    description: If not supplied, internal reference will be used.
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5721
+              - adi,ad5761
+    then:
+      required:
+        - vref-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dac@0 {
+            compatible = "adi,ad5721";
+            reg = <0>;
+            vref-supply = <&dac_vref>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 12/15] dt-bindings: iio: dac: adi,ad5764: Add missing binding document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (10 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:58   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 13/15] dt-bindings: iio: dac: adi,ad5791: Add missing bindings document Jonathan Cameron
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Lars-Peter Clausen

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

This binding covers the ad5744, ad5744r, ad5764 and ad5764r DACs.
Note that the driver currently assumes the internal reference is used for
the r parts. The binding as defined relaxes this constraint.

There is no support in the binding or driver for the two digital IO
signals.  I do not propose to add that until we have a means to
test any such binding.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
 .../bindings/iio/dac/adi,ad5764.yaml          | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml
new file mode 100644
index 000000000000..8e893d52bfb1
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5764.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5744 and AD5764 DAC families
+
+maintainers:
+  - Lars-Peter Clausen <lars@metafoo.de>
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+
+  compatible:
+    enum:
+      - adi,ad5744
+      - adi,ad5744r
+      - adi,ad5764
+      - adi,ad5764r
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vrefAB-supply: true
+  vrefCD-supply: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - adi,ad5744
+              - adi,ad5764
+    then:
+      required:
+        - vrefAB-supply
+        - vrefCD-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dac@0 {
+            compatible = "adi,ad5744";
+            reg = <0>;
+            vrefAB-supply = <&dac_vref>;
+            vrefCD-supply = <&dac_vref>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 13/15] dt-bindings: iio: dac: adi,ad5791: Add missing bindings document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (11 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 12/15] dt-bindings: iio: dac: adi,ad5764: Add missing binding document Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:59   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 14/15] dt-bindings: iio: dac: adi,ad8801: Add missing binding document Jonathan Cameron
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Michael Hennerich

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

Documenting existing bindings for this device.

The Linux driver in theory 'works' without the two supplies that I have
listed as required, but without a valid scale.  As such I've
documented it as required.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
---
 .../bindings/iio/dac/adi,ad5791.yaml          | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml
new file mode 100644
index 000000000000..650d1ebdcec3
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5791.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5791 and similar DACs
+
+maintainers:
+  - Michael Hennerich <michael.hennerich@analog.com>
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+
+  compatible:
+    enum:
+      - adi,ad5760
+      - adi,ad5780
+      - adi,ad5781
+      - adi,ad5790
+      - adi,ad5791
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vdd-supply: true
+  vss-supply: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - vdd-supply
+  - vss-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dac@0 {
+            compatible = "adi,ad5791";
+            reg = <0>;
+            vss-supply = <&dac_vss>;
+            vdd-supply = <&dac_vdd>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 14/15] dt-bindings: iio: dac: adi,ad8801: Add missing binding document.
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (12 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 13/15] dt-bindings: iio: dac: adi,ad5791: Add missing bindings document Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:59   ` Rob Herring
  2021-06-27 16:32 ` [PATCH 15/15] dt-bindings: iio: dac: microchip,mcp4922: " Jonathan Cameron
  2021-06-28  7:09 ` [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Sa, Nuno
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree
  Cc: Jonathan Cameron, Gwenhael Goavec-Merou

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

This device was missing a binding document. Simple binding with the
ad8803 requiring two both low and high references whilst the 8801
only has a high reference.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 .../bindings/iio/dac/adi,ad8801.yaml          | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml
new file mode 100644
index 000000000000..6a3990a8d0ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad8801.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD8801 and AD8803 DACs
+
+maintainers:
+  - Jonathan Cameron <jic23@kernel.org>
+
+properties:
+
+  compatible:
+    enum:
+      - adi,ad8801
+      - adi,ad8803
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vrefh-supply: true
+  vrefl-supply: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - vrefh-supply
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: adi,ad8803
+    then:
+      required:
+        - vrefl-supply
+    else:
+      properties:
+        vrefl-supply: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dac@0 {
+            compatible = "adi,ad8803";
+            reg = <0>;
+            vrefl-supply = <&dac_vrefl>;
+            vrefh-supply = <&dac_vrefh>;
+        };
+    };
+...
-- 
2.32.0


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

* [PATCH 15/15] dt-bindings: iio: dac: microchip,mcp4922: Add missing binding document
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (13 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 14/15] dt-bindings: iio: dac: adi,ad8801: Add missing binding document Jonathan Cameron
@ 2021-06-27 16:32 ` Jonathan Cameron
  2021-07-14 15:59   ` Rob Herring
  2021-06-28  7:09 ` [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Sa, Nuno
  15 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-27 16:32 UTC (permalink / raw)
  To: linux-iio, Rob Herring, devicetree; +Cc: Jonathan Cameron, Michael Welling

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

Simple binding for this family of microchip DACs.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Michael Welling <mwelling@ieee.org>
---
 .../bindings/iio/dac/microchip,mcp4922.yaml   | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml
new file mode 100644
index 000000000000..12a14b3f36cb
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4922.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MCP4902, MCP4912 and MPC4922 dual output SPI DACs
+
+maintainers:
+  - Jonathan Cameron <jic23@kernel.org>
+  - Michael Welling <mwelling@ieee.org>
+
+properties:
+  compatible:
+    enum:
+      - microchip,mcp4902
+      - microchip,mcp4912
+      - microchip,mcp4922
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency: true
+
+  vref-supply: true
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - vref-supply
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        dac@0 {
+            compatible = "microchip,mcp4912";
+            reg = <0>;
+            vref-supply = <&dac_vref>;
+        };
+    };
+...
-- 
2.32.0


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

* Re: [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
  2021-06-27 16:32 ` [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator Jonathan Cameron
@ 2021-06-27 17:29     ` kernel test robot
  2021-06-27 18:53     ` kernel test robot
  1 sibling, 0 replies; 43+ messages in thread
From: kernel test robot @ 2021-06-27 17:29 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, Rob Herring, devicetree
  Cc: kbuild-all, Jonathan Cameron

[-- Attachment #1: Type: text/plain, Size: 13408 bytes --]

Hi Jonathan,

I love your patch! Yet something to improve:

[auto build test ERROR on iio/togreg]
[also build test ERROR on robh/for-next v5.13-rc7 next-20210625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: nios2-randconfig-r001-20210627 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/4f70da9b9819945461961ccdfbd87438ac8a9f89
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
        git checkout 4f70da9b9819945461961ccdfbd87438ac8a9f89
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/iio/dac/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/iio/dac/ad5624r_spi.c: In function 'ad5624r_probe':
>> drivers/iio/dac/ad5624r_spi.c:296:12: error: invalid storage class for function 'ad5624r_remove'
     296 | static int ad5624r_remove(struct spi_device *spi)
         |            ^~~~~~~~~~~~~~
>> drivers/iio/dac/ad5624r_spi.c:296:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     296 | static int ad5624r_remove(struct spi_device *spi)
         | ^~~~~~
>> drivers/iio/dac/ad5624r_spi.c:324:12: error: initializer element is not constant
     324 |  .remove = ad5624r_remove,
         |            ^~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:324:12: note: (near initialization for 'ad5624r_driver.remove')
   drivers/iio/dac/ad5624r_spi.c:319:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     319 | static struct spi_driver ad5624r_driver = {
         | ^~~~~~
   In file included from include/linux/device.h:32,
                    from drivers/iio/dac/ad5624r_spi.c:10:
>> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_init'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:259:19: note: in definition of macro 'module_driver'
     259 | static int __init __driver##_init(void) \
         |                   ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:6,
                    from include/linux/kernel.h:17,
                    from include/linux/interrupt.h:6,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/init.h:250:41: note: in definition of macro '____define_initcall'
     250 |   __attribute__((__section__(__sec))) = fn;
         |                                         ^~
   include/linux/init.h:260:2: note: in expansion of macro '__unique_initcall'
     260 |  __unique_initcall(fn, id, __sec, __initcall_id(fn))
         |  ^~~~~~~~~~~~~~~~~
   include/linux/init.h:262:35: note: in expansion of macro '___define_initcall'
     262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/init.h:291:30: note: in expansion of macro '__define_initcall'
     291 | #define device_initcall(fn)  __define_initcall(fn, 6)
         |                              ^~~~~~~~~~~~~~~~~
   include/linux/init.h:296:24: note: in expansion of macro 'device_initcall'
     296 | #define __initcall(fn) device_initcall(fn)
         |                        ^~~~~~~~~~~~~~~
   include/linux/module.h:87:24: note: in expansion of macro '__initcall'
      87 | #define module_init(x) __initcall(x);
         |                        ^~~~~~~~~~
   include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
     263 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/device.h:32,
                    from drivers/iio/dac/ad5624r_spi.c:10:
>> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_exit'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:264:20: note: in definition of macro 'module_driver'
     264 | static void __exit __driver##_exit(void) \
         |                    ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
>> include/linux/device/driver.h:264:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     264 | static void __exit __driver##_exit(void) \
         | ^~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:6,
                    from include/linux/kernel.h:17,
                    from include/linux/interrupt.h:6,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/init.h:299:50: note: in definition of macro '__exitcall'
     299 |  static exitcall_t __exitcall_##fn __exit_call = fn
         |                                                  ^~
   include/linux/device/driver.h:268:1: note: in expansion of macro 'module_exit'
     268 | module_exit(__driver##_exit);
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/module.h:21,
                    from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/iio/dac/ad5624r_spi.c:15:
   include/linux/moduleparam.h:24:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      24 |  static const char __UNIQUE_ID(name)[]      \
         |  ^~~~~~
   include/linux/module.h:165:32: note: in expansion of macro '__MODULE_INFO'
     165 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
         |                                ^~~~~~~~~~~~~
   include/linux/module.h:235:32: note: in expansion of macro 'MODULE_INFO'
     235 | #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
         |                                ^~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:329:1: note: in expansion of macro 'MODULE_AUTHOR'
     329 | MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
         | ^~~~~~~~~~~~~
>> drivers/iio/dac/ad5624r_spi.c:331:1: error: expected declaration or statement at end of input
     331 | MODULE_LICENSE("GPL v2");
         | ^~~~~~~~~~~~~~
   At top level:
   drivers/iio/dac/ad5624r_spi.c:222:12: warning: 'ad5624r_probe' defined but not used [-Wunused-function]
     222 | static int ad5624r_probe(struct spi_device *spi)
         |            ^~~~~~~~~~~~~


vim +/ad5624r_remove +296 drivers/iio/dac/ad5624r_spi.c

6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  295  
fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @296  static int ad5624r_remove(struct spi_device *spi)
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  297  {
3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  298  	struct iio_dev *indio_dev = spi_get_drvdata(spi);
3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  299  	struct ad5624r_state *st = iio_priv(indio_dev);
3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  300  
d2fffd6c2fd60f drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-10-14  301  	iio_device_unregister(indio_dev);
75238230cce22b drivers/iio/dac/ad5624r_spi.c         Sachin Kamat       2013-08-19  302  	if (!IS_ERR(st->reg))
26a54797c1b094 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-08-30  303  		regulator_disable(st->reg);
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  304  
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  305  	return 0;
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  306  }
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  307  
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  308  static const struct spi_device_id ad5624r_id[] = {
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  309  	{"ad5624r3", ID_AD5624R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  310  	{"ad5644r3", ID_AD5644R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  311  	{"ad5664r3", ID_AD5664R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  312  	{"ad5624r5", ID_AD5624R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  313  	{"ad5644r5", ID_AD5644R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  314  	{"ad5664r5", ID_AD5664R5},
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  315  	{}
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  316  };
55e4390cb04e8b drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16  317  MODULE_DEVICE_TABLE(spi, ad5624r_id);
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  318  
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  319  static struct spi_driver ad5624r_driver = {
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  320  	.driver = {
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  321  		   .name = "ad5624r",
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  322  		   },
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  323  	.probe = ad5624r_probe,
fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @324  	.remove = ad5624r_remove,
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  325  	.id_table = ad5624r_id,
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  326  };
ae6ae6fec3f7d6 drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16 @327  module_spi_driver(ad5624r_driver);
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  328  
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  329  MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  330  MODULE_DESCRIPTION("Analog Devices AD5624/44/64R DAC spi driver");
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27 @331  MODULE_LICENSE("GPL v2");

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 20410 bytes --]

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

* Re: [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
@ 2021-06-27 17:29     ` kernel test robot
  0 siblings, 0 replies; 43+ messages in thread
From: kernel test robot @ 2021-06-27 17:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 13612 bytes --]

Hi Jonathan,

I love your patch! Yet something to improve:

[auto build test ERROR on iio/togreg]
[also build test ERROR on robh/for-next v5.13-rc7 next-20210625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: nios2-randconfig-r001-20210627 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/4f70da9b9819945461961ccdfbd87438ac8a9f89
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
        git checkout 4f70da9b9819945461961ccdfbd87438ac8a9f89
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/iio/dac/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/iio/dac/ad5624r_spi.c: In function 'ad5624r_probe':
>> drivers/iio/dac/ad5624r_spi.c:296:12: error: invalid storage class for function 'ad5624r_remove'
     296 | static int ad5624r_remove(struct spi_device *spi)
         |            ^~~~~~~~~~~~~~
>> drivers/iio/dac/ad5624r_spi.c:296:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     296 | static int ad5624r_remove(struct spi_device *spi)
         | ^~~~~~
>> drivers/iio/dac/ad5624r_spi.c:324:12: error: initializer element is not constant
     324 |  .remove = ad5624r_remove,
         |            ^~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:324:12: note: (near initialization for 'ad5624r_driver.remove')
   drivers/iio/dac/ad5624r_spi.c:319:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     319 | static struct spi_driver ad5624r_driver = {
         | ^~~~~~
   In file included from include/linux/device.h:32,
                    from drivers/iio/dac/ad5624r_spi.c:10:
>> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_init'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:259:19: note: in definition of macro 'module_driver'
     259 | static int __init __driver##_init(void) \
         |                   ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:6,
                    from include/linux/kernel.h:17,
                    from include/linux/interrupt.h:6,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/init.h:250:41: note: in definition of macro '____define_initcall'
     250 |   __attribute__((__section__(__sec))) = fn;
         |                                         ^~
   include/linux/init.h:260:2: note: in expansion of macro '__unique_initcall'
     260 |  __unique_initcall(fn, id, __sec, __initcall_id(fn))
         |  ^~~~~~~~~~~~~~~~~
   include/linux/init.h:262:35: note: in expansion of macro '___define_initcall'
     262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
         |                                   ^~~~~~~~~~~~~~~~~~
   include/linux/init.h:291:30: note: in expansion of macro '__define_initcall'
     291 | #define device_initcall(fn)  __define_initcall(fn, 6)
         |                              ^~~~~~~~~~~~~~~~~
   include/linux/init.h:296:24: note: in expansion of macro 'device_initcall'
     296 | #define __initcall(fn) device_initcall(fn)
         |                        ^~~~~~~~~~~~~~~
   include/linux/module.h:87:24: note: in expansion of macro '__initcall'
      87 | #define module_init(x) __initcall(x);
         |                        ^~~~~~~~~~
   include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
     263 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/device.h:32,
                    from drivers/iio/dac/ad5624r_spi.c:10:
>> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_exit'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:264:20: note: in definition of macro 'module_driver'
     264 | static void __exit __driver##_exit(void) \
         |                    ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
>> include/linux/device/driver.h:264:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     264 | static void __exit __driver##_exit(void) \
         | ^~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/printk.h:6,
                    from include/linux/kernel.h:17,
                    from include/linux/interrupt.h:6,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/init.h:299:50: note: in definition of macro '__exitcall'
     299 |  static exitcall_t __exitcall_##fn __exit_call = fn
         |                                                  ^~
   include/linux/device/driver.h:268:1: note: in expansion of macro 'module_exit'
     268 | module_exit(__driver##_exit);
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/module.h:21,
                    from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/iio/dac/ad5624r_spi.c:15:
   include/linux/moduleparam.h:24:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      24 |  static const char __UNIQUE_ID(name)[]      \
         |  ^~~~~~
   include/linux/module.h:165:32: note: in expansion of macro '__MODULE_INFO'
     165 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
         |                                ^~~~~~~~~~~~~
   include/linux/module.h:235:32: note: in expansion of macro 'MODULE_INFO'
     235 | #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
         |                                ^~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:329:1: note: in expansion of macro 'MODULE_AUTHOR'
     329 | MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
         | ^~~~~~~~~~~~~
>> drivers/iio/dac/ad5624r_spi.c:331:1: error: expected declaration or statement at end of input
     331 | MODULE_LICENSE("GPL v2");
         | ^~~~~~~~~~~~~~
   At top level:
   drivers/iio/dac/ad5624r_spi.c:222:12: warning: 'ad5624r_probe' defined but not used [-Wunused-function]
     222 | static int ad5624r_probe(struct spi_device *spi)
         |            ^~~~~~~~~~~~~


vim +/ad5624r_remove +296 drivers/iio/dac/ad5624r_spi.c

6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  295  
fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @296  static int ad5624r_remove(struct spi_device *spi)
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  297  {
3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  298  	struct iio_dev *indio_dev = spi_get_drvdata(spi);
3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  299  	struct ad5624r_state *st = iio_priv(indio_dev);
3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  300  
d2fffd6c2fd60f drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-10-14  301  	iio_device_unregister(indio_dev);
75238230cce22b drivers/iio/dac/ad5624r_spi.c         Sachin Kamat       2013-08-19  302  	if (!IS_ERR(st->reg))
26a54797c1b094 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-08-30  303  		regulator_disable(st->reg);
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  304  
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  305  	return 0;
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  306  }
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  307  
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  308  static const struct spi_device_id ad5624r_id[] = {
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  309  	{"ad5624r3", ID_AD5624R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  310  	{"ad5644r3", ID_AD5644R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  311  	{"ad5664r3", ID_AD5664R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  312  	{"ad5624r5", ID_AD5624R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  313  	{"ad5644r5", ID_AD5644R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  314  	{"ad5664r5", ID_AD5664R5},
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  315  	{}
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  316  };
55e4390cb04e8b drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16  317  MODULE_DEVICE_TABLE(spi, ad5624r_id);
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  318  
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  319  static struct spi_driver ad5624r_driver = {
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  320  	.driver = {
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  321  		   .name = "ad5624r",
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  322  		   },
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  323  	.probe = ad5624r_probe,
fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @324  	.remove = ad5624r_remove,
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  325  	.id_table = ad5624r_id,
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  326  };
ae6ae6fec3f7d6 drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16 @327  module_spi_driver(ad5624r_driver);
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  328  
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  329  MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  330  MODULE_DESCRIPTION("Analog Devices AD5624/44/64R DAC spi driver");
6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27 @331  MODULE_LICENSE("GPL v2");

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 20410 bytes --]

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

* Re: [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
  2021-06-27 16:32 ` [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator Jonathan Cameron
@ 2021-06-27 18:53     ` kernel test robot
  2021-06-27 18:53     ` kernel test robot
  1 sibling, 0 replies; 43+ messages in thread
From: kernel test robot @ 2021-06-27 18:53 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, Rob Herring, devicetree
  Cc: kbuild-all, Jonathan Cameron

[-- Attachment #1: Type: text/plain, Size: 9282 bytes --]

Hi Jonathan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on robh/for-next v5.13-rc7 next-20210625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/4f70da9b9819945461961ccdfbd87438ac8a9f89
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
        git checkout 4f70da9b9819945461961ccdfbd87438ac8a9f89
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/iio/dac/ad5624r_spi.c: In function 'ad5624r_probe':
   drivers/iio/dac/ad5624r_spi.c:296:12: error: invalid storage class for function 'ad5624r_remove'
     296 | static int ad5624r_remove(struct spi_device *spi)
         |            ^~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:296:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     296 | static int ad5624r_remove(struct spi_device *spi)
         | ^~~~~~
>> drivers/iio/dac/ad5624r_spi.c:317:1: warning: 'alias' attribute ignored [-Wattributes]
     317 | MODULE_DEVICE_TABLE(spi, ad5624r_id);
         | ^~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:324:12: error: initializer element is not constant
     324 |  .remove = ad5624r_remove,
         |            ^~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:324:12: note: (near initialization for 'ad5624r_driver.remove')
   In file included from include/linux/device.h:32,
                    from arch/powerpc/include/asm/io.h:27,
                    from include/linux/io.h:13,
                    from include/linux/irq.h:20,
                    from arch/powerpc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:11,
                    from include/linux/interrupt.h:11,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_init'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:259:19: note: in definition of macro 'module_driver'
     259 | static int __init __driver##_init(void) \
         |                   ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/iio/dac/ad5624r_spi.c:15:
   include/linux/module.h:130:42: error: invalid storage class for function '__inittest'
     130 |  static inline initcall_t __maybe_unused __inittest(void)  \
         |                                          ^~~~~~~~~~
   include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
     263 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from include/linux/device.h:32,
                    from arch/powerpc/include/asm/io.h:27,
                    from include/linux/io.h:13,
                    from include/linux/irq.h:20,
                    from arch/powerpc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:11,
                    from include/linux/interrupt.h:11,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_exit'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:264:20: note: in definition of macro 'module_driver'
     264 | static void __exit __driver##_exit(void) \
         |                    ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   include/linux/device/driver.h:264:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     264 | static void __exit __driver##_exit(void) \
         | ^~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/iio/dac/ad5624r_spi.c:15:
   include/linux/module.h:138:42: error: invalid storage class for function '__exittest'
     138 |  static inline exitcall_t __maybe_unused __exittest(void)  \
         |                                          ^~~~~~~~~~
   include/linux/device/driver.h:268:1: note: in expansion of macro 'module_exit'
     268 | module_exit(__driver##_exit);
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from include/linux/module.h:21,
                    from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,


vim +/alias +317 drivers/iio/dac/ad5624r_spi.c

6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  307  
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  308  static const struct spi_device_id ad5624r_id[] = {
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  309  	{"ad5624r3", ID_AD5624R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  310  	{"ad5644r3", ID_AD5644R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  311  	{"ad5664r3", ID_AD5664R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  312  	{"ad5624r5", ID_AD5624R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  313  	{"ad5644r5", ID_AD5644R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  314  	{"ad5664r5", ID_AD5664R5},
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  315  	{}
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  316  };
55e4390cb04e8b drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16 @317  MODULE_DEVICE_TABLE(spi, ad5624r_id);
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  318  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 73397 bytes --]

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

* Re: [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
@ 2021-06-27 18:53     ` kernel test robot
  0 siblings, 0 replies; 43+ messages in thread
From: kernel test robot @ 2021-06-27 18:53 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 9441 bytes --]

Hi Jonathan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on iio/togreg]
[also build test WARNING on robh/for-next v5.13-rc7 next-20210625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/4f70da9b9819945461961ccdfbd87438ac8a9f89
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
        git checkout 4f70da9b9819945461961ccdfbd87438ac8a9f89
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/iio/dac/ad5624r_spi.c: In function 'ad5624r_probe':
   drivers/iio/dac/ad5624r_spi.c:296:12: error: invalid storage class for function 'ad5624r_remove'
     296 | static int ad5624r_remove(struct spi_device *spi)
         |            ^~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:296:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     296 | static int ad5624r_remove(struct spi_device *spi)
         | ^~~~~~
>> drivers/iio/dac/ad5624r_spi.c:317:1: warning: 'alias' attribute ignored [-Wattributes]
     317 | MODULE_DEVICE_TABLE(spi, ad5624r_id);
         | ^~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:324:12: error: initializer element is not constant
     324 |  .remove = ad5624r_remove,
         |            ^~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:324:12: note: (near initialization for 'ad5624r_driver.remove')
   In file included from include/linux/device.h:32,
                    from arch/powerpc/include/asm/io.h:27,
                    from include/linux/io.h:13,
                    from include/linux/irq.h:20,
                    from arch/powerpc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:11,
                    from include/linux/interrupt.h:11,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_init'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:259:19: note: in definition of macro 'module_driver'
     259 | static int __init __driver##_init(void) \
         |                   ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/iio/dac/ad5624r_spi.c:15:
   include/linux/module.h:130:42: error: invalid storage class for function '__inittest'
     130 |  static inline initcall_t __maybe_unused __inittest(void)  \
         |                                          ^~~~~~~~~~
   include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
     263 | module_init(__driver##_init); \
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from include/linux/device.h:32,
                    from arch/powerpc/include/asm/io.h:27,
                    from include/linux/io.h:13,
                    from include/linux/irq.h:20,
                    from arch/powerpc/include/asm/hardirq.h:6,
                    from include/linux/hardirq.h:11,
                    from include/linux/interrupt.h:11,
                    from drivers/iio/dac/ad5624r_spi.c:8:
   drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_exit'
     327 | module_spi_driver(ad5624r_driver);
         |                   ^~~~~~~~~~~~~~
   include/linux/device/driver.h:264:20: note: in definition of macro 'module_driver'
     264 | static void __exit __driver##_exit(void) \
         |                    ^~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   include/linux/device/driver.h:264:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     264 | static void __exit __driver##_exit(void) \
         | ^~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,
                    from include/linux/suspend.h:5,
                    from include/linux/regulator/consumer.h:35,
                    from drivers/iio/dac/ad5624r_spi.c:15:
   include/linux/module.h:138:42: error: invalid storage class for function '__exittest'
     138 |  static inline exitcall_t __maybe_unused __exittest(void)  \
         |                                          ^~~~~~~~~~
   include/linux/device/driver.h:268:1: note: in expansion of macro 'module_exit'
     268 | module_exit(__driver##_exit);
         | ^~~~~~~~~~~
   include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
     315 |  module_driver(__spi_driver, spi_register_driver, \
         |  ^~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
     327 | module_spi_driver(ad5624r_driver);
         | ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad5624r_spi.c:327:1: warning: 'alias' attribute ignored [-Wattributes]
   In file included from include/linux/module.h:21,
                    from include/linux/bpf.h:19,
                    from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/linux/memcontrol.h:13,
                    from include/linux/swap.h:9,


vim +/alias +317 drivers/iio/dac/ad5624r_spi.c

6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  307  
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  308  static const struct spi_device_id ad5624r_id[] = {
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  309  	{"ad5624r3", ID_AD5624R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  310  	{"ad5644r3", ID_AD5644R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  311  	{"ad5664r3", ID_AD5664R3},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  312  	{"ad5624r5", ID_AD5624R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  313  	{"ad5644r5", ID_AD5644R5},
14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  314  	{"ad5664r5", ID_AD5664R5},
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  315  	{}
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  316  };
55e4390cb04e8b drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16 @317  MODULE_DEVICE_TABLE(spi, ad5624r_id);
ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  318  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 73397 bytes --]

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

* RE: [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents.
  2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
                   ` (14 preceding siblings ...)
  2021-06-27 16:32 ` [PATCH 15/15] dt-bindings: iio: dac: microchip,mcp4922: " Jonathan Cameron
@ 2021-06-28  7:09 ` Sa, Nuno
  2021-06-28 13:44   ` Jonathan Cameron
  15 siblings, 1 reply; 43+ messages in thread
From: Sa, Nuno @ 2021-06-28  7:09 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio, Rob Herring, devicetree
  Cc: Jonathan Cameron, Lars-Peter Clausen, Ricardo Ribalda, Hennerich,
	Michael, Gwenhael Goavec-Merou, Michael Welling

Hi Jonathan,

> -----Original Message-----
> From: Jonathan Cameron <jic23@kernel.org>
> Sent: Sunday, June 27, 2021 6:32 PM
> To: linux-iio@vger.kernel.org; Rob Herring <robh+dt@kernel.org>;
> devicetree@vger.kernel.org
> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>; Lars-Peter
> Clausen <lars@metafoo.de>; Ricardo Ribalda <ribalda@kernel.org>;
> Hennerich, Michael <Michael.Hennerich@analog.com>; Gwenhael
> Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>; Michael
> Welling <mwelling@ieee.org>
> Subject: [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding
> documents.
> 
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> We have quite a few drivers in IIO that date back to the days of
> platform
> data.  Many of them either worked out of the box with device tree
> due to the spi core using the spi_device_id to match against
> device tree compatibles, or were updated to use newer interfaces in
> the
> intervening years.  As such, they mostly 'work' with device tree but
> can have some slightly odd quirks (particularly around naming of
> supplies).
> As we have no way of knowing what is out in the wild, we need to
> support
> these interesting bits of regulator naming.
> 
> I would ultimately like all such bindings to be documented both to
> facilitate
> automated check of device trees and to make things easier for people
> trying
> to write device tree files using these devices.
> 
> This series fills in the majority of the absent bindings for DACs.
> There are some outstanding
> * max517 - some platform data configuration needs porting over to
> device tree.
> * m62332 - this passes a consumer mapping in as platform data and will
> need
>   careful porting over the dt way of doing that.
> 
> There is one 'fixlet' in here for the driver to deal with a case were the
> code was intended to allow the presence of a regulator to dictate
> whether
> an internal reference was used, but did not use the optional regulator
> get.
> 
> I've mostly nominated maintainers based on original authorship +
> where
> I was feeling guilty or couldn't find anyone still active I've listed myself.
> 
> I got bored half way through of producing brief descriptions of
> the devices so stopped doing so. If anyone wants to provide one for
> these
> parts I'm happy to add it!
> 
> Future series will cover the c. 40 bindings that I've identified as missing
> for other types of devices.  I've also kept notes of easy cleanups in
> drivers spotted whilst working these out, so will probably follow up
> with
> those soon as well.
> 
> Note I haven't tested all of these so there may well be errors or
> elements
> I've missed.
> 

LGTM... Just wondering if we could not add the adi,ad5421 directly into
the trivial-devices yaml as it looks to be the only one without any odd
regulator name?

Anyways, feel free to add:

Acked-by: Nuno Sá <nuno.sa@analog.com>

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

* Re: [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents.
  2021-06-28  7:09 ` [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Sa, Nuno
@ 2021-06-28 13:44   ` Jonathan Cameron
  2021-06-29  8:28     ` Sa, Nuno
  0 siblings, 1 reply; 43+ messages in thread
From: Jonathan Cameron @ 2021-06-28 13:44 UTC (permalink / raw)
  To: Sa, Nuno
  Cc: Jonathan Cameron, linux-iio, Rob Herring, devicetree,
	Lars-Peter Clausen, Ricardo Ribalda, Hennerich, Michael,
	Gwenhael Goavec-Merou, Michael Welling

On Mon, 28 Jun 2021 07:09:18 +0000
"Sa, Nuno" <Nuno.Sa@analog.com> wrote:

> Hi Jonathan,
> 
> > -----Original Message-----
> > From: Jonathan Cameron <jic23@kernel.org>
> > Sent: Sunday, June 27, 2021 6:32 PM
> > To: linux-iio@vger.kernel.org; Rob Herring <robh+dt@kernel.org>;
> > devicetree@vger.kernel.org
> > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>; Lars-Peter
> > Clausen <lars@metafoo.de>; Ricardo Ribalda <ribalda@kernel.org>;
> > Hennerich, Michael <Michael.Hennerich@analog.com>; Gwenhael
> > Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>; Michael
> > Welling <mwelling@ieee.org>
> > Subject: [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding
> > documents.
> > 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > We have quite a few drivers in IIO that date back to the days of
> > platform
> > data.  Many of them either worked out of the box with device tree
> > due to the spi core using the spi_device_id to match against
> > device tree compatibles, or were updated to use newer interfaces in
> > the
> > intervening years.  As such, they mostly 'work' with device tree but
> > can have some slightly odd quirks (particularly around naming of
> > supplies).
> > As we have no way of knowing what is out in the wild, we need to
> > support
> > these interesting bits of regulator naming.
> > 
> > I would ultimately like all such bindings to be documented both to
> > facilitate
> > automated check of device trees and to make things easier for people
> > trying
> > to write device tree files using these devices.
> > 
> > This series fills in the majority of the absent bindings for DACs.
> > There are some outstanding
> > * max517 - some platform data configuration needs porting over to
> > device tree.
> > * m62332 - this passes a consumer mapping in as platform data and will
> > need
> >   careful porting over the dt way of doing that.
> > 
> > There is one 'fixlet' in here for the driver to deal with a case were the
> > code was intended to allow the presence of a regulator to dictate
> > whether
> > an internal reference was used, but did not use the optional regulator
> > get.
> > 
> > I've mostly nominated maintainers based on original authorship +
> > where
> > I was feeling guilty or couldn't find anyone still active I've listed myself.
> > 
> > I got bored half way through of producing brief descriptions of
> > the devices so stopped doing so. If anyone wants to provide one for
> > these
> > parts I'm happy to add it!
> > 
> > Future series will cover the c. 40 bindings that I've identified as missing
> > for other types of devices.  I've also kept notes of easy cleanups in
> > drivers spotted whilst working these out, so will probably follow up
> > with
> > those soon as well.
> > 
> > Note I haven't tested all of these so there may well be errors or
> > elements
> > I've missed.
> >   
> 
> LGTM... Just wondering if we could not add the adi,ad5421 directly into
> the trivial-devices yaml as it looks to be the only one without any odd
> regulator name?

We could, but would probably end up pulling it out again.  As noted in
that patch description there is a bunch of stuff the binding doesn't currently
support that would make sense to add if anyone actually needs it.

Hmm. I guess it's a question of whether we think anyone will ever care :)

Jonathan
> 
> Anyways, feel free to add:
> 
> Acked-by: Nuno Sá <nuno.sa@analog.com>


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

* RE: [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents.
  2021-06-28 13:44   ` Jonathan Cameron
@ 2021-06-29  8:28     ` Sa, Nuno
  2021-07-17 18:11       ` Jonathan Cameron
  0 siblings, 1 reply; 43+ messages in thread
From: Sa, Nuno @ 2021-06-29  8:28 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Jonathan Cameron, linux-iio, Rob Herring, devicetree,
	Lars-Peter Clausen, Ricardo Ribalda, Hennerich, Michael,
	Gwenhael Goavec-Merou, Michael Welling


> From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
> Sent: Monday, June 28, 2021 3:44 PM
> To: Sa, Nuno <Nuno.Sa@analog.com>
> Cc: Jonathan Cameron <jic23@kernel.org>; linux-iio@vger.kernel.org;
> Rob Herring <robh+dt@kernel.org>; devicetree@vger.kernel.org;
> Lars-Peter Clausen <lars@metafoo.de>; Ricardo Ribalda
> <ribalda@kernel.org>; Hennerich, Michael
> <Michael.Hennerich@analog.com>; Gwenhael Goavec-Merou
> <gwenhael.goavec-merou@trabucayre.com>; Michael Welling
> <mwelling@ieee.org>
> Subject: Re: [PATCH 00/15] dt-bindings: iio: dac: Add most missing
> binding documents.
> 
> [External]
> 
> On Mon, 28 Jun 2021 07:09:18 +0000
> "Sa, Nuno" <Nuno.Sa@analog.com> wrote:
> 
> > Hi Jonathan,
> >
> > > -----Original Message-----
> > > From: Jonathan Cameron <jic23@kernel.org>
> > > Sent: Sunday, June 27, 2021 6:32 PM
> > > To: linux-iio@vger.kernel.org; Rob Herring <robh+dt@kernel.org>;
> > > devicetree@vger.kernel.org
> > > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>; Lars-
> Peter
> > > Clausen <lars@metafoo.de>; Ricardo Ribalda
> <ribalda@kernel.org>;
> > > Hennerich, Michael <Michael.Hennerich@analog.com>; Gwenhael
> > > Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>;
> Michael
> > > Welling <mwelling@ieee.org>
> > > Subject: [PATCH 00/15] dt-bindings: iio: dac: Add most missing
> binding
> > > documents.
> > >
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > >
> > > We have quite a few drivers in IIO that date back to the days of
> > > platform
> > > data.  Many of them either worked out of the box with device tree
> > > due to the spi core using the spi_device_id to match against
> > > device tree compatibles, or were updated to use newer interfaces
> in
> > > the
> > > intervening years.  As such, they mostly 'work' with device tree but
> > > can have some slightly odd quirks (particularly around naming of
> > > supplies).
> > > As we have no way of knowing what is out in the wild, we need to
> > > support
> > > these interesting bits of regulator naming.
> > >
> > > I would ultimately like all such bindings to be documented both to
> > > facilitate
> > > automated check of device trees and to make things easier for
> people
> > > trying
> > > to write device tree files using these devices.
> > >
> > > This series fills in the majority of the absent bindings for DACs.
> > > There are some outstanding
> > > * max517 - some platform data configuration needs porting over to
> > > device tree.
> > > * m62332 - this passes a consumer mapping in as platform data and
> will
> > > need
> > >   careful porting over the dt way of doing that.
> > >
> > > There is one 'fixlet' in here for the driver to deal with a case were
> the
> > > code was intended to allow the presence of a regulator to dictate
> > > whether
> > > an internal reference was used, but did not use the optional
> regulator
> > > get.
> > >
> > > I've mostly nominated maintainers based on original authorship +
> > > where
> > > I was feeling guilty or couldn't find anyone still active I've listed
> myself.
> > >
> > > I got bored half way through of producing brief descriptions of
> > > the devices so stopped doing so. If anyone wants to provide one
> for
> > > these
> > > parts I'm happy to add it!
> > >
> > > Future series will cover the c. 40 bindings that I've identified as
> missing
> > > for other types of devices.  I've also kept notes of easy cleanups in
> > > drivers spotted whilst working these out, so will probably follow up
> > > with
> > > those soon as well.
> > >
> > > Note I haven't tested all of these so there may well be errors or
> > > elements
> > > I've missed.
> > >
> >
> > LGTM... Just wondering if we could not add the adi,ad5421 directly
> into
> > the trivial-devices yaml as it looks to be the only one without any odd
> > regulator name?
> 
> We could, but would probably end up pulling it out again.  As noted in
> that patch description there is a bunch of stuff the binding doesn't
> currently
> support that would make sense to add if anyone actually needs it.

Fair enough :)

- Nuno Sá


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

* Re: [PATCH 05/15] dt-bindings: iio: dac: ad5446: Add missing binding document
  2021-06-27 16:32 ` [PATCH 05/15] dt-bindings: iio: dac: ad5446: " Jonathan Cameron
@ 2021-07-01 14:02   ` Rob Herring
  2021-07-01 19:30     ` Rob Herring
  0 siblings, 1 reply; 43+ messages in thread
From: Rob Herring @ 2021-07-01 14:02 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Jonathan Cameron, Rob Herring, Lars-Peter Clausen, linux-iio

On Sun, 27 Jun 2021 17:32:34 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Binding is a little stricter than the Linux driver.
> 
> It requires vcc-supply to be present for devices that don't have
> an internal reference, whereas the driver just prints a message and
> carries on.  Given this means that it is impossible to establish
> a scaling of the output channel, let us make it required in the binding
> schema.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  .../bindings/iio/dac/adi,ad5446.yaml          | 105 ++++++++++++++++++
>  1 file changed, 105 insertions(+)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/dac/ti,dac7512.example.dt.yaml: dac@0: 'vcc-supply' is a required property
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml
\ndoc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1497723

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.


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

* Re: [PATCH 05/15] dt-bindings: iio: dac: ad5446: Add missing binding document
  2021-07-01 14:02   ` Rob Herring
@ 2021-07-01 19:30     ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-01 19:30 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Jonathan Cameron, Lars-Peter Clausen, linux-iio

On Thu, Jul 01, 2021 at 08:02:43AM -0600, Rob Herring wrote:
> On Sun, 27 Jun 2021 17:32:34 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > Binding is a little stricter than the Linux driver.
> > 
> > It requires vcc-supply to be present for devices that don't have
> > an internal reference, whereas the driver just prints a message and
> > carries on.  Given this means that it is impossible to establish
> > a scaling of the output channel, let us make it required in the binding
> > schema.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > ---
> >  .../bindings/iio/dac/adi,ad5446.yaml          | 105 ++++++++++++++++++
> >  1 file changed, 105 insertions(+)
> > 
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/dac/ti,dac7512.example.dt.yaml: dac@0: 'vcc-supply' is a required property
> 	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml

Humm, seems it's not missing?

Rob

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

* Re: [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document.
  2021-06-27 16:32 ` [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document Jonathan Cameron
@ 2021-07-14 15:47   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:47 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, Jonathan Cameron, Rob Herring, Lars-Peter Clausen

On Sun, 27 Jun 2021 17:32:30 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This is documented what is currently the case.  There are a number
> of things that could be added, but I don't feel the binding elements
> are obvious enough to document without a driver implementation to
> verify they are good choices.
> 
> These include
> * Range
> * Regulators, both input and potentially output (if the loop being
>   driven is ever described).
> 
> I've listed Lars and myself as maintainers of the binding, but if
> anyone else wants to be added they would be most welcome!
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  .../bindings/iio/dac/adi,ad5421.yaml          | 51 +++++++++++++++++++
>  1 file changed, 51 insertions(+)
> 

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

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

* Re: [PATCH 02/15] dt-bindings: iio: dac: adi,ad5064: Document bindings for many different DACs
  2021-06-27 16:32 ` [PATCH 02/15] dt-bindings: iio: dac: adi,ad5064: Document bindings for many different DACs Jonathan Cameron
@ 2021-07-14 15:49   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:49 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Rob Herring, devicetree, linux-iio, Jonathan Cameron, Lars-Peter Clausen

On Sun, 27 Jun 2021 17:32:31 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Note this is documenting bindings that have effectively existing ever
> since this driver was merged. The naming conventions for the ADI
> parts are inconsistent on the data sheets which has lead to a mixture
> of -X and -reference voltage part naming.  We could attempt to clean this
> up, but as we are stuck supporting the existing binding it is probably
> not worthwhile.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  .../bindings/iio/dac/adi,ad5064.yaml          | 268 ++++++++++++++++++
>  1 file changed, 268 insertions(+)
> 

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

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

* Re: [PATCH 03/15] dt-bindings: iio: dac: adi,ad5360: Add missing binding document
  2021-06-27 16:32 ` [PATCH 03/15] dt-bindings: iio: dac: adi,ad5360: Add missing binding document Jonathan Cameron
@ 2021-07-14 15:50   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:50 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, Jonathan Cameron, Lars-Peter Clausen, Rob Herring

On Sun, 27 Jun 2021 17:32:32 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Bindings for the family of many channel DACs.  Fairly straight forward
> with just a differing number of voltage references (an extra one
> for the 40 channel ad4371)
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  .../bindings/iio/dac/adi,ad5360.yaml          | 79 +++++++++++++++++++
>  1 file changed, 79 insertions(+)
> 

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

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

* Re: [PATCH 04/15] dt-bindings: iio: dac: ad5380: Add missing binding document
  2021-06-27 16:32 ` [PATCH 04/15] dt-bindings: iio: dac: ad5380: " Jonathan Cameron
@ 2021-07-14 15:54   ` Rob Herring
  2021-07-17 18:01     ` Jonathan Cameron
  0 siblings, 1 reply; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:54 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, devicetree, Jonathan Cameron, Lars-Peter Clausen

On Sun, Jun 27, 2021 at 05:32:33PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> A simple binding for this particular DAC familly.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  .../bindings/iio/dac/adi,ad5380.yaml          | 70 +++++++++++++++++++
>  1 file changed, 70 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
> new file mode 100644
> index 000000000000..d599b418a020
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/dac/adi,ad5380.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices AD5380 and similar DACs
> +
> +maintainers:
> +  - Lars-Peter Clausen <lars@metafoo.de>
> +  - Jonathan Cameron <jic23@kernel.org>
> +
> +description: |
> +  DAC devices supporting both SPI and I2C interfaces.
> +properties:
> +  compatible:
> +    enum:
> +      - adi,ad5380-3
> +      - adi,ad5380-5
> +      - adi,ad5381-3
> +      - adi,ad5381-5
> +      - adi,ad5382-3
> +      - adi,ad5382-5
> +      - adi,ad5383-3
> +      - adi,ad5383-5
> +      - adi,ad5384-3
> +      - adi,ad5384-5
> +      - adi,ad5390-3
> +      - adi,ad5390-5
> +      - adi,ad5391-3
> +      - adi,ad5391-5
> +      - adi,ad5392-3
> +      - adi,ad5392-5

You could do this:

pattern: '^adi,ad53(8[0-4]|9[0-2])-[35]$'

Either way,

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

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

* Re: [PATCH 06/15] dt-bindings: iio: dac: ad5449: Add missing binding document.
  2021-06-27 16:32 ` [PATCH 06/15] dt-bindings: iio: dac: ad5449: " Jonathan Cameron
@ 2021-07-14 15:55   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:55 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Rob Herring, Jonathan Cameron, Lars-Peter Clausen, linux-iio

On Sun, 27 Jun 2021 17:32:35 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Documenting existing binding, so little flexibility available.
> 2 channel devices that require separate reference voltages.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  .../bindings/iio/dac/adi,ad5449.yaml          | 97 +++++++++++++++++++
>  1 file changed, 97 insertions(+)
> 

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

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

* Re: [PATCH 07/15] dt-bindings: iio: dac: ad5504: Add missing binding document
  2021-06-27 16:32 ` [PATCH 07/15] dt-bindings: iio: dac: ad5504: " Jonathan Cameron
@ 2021-07-14 15:55   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:55 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: devicetree, linux-iio, Jonathan Cameron, Rob Herring

On Sun, 27 Jun 2021 17:32:36 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Binding for this high voltage DAC with temperature event signal.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  .../bindings/iio/dac/adi,ad5504.yaml          | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 

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

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

* Re: [PATCH 09/15] dt-bindings: iio: dac: ad5624r: Add missing binding document
  2021-06-27 16:32 ` [PATCH 09/15] dt-bindings: iio: dac: ad5624r: Add missing binding document Jonathan Cameron
@ 2021-07-14 15:56   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:56 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: devicetree, Rob Herring, Jonathan Cameron, linux-iio

On Sun, 27 Jun 2021 17:32:38 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Simple binding, with optional vref.
> Note that the Linux driver does support vcc-supply for historical
> reasons, but lets not let that get into any bindings that are checked
> going forwards.  Hence I have deliberately not documented it.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  .../bindings/iio/dac/adi,ad5624r.yaml         | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
> 

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

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

* Re: [PATCH 10/15] dt-bindings: iio: dac: ad5686 and ad5696: Add missing binding document.
  2021-06-27 16:32 ` [PATCH 10/15] dt-bindings: iio: dac: ad5686 and ad5696: " Jonathan Cameron
@ 2021-07-14 15:57   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:57 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, devicetree, Jonathan Cameron

On Sun, Jun 27, 2021 at 05:32:39PM +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> The use of vcc-supply for the reference voltage is unsual and should

unusual

> probably be deprecated as there is an explicit VREF pin on at least
> some of these parts.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  .../bindings/iio/dac/adi,ad5686.yaml          | 75 +++++++++++++++++++
>  1 file changed, 75 insertions(+)

Otherwise,

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

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

* Re: [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc.
  2021-06-27 16:32 ` [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc Jonathan Cameron
@ 2021-07-14 15:58   ` Rob Herring
  2021-07-27 10:52     ` Ricardo Ribalda Delgado
  0 siblings, 1 reply; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:58 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Ricardo Ribalda, Rob Herring, linux-iio, Jonathan Cameron

On Sun, 27 Jun 2021 17:32:40 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Straight forward binding with vref optional for those part with internal
> regulators, but required for those without.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Ricardo Ribalda <ribalda@kernel.org>
> ---
>  .../bindings/iio/dac/adi,ad5761.yaml          | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 

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

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

* Re: [PATCH 12/15] dt-bindings: iio: dac: adi,ad5764: Add missing binding document
  2021-06-27 16:32 ` [PATCH 12/15] dt-bindings: iio: dac: adi,ad5764: Add missing binding document Jonathan Cameron
@ 2021-07-14 15:58   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:58 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Jonathan Cameron, linux-iio, Rob Herring, devicetree

On Sun, 27 Jun 2021 17:32:41 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This binding covers the ad5744, ad5744r, ad5764 and ad5764r DACs.
> Note that the driver currently assumes the internal reference is used for
> the r parts. The binding as defined relaxes this constraint.
> 
> There is no support in the binding or driver for the two digital IO
> signals.  I do not propose to add that until we have a means to
> test any such binding.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  .../bindings/iio/dac/adi,ad5764.yaml          | 62 +++++++++++++++++++
>  1 file changed, 62 insertions(+)
> 

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

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

* Re: [PATCH 13/15] dt-bindings: iio: dac: adi,ad5791: Add missing bindings document
  2021-06-27 16:32 ` [PATCH 13/15] dt-bindings: iio: dac: adi,ad5791: Add missing bindings document Jonathan Cameron
@ 2021-07-14 15:59   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:59 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: devicetree, Rob Herring, Jonathan Cameron, linux-iio, Michael Hennerich

On Sun, 27 Jun 2021 17:32:42 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Documenting existing bindings for this device.
> 
> The Linux driver in theory 'works' without the two supplies that I have
> listed as required, but without a valid scale.  As such I've
> documented it as required.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Michael Hennerich <michael.hennerich@analog.com>
> ---
>  .../bindings/iio/dac/adi,ad5791.yaml          | 52 +++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 

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

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

* Re: [PATCH 14/15] dt-bindings: iio: dac: adi,ad8801: Add missing binding document.
  2021-06-27 16:32 ` [PATCH 14/15] dt-bindings: iio: dac: adi,ad8801: Add missing binding document Jonathan Cameron
@ 2021-07-14 15:59   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:59 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Rob Herring, Gwenhael Goavec-Merou, Jonathan Cameron, linux-iio,
	devicetree

On Sun, 27 Jun 2021 17:32:43 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This device was missing a binding document. Simple binding with the
> ad8803 requiring two both low and high references whilst the 8801
> only has a high reference.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
> ---
>  .../bindings/iio/dac/adi,ad8801.yaml          | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
> 

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

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

* Re: [PATCH 15/15] dt-bindings: iio: dac: microchip,mcp4922: Add missing binding document
  2021-06-27 16:32 ` [PATCH 15/15] dt-bindings: iio: dac: microchip,mcp4922: " Jonathan Cameron
@ 2021-07-14 15:59   ` Rob Herring
  0 siblings, 0 replies; 43+ messages in thread
From: Rob Herring @ 2021-07-14 15:59 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Rob Herring, Jonathan Cameron, linux-iio, devicetree, Michael Welling

On Sun, 27 Jun 2021 17:32:44 +0100, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Simple binding for this family of microchip DACs.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Michael Welling <mwelling@ieee.org>
> ---
>  .../bindings/iio/dac/microchip,mcp4922.yaml   | 46 +++++++++++++++++++
>  1 file changed, 46 insertions(+)
> 

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

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

* Re: [PATCH 04/15] dt-bindings: iio: dac: ad5380: Add missing binding document
  2021-07-14 15:54   ` Rob Herring
@ 2021-07-17 18:01     ` Jonathan Cameron
  0 siblings, 0 replies; 43+ messages in thread
From: Jonathan Cameron @ 2021-07-17 18:01 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-iio, devicetree, Jonathan Cameron, Lars-Peter Clausen

On Wed, 14 Jul 2021 09:54:21 -0600
Rob Herring <robh@kernel.org> wrote:

> On Sun, Jun 27, 2021 at 05:32:33PM +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > A simple binding for this particular DAC familly.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > ---
> >  .../bindings/iio/dac/adi,ad5380.yaml          | 70 +++++++++++++++++++
> >  1 file changed, 70 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
> > new file mode 100644
> > index 000000000000..d599b418a020
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
> > @@ -0,0 +1,70 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/dac/adi,ad5380.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Analog Devices AD5380 and similar DACs
> > +
> > +maintainers:
> > +  - Lars-Peter Clausen <lars@metafoo.de>
> > +  - Jonathan Cameron <jic23@kernel.org>
> > +
> > +description: |
> > +  DAC devices supporting both SPI and I2C interfaces.
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - adi,ad5380-3
> > +      - adi,ad5380-5
> > +      - adi,ad5381-3
> > +      - adi,ad5381-5
> > +      - adi,ad5382-3
> > +      - adi,ad5382-5
> > +      - adi,ad5383-3
> > +      - adi,ad5383-5
> > +      - adi,ad5384-3
> > +      - adi,ad5384-5
> > +      - adi,ad5390-3
> > +      - adi,ad5390-5
> > +      - adi,ad5391-3
> > +      - adi,ad5391-5
> > +      - adi,ad5392-3
> > +      - adi,ad5392-5  
> 
> You could do this:
> 
> pattern: '^adi,ad53(8[0-4]|9[0-2])-[35]$'
Feels fragile and not possible to grep, so I'll stick with the full listing.
> 
> Either way,
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Thanks!

Jonathan



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

* Re: [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
  2021-06-27 17:29     ` kernel test robot
@ 2021-07-17 18:06       ` Jonathan Cameron
  -1 siblings, 0 replies; 43+ messages in thread
From: Jonathan Cameron @ 2021-07-17 18:06 UTC (permalink / raw)
  To: kernel test robot
  Cc: linux-iio, Rob Herring, devicetree, kbuild-all, Jonathan Cameron

On Mon, 28 Jun 2021 01:29:53 +0800
kernel test robot <lkp@intel.com> wrote:

> Hi Jonathan,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on iio/togreg]
> [also build test ERROR on robh/for-next v5.13-rc7 next-20210625]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> config: nios2-randconfig-r001-20210627 (attached as .config)
> compiler: nios2-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/0day-ci/linux/commit/4f70da9b9819945461961ccdfbd87438ac8a9f89
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
>         git checkout 4f70da9b9819945461961ccdfbd87438ac8a9f89
>         # save the attached .config to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/iio/dac/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
Stray bracket.  Oops and now fixed in the patch I've applied.

Thanks!
Jonathan

> 
> All error/warnings (new ones prefixed by >>):
> 
>    drivers/iio/dac/ad5624r_spi.c: In function 'ad5624r_probe':
> >> drivers/iio/dac/ad5624r_spi.c:296:12: error: invalid storage class for function 'ad5624r_remove'  
>      296 | static int ad5624r_remove(struct spi_device *spi)
>          |            ^~~~~~~~~~~~~~
> >> drivers/iio/dac/ad5624r_spi.c:296:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]  
>      296 | static int ad5624r_remove(struct spi_device *spi)
>          | ^~~~~~
> >> drivers/iio/dac/ad5624r_spi.c:324:12: error: initializer element is not constant  
>      324 |  .remove = ad5624r_remove,
>          |            ^~~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:324:12: note: (near initialization for 'ad5624r_driver.remove')
>    drivers/iio/dac/ad5624r_spi.c:319:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>      319 | static struct spi_driver ad5624r_driver = {
>          | ^~~~~~
>    In file included from include/linux/device.h:32,
>                     from drivers/iio/dac/ad5624r_spi.c:10:
> >> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_init'  
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/device/driver.h:259:19: note: in definition of macro 'module_driver'
>      259 | static int __init __driver##_init(void) \
>          |                   ^~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/printk.h:6,
>                     from include/linux/kernel.h:17,
>                     from include/linux/interrupt.h:6,
>                     from drivers/iio/dac/ad5624r_spi.c:8:
>    drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/init.h:250:41: note: in definition of macro '____define_initcall'
>      250 |   __attribute__((__section__(__sec))) = fn;
>          |                                         ^~
>    include/linux/init.h:260:2: note: in expansion of macro '__unique_initcall'
>      260 |  __unique_initcall(fn, id, __sec, __initcall_id(fn))
>          |  ^~~~~~~~~~~~~~~~~
>    include/linux/init.h:262:35: note: in expansion of macro '___define_initcall'
>      262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
>          |                                   ^~~~~~~~~~~~~~~~~~
>    include/linux/init.h:291:30: note: in expansion of macro '__define_initcall'
>      291 | #define device_initcall(fn)  __define_initcall(fn, 6)
>          |                              ^~~~~~~~~~~~~~~~~
>    include/linux/init.h:296:24: note: in expansion of macro 'device_initcall'
>      296 | #define __initcall(fn) device_initcall(fn)
>          |                        ^~~~~~~~~~~~~~~
>    include/linux/module.h:87:24: note: in expansion of macro '__initcall'
>       87 | #define module_init(x) __initcall(x);
>          |                        ^~~~~~~~~~
>    include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
>      263 | module_init(__driver##_init); \
>          | ^~~~~~~~~~~
>    include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
>      315 |  module_driver(__spi_driver, spi_register_driver, \
>          |  ^~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/device.h:32,
>                     from drivers/iio/dac/ad5624r_spi.c:10:
> >> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_exit'  
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/device/driver.h:264:20: note: in definition of macro 'module_driver'
>      264 | static void __exit __driver##_exit(void) \
>          |                    ^~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
> >> include/linux/device/driver.h:264:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]  
>      264 | static void __exit __driver##_exit(void) \
>          | ^~~~~~
>    include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
>      315 |  module_driver(__spi_driver, spi_register_driver, \
>          |  ^~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/printk.h:6,
>                     from include/linux/kernel.h:17,
>                     from include/linux/interrupt.h:6,
>                     from drivers/iio/dac/ad5624r_spi.c:8:
>    drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/init.h:299:50: note: in definition of macro '__exitcall'
>      299 |  static exitcall_t __exitcall_##fn __exit_call = fn
>          |                                                  ^~
>    include/linux/device/driver.h:268:1: note: in expansion of macro 'module_exit'
>      268 | module_exit(__driver##_exit);
>          | ^~~~~~~~~~~
>    include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
>      315 |  module_driver(__spi_driver, spi_register_driver, \
>          |  ^~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/module.h:21,
>                     from include/linux/bpf.h:19,
>                     from include/linux/bpf-cgroup.h:5,
>                     from include/linux/cgroup-defs.h:22,
>                     from include/linux/cgroup.h:28,
>                     from include/linux/memcontrol.h:13,
>                     from include/linux/swap.h:9,
>                     from include/linux/suspend.h:5,
>                     from include/linux/regulator/consumer.h:35,
>                     from drivers/iio/dac/ad5624r_spi.c:15:
>    include/linux/moduleparam.h:24:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>       24 |  static const char __UNIQUE_ID(name)[]      \
>          |  ^~~~~~
>    include/linux/module.h:165:32: note: in expansion of macro '__MODULE_INFO'
>      165 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>          |                                ^~~~~~~~~~~~~
>    include/linux/module.h:235:32: note: in expansion of macro 'MODULE_INFO'
>      235 | #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
>          |                                ^~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:329:1: note: in expansion of macro 'MODULE_AUTHOR'
>      329 | MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
>          | ^~~~~~~~~~~~~
> >> drivers/iio/dac/ad5624r_spi.c:331:1: error: expected declaration or statement at end of input  
>      331 | MODULE_LICENSE("GPL v2");
>          | ^~~~~~~~~~~~~~
>    At top level:
>    drivers/iio/dac/ad5624r_spi.c:222:12: warning: 'ad5624r_probe' defined but not used [-Wunused-function]
>      222 | static int ad5624r_probe(struct spi_device *spi)
>          |            ^~~~~~~~~~~~~
> 
> 
> vim +/ad5624r_remove +296 drivers/iio/dac/ad5624r_spi.c
> 
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  295  
> fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @296  static int ad5624r_remove(struct spi_device *spi)
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  297  {
> 3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  298  	struct iio_dev *indio_dev = spi_get_drvdata(spi);
> 3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  299  	struct ad5624r_state *st = iio_priv(indio_dev);
> 3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  300  
> d2fffd6c2fd60f drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-10-14  301  	iio_device_unregister(indio_dev);
> 75238230cce22b drivers/iio/dac/ad5624r_spi.c         Sachin Kamat       2013-08-19  302  	if (!IS_ERR(st->reg))
> 26a54797c1b094 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-08-30  303  		regulator_disable(st->reg);
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  304  
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  305  	return 0;
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  306  }
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  307  
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  308  static const struct spi_device_id ad5624r_id[] = {
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  309  	{"ad5624r3", ID_AD5624R3},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  310  	{"ad5644r3", ID_AD5644R3},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  311  	{"ad5664r3", ID_AD5664R3},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  312  	{"ad5624r5", ID_AD5624R5},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  313  	{"ad5644r5", ID_AD5644R5},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  314  	{"ad5664r5", ID_AD5664R5},
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  315  	{}
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  316  };
> 55e4390cb04e8b drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16  317  MODULE_DEVICE_TABLE(spi, ad5624r_id);
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  318  
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  319  static struct spi_driver ad5624r_driver = {
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  320  	.driver = {
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  321  		   .name = "ad5624r",
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  322  		   },
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  323  	.probe = ad5624r_probe,
> fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @324  	.remove = ad5624r_remove,
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  325  	.id_table = ad5624r_id,
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  326  };
> ae6ae6fec3f7d6 drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16 @327  module_spi_driver(ad5624r_driver);
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  328  
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  329  MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  330  MODULE_DESCRIPTION("Analog Devices AD5624/44/64R DAC spi driver");
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27 @331  MODULE_LICENSE("GPL v2");
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


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

* Re: [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator.
@ 2021-07-17 18:06       ` Jonathan Cameron
  0 siblings, 0 replies; 43+ messages in thread
From: Jonathan Cameron @ 2021-07-17 18:06 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 14196 bytes --]

On Mon, 28 Jun 2021 01:29:53 +0800
kernel test robot <lkp@intel.com> wrote:

> Hi Jonathan,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on iio/togreg]
> [also build test ERROR on robh/for-next v5.13-rc7 next-20210625]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> config: nios2-randconfig-r001-20210627 (attached as .config)
> compiler: nios2-linux-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/0day-ci/linux/commit/4f70da9b9819945461961ccdfbd87438ac8a9f89
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Jonathan-Cameron/dt-bindings-iio-dac-Add-most-missing-binding-documents/20210628-003216
>         git checkout 4f70da9b9819945461961ccdfbd87438ac8a9f89
>         # save the attached .config to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/iio/dac/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
Stray bracket.  Oops and now fixed in the patch I've applied.

Thanks!
Jonathan

> 
> All error/warnings (new ones prefixed by >>):
> 
>    drivers/iio/dac/ad5624r_spi.c: In function 'ad5624r_probe':
> >> drivers/iio/dac/ad5624r_spi.c:296:12: error: invalid storage class for function 'ad5624r_remove'  
>      296 | static int ad5624r_remove(struct spi_device *spi)
>          |            ^~~~~~~~~~~~~~
> >> drivers/iio/dac/ad5624r_spi.c:296:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]  
>      296 | static int ad5624r_remove(struct spi_device *spi)
>          | ^~~~~~
> >> drivers/iio/dac/ad5624r_spi.c:324:12: error: initializer element is not constant  
>      324 |  .remove = ad5624r_remove,
>          |            ^~~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:324:12: note: (near initialization for 'ad5624r_driver.remove')
>    drivers/iio/dac/ad5624r_spi.c:319:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>      319 | static struct spi_driver ad5624r_driver = {
>          | ^~~~~~
>    In file included from include/linux/device.h:32,
>                     from drivers/iio/dac/ad5624r_spi.c:10:
> >> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_init'  
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/device/driver.h:259:19: note: in definition of macro 'module_driver'
>      259 | static int __init __driver##_init(void) \
>          |                   ^~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/printk.h:6,
>                     from include/linux/kernel.h:17,
>                     from include/linux/interrupt.h:6,
>                     from drivers/iio/dac/ad5624r_spi.c:8:
>    drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/init.h:250:41: note: in definition of macro '____define_initcall'
>      250 |   __attribute__((__section__(__sec))) = fn;
>          |                                         ^~
>    include/linux/init.h:260:2: note: in expansion of macro '__unique_initcall'
>      260 |  __unique_initcall(fn, id, __sec, __initcall_id(fn))
>          |  ^~~~~~~~~~~~~~~~~
>    include/linux/init.h:262:35: note: in expansion of macro '___define_initcall'
>      262 | #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id)
>          |                                   ^~~~~~~~~~~~~~~~~~
>    include/linux/init.h:291:30: note: in expansion of macro '__define_initcall'
>      291 | #define device_initcall(fn)  __define_initcall(fn, 6)
>          |                              ^~~~~~~~~~~~~~~~~
>    include/linux/init.h:296:24: note: in expansion of macro 'device_initcall'
>      296 | #define __initcall(fn) device_initcall(fn)
>          |                        ^~~~~~~~~~~~~~~
>    include/linux/module.h:87:24: note: in expansion of macro '__initcall'
>       87 | #define module_init(x) __initcall(x);
>          |                        ^~~~~~~~~~
>    include/linux/device/driver.h:263:1: note: in expansion of macro 'module_init'
>      263 | module_init(__driver##_init); \
>          | ^~~~~~~~~~~
>    include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
>      315 |  module_driver(__spi_driver, spi_register_driver, \
>          |  ^~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/device.h:32,
>                     from drivers/iio/dac/ad5624r_spi.c:10:
> >> drivers/iio/dac/ad5624r_spi.c:327:19: error: invalid storage class for function 'ad5624r_driver_exit'  
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/device/driver.h:264:20: note: in definition of macro 'module_driver'
>      264 | static void __exit __driver##_exit(void) \
>          |                    ^~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
> >> include/linux/device/driver.h:264:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]  
>      264 | static void __exit __driver##_exit(void) \
>          | ^~~~~~
>    include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
>      315 |  module_driver(__spi_driver, spi_register_driver, \
>          |  ^~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/printk.h:6,
>                     from include/linux/kernel.h:17,
>                     from include/linux/interrupt.h:6,
>                     from drivers/iio/dac/ad5624r_spi.c:8:
>    drivers/iio/dac/ad5624r_spi.c:327:19: error: initializer element is not constant
>      327 | module_spi_driver(ad5624r_driver);
>          |                   ^~~~~~~~~~~~~~
>    include/linux/init.h:299:50: note: in definition of macro '__exitcall'
>      299 |  static exitcall_t __exitcall_##fn __exit_call = fn
>          |                                                  ^~
>    include/linux/device/driver.h:268:1: note: in expansion of macro 'module_exit'
>      268 | module_exit(__driver##_exit);
>          | ^~~~~~~~~~~
>    include/linux/spi/spi.h:315:2: note: in expansion of macro 'module_driver'
>      315 |  module_driver(__spi_driver, spi_register_driver, \
>          |  ^~~~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:327:1: note: in expansion of macro 'module_spi_driver'
>      327 | module_spi_driver(ad5624r_driver);
>          | ^~~~~~~~~~~~~~~~~
>    In file included from include/linux/module.h:21,
>                     from include/linux/bpf.h:19,
>                     from include/linux/bpf-cgroup.h:5,
>                     from include/linux/cgroup-defs.h:22,
>                     from include/linux/cgroup.h:28,
>                     from include/linux/memcontrol.h:13,
>                     from include/linux/swap.h:9,
>                     from include/linux/suspend.h:5,
>                     from include/linux/regulator/consumer.h:35,
>                     from drivers/iio/dac/ad5624r_spi.c:15:
>    include/linux/moduleparam.h:24:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
>       24 |  static const char __UNIQUE_ID(name)[]      \
>          |  ^~~~~~
>    include/linux/module.h:165:32: note: in expansion of macro '__MODULE_INFO'
>      165 | #define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
>          |                                ^~~~~~~~~~~~~
>    include/linux/module.h:235:32: note: in expansion of macro 'MODULE_INFO'
>      235 | #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
>          |                                ^~~~~~~~~~~
>    drivers/iio/dac/ad5624r_spi.c:329:1: note: in expansion of macro 'MODULE_AUTHOR'
>      329 | MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
>          | ^~~~~~~~~~~~~
> >> drivers/iio/dac/ad5624r_spi.c:331:1: error: expected declaration or statement at end of input  
>      331 | MODULE_LICENSE("GPL v2");
>          | ^~~~~~~~~~~~~~
>    At top level:
>    drivers/iio/dac/ad5624r_spi.c:222:12: warning: 'ad5624r_probe' defined but not used [-Wunused-function]
>      222 | static int ad5624r_probe(struct spi_device *spi)
>          |            ^~~~~~~~~~~~~
> 
> 
> vim +/ad5624r_remove +296 drivers/iio/dac/ad5624r_spi.c
> 
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  295  
> fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @296  static int ad5624r_remove(struct spi_device *spi)
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  297  {
> 3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  298  	struct iio_dev *indio_dev = spi_get_drvdata(spi);
> 3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  299  	struct ad5624r_state *st = iio_priv(indio_dev);
> 3ff242055b7b46 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-06-27  300  
> d2fffd6c2fd60f drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-10-14  301  	iio_device_unregister(indio_dev);
> 75238230cce22b drivers/iio/dac/ad5624r_spi.c         Sachin Kamat       2013-08-19  302  	if (!IS_ERR(st->reg))
> 26a54797c1b094 drivers/staging/iio/dac/ad5624r_spi.c Jonathan Cameron   2011-08-30  303  		regulator_disable(st->reg);
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  304  
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  305  	return 0;
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  306  }
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  307  
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  308  static const struct spi_device_id ad5624r_id[] = {
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  309  	{"ad5624r3", ID_AD5624R3},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  310  	{"ad5644r3", ID_AD5644R3},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  311  	{"ad5664r3", ID_AD5664R3},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  312  	{"ad5624r5", ID_AD5624R5},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  313  	{"ad5644r5", ID_AD5644R5},
> 14f88f1b07e03b drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2011-03-09  314  	{"ad5664r5", ID_AD5664R5},
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  315  	{}
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  316  };
> 55e4390cb04e8b drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16  317  MODULE_DEVICE_TABLE(spi, ad5624r_id);
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  318  
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  319  static struct spi_driver ad5624r_driver = {
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  320  	.driver = {
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  321  		   .name = "ad5624r",
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  322  		   },
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  323  	.probe = ad5624r_probe,
> fc52692c49969e drivers/iio/dac/ad5624r_spi.c         Greg Kroah-Hartman 2012-12-21 @324  	.remove = ad5624r_remove,
> ece30c15921f94 drivers/staging/iio/dac/ad5624r_spi.c Michael Hennerich  2010-11-19  325  	.id_table = ad5624r_id,
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  326  };
> ae6ae6fec3f7d6 drivers/staging/iio/dac/ad5624r_spi.c Lars-Peter Clausen 2011-11-16 @327  module_spi_driver(ad5624r_driver);
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  328  
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  329  MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27  330  MODULE_DESCRIPTION("Analog Devices AD5624/44/64R DAC spi driver");
> 6790e29fef61b2 drivers/staging/iio/dac/ad5624r_spi.c Barry Song         2010-10-27 @331  MODULE_LICENSE("GPL v2");
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

* Re: [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents.
  2021-06-29  8:28     ` Sa, Nuno
@ 2021-07-17 18:11       ` Jonathan Cameron
  0 siblings, 0 replies; 43+ messages in thread
From: Jonathan Cameron @ 2021-07-17 18:11 UTC (permalink / raw)
  To: Sa, Nuno
  Cc: Jonathan Cameron, linux-iio, Rob Herring, devicetree,
	Lars-Peter Clausen, Ricardo Ribalda, Hennerich, Michael,
	Gwenhael Goavec-Merou, Michael Welling

On Tue, 29 Jun 2021 08:28:30 +0000
"Sa, Nuno" <Nuno.Sa@analog.com> wrote:

> > From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
> > Sent: Monday, June 28, 2021 3:44 PM
> > To: Sa, Nuno <Nuno.Sa@analog.com>
> > Cc: Jonathan Cameron <jic23@kernel.org>; linux-iio@vger.kernel.org;
> > Rob Herring <robh+dt@kernel.org>; devicetree@vger.kernel.org;
> > Lars-Peter Clausen <lars@metafoo.de>; Ricardo Ribalda
> > <ribalda@kernel.org>; Hennerich, Michael
> > <Michael.Hennerich@analog.com>; Gwenhael Goavec-Merou
> > <gwenhael.goavec-merou@trabucayre.com>; Michael Welling
> > <mwelling@ieee.org>
> > Subject: Re: [PATCH 00/15] dt-bindings: iio: dac: Add most missing
> > binding documents.
> > 
> > [External]
> > 
> > On Mon, 28 Jun 2021 07:09:18 +0000
> > "Sa, Nuno" <Nuno.Sa@analog.com> wrote:
> >   
> > > Hi Jonathan,
> > >  
> > > > -----Original Message-----
> > > > From: Jonathan Cameron <jic23@kernel.org>
> > > > Sent: Sunday, June 27, 2021 6:32 PM
> > > > To: linux-iio@vger.kernel.org; Rob Herring <robh+dt@kernel.org>;
> > > > devicetree@vger.kernel.org
> > > > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>; Lars-  
> > Peter  
> > > > Clausen <lars@metafoo.de>; Ricardo Ribalda  
> > <ribalda@kernel.org>;  
> > > > Hennerich, Michael <Michael.Hennerich@analog.com>; Gwenhael
> > > > Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>;  
> > Michael  
> > > > Welling <mwelling@ieee.org>
> > > > Subject: [PATCH 00/15] dt-bindings: iio: dac: Add most missing  
> > binding  
> > > > documents.
> > > >
> > > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > >
> > > > We have quite a few drivers in IIO that date back to the days of
> > > > platform
> > > > data.  Many of them either worked out of the box with device tree
> > > > due to the spi core using the spi_device_id to match against
> > > > device tree compatibles, or were updated to use newer interfaces  
> > in  
> > > > the
> > > > intervening years.  As such, they mostly 'work' with device tree but
> > > > can have some slightly odd quirks (particularly around naming of
> > > > supplies).
> > > > As we have no way of knowing what is out in the wild, we need to
> > > > support
> > > > these interesting bits of regulator naming.
> > > >
> > > > I would ultimately like all such bindings to be documented both to
> > > > facilitate
> > > > automated check of device trees and to make things easier for  
> > people  
> > > > trying
> > > > to write device tree files using these devices.
> > > >
> > > > This series fills in the majority of the absent bindings for DACs.
> > > > There are some outstanding
> > > > * max517 - some platform data configuration needs porting over to
> > > > device tree.
> > > > * m62332 - this passes a consumer mapping in as platform data and  
> > will  
> > > > need
> > > >   careful porting over the dt way of doing that.
> > > >
> > > > There is one 'fixlet' in here for the driver to deal with a case were  
> > the  
> > > > code was intended to allow the presence of a regulator to dictate
> > > > whether
> > > > an internal reference was used, but did not use the optional  
> > regulator  
> > > > get.
> > > >
> > > > I've mostly nominated maintainers based on original authorship +
> > > > where
> > > > I was feeling guilty or couldn't find anyone still active I've listed  
> > myself.  
> > > >
> > > > I got bored half way through of producing brief descriptions of
> > > > the devices so stopped doing so. If anyone wants to provide one  
> > for  
> > > > these
> > > > parts I'm happy to add it!
> > > >
> > > > Future series will cover the c. 40 bindings that I've identified as  
> > missing  
> > > > for other types of devices.  I've also kept notes of easy cleanups in
> > > > drivers spotted whilst working these out, so will probably follow up
> > > > with
> > > > those soon as well.
> > > >
> > > > Note I haven't tested all of these so there may well be errors or
> > > > elements
> > > > I've missed.
> > > >  
> > >
> > > LGTM... Just wondering if we could not add the adi,ad5421 directly  
> > into  
> > > the trivial-devices yaml as it looks to be the only one without any odd
> > > regulator name?  
> > 
> > We could, but would probably end up pulling it out again.  As noted in
> > that patch description there is a bunch of stuff the binding doesn't
> > currently
> > support that would make sense to add if anyone actually needs it.  
> 
> Fair enough :)
> 
> - Nuno Sá
> 
Applied all except patch 5 where something odd happened with the test scripts
that needs another look.

Thanks,

Jonathan



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

* Re: [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc.
  2021-07-14 15:58   ` Rob Herring
@ 2021-07-27 10:52     ` Ricardo Ribalda Delgado
  0 siblings, 0 replies; 43+ messages in thread
From: Ricardo Ribalda Delgado @ 2021-07-27 10:52 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jonathan Cameron, devicetree, Rob Herring, linux-iio, Jonathan Cameron

Sorry for the late reply, holiday season :). Thanks for the patch

Acked-by: Ricardo Ribalda <ribalda@kernel.org>

On Wed, Jul 14, 2021 at 5:58 PM Rob Herring <robh@kernel.org> wrote:
>
> On Sun, 27 Jun 2021 17:32:40 +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Straight forward binding with vref optional for those part with internal
> > regulators, but required for those without.
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Cc: Ricardo Ribalda <ribalda@kernel.org>
> > ---
> >  .../bindings/iio/dac/adi,ad5761.yaml          | 60 +++++++++++++++++++
> >  1 file changed, 60 insertions(+)
> >
>
> Reviewed-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2021-07-27 10:52 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27 16:32 [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Jonathan Cameron
2021-06-27 16:32 ` [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document Jonathan Cameron
2021-07-14 15:47   ` Rob Herring
2021-06-27 16:32 ` [PATCH 02/15] dt-bindings: iio: dac: adi,ad5064: Document bindings for many different DACs Jonathan Cameron
2021-07-14 15:49   ` Rob Herring
2021-06-27 16:32 ` [PATCH 03/15] dt-bindings: iio: dac: adi,ad5360: Add missing binding document Jonathan Cameron
2021-07-14 15:50   ` Rob Herring
2021-06-27 16:32 ` [PATCH 04/15] dt-bindings: iio: dac: ad5380: " Jonathan Cameron
2021-07-14 15:54   ` Rob Herring
2021-07-17 18:01     ` Jonathan Cameron
2021-06-27 16:32 ` [PATCH 05/15] dt-bindings: iio: dac: ad5446: " Jonathan Cameron
2021-07-01 14:02   ` Rob Herring
2021-07-01 19:30     ` Rob Herring
2021-06-27 16:32 ` [PATCH 06/15] dt-bindings: iio: dac: ad5449: " Jonathan Cameron
2021-07-14 15:55   ` Rob Herring
2021-06-27 16:32 ` [PATCH 07/15] dt-bindings: iio: dac: ad5504: " Jonathan Cameron
2021-07-14 15:55   ` Rob Herring
2021-06-27 16:32 ` [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator Jonathan Cameron
2021-06-27 17:29   ` kernel test robot
2021-06-27 17:29     ` kernel test robot
2021-07-17 18:06     ` Jonathan Cameron
2021-07-17 18:06       ` Jonathan Cameron
2021-06-27 18:53   ` kernel test robot
2021-06-27 18:53     ` kernel test robot
2021-06-27 16:32 ` [PATCH 09/15] dt-bindings: iio: dac: ad5624r: Add missing binding document Jonathan Cameron
2021-07-14 15:56   ` Rob Herring
2021-06-27 16:32 ` [PATCH 10/15] dt-bindings: iio: dac: ad5686 and ad5696: " Jonathan Cameron
2021-07-14 15:57   ` Rob Herring
2021-06-27 16:32 ` [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc Jonathan Cameron
2021-07-14 15:58   ` Rob Herring
2021-07-27 10:52     ` Ricardo Ribalda Delgado
2021-06-27 16:32 ` [PATCH 12/15] dt-bindings: iio: dac: adi,ad5764: Add missing binding document Jonathan Cameron
2021-07-14 15:58   ` Rob Herring
2021-06-27 16:32 ` [PATCH 13/15] dt-bindings: iio: dac: adi,ad5791: Add missing bindings document Jonathan Cameron
2021-07-14 15:59   ` Rob Herring
2021-06-27 16:32 ` [PATCH 14/15] dt-bindings: iio: dac: adi,ad8801: Add missing binding document Jonathan Cameron
2021-07-14 15:59   ` Rob Herring
2021-06-27 16:32 ` [PATCH 15/15] dt-bindings: iio: dac: microchip,mcp4922: " Jonathan Cameron
2021-07-14 15:59   ` Rob Herring
2021-06-28  7:09 ` [PATCH 00/15] dt-bindings: iio: dac: Add most missing binding documents Sa, Nuno
2021-06-28 13:44   ` Jonathan Cameron
2021-06-29  8:28     ` Sa, Nuno
2021-07-17 18:11       ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.