Skip to content

Commit

Permalink
iio: adc: ti-ads1015: add datasheet names
Browse files Browse the repository at this point in the history
Add datasheet names for ADC channels to allow iio consumers access.

Signed-off-by: Matt Ranostay <matt.ranostay@intel.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Matt Ranostay authored and Jonathan Cameron committed May 28, 2016
1 parent 5291582 commit 8ac8aa6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/iio/adc/ti-ads1015.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ static const struct {
.shift = 4, \
.endianness = IIO_CPU, \
}, \
.datasheet_name = "AIN"#_chan, \
}

#define ADS1015_V_DIFF_CHAN(_chan, _chan2, _addr) { \
Expand All @@ -130,6 +131,7 @@ static const struct {
.shift = 4, \
.endianness = IIO_CPU, \
}, \
.datasheet_name = "AIN"#_chan"-AIN"#_chan2, \
}

#define ADS1115_V_CHAN(_chan, _addr) { \
Expand All @@ -147,6 +149,7 @@ static const struct {
.storagebits = 16, \
.endianness = IIO_CPU, \
}, \
.datasheet_name = "AIN"#_chan, \
}

#define ADS1115_V_DIFF_CHAN(_chan, _chan2, _addr) { \
Expand All @@ -166,6 +169,7 @@ static const struct {
.storagebits = 16, \
.endianness = IIO_CPU, \
}, \
.datasheet_name = "AIN"#_chan"-AIN"#_chan2, \
}

struct ads1015_data {
Expand Down

0 comments on commit 8ac8aa6

Please sign in to comment.