Re: [PATCH] iio: add bmp280 pressure and temperature driver

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

 



> > > +static int bmp280_read_raw(struct iio_dev *indio_dev,
> > > +			   struct iio_chan_spec const *chan,
> > > +			   int *val, int *val2, long mask)
> > > +{
> > > +	int ret;
> > > +	struct bmp280_data *data = iio_priv(indio_dev);
> > > +
> > > +	mutex_lock(&data->lock);
> > 
> > locking is only needed for _RAW
> > 
> > > +
> > > +	switch (mask) {
> > > +	case IIO_CHAN_INFO_RAW:
> > 
> > I think this should be _PROCESSED, not _RAW;
> > there is calibration and all kind of scaling done internally
> 
> Just to make sure here:  If I use _PROCESSED, I need to apply scale in
> kernel space and remove _SCALE, correct?

yes

since pressure is using a temperature read and calibration data, it hardly 
qualifies as 'raw'

> I will address the rest of your observations in v2, once I get a chance
> to test using the device on Monday.
> 
> Thank you for the review.

p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)
--
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