Re: [PATCH v2 6/6] iio: imu: bmi270: Add scale and sampling frequency to BMI270 IMU

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

 



Jonathan Cameron <jic23@xxxxxxxxxx> writes:

> On Fri, 18 Oct 2024 16:36:12 -0700
> Justin Weiss <justin@xxxxxxxxxxxxxxx> wrote:
>
>> Add read and write functions and create _available entries.
>> 
>> Signed-off-by: Justin Weiss <justin@xxxxxxxxxxxxxxx>
> Hi Justin,
>
> Just one trivial comment from me.
>
> Jonathan
>
>
>
>> +
>> +static int bmi270_write_raw(struct iio_dev *indio_dev,
>> +			    struct iio_chan_spec const *chan,
>> +			    int val, int val2, long mask)
>> +{
>> +	struct bmi270_data *data = iio_priv(indio_dev);
>> +
>> +	switch (mask) {
>> +	case IIO_CHAN_INFO_SCALE:
>> +		return bmi270_set_scale(data, chan->type, val2);
>> +	case IIO_CHAN_INFO_SAMP_FREQ:
>> +		return bmi270_set_odr(data, chan->type, val, val2);
>> +	default:
>> +		return -EINVAL;
>> +	}
>> +
> Unreachable code, so drop this return.

Will remove in v3.

Justin

>> +	return 0;
>> +}
>>




[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