2022-10-10 18:36:33

by Rajat Khandelwal

[permalink] [raw]
Subject: [PATCH] Change the I2C slave address for ds4422/4424 to its correct value

The datasheet states that the slave address for the device is 0x20
when the pins A0 and A1 are ground. The DT binding has been using
0x10 as the value and I think it should be 0x20 as per datasheet.

Let me know if I am wrong about this.

Signed-off-by: Rajat Khandelwal <[email protected]>
---
Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
index 264fa7c5fe3a..1955b1a97cd6 100644
--- a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
@@ -38,7 +38,7 @@ examples:

dac@10 {
compatible = "maxim,ds4424";
- reg = <0x10>; /* When A0, A1 pins are ground */
+ reg = <0x20>; /* When A0, A1 pins are ground */
vcc-supply = <&vcc_3v3>;
};
};
--
2.34.1


2022-10-10 18:49:02

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] Change the I2C slave address for ds4422/4424 to its correct value

On 11/10/2022 14:24, Rajat Khandelwal wrote:
> The datasheet states that the slave address for the device is 0x20
> when the pins A0 and A1 are ground. The DT binding has been using
> 0x10 as the value and I think it should be 0x20 as per datasheet.

Use subject prefixes matching the subsystem (git log --oneline -- ...).


>
> Let me know if I am wrong about this.

This does not belong to the commit msg.

>
> Signed-off-by: Rajat Khandelwal <[email protected]>
> ---
> Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> index 264fa7c5fe3a..1955b1a97cd6 100644
> --- a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> +++ b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> @@ -38,7 +38,7 @@ examples:
>
> dac@10 {
> compatible = "maxim,ds4424";
> - reg = <0x10>; /* When A0, A1 pins are ground */
> + reg = <0x20>; /* When A0, A1 pins are ground */

Does not look like you tested the bindings. Please run `make
dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

> vcc-supply = <&vcc_3v3>;
> };
> };

Best regards,
Krzysztof

2022-10-11 02:03:23

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH] Change the I2C slave address for ds4422/4424 to its correct value

On Tue, 11 Oct 2022 23:54:37 +0530, Rajat Khandelwal wrote:
> The datasheet states that the slave address for the device is 0x20
> when the pins A0 and A1 are ground. The DT binding has been using
> 0x10 as the value and I think it should be 0x20 as per datasheet.
>
> Let me know if I am wrong about this.
>
> Signed-off-by: Rajat Khandelwal <[email protected]>
> ---
> Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

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:
Documentation/devicetree/bindings/iio/dac/maxim,ds4424.example.dts:22.20-26.15: Warning (i2c_bus_reg): /example-0/i2c/dac@10: I2C bus unit address format error, expected "20"

doc reference errors (make refcheckdocs):

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

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.

2022-10-11 07:53:23

by Rajat Khandelwal

[permalink] [raw]
Subject: RE: [PATCH] Change the I2C slave address for ds4422/4424 to its correct value

Hi,
I don't know how I missed subject prefixes, sorry for that.
Upstreaming patches for dt is something new for me so was
skeptical on dt validation. However, I have run it now and it
passes for me.

Have sent a v2 for you to review.

Thanks

-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, October 11, 2022 12:08 AM
To: Rajat Khandelwal <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; Khandelwal, Rajat <[email protected]>
Subject: Re: [PATCH] Change the I2C slave address for ds4422/4424 to its correct value

On 11/10/2022 14:24, Rajat Khandelwal wrote:
> The datasheet states that the slave address for the device is 0x20
> when the pins A0 and A1 are ground. The DT binding has been using
> 0x10 as the value and I think it should be 0x20 as per datasheet.

Use subject prefixes matching the subsystem (git log --oneline -- ...).


>
> Let me know if I am wrong about this.

This does not belong to the commit msg.

>
> Signed-off-by: Rajat Khandelwal <[email protected]>
> ---
> Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git
> a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> index 264fa7c5fe3a..1955b1a97cd6 100644
> --- a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> +++ b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
> @@ -38,7 +38,7 @@ examples:
>
> dac@10 {
> compatible = "maxim,ds4424";
> - reg = <0x10>; /* When A0, A1 pins are ground */
> + reg = <0x20>; /* When A0, A1 pins are ground */

Does not look like you tested the bindings. Please run `make dt_binding_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions).

> vcc-supply = <&vcc_3v3>;
> };
> };

Best regards,
Krzysztof