STAGING:iio:light: fix ISL29018 init to handle brownout
authorGrant Grundler <grundler@google.com>
Tue, 9 Aug 2011 22:18:14 +0000 (15:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 20:39:48 +0000 (13:39 -0700)
commit176f9f29cec95f88cfa01a8e40741d1fc532add2
tree57a126e33b2b63fa446a4a32b9992dbccebe4839
parentf94aa354d676532448e8e222e737fdd0755fc786
STAGING:iio:light: fix ISL29018 init to handle brownout

After a voltage brownout, sensor will now operate correctly.

Page 10 of ISL29018 data sheet and the Intersil Application Note 1534
describe the required initialization sequence:
1. Write 0x00 to register 0x08 (TEST)
2. Write 0x00 to register 0x00 (CMD1)
3. msleep(1)
4. program remaining registers as before

Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/light/isl29018.c