From 9631135dd9396aca149a3041197bce452fa0ce90 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Wed, 14 Dec 2011 20:25:12 +0100 Subject: [PATCH] iio: gyro: ADXRS450: Add missing read support for calibbias attribute Signed-off-by: Michael Hennerich Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/gyro/adxrs450_core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/iio/gyro/adxrs450_core.c b/drivers/staging/iio/gyro/adxrs450_core.c index 9d3362880d68..a146d55c37c8 100644 --- a/drivers/staging/iio/gyro/adxrs450_core.c +++ b/drivers/staging/iio/gyro/adxrs450_core.c @@ -308,6 +308,13 @@ static int adxrs450_read_raw(struct iio_dev *indio_dev, *val = t; ret = IIO_VAL_INT; break; + case IIO_CHAN_INFO_CALIBBIAS: + ret = adxrs450_spi_read_reg_16(indio_dev, ADXRS450_DNC1, &t); + if (ret) + break; + *val = t; + ret = IIO_VAL_INT; + break; default: ret = -EINVAL; break; -- 2.39.5