All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry for AD5337
@ 2022-11-30 18:26 Fabio Estevam
  2022-11-30 18:26 ` [PATCH 2/2] iio: dac: ad5686: Add support " Fabio Estevam
  2022-12-01 10:39 ` [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry " Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2022-11-30 18:26 UTC (permalink / raw)
  To: jic23
  Cc: lars, robh+dt, krzysztof.kozlowski+dt, linux-iio, devicetree,
	Fabio Estevam

AD5337 belongs to the same family as the AD5338.

The difference is that the AD5337 has 8-bit resolution instead of 10-bit.

Add a compatible entry for AD5337.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
index 13f214234b8e..b4400c52bec3 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
@@ -33,6 +33,7 @@ properties:
       - description: I2C devices
         enum:
           - adi,ad5311r
+          - adi,ad5337r
           - adi,ad5338r
           - adi,ad5671r
           - adi,ad5675r
-- 
2.25.1


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

* [PATCH 2/2] iio: dac: ad5686: Add support for AD5337
  2022-11-30 18:26 [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry for AD5337 Fabio Estevam
@ 2022-11-30 18:26 ` Fabio Estevam
  2022-12-01 10:39 ` [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry " Krzysztof Kozlowski
  1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2022-11-30 18:26 UTC (permalink / raw)
  To: jic23
  Cc: lars, robh+dt, krzysztof.kozlowski+dt, linux-iio, devicetree,
	Fabio Estevam

AD5337 belongs to the same family as the AD5338.

The difference is that the AD5337 has 8-bit precision instead of 10-bit.

Add support for the AD5337 chip in the driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/iio/dac/Kconfig      | 8 ++++----
 drivers/iio/dac/ad5686.c     | 7 +++++++
 drivers/iio/dac/ad5686.h     | 1 +
 drivers/iio/dac/ad5696-i2c.c | 2 ++
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index 80521bd28d0f..e83eb75d87d1 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -162,10 +162,10 @@ config AD5696_I2C
 	depends on I2C
 	select AD5686
 	help
-	  Say yes here to build support for Analog Devices AD5311R, AD5338R,
-	  AD5671R, AD5673R, AD5675R, AD5677R, AD5691R, AD5692R, AD5693, AD5693R,
-	  AD5694, AD5694R, AD5695R, AD5696, and AD5696R Digital to Analog
-	  converters.
+	  Say yes here to build support for Analog Devices AD5311R, AD5337,
+	  AD5338R, AD5671R, AD5673R, AD5675R, AD5677R, AD5691R, AD5692R, AD5693,
+	  AD5693R, AD5694, AD5694R, AD5695R, AD5696, and AD5696R Digital to
+	  Analog converters.
 
 	  To compile this driver as a module, choose M here: the module will be
 	  called ad5696.
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
index 15361d8bbf94..57cc0f0eedc6 100644
--- a/drivers/iio/dac/ad5686.c
+++ b/drivers/iio/dac/ad5686.c
@@ -258,6 +258,7 @@ static const struct iio_chan_spec name[] = {			\
 
 DECLARE_AD5693_CHANNELS(ad5310r_channels, 10, 2);
 DECLARE_AD5693_CHANNELS(ad5311r_channels, 10, 6);
+DECLARE_AD5338_CHANNELS(ad5337r_channels, 8, 8);
 DECLARE_AD5338_CHANNELS(ad5338r_channels, 10, 6);
 DECLARE_AD5676_CHANNELS(ad5672_channels, 12, 4);
 DECLARE_AD5679_CHANNELS(ad5674r_channels, 12, 4);
@@ -283,6 +284,12 @@ static const struct ad5686_chip_info ad5686_chip_info_tbl[] = {
 		.num_channels = 1,
 		.regmap_type = AD5693_REGMAP,
 	},
+	[ID_AD5337R] = {
+		.channels = ad5337r_channels,
+		.int_vref_mv = 2500,
+		.num_channels = 2,
+		.regmap_type = AD5686_REGMAP,
+	},
 	[ID_AD5338R] = {
 		.channels = ad5338r_channels,
 		.int_vref_mv = 2500,
diff --git a/drivers/iio/dac/ad5686.h b/drivers/iio/dac/ad5686.h
index b7ade3a6b9b6..760f852911df 100644
--- a/drivers/iio/dac/ad5686.h
+++ b/drivers/iio/dac/ad5686.h
@@ -54,6 +54,7 @@
 enum ad5686_supported_device_ids {
 	ID_AD5310R,
 	ID_AD5311R,
+	ID_AD5337R,
 	ID_AD5338R,
 	ID_AD5671R,
 	ID_AD5672R,
diff --git a/drivers/iio/dac/ad5696-i2c.c b/drivers/iio/dac/ad5696-i2c.c
index 160e80cf9135..8a95f0278018 100644
--- a/drivers/iio/dac/ad5696-i2c.c
+++ b/drivers/iio/dac/ad5696-i2c.c
@@ -72,6 +72,7 @@ static void ad5686_i2c_remove(struct i2c_client *i2c)
 
 static const struct i2c_device_id ad5686_i2c_id[] = {
 	{"ad5311r", ID_AD5311R},
+	{"ad5337r", ID_AD5337R},
 	{"ad5338r", ID_AD5338R},
 	{"ad5671r", ID_AD5671R},
 	{"ad5673r", ID_AD5673R},
@@ -92,6 +93,7 @@ MODULE_DEVICE_TABLE(i2c, ad5686_i2c_id);
 
 static const struct of_device_id ad5686_of_match[] = {
 	{ .compatible = "adi,ad5311r" },
+	{ .compatible = "adi,ad5337r" },
 	{ .compatible = "adi,ad5338r" },
 	{ .compatible = "adi,ad5671r" },
 	{ .compatible = "adi,ad5675r" },
-- 
2.25.1


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

* Re: [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry for AD5337
  2022-11-30 18:26 [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry for AD5337 Fabio Estevam
  2022-11-30 18:26 ` [PATCH 2/2] iio: dac: ad5686: Add support " Fabio Estevam
@ 2022-12-01 10:39 ` Krzysztof Kozlowski
  2022-12-04 15:44   ` Jonathan Cameron
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-01 10:39 UTC (permalink / raw)
  To: Fabio Estevam, jic23
  Cc: lars, robh+dt, krzysztof.kozlowski+dt, linux-iio, devicetree

On 30/11/2022 19:26, Fabio Estevam wrote:
> AD5337 belongs to the same family as the AD5338.
> 
> The difference is that the AD5337 has 8-bit resolution instead of 10-bit.
> 
> Add a compatible entry for AD5337.
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry for AD5337
  2022-12-01 10:39 ` [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry " Krzysztof Kozlowski
@ 2022-12-04 15:44   ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2022-12-04 15:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Fabio Estevam, lars, robh+dt, krzysztof.kozlowski+dt, linux-iio,
	devicetree

On Thu, 1 Dec 2022 11:39:38 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 30/11/2022 19:26, Fabio Estevam wrote:
> > AD5337 belongs to the same family as the AD5338.
> > 
> > The difference is that the AD5337 has 8-bit resolution instead of 10-bit.
> > 
> > Add a compatible entry for AD5337.
> > 
> > Signed-off-by: Fabio Estevam <festevam@gmail.com>  
> 
> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Series applied. Note this is now 6.3 material unless we end up with an rc9 for
some reason (which is very unlikely).
Until I can rebase the tree on rc1 this will just be pushed out as testing
for 0-day etc to poke at.

Thanks,

Jonathan

> 
> Best regards,
> Krzysztof
> 


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

end of thread, other threads:[~2022-12-04 15:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 18:26 [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry for AD5337 Fabio Estevam
2022-11-30 18:26 ` [PATCH 2/2] iio: dac: ad5686: Add support " Fabio Estevam
2022-12-01 10:39 ` [PATCH 1/2] dt-bindings: iio: dac: ad5686: Add an entry " Krzysztof Kozlowski
2022-12-04 15:44   ` 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.