[linux-yocto] [PATCH 3/5] iio: adc: ti-ads1015: add datasheet names

tuomas.katila at intel.com tuomas.katila at intel.com
Mon Dec 12 05:58:16 PST 2016


From: Matt Ranostay <matt.ranostay at intel.com>

Backported from linux-yocto-4.8: 8ac8aa61f87eda944cf29229c9c20cba9e83f1ea

Add datasheet names for ADC channels to allow iio consumers access.

Signed-off-by: Matt Ranostay <matt.ranostay at intel.com>
Acked-by: Daniel Baluta <daniel.baluta at intel.com>
Signed-off-by: Jonathan Cameron <jic23 at kernel.org>
---
 drivers/iio/adc/ti-ads1015.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c
index a83542319d28..8be192a84893 100644
--- a/drivers/iio/adc/ti-ads1015.c
+++ b/drivers/iio/adc/ti-ads1015.c
@@ -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 {
-- 
2.11.0

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the linux-yocto mailing list