iio: accel: adis16201: Use IIO_VAL_INT for temperature scale
Subsystems (3)
PATCH 1/1 iio: accel: adis16201: Use IIO_VAL_INT for temperature scale
This is a leftover from the patch: commit cf96ffd8c2ed ("staging:iio:accel:adis16201 move to chan_spec based setup."). Initially *val = 0 and *val2 = -470000. However, they were later changed to -470 and 0 respectively but their return type was not updated.
Use correct type as -470 is an integer in the base units.
--- drivers/iio/accel/adis16201.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/adis16201.c +1 -1
@@ -125,7 +125,7 @@ static int adis16201_read_raw(struct iio_dev *indio_dev,case IIO_TEMP : *val =-470 ; *val2 =0 ; -return IIO_VAL_INT_PLUS_MICRO ; +return IIO_VAL_INT ;case IIO_ACCEL :/* * IIO base unit for sensitivity of accelerometer
Signature · 1 line
2.43.0
Not sure this is worth mentioning but one of the emails from using get_maintainer.pl on the patch listed a deprecated email:
[email protected].
Quoted 32 lines · Gabriel Shahrouzi
This is a leftover from the patch: commit
cf96ffd8c2ed("staging:iio:accel:adis16201 move tochan_specbased setup."). Initially *val = 0 and *val2 = -470000. However, they were later changed to -470 and 0 respectively but their return type was not updated.Use correct type as -470 is an integer in the base units.
Fixes cf96ffd8c2ed ("staging:iio:accel:adis16201 move to chan_spec based setup.")Signed-off-by Gabriel Shahrouzi <[email protected]>--- drivers/iio/accel/adis16201.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/adis16201.c +1
-2@@ -125,7 +125,7 @@ static int adis16201_read_raw(struct iio_dev *indio_dev,case IIO_TEMP : *val =-470 ; *val2 =0 ; -return IIO_VAL_INT_PLUS_MICRO ; +return IIO_VAL_INT ;case IIO_ACCEL :/* * IIO base unit for sensitivity of accelerometer -- 2.43.0
Greg KH
maintainerQuoted 3 lines · Gabriel Shahrouzi
Not sure this is worth mentioning but one of the emails from using get_maintainer.pl on the patch listed a deprecated email:
[email protected].
How? Doesn't do that for me:
Quoted 1 line
Quoted 1 line
drivers/iio/accel/adis16201.c | 2 +-
$ ./scripts/get_maintainer.pl drivers/iio/accel/adis16201.c Lars-Peter Clausen <[email protected]> (maintainer:ANALOG DEVICES INC IIO DRIVERS) Michael Hennerich <[email protected]> (maintainer:ANALOG DEVICES INC IIO DRIVERS) Jonathan Cameron <[email protected]> (maintainer:IIO SUBSYSTEM AND DRIVERS) [email protected] (open list:IIO SUBSYSTEM AND DRIVERS) [email protected] (open list) ANALOG DEVICES INC IIO DRIVERS status: Supported
How did you run this?
thanks,
greg k-h
Quoted 18 lines · Greg KH
Quoted 3 lines · Gabriel Shahrouzi
Not sure this is worth mentioning but one of the emails from using get_maintainer.pl on the patch listed a deprecated email:
[email protected].How? Doesn't do that for me:
Quoted 1 line
Quoted 1 line
drivers/iio/accel/adis16201.c | 2 +-$ ./scripts/get_maintainer.pl drivers/iio/accel/adis16201.c Lars-Peter Clausen <[email protected]> (maintainer:ANALOG DEVICES INC IIO DRIVERS) Michael Hennerich <[email protected]> (maintainer:ANALOG DEVICES INC IIO DRIVERS) Jonathan Cameron <[email protected]> (maintainer:IIO SUBSYSTEM AND DRIVERS) [email protected] (open list:IIO SUBSYSTEM AND DRIVERS) [email protected] (open list) ANALOG DEVICES INC IIO DRIVERS status: Supported
Quoted 1 line
How did you run this?
I ran it on the patch: get_maintainer.pl 0001-iio-accel-adis16201-Use-IIO_VAL_INT-for-temperature-.patch Lars-Peter Clausen <[email protected]> (maintainer:ANALOG DEVICES INC IIO DRIVERS) Michael Hennerich <[email protected]> (maintainer:ANALOG DEVICES INC IIO DRIVERS)
Jonathan Cameron <[email protected]> (maintainer:IIO SUBSYSTEM AND DRIVERS,blamed_fixes:1/1=100%)
Greg Kroah-Hartman <[email protected]> (blamed_fixes:1/1=100%) [email protected] (open list:IIO SUBSYSTEM AND DRIVERS) [email protected] (open list)
ANALOG DEVICES INC IIO DRIVERS status: Supported
Running it only on the file the patch modifies gives the same result that you got.
Quoted 4 lines
thanks,
greg k-h
Jonathan Cameron
maintainerQuoted 7 lines · On Mon, 21 Apr 2025 08:28:19 -0400 Gabriel Shahrouzi <[email protected]>…
This is a leftover from the patch: commit
cf96ffd8c2ed("staging:iio:accel:adis16201 move tochan_specbased setup."). Initially *val = 0 and *val2 = -470000. However, they were later changed to -470 and 0 respectively but their return type was not updated.Use correct type as -470 is an integer in the base units.
It's not a fix as such.
We'll get a string that is -470.000000
There was no need to print the .000000 but it also does no harm and generic userspace will always treat this as a float anyway as most scale values are.
I don't mind this as a minor improvement patch however. One comment inline.
Jonathan
Quoted 13 lines
Fixes cf96ffd8c2ed ("staging:iio:accel:adis16201 move to chan_spec based setup.")Signed-off-by Gabriel Shahrouzi <[email protected]>--- drivers/iio/accel/adis16201.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/accel/adis16201.c +0
-0
drivers/iio/accel/adis16201.c static int adis16201_read_raw(struct iio_dev *indio_dev, · line 127
Quoted 3 lines
drivers/iio/accel/adis16201.c +0
-0@@ -125,7 +125,7 @@ static int adis16201_read_raw(struct iio_dev *indio_dev,case IIO_TEMP : *val =-470 ; *val2 =0 ;
If we are returning IIO_VAL_INT there is no need to set *val2 as it is never used.
Quoted 5 lines
drivers/iio/accel/adis16201.c +1
-1-return IIO_VAL_INT_PLUS_MICRO ; +return IIO_VAL_INT ;case IIO_ACCEL :/* * IIO base unit for sensitivity of accelerometer