diff options
author | Stefan Brüns <stefan.bruens@rwth-aachen.de> | 2017-05-24 02:09:05 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-06-03 08:43:20 +0100 |
commit | 84b84dc19bf19d66b8c8fe54a74c0f5edee51e86 (patch) | |
tree | a39e314193d02adca709946ad5a61c913fea76fa /drivers/iio | |
parent | f06a0d2c880c17672f62d2d5b82410bddf64d1a7 (diff) | |
download | linux-84b84dc19bf19d66b8c8fe54a74c0f5edee51e86.tar.gz linux-84b84dc19bf19d66b8c8fe54a74c0f5edee51e86.tar.bz2 linux-84b84dc19bf19d66b8c8fe54a74c0f5edee51e86.zip |
iio: adc: ina2xx: Make use of attribute flags consistent on all channels
Flags for shared channel attributes should be set on all channels of a
channel set. I.e. SAMP_FREQUENCY and OVERSAMPLING_RATIO are set on the
in_voltage{0,1} channels, thus should be set on in_power, in_current.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/ina2xx-adc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c index 6b588ac3130c..bba10a1b2fcb 100644 --- a/drivers/iio/adc/ina2xx-adc.c +++ b/drivers/iio/adc/ina2xx-adc.c @@ -442,6 +442,8 @@ static ssize_t ina2xx_shunt_resistor_store(struct device *dev, .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ BIT(IIO_CHAN_INFO_SCALE) | \ BIT(IIO_CHAN_INFO_INT_TIME), \ + .info_mask_shared_by_dir = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ + BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \ .scan_index = (_index), \ .scan_type = { \ .sign = 'u', \ |