Commit 4d9948b3 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio:magnetometer Add IIO_CHAN_INFO_RAW entries to all drivers.

Precursor to making value read / write attribute optional.
No processed values for magnetometers.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 90354d00
...@@ -429,7 +429,7 @@ static int ak8975_read_raw(struct iio_dev *indio_dev, ...@@ -429,7 +429,7 @@ static int ak8975_read_raw(struct iio_dev *indio_dev,
struct ak8975_data *data = iio_priv(indio_dev); struct ak8975_data *data = iio_priv(indio_dev);
switch (mask) { switch (mask) {
case 0: case IIO_CHAN_INFO_RAW:
return ak8975_read_axis(indio_dev, chan->address, val); return ak8975_read_axis(indio_dev, chan->address, val);
case IIO_CHAN_INFO_SCALE: case IIO_CHAN_INFO_SCALE:
*val = data->raw_to_gauss[chan->address]; *val = data->raw_to_gauss[chan->address];
...@@ -443,7 +443,8 @@ static int ak8975_read_raw(struct iio_dev *indio_dev, ...@@ -443,7 +443,8 @@ static int ak8975_read_raw(struct iio_dev *indio_dev,
.type = IIO_MAGN, \ .type = IIO_MAGN, \
.modified = 1, \ .modified = 1, \
.channel2 = IIO_MOD_##axis, \ .channel2 = IIO_MOD_##axis, \
.info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \
.address = index, \ .address = index, \
} }
......
...@@ -459,7 +459,7 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev, ...@@ -459,7 +459,7 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev,
struct hmc5843_data *data = iio_priv(indio_dev); struct hmc5843_data *data = iio_priv(indio_dev);
switch (mask) { switch (mask) {
case 0: case IIO_CHAN_INFO_RAW:
return hmc5843_read_measurement(indio_dev, return hmc5843_read_measurement(indio_dev,
chan->address, chan->address,
val); val);
...@@ -476,7 +476,8 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev, ...@@ -476,7 +476,8 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev,
.type = IIO_MAGN, \ .type = IIO_MAGN, \
.modified = 1, \ .modified = 1, \
.channel2 = IIO_MOD_##axis, \ .channel2 = IIO_MOD_##axis, \
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, \ .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \
IIO_CHAN_INFO_SCALE_SHARED_BIT, \
.address = add \ .address = add \
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment