Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] iio: dac: ad5446: Add support for new AD5600 DAC
@ 2019-11-06  9:47 Alexandru Ardelean
  2019-11-10 15:15 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Ardelean @ 2019-11-06  9:47 UTC (permalink / raw)
  To: linux-iio, linux-kernel; +Cc: jic23, Stefan Popa, Alexandru Ardelean

From: Stefan Popa <stefan.popa@analog.com>

The AD5600 is a single channel, 16-bit resolution, voltage output digital
to analog converter (DAC). The AD5600 uses a 3-wire SPI interface. It is
part of the AD5541 family of DACs.

The ad5446 IIO driver implements support for some of these DACs (in the
AD5441 family), so the change is a simple entry in this driver.

Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD5600.pdf

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 drivers/iio/dac/Kconfig  | 4 ++--
 drivers/iio/dac/ad5446.c | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
index cc42219a64f7..979070196da9 100644
--- a/drivers/iio/dac/Kconfig
+++ b/drivers/iio/dac/Kconfig
@@ -60,8 +60,8 @@ config AD5446
 	help
 	  Say yes here to build support for Analog Devices AD5300, AD5301, AD5310,
 	  AD5311, AD5320, AD5321, AD5444, AD5446, AD5450, AD5451, AD5452, AD5453,
-	  AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5601, AD5602, AD5611, AD5612,
-	  AD5620, AD5621, AD5622, AD5640, AD5641, AD5660, AD5662 DACs
+	  AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5600, AD5601, AD5602, AD5611,
+	  AD5612, AD5620, AD5621, AD5622, AD5640, AD5641, AD5660, AD5662 DACs
 	  as well as Texas Instruments DAC081S101, DAC101S101, DAC121S101.
 
 	  To compile this driver as a module, choose M here: the
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
index 7df8b4cc295d..61c670f7fc5f 100644
--- a/drivers/iio/dac/ad5446.c
+++ b/drivers/iio/dac/ad5446.c
@@ -327,6 +327,7 @@ enum ad5446_supported_spi_device_ids {
 	ID_AD5541A,
 	ID_AD5512A,
 	ID_AD5553,
+	ID_AD5600,
 	ID_AD5601,
 	ID_AD5611,
 	ID_AD5621,
@@ -381,6 +382,10 @@ static const struct ad5446_chip_info ad5446_spi_chip_info[] = {
 		.channel = AD5446_CHANNEL(14, 16, 0),
 		.write = ad5446_write,
 	},
+	[ID_AD5600] = {
+		.channel = AD5446_CHANNEL(16, 16, 0),
+		.write = ad5446_write,
+	},
 	[ID_AD5601] = {
 		.channel = AD5446_CHANNEL_POWERDOWN(8, 16, 6),
 		.write = ad5446_write,
@@ -448,6 +453,7 @@ static const struct spi_device_id ad5446_spi_ids[] = {
 	{"ad5542a", ID_AD5541A}, /* ad5541a and ad5542a are compatible */
 	{"ad5543", ID_AD5541A}, /* ad5541a and ad5543 are compatible */
 	{"ad5553", ID_AD5553},
+	{"ad5600", ID_AD5600},
 	{"ad5601", ID_AD5601},
 	{"ad5611", ID_AD5611},
 	{"ad5621", ID_AD5621},
-- 
2.20.1


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

* Re: [PATCH] iio: dac: ad5446: Add support for new AD5600 DAC
  2019-11-06  9:47 [PATCH] iio: dac: ad5446: Add support for new AD5600 DAC Alexandru Ardelean
@ 2019-11-10 15:15 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2019-11-10 15:15 UTC (permalink / raw)
  To: Alexandru Ardelean; +Cc: linux-iio, linux-kernel, Stefan Popa

On Wed, 6 Nov 2019 11:47:21 +0200
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> From: Stefan Popa <stefan.popa@analog.com>
> 
> The AD5600 is a single channel, 16-bit resolution, voltage output digital
> to analog converter (DAC). The AD5600 uses a 3-wire SPI interface. It is
> part of the AD5541 family of DACs.
> 
> The ad5446 IIO driver implements support for some of these DACs (in the
> AD5441 family), so the change is a simple entry in this driver.
> 
> Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD5600.pdf
> 
> Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Applied to the togreg branch of iio.git and pushed out as testing

Thanks,

Jonathan

> ---
>  drivers/iio/dac/Kconfig  | 4 ++--
>  drivers/iio/dac/ad5446.c | 6 ++++++
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig
> index cc42219a64f7..979070196da9 100644
> --- a/drivers/iio/dac/Kconfig
> +++ b/drivers/iio/dac/Kconfig
> @@ -60,8 +60,8 @@ config AD5446
>  	help
>  	  Say yes here to build support for Analog Devices AD5300, AD5301, AD5310,
>  	  AD5311, AD5320, AD5321, AD5444, AD5446, AD5450, AD5451, AD5452, AD5453,
> -	  AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5601, AD5602, AD5611, AD5612,
> -	  AD5620, AD5621, AD5622, AD5640, AD5641, AD5660, AD5662 DACs
> +	  AD5512A, AD5541A, AD5542A, AD5543, AD5553, AD5600, AD5601, AD5602, AD5611,
> +	  AD5612, AD5620, AD5621, AD5622, AD5640, AD5641, AD5660, AD5662 DACs
>  	  as well as Texas Instruments DAC081S101, DAC101S101, DAC121S101.
>  
>  	  To compile this driver as a module, choose M here: the
> diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
> index 7df8b4cc295d..61c670f7fc5f 100644
> --- a/drivers/iio/dac/ad5446.c
> +++ b/drivers/iio/dac/ad5446.c
> @@ -327,6 +327,7 @@ enum ad5446_supported_spi_device_ids {
>  	ID_AD5541A,
>  	ID_AD5512A,
>  	ID_AD5553,
> +	ID_AD5600,
>  	ID_AD5601,
>  	ID_AD5611,
>  	ID_AD5621,
> @@ -381,6 +382,10 @@ static const struct ad5446_chip_info ad5446_spi_chip_info[] = {
>  		.channel = AD5446_CHANNEL(14, 16, 0),
>  		.write = ad5446_write,
>  	},
> +	[ID_AD5600] = {
> +		.channel = AD5446_CHANNEL(16, 16, 0),
> +		.write = ad5446_write,
> +	},
>  	[ID_AD5601] = {
>  		.channel = AD5446_CHANNEL_POWERDOWN(8, 16, 6),
>  		.write = ad5446_write,
> @@ -448,6 +453,7 @@ static const struct spi_device_id ad5446_spi_ids[] = {
>  	{"ad5542a", ID_AD5541A}, /* ad5541a and ad5542a are compatible */
>  	{"ad5543", ID_AD5541A}, /* ad5541a and ad5543 are compatible */
>  	{"ad5553", ID_AD5553},
> +	{"ad5600", ID_AD5600},
>  	{"ad5601", ID_AD5601},
>  	{"ad5611", ID_AD5611},
>  	{"ad5621", ID_AD5621},


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  9:47 [PATCH] iio: dac: ad5446: Add support for new AD5600 DAC Alexandru Ardelean
2019-11-10 15:15 ` Jonathan Cameron

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git