Skip to contentSkip to conversation

iio: adc: ad7476: Add LTC2314-14 support

PATCH Superseded Mircea Caprioru 2 participants 2 messages Dec 16, 2020

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iio: adc: ad7476: Add LTC2314-14 support

From: Dragos Bogdan <[email protected]>

The LTC2314-14 is a 14-bit, 4.5Msps, serial sampling A/D converter that draws only 6.2mA from a wide range analog supply adjustable from 2.7V to 5.25V.

---
Changelog v2
- fix conflict with ADS7868 device in chip_info_tbl

 drivers/iio/adc/ad7476.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/iio/adc/ad7476.c +5 -0
index 66c55ae67791..6bb4711b0f61 100644
@@ -67,6 +67,7 @@ enum ad7476_supported_device_ids {
 	ID_ADS7866,
 	ID_ADS7867,
 	ID_ADS7868,
+	ID_LTC2314_14,
 };
 
 static void ad7091_convst(struct ad7476_state *st)
@@ -249,6 +250,9 @@ static const struct ad7476_chip_info ad7476_chip_info_tbl[] = {
 	[ID_ADS7868] = {
 		.channel[0] = ADS786X_CHAN(8),
 		.channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),
+	[ID_LTC2314_14] = {
+		.channel[0] = AD7940_CHAN(14),
+		.channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),
 	},
 };
 
@@ -365,6 +369,7 @@ static const struct spi_device_id ad7476_id[] = {
 	{"ads7866", ID_ADS7866},
 	{"ads7867", ID_ADS7867},
 	{"ads7868", ID_ADS7868},
+	{"ltc2314-14", ID_LTC2314_14},
 	{}
 };
 MODULE_DEVICE_TABLE(spi, ad7476_id);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 7 lines · Mircea Caprioru

[...]
Changelog v2
- fix conflict with ADS7868 device in chip_info_tbl [...]
[ID_ADS7868] = {
.channel[0] = ADS786X_CHAN(8), .channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),

Hi Mircea,

I think this is still missing a } here

Quoted 5 lines
drivers/iio/adc/ad7476.c +3 -0
+	[ID_LTC2314_14] = {
+		.channel[0] = AD7940_CHAN(14),
+		.channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),
  	},
  };