Skip to contentSkip to conversation

IIO: DAC: Add support for the AD5543/AD5553

PATCH In review [email protected] 2 participants 2 messages Feb 14, 2011 – Feb 22, 2011

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 IIO: DAC: Add support for the AD5543/AD5553

From: Michael Hennerich <[email protected]>

Add support for the AD5543/AD5553 SPI 16-/14-Bit DACs Fix typo in kconfig description

---
 drivers/staging/iio/dac/Kconfig  |    6 +++---
 drivers/staging/iio/dac/ad5446.c |   12 ++++++++++++
 drivers/staging/iio/dac/ad5446.h |    2 ++
 3 files changed, 17 insertions(+), 3 deletions(-)
drivers/staging/iio/dac/Kconfig +3 -3
index 2120904..64e6730 100644
@@ -11,11 +11,11 @@ config AD5624R_SPI
 	  AD5664R convertors (DAC). This driver uses the common SPI interface.
 
 config AD5446
-	tristate "Analog Devices AD5444/6, AD5620/40/60 and AD5541A/12A DAC SPI driver"
+	tristate "Analog Devices AD5444/6, AD5620/40/60 and AD5542A/12A DAC SPI driver"
 	depends on SPI
 	help
-	  Say yes here to build support for Analog Devices AD5444, AD5446,
-	  AD5620, AD5640, AD5660 and AD5541A, AD5512A DACs.
+	  Say yes here to build support for Analog Devices AD5444, AD5446, AD5543,
+	  AD5553, AD5620, AD5640, AD5660 and AD5542A, AD5512A DACs.
 
 	  To compile this driver as a module, choose M here: the
 	  module will be called ad5446.
drivers/staging/iio/dac/ad5446.c +12 -0
index 0f87eca..dcec297 100644
@@ -132,12 +132,24 @@ static const struct ad5446_chip_info ad5446_chip_info_tbl[] = {
 		.left_shift = 0,
 		.store_sample = ad5542_store_sample,
 	},
+	[ID_AD5543] = {
+		.bits = 16,
+		.storagebits = 16,
+		.left_shift = 0,
+		.store_sample = ad5542_store_sample,
+	},
 	[ID_AD5512A] = {
 		.bits = 12,
 		.storagebits = 16,
 		.left_shift = 4,
 		.store_sample = ad5542_store_sample,
 	},
+	[ID_AD5553] = {
+		.bits = 14,
+		.storagebits = 16,
+		.left_shift = 0,
+		.store_sample = ad5542_store_sample,
+	},
 	[ID_AD5620_2500] = {
 		.bits = 12,
 		.storagebits = 16,
drivers/staging/iio/dac/ad5446.h +2 -0
index 902542e..0cb9c14 100644
@@ -84,7 +84,9 @@ enum ad5446_supported_device_ids {
 	ID_AD5444,
 	ID_AD5446,
 	ID_AD5542A,
+	ID_AD5543,
 	ID_AD5512A,
+	ID_AD5553,
 	ID_AD5620_2500,
 	ID_AD5620_1250,
 	ID_AD5640_2500,
Signature · 1 line
1.6.0.2
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · On 02/14/11 14:46, [email protected] wrote:

From: Michael Hennerich <[email protected]>

Add support for the AD5543/AD5553 SPI 16-/14-Bit DACs Fix typo in kconfig description

Now this is the sort of patch I like to see for adding new devices support :) Couple of trivial questions about ordering of device names inline.

Quoted 2 lines
Quoted 11 lines
---
 drivers/staging/iio/dac/Kconfig  |    6 +++---
 drivers/staging/iio/dac/ad5446.c |   12 ++++++++++++
 drivers/staging/iio/dac/ad5446.h |    2 ++
 3 files changed, 17 insertions(+), 3 deletions(-)
drivers/staging/iio/dac/Kconfig +0 -0
index 2120904..64e6730 100644

drivers/staging/iio/dac/Kconfig config AD5624R_SPI · line 14

Quoted 5 lines
drivers/staging/iio/dac/Kconfig +1 -1
@@ -11,11 +11,11 @@ config AD5624R_SPI
 	  AD5664R convertors (DAC). This driver uses the common SPI interface.
 
 config AD5446
-	tristate "Analog Devices AD5444/6, AD5620/40/60 and AD5541A/12A DAC SPI driver"
+	tristate "Analog Devices AD5444/6, AD5620/40/60 and AD5542A/12A DAC SPI driver"

Do you want the new devices in this description? It's getting a bit long anyway so I can see why you might not want them there!

drivers/staging/iio/dac/Kconfig config AD5624R_SPI · line 18

Quoted 6 lines
drivers/staging/iio/dac/Kconfig +2 -2
 	depends on SPI
 	help
-	  Say yes here to build support for Analog Devices AD5444, AD5446,
-	  AD5620, AD5640, AD5660 and AD5541A, AD5512A DACs.
+	  Say yes here to build support for Analog Devices AD5444, AD5446, AD5543,
+	  AD5553, AD5620, AD5640, AD5660 and AD5542A, AD5512A DACs.

Why this ordering?

Quoted 37 lines
drivers/staging/iio/dac/Kconfig +0 -0
 	  To compile this driver as a module, choose M here: the
 	  module will be called ad5446.
drivers/staging/iio/dac/ad5446.c +12 -0
index 0f87eca..dcec297 100644
@@ -132,12 +132,24 @@ static const struct ad5446_chip_info ad5446_chip_info_tbl[] = {
 		.left_shift = 0,
 		.store_sample = ad5542_store_sample,
 	},
+	[ID_AD5543] = {
+		.bits = 16,
+		.storagebits = 16,
+		.left_shift = 0,
+		.store_sample = ad5542_store_sample,
+	},
 	[ID_AD5512A] = {
 		.bits = 12,
 		.storagebits = 16,
 		.left_shift = 4,
 		.store_sample = ad5542_store_sample,
 	},
+	[ID_AD5553] = {
+		.bits = 14,
+		.storagebits = 16,
+		.left_shift = 0,
+		.store_sample = ad5542_store_sample,
+	},
 	[ID_AD5620_2500] = {
 		.bits = 12,
 		.storagebits = 16,
drivers/staging/iio/dac/ad5446.h +0 -0
index 902542e..0cb9c14 100644

drivers/staging/iio/dac/ad5446.h enum ad5446_supported_device_ids { · line 88

Quoted 5 lines
drivers/staging/iio/dac/ad5446.h +1 -0
@@ -84,7 +84,9 @@ enum ad5446_supported_device_ids {
 	ID_AD5444,
 	ID_AD5446,
 	ID_AD5542A,
+	ID_AD5543,
 	ID_AD5512A,

This does seem like a slightly random order. Care to explain why it is like this? (applies to the avoid use of these as well)

Quoted 4 lines
drivers/staging/iio/dac/ad5446.h +1 -0
+	ID_AD5553,
 	ID_AD5620_2500,
 	ID_AD5620_1250,
 	ID_AD5640_2500,