Skip to contentSkip to conversation

iio: adc: ad4695: move dt-bindings header

PATCH Applied David Lechner 3 participants 7 messages Nov 13, 2024 – Nov 24, 2024

Subsystems (5)
lore
Share & tools
lore

David Lechner

author reviewer
#0 lore raw

cover iio: adc: ad4695: move dt-bindings header

During review, no one caught that the dt-bindings header was not in the preferred location when the bindings were created. Move the header to the correct location.

---
David Lechner (2):
iio: adc: ad4695: move dt-bindings header
dt-bindings: iio: adc: adi,ad4695: change include path

 Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 7 ++++---
 Documentation/iio/ad4695.rst                              | 2 +-
 MAINTAINERS                                               | 2 +-
 drivers/iio/adc/ad4695.c                                  | 2 +-
 include/dt-bindings/iio/{ => adc}/adi,ad4695.h            | 0
 5 files changed, 7 insertions(+), 6 deletions(-)

---
base-commit: 9dd2270ca0b38ee16094817f4a53e7ba78e31567
change-id: 20241113-iio-adc-ad4695-move-dt-bindings-header-d6922ef7d134

Best regards,

Signature · 1 line
David Lechner <[email protected]>
author reviewer
#1 lore raw

PATCH 1/2 iio: adc: ad4695: move dt-bindings header

Move the dt-bindings header file to the include/dt-bindings/iio/adc/ directory. ad4695 is an ADC driver, so it should be in the adc/ subdirectory for better organization. Previously, it was in the iio/ subdirectory.

---
 Documentation/iio/ad4695.rst                   | 2 +-
 MAINTAINERS                                    | 2 +-
 drivers/iio/adc/ad4695.c                       | 2 +-
 include/dt-bindings/iio/{ => adc}/adi,ad4695.h | 0
 4 files changed, 3 insertions(+), 3 deletions(-)
Documentation/iio/ad4695.rst +1 -1
index 33ed29b7c98a..9ec8bf466c15 100644
@@ -101,7 +101,7 @@ The macro comes from:
 
 .. code-block::
 
-    #include <dt-bindings/iio/adi,ad4695.h>
+    #include <dt-bindings/iio/adc/adi,ad4695.h>
 
 Pairing two INx pins
 ^^^^^^^^^^^^^^^^^^^^
MAINTAINERS +1 -1
index e69d1632c382..3fd398d6e64f 100644
@@ -1268,7 +1268,7 @@ W:	https://ez.analog.com/linux-software-drivers
 F:	Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml
 F:	Documentation/iio/ad4695.rst
 F:	drivers/iio/adc/ad4695.c
-F:	include/dt-bindings/iio/adi,ad4695.h
+F:	include/dt-bindings/iio/adc/adi,ad4695.h
 
 ANALOG DEVICES INC AD7091R DRIVER
 M:	Marcelo Schmitt <[email protected]>
drivers/iio/adc/ad4695.c +1 -1
index 595ec4158e73..3c2c01289fda 100644
@@ -30,7 +30,7 @@
 #include <linux/spi/spi.h>
 #include <linux/units.h>
 
-#include <dt-bindings/iio/adi,ad4695.h>
+#include <dt-bindings/iio/adc/adi,ad4695.h>
 
 /* AD4695 registers */
 #define AD4695_REG_SPI_CONFIG_A				0x0000
include/dt-bindings/iio/adc/adi,ad4695.h renamed from include/dt-bindings/iio/adi,ad4695.h +0 -0
similarity index 100%
rename from include/dt-bindings/iio/adi,ad4695.h
rename to include/dt-bindings/iio/adc/adi,ad4695.h
Signature · 1 line
2.43.0
author reviewer
#2 lore raw

PATCH 2/2 dt-bindings: iio: adc: adi,ad4695: change include path

In reply to David Lechner

Change the include path for the adi,ad4695.h header since it has been moved to the include/dt-bindings/iio/adc/ directory.

---
 Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml +4 -3
index 310f046e139f..7d2229dee444 100644
@@ -134,8 +134,9 @@ patternProperties:
         description:
           Describes the common mode channel for single channels. 0xFF is REFGND
           and OxFE is COM. Macros are available for these values in
-          dt-bindings/iio/adi,ad4695.h. Values 1 to 15 correspond to INx inputs.
-          Only odd numbered INx inputs can be used as common mode channels.
+          dt-bindings/iio/adc/adi,ad4695.h. Values 1 to 15 correspond to INx
+          inputs. Only odd numbered INx inputs can be used as common mode
+          channels.
         enum: [1, 3, 5, 7, 9, 11, 13, 15, 0xFE, 0xFF]
         default: 0xFF
 
@@ -209,7 +210,7 @@ unevaluatedProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
-    #include <dt-bindings/iio/adi,ad4695.h>
+    #include <dt-bindings/iio/adc/adi,ad4695.h>
 
     spi {
         #address-cells = <1>;
Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH 2/2] dt-bindings: iio: adc: adi,ad4695: change include path

Quoted 8 lines · David Lechner

Change the include path for the adi,ad4695.h header since it has been moved to the include/dt-bindings/iio/adc/ directory.

---
 Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/iio/adc/adi,ad4695.example.dts:19:18: fatal error: dt-bindings/iio/adc/adi,ad4695.h: No such file or directory
19 | #include <dt-bindings/iio/adc/adi,ad4695.h>

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.
make[2]: *** [scripts/Makefile.dtbs:129: Documentation/devicetree/bindings/iio/adc/adi,ad4695.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1442: dt_binding_check] Error 2
make: *** [Makefile:224: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241113-iio-adc-ad4695-move-dt-bindings-header-v1-2-aba1f0f9b628@baylibre.com

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

author reviewer
#4 lore raw

Re: [PATCH 2/2] dt-bindings: iio: adc: adi,ad4695: change include path

Quoted 11 lines · Rob Herring (Arm)
Quoted 8 lines · David Lechner

Change the include path for the adi,ad4695.h header since it has been moved to the include/dt-bindings/iio/adc/ directory.

---
 Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Quoted 8 lines

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/iio/adc/adi,ad4695.example.dts:19:18: fatal error: dt-bindings/iio/adc/adi,ad4695.h: No such file or directory
19 | #include <dt-bindings/iio/adc/adi,ad4695.h>

      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Is this testing this patch without the other patch from this series?

I did run make dt_binding_check DT_SCHEMA_FILES=adi,ad4695.yaml ... locally before sending the patch, so wasn't expecting an error here.

I know that normally we should be including the header change in the same patch as the .yaml file, but in this case, I had to make an exception because the same header is also included in a .c file. It seemed better to not break compiling .c files rather than follow the rule strictly.

maintainer Reviewed-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] dt-bindings: iio: adc: adi,ad4695: change include path

In reply to David Lechner
Quoted 8 lines · David Lechner

Change the include path for the adi,ad4695.h header since it has been moved to the include/dt-bindings/iio/adc/ directory.

---
 Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
maintainer Applied
#6 lore raw
In reply to David Lechner
Quoted 4 lines · On Wed, 13 Nov 2024 10:55:18 -0600 David Lechner <[email protected]> wrote:

During review, no one caught that the dt-bindings header was not in the preferred location when the bindings were created. Move the header to the correct location.

Applied to the togreg branch of iio.git which will get rebased on rc1 when available .

Thanks,

Jonathan

Quoted 16 lines

---
David Lechner (2):
iio: adc: ad4695: move dt-bindings header
dt-bindings: iio: adc: adi,ad4695: change include path

 Documentation/devicetree/bindings/iio/adc/adi,ad4695.yaml | 7 ++++---
 Documentation/iio/ad4695.rst                              | 2 +-
 MAINTAINERS                                               | 2 +-
 drivers/iio/adc/ad4695.c                                  | 2 +-
 include/dt-bindings/iio/{ => adc}/adi,ad4695.h            | 0
 5 files changed, 7 insertions(+), 6 deletions(-)

---
base-commit: 9dd2270ca0b38ee16094817f4a53e7ba78e31567
change-id: 20241113-iio-adc-ad4695-move-dt-bindings-header-d6922ef7d134

Best regards,