diff mbox series

[v2] iio: dac: ad3552r: Correct device IDs

Message ID 011f480220799fbfabdd53896f8a2f251ad995ad.1691091324.git.marcelo.schmitt1@gmail.com (mailing list archive)
State Accepted
Headers show
Series [v2] iio: dac: ad3552r: Correct device IDs | expand

Commit Message

Marcelo Schmitt Aug. 3, 2023, 7:56 p.m. UTC
Device IDs for AD3542R and AD3552R were swapped leading to unintended
collection of DAC output ranges being used for each design.
Change device ID values so they are correct for each DAC chip.

Fixes: 8f2b54824b28 ("drivers:iio:dac: Add AD3552R driver support")
Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Reported-by: Chandrakant Minajigi <Chandrakant.Minajigi@analog.com>
---
A user has reported that the IDs were wrong and the output ranges were not ok.
Also, the dt-doc and the driver require the adi,output-range-microvolt property
for ad3542r but not for ad3552r, which could cause actual ad3552r probing to
fail if the device node did not have that property.
It's not clear from datasheet if setting the output range is really required for
ad3542r.

Was once better at sending patches. Hope I get used to it again :)

Thanks

 drivers/iio/dac/ad3552r.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jonathan Cameron Aug. 5, 2023, 6:01 p.m. UTC | #1
On Thu, 3 Aug 2023 16:56:23 -0300
Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote:

> Device IDs for AD3542R and AD3552R were swapped leading to unintended
> collection of DAC output ranges being used for each design.
> Change device ID values so they are correct for each DAC chip.
> 
> Fixes: 8f2b54824b28 ("drivers:iio:dac: Add AD3552R driver support")
> Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
> Reported-by: Chandrakant Minajigi <Chandrakant.Minajigi@analog.com>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan

> ---
> A user has reported that the IDs were wrong and the output ranges were not ok.
> Also, the dt-doc and the driver require the adi,output-range-microvolt property
> for ad3542r but not for ad3552r, which could cause actual ad3552r probing to
> fail if the device node did not have that property.
> It's not clear from datasheet if setting the output range is really required for
> ad3542r.
> 
> Was once better at sending patches. Hope I get used to it again :)
> 
> Thanks
> 
>  drivers/iio/dac/ad3552r.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/dac/ad3552r.c b/drivers/iio/dac/ad3552r.c
> index d5ea1a1be122..a492e8f2fc0f 100644
> --- a/drivers/iio/dac/ad3552r.c
> +++ b/drivers/iio/dac/ad3552r.c
> @@ -140,8 +140,8 @@ enum ad3552r_ch_vref_select {
>  };
>  
>  enum ad3542r_id {
> -	AD3542R_ID = 0x4008,
> -	AD3552R_ID = 0x4009,
> +	AD3542R_ID = 0x4009,
> +	AD3552R_ID = 0x4008,
>  };
>  
>  enum ad3552r_ch_output_range {
diff mbox series

Patch

diff --git a/drivers/iio/dac/ad3552r.c b/drivers/iio/dac/ad3552r.c
index d5ea1a1be122..a492e8f2fc0f 100644
--- a/drivers/iio/dac/ad3552r.c
+++ b/drivers/iio/dac/ad3552r.c
@@ -140,8 +140,8 @@  enum ad3552r_ch_vref_select {
 };
 
 enum ad3542r_id {
-	AD3542R_ID = 0x4008,
-	AD3552R_ID = 0x4009,
+	AD3542R_ID = 0x4009,
+	AD3552R_ID = 0x4008,
 };
 
 enum ad3552r_ch_output_range {