Re: [PATCH v2 1/7] iio: imu: fxos8700: fix map lable of channel type to MAGN sensor

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

 



On Thu,  8 Dec 2022 15:19:05 +0800
carlos.song@xxxxxxx wrote:

> From: Carlos Song <carlos.song@xxxxxxx>
> 
> FXOS8700 is an IMU sensor with ACCEL sensor and MAGN sensor.
> Sensor type is indexed by corresponding channel type in a switch.
> IIO_ANGL_VEL channel type mapped to MAGN sensor has caused confusion.
> 
> Fix the mapping lable of "IIO_MAGN" channel type instead of
> "IIO_ANGL_VEL" channel type to MAGN sensor.
> 
> Fixes: 84e5ddd5c46e ("iio: imu: Add support for the FXOS8700 IMU")
> Signed-off-by: Carlos Song <carlos.song@xxxxxxx>
Applied to the fixes-togreg branch of iio.git and marked for stable
inclusion.

Thanks,

Jonathan

> ---
> Changes for V2:
> - Modify the magnetometer sensitivity unit to be consistent with the
>   documentation as 0.001g
> - Rework commit log
> 
> diff --git a/drivers/iio/imu/fxos8700_core.c b/drivers/iio/imu/fxos8700_core.c
> index 423cfe526f2a..235b02b2f4e5 100644
> --- a/drivers/iio/imu/fxos8700_core.c
> +++ b/drivers/iio/imu/fxos8700_core.c
> @@ -320,7 +320,7 @@ static enum fxos8700_sensor fxos8700_to_sensor(enum iio_chan_type iio_type)
>  	switch (iio_type) {
>  	case IIO_ACCEL:
>  		return FXOS8700_ACCEL;
> -	case IIO_ANGL_VEL:
> +	case IIO_MAGN:
>  		return FXOS8700_MAGN;
>  	default:
>  		return -EINVAL;




[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