iio: adc: ti-ads1015: add datasheet names
authorMatt Ranostay <matt.ranostay@intel.com>
Tue, 17 May 2016 22:02:03 +0000 (15:02 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sat, 28 May 2016 17:20:45 +0000 (18:20 +0100)
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>
drivers/iio/adc/ti-ads1015.c

index a83542319d280f4545adda674f78474a3f5f9e2e..8be192a848934b38d435af864b380540284b1432 100644 (file)
@@ -110,6 +110,7 @@ static const struct {
                .shift = 4,                                     \
                .endianness = IIO_CPU,                          \
        },                                                      \
+       .datasheet_name = "AIN"#_chan,                          \
 }
 
 #define ADS1015_V_DIFF_CHAN(_chan, _chan2, _addr) {            \
@@ -130,6 +131,7 @@ static const struct {
                .shift = 4,                                     \
                .endianness = IIO_CPU,                          \
        },                                                      \
+       .datasheet_name = "AIN"#_chan"-AIN"#_chan2,             \
 }
 
 #define ADS1115_V_CHAN(_chan, _addr) {                         \
@@ -147,6 +149,7 @@ static const struct {
                .storagebits = 16,                              \
                .endianness = IIO_CPU,                          \
        },                                                      \
+       .datasheet_name = "AIN"#_chan,                          \
 }
 
 #define ADS1115_V_DIFF_CHAN(_chan, _chan2, _addr) {            \
@@ -166,6 +169,7 @@ static const struct {
                .storagebits = 16,                              \
                .endianness = IIO_CPU,                          \
        },                                                      \
+       .datasheet_name = "AIN"#_chan"-AIN"#_chan2,             \
 }
 
 struct ads1015_data {