Re: [PATCH 1/5] iio: adis16400: Report pressure channel scale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15/05/15 16:18, Lars-Peter Clausen wrote:
> Add the scale for the pressure channel, which is currently missing.
> 
> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
> Fixes: 76ada52f7f5d ("iio:adis16400: Add support for the adis16448")
Applied to the fixes branch of iio.git and marked for stable.
> ---
>  drivers/iio/imu/adis16400_core.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index fa795dc..8de6427 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -405,6 +405,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
>  			*val = st->variant->temp_scale_nano / 1000000;
>  			*val2 = (st->variant->temp_scale_nano % 1000000);
>  			return IIO_VAL_INT_PLUS_MICRO;
> +		case IIO_PRESSURE:
> +			/* 20 uBar = 0.002kPascal */
> +			*val = 0;
> +			*val2 = 2000;
> +			return IIO_VAL_INT_PLUS_MICRO;
>  		default:
>  			return -EINVAL;
>  		}
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux