opt3001: Change resume hook priority

If the power rail to the ambient light sensor is only enabled
at HOOK_CHIPSET_RESUME (as on glados) then the ALS init should
not attempt to execute until after that happens.

BUG=chrome-os-partner:43493
BRANCH=none
TEST=enable ALS on glados and successfully build and use it

Change-Id: I4e8841bdf6d3970a30f58431aca771c87c7e15ba
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/298157
Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
Duncan Laurie
2015-09-09 14:58:52 -07:00
committed by chrome-bot
parent dda0704bf9
commit 2a16019d54

View File

@@ -72,7 +72,7 @@ static void opt3001_init(void)
if (ret)
CPRINTF("ALS configure failed: ret=%d\n", ret);
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, opt3001_init, HOOK_PRIO_DEFAULT);
DECLARE_HOOK(HOOK_CHIPSET_RESUME, opt3001_init, HOOK_PRIO_DEFAULT + 1);
/**
* Read OPT3001 light sensor data.