diff options
Diffstat (limited to 'driver/als_isl29035.c')
-rw-r--r-- | driver/als_isl29035.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/driver/als_isl29035.c b/driver/als_isl29035.c index f908e443bd..357cc99089 100644 --- a/driver/als_isl29035.c +++ b/driver/als_isl29035.c @@ -6,10 +6,7 @@ */ #include "driver/als_isl29035.h" -#include "common.h" -#include "hooks.h" #include "i2c.h" -#include "timer.h" /* I2C interface */ #define ILS29035_I2C_ADDR 0x88 @@ -23,17 +20,16 @@ #define ILS29035_REG_INT_HT_MSB 7 #define ILS29035_REG_ID 15 -static void isl29035_init(void) +int isl29035_init(void) { /* * Tell it to read continually. This uses 70uA, as opposed to nearly * zero, but it makes the hook/update code cleaner (we don't want to * wait 90ms to read on demand while processing hook callbacks). */ - (void)i2c_write8(I2C_PORT_ALS, ILS29035_I2C_ADDR, + return i2c_write8(I2C_PORT_ALS, ILS29035_I2C_ADDR, ILS29035_REG_COMMAND_I, 0xa0); } -DECLARE_HOOK(HOOK_CHIPSET_RESUME, isl29035_init, HOOK_PRIO_DEFAULT); int isl29035_read_lux(int *lux, int af) { |