aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-08-28 17:59:53 -0400
committerJonathan Cameron <jic23@kernel.org>2015-10-11 10:39:37 -0400
commit862a76acb2a033b886880fc70db19f00a036b4aa (patch)
treeb3364c8caef101f9af5f86e7acb418a9c372984e
parentd3a21ce0c60365991e59bbe848457c08f0c3c7ca (diff)
iio:dac:m62332: share scale and offset
This device simply uses its Vcc as reference voltage, so the same scale applies for all channels. Also offset doesn't appear to be different for any channel. Represent this by switching these two attributes to info_mask_shared_by_type. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/dac/m62332.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/iio/dac/m62332.c b/drivers/iio/dac/m62332.c
index c23d7fa889ee..cffc0630ed32 100644
--- a/drivers/iio/dac/m62332.c
+++ b/drivers/iio/dac/m62332.c
@@ -173,15 +173,15 @@ static const struct iio_info m62332_info = {
173 .driver_module = THIS_MODULE, 173 .driver_module = THIS_MODULE,
174}; 174};
175 175
176#define M62332_CHANNEL(chan) { \ 176#define M62332_CHANNEL(chan) { \
177 .type = IIO_VOLTAGE, \ 177 .type = IIO_VOLTAGE, \
178 .indexed = 1, \ 178 .indexed = 1, \
179 .output = 1, \ 179 .output = 1, \
180 .channel = (chan), \ 180 .channel = (chan), \
181 .datasheet_name = "CH" #chan, \ 181 .datasheet_name = "CH" #chan, \
182 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ 182 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \
183 BIT(IIO_CHAN_INFO_SCALE) | \ 183 .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \
184 BIT(IIO_CHAN_INFO_OFFSET), \ 184 BIT(IIO_CHAN_INFO_OFFSET), \
185} 185}
186 186
187static const struct iio_chan_spec m62332_channels[M62332_CHANNELS] = { 187static const struct iio_chan_spec m62332_channels[M62332_CHANNELS] = {