Re: [PATCH v2 2/3] iio: light: Add support for AL3000a illuminance sensor

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

 



Hi,

> > > +static int al3000a_read_raw(struct iio_dev *indio_dev,
> > > +                         struct iio_chan_spec const *chan, int *val,
> > > +                         int *val2, long mask)
> > > +{
> > > +     struct al3000a_data *data = iio_priv(indio_dev);
> > > +     int ret, gain;
> > > +
> > > +     switch (mask) {
> > > +     case IIO_CHAN_INFO_RAW:
> > > +             ret = regmap_read(data->regmap, AL3000A_REG_DATA, &gain);
> > > +             if (ret < 0)
> > > +                     return ret;
> > > +
> > > +             *val = lux_table[gain & AL3000A_GAIN_MASK];  
> >
> > I may have misinterpreted the other thread.  IS this value in lux?
> > If it is make this channel IIO_CHAN_INFO_PROCESSED instead.
> >  
> 
> This is actually a really good hint, I will check if this works out
> and if yes, then definitely will use it. Thank you.


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux