On Sun, Sep 3, 2023 at 8:04 PM Mighty <bavishimithil@xxxxxxxxx> wrote: > On Mon, Aug 28, 2023 at 11:48 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > > > 2) If the channel has a horrible non linear and none invertable conversion > > to standard units and events support the you might need PROCESSED to > > provide the useful value, but RAW to give you clue what the current value > > is for setting an event (light sensors are usual place we see this). > > In this very specific case yes, it is being used as a current sense shunt for a > light+prox sensor (gp2ap002), so I do think that it might be case 2 instead of 3. > But with no other devices using the twl6030/32 gpadc for any features it could > also be due to it not being updated like case 3. See if my patch fixes the issue for you, else we need to patch twl6030 as indicated. > Also the fact that the adc would break in cases when its not just a light sensor > as well, we just dont have any such devices yet. I have tested the gp2ap002 both with and without light sensor. They have different product numbers and thus different device tree compatibles if the component supports light sensoring and not just proximity detection, see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/iio/light/sharp,gp2ap002.yaml So just use the right compatible (if you're using device tree) and it'll be fine. Yours, Linus Walleij