Hi, On Thu, Aug 14, 2014 at 03:56:05PM -0500, Felipe Balbi wrote: > +static int opt3001_write_raw(struct iio_dev *iio, > + struct iio_chan_spec const *chan, int val, int val2, > + long mask) > +{ > + struct opt3001 *opt = iio_priv(iio); > + int ret = 0; > + > + if (opt->mode == OPT3001_CONFIGURATION_M_CONTINUOUS) > + return -EBUSY; > + > + if (chan->type != IIO_LIGHT) > + return -EINVAL; > + > + if (mask != IIO_CHAN_INFO_INT_TIME) > + return -EINVAL; > + > + mutex_lock(&opt->lock); > + ret = opt3001_set_int_time(opt, val); I just noticed (after further reading other drivers and testing more) that I'm passing the wrong argument to this function. I should be passing val2 instead. In fact, I was complaining that the entire framework was in (in this case) lux but integration time was in ms rather than in s, turns out that was my issue. Do you want me to resend or can you fix this one line when applying ? I just checked that replacing val with val2 doesn't break anything and I can echo 0.1 or 0.8 to in_illuminance_integration_time cheers -- balbi
Attachment:
signature.asc
Description: Digital signature