On Thu, Aug 24, 2023 at 9:39 AM Mighty <bavishimithil@xxxxxxxxx> wrote: > > patch the twl6030 driver to convert all IIO_CHAN_INFO_RAW to IIO_CHAN_INFO_PROCESSED. > > That would break the case here https://github.com/torvalds/linux/blob/master/drivers/iio/adc/twl6030-gpadc.c#L541 > hence I think we just comply to adding scale as well, even though it would be 1:1? Seems reasonable to me! > There is this https://github.com/torvalds/linux/blob/master/drivers/iio/adc/twl6030-gpadc.c#L447 but I'm not very sure about how it changes the scale. That looks like the channel is actually processed, not raw, right? i.e. that should only be done on channels marked as processed. This should definitely be reflected in the scale attribute for the raw channel instead, especially if you support buffered reads (I don't know if the driver does this) because buffered reads usually just read out the values from the hardware without any such processing and rely on scale to correct them in userspace afterwards. Yours, Linus Walleij