* Re: [PATCH v3] dt-bindings: iio: dac: Change the I2C slave address for ds4422/4424 to its correct value
2022-10-24 17:50 [PATCH v3] dt-bindings: iio: dac: Change the I2C slave address for ds4422/4424 to its correct value Rajat Khandelwal
@ 2022-10-23 23:23 ` Krzysztof Kozlowski
2022-10-29 12:25 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-23 23:23 UTC (permalink / raw)
To: Rajat Khandelwal, jic23, lars, robh+dt, krzysztof.kozlowski+dt,
ihkose
Cc: linux-iio, devicetree, linux-kernel, rajat.khandelwal
On 24/10/2022 13:50, 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.
>
> Signed-off-by: Rajat Khandelwal <rajat.khandelwal@linux.intel.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3] dt-bindings: iio: dac: Change the I2C slave address for ds4422/4424 to its correct value
@ 2022-10-24 17:50 Rajat Khandelwal
2022-10-23 23:23 ` Krzysztof Kozlowski
0 siblings, 1 reply; 3+ messages in thread
From: Rajat Khandelwal @ 2022-10-24 17:50 UTC (permalink / raw)
To: jic23, lars, robh+dt, krzysztof.kozlowski+dt, ihkose
Cc: linux-iio, devicetree, linux-kernel, rajat.khandelwal,
Rajat Khandelwal
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.
Signed-off-by: Rajat Khandelwal <rajat.khandelwal@linux.intel.com>
---
v3:
1. Subject prefix added
2. Improvised 'examples:'
Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
index 264fa7c5fe3a..e7c7c103d1dd 100644
--- a/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/maxim,ds4424.yaml
@@ -36,9 +36,9 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
- dac@10 {
+ dac@20 {
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] dt-bindings: iio: dac: Change the I2C slave address for ds4422/4424 to its correct value
2022-10-23 23:23 ` Krzysztof Kozlowski
@ 2022-10-29 12:25 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2022-10-29 12:25 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rajat Khandelwal, lars, robh+dt, krzysztof.kozlowski+dt, ihkose,
linux-iio, devicetree, linux-kernel, rajat.khandelwal
On Sun, 23 Oct 2022 19:23:09 -0400
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 24/10/2022 13:50, 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.
> >
> > Signed-off-by: Rajat Khandelwal <rajat.khandelwal@linux.intel.com>
> > ---
>
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
hmm. This is curious. So the datasheet indeed provides a table saying
grounding both pins sets the address to 0x20, however take a look at
Figure 2 which says the address is
A1 | A0 | 1 | 0 | 0 | 0 | 0
or 0x10 as per the example. My guess is someone forgot that i2c addresses
are 7 bits and the lowest bit of the first byte is used for R/W control.
So unless we have this verified on hardware (implying that the address table
is correct in this sense) I'm not keen to take this.
I doubt that is the case given it has 8 bit addresses (0xe0) and i2c addresses
are 7 bits.
Jonathan
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-29 12:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 17:50 [PATCH v3] dt-bindings: iio: dac: Change the I2C slave address for ds4422/4424 to its correct value Rajat Khandelwal
2022-10-23 23:23 ` Krzysztof Kozlowski
2022-10-29 12:25 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).