On Thu, Oct 06, 2016 at 05:43:36PM +0200, Lars-Peter Clausen wrote: > On 10/06/2016 04:42 PM, Eva Rachel Retuya wrote: > > This driver predates the availability of IIO_CHAN_INFO_OVERSAMPLING_RATIO > > attribute wherein usage has some advantages like it can be accessed by > > in-kernel consumers as well as reduces the code size. > > > > Therefore, use IIO_CHAN_INFO_OVERSAMPLING_RATIO to implement the > > oversampling_ratio attribute instead of using IIO_DEVICE_ATTR() macro. > > > > Move code from the functions associated with IIO_DEVICE_ATTR() into > > the read_raw hook as well as add the write_raw hook with both masks set > > to IIO_CHAN_INFO_OVERSAMPLING_RATIO. > > > > Signed-off-by: Eva Rachel Retuya <eraretuya@xxxxxxxxx> > > Looks good, thanks. > > Acked-by: Lars-Peter Clausen <lars@xxxxxxxxxx> > Thank you for the feedback! > I did some cleanup on this driver last week (not yet submitted), this was > the last bit I hadn't gotten to yet that needs to be done before the driver > can be moved out of staging. Anything else about this driver that needs to be addressed? I'll be glad to help submit patches for those (and in the process learn something new). By the way, this particular code took my attention (from write_raw of this patch): gpio_set_value(st->pdata->gpio_os0, (ret >> 0) & 1); gpio_set_value(st->pdata->gpio_os1, (ret >> 1) & 1); gpio_set_value(st->pdata->gpio_os1, (ret >> 2) & 1); The last line, st->pdata->gpio_os1, is that really intended or is it a typo? It could have been st->pdata->gpio_os2. I checked the datasheet and definition, looks like a typo to me. Just checking with everyone for confirmation. Thanks, Eva -- 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