Hey Laxman, Jonathan.
The regmap is pretty new to me. In looking at it, I see
_regmap_write() will regcache_write() before attempting to write to
the device.
This effectively updates the cached value even when the device write
fails, which is the opposite of the current isl29018 cache policy.
It looks like we tried to change the policy back in August and got
this response:
> 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.
See http://driverdev.linuxdriverproject.org/pipermail/devel/2011-August/020256.html
for details.
The result is likely to be that after a failed write to one field of a
register, the next successful write to another field of that register
will update them both.