Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325360
b: refs/heads/master
c: c26cc89
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Sep 15, 2012
1 parent b5db2bb commit f3f1ab5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c337de870d9bd1459ab603574256bb0e7644ad6
refs/heads/master: c26cc89e8d758804499dcaa58ba7d2a993b954fe
6 changes: 3 additions & 3 deletions trunk/drivers/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ config AD7476
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help
Say yes here to build support for Analog Devices AD7475, AD7476, AD7477,
AD7478, AD7466, AD7467, AD7468, AD7495, AD7910, AD7920, AD7920 SPI analog
to digital converters (ADC).
Say yes here to build support for Analog Devices AD7273, AD7274, AD7276,
AD7277, AD7278, AD7475, AD7476, AD7477, AD7478, AD7466, AD7467, AD7468,
AD7495, AD7910, AD7920, AD7920 SPI analog to digital converters (ADC).

If unsure, say N (but it's safe to say "Y").

Expand Down
20 changes: 20 additions & 0 deletions trunk/drivers/iio/adc/ad7476.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ struct ad7476_state {
};

enum ad7476_supported_device_ids {
ID_AD7276,
ID_AD7277,
ID_AD7278,
ID_AD7466,
ID_AD7467,
ID_AD7468,
Expand Down Expand Up @@ -146,6 +149,18 @@ static int ad7476_read_raw(struct iio_dev *indio_dev,
#define AD7940_CHAN(bits) _AD7476_CHAN((bits), 15 - (bits))

static const struct ad7476_chip_info ad7476_chip_info_tbl[] = {
[ID_AD7276] = {
.channel[0] = AD7940_CHAN(12),
.channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),
},
[ID_AD7277] = {
.channel[0] = AD7940_CHAN(10),
.channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),
},
[ID_AD7278] = {
.channel[0] = AD7940_CHAN(8),
.channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),
},
[ID_AD7466] = {
.channel[0] = AD7476_CHAN(12),
.channel[1] = IIO_CHAN_SOFT_TIMESTAMP(1),
Expand Down Expand Up @@ -256,6 +271,11 @@ static int __devexit ad7476_remove(struct spi_device *spi)
}

static const struct spi_device_id ad7476_id[] = {
{"ad7273", ID_AD7277},
{"ad7274", ID_AD7276},
{"ad7276", ID_AD7276},
{"ad7277", ID_AD7277},
{"ad7278", ID_AD7278},
{"ad7466", ID_AD7466},
{"ad7467", ID_AD7467},
{"ad7468", ID_AD7468},
Expand Down

0 comments on commit f3f1ab5

Please sign in to comment.