STAGING:iio:light: fix ISL29018 init to handle brownout

Grant Grundler grundler at google.com
Tue Aug 30 16:14:53 UTC 2011


On Tue, Aug 30, 2011 at 3:05 AM, Jonathan Cameron <jic23 at cam.ac.uk> wrote:
....
>> I did change one basic behavior that I think was also broken: cache
>> the value regardless of if the transaction completed successfully or
>> not.
> Don't do that.  That means userspace will get an invalid value if it reads
> in the meantime. If you have an error on a hardware bus - tell userspace about
> it and don't 'guess' what is in the register.

Ah ok - I didn't know this was part of the path to/from user space.

>
> Otherwise patch looks fine to me.

OK - I'll restore previous behavior and submit another patch.

cheers!
grant



More information about the devel mailing list