patch "iio/gyro/bmg160: Use millidegrees for temperature scale" added to staging-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio/gyro/bmg160: Use millidegrees for temperature scale
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 40a7198a4a01037003c7ca714f0d048a61e729ac Mon Sep 17 00:00:00 2001
From: Mike Looijmans <[email protected]>
Date: Wed, 13 Feb 2019 08:41:47 +0100
Subject: iio/gyro/bmg160: Use millidegrees for temperature scale
Standard unit for temperature is millidegrees Celcius, whereas this driver was reporting in degrees. Fix the scale factor in the driver.
--- drivers/iio/gyro/bmg160_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/gyro/bmg160_core.c +3 -3
@@ -582,11 +582,10 @@ static int bmg160_read_raw(struct iio_dev *indio_dev,case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY :return bmg160_get_filter (data, val);case IIO_CHAN_INFO_SCALE : - *val =0 ;switch (chan->type) {case IIO_TEMP : - *val2 =500000 ; -return IIO_VAL_INT_PLUS_MICRO ; + *val =500 ; +return IIO_VAL_INT ;case IIO_ANGL_VEL : {int i;
@@ -594,6 +593,7 @@ static int bmg160_read_raw(struct iio_dev *indio_dev,for (i =0 ; i <ARRAY_SIZE (bmg160_scale_table); ++i) {if (bmg160_scale_table[i].dps_range == data->dps_range) { + *val =0 ; *val2 = bmg160_scale_table[i].scale;return IIO_VAL_INT_PLUS_MICRO ; }
Signature · 1 line
2.21.0