diff options
author | Jett Rink <jettrink@chromium.org> | 2018-01-17 16:55:19 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-18 17:40:53 -0800 |
commit | f02c8c4c87cdf9c30b44be9c7ba49e506115a188 (patch) | |
tree | 758d97277c8014d4dbf6d6a4f2378c224751f115 | |
parent | bffb196a07e985280a45f5e5f7965c99b4332b0a (diff) | |
download | chrome-ec-f02c8c4c87cdf9c30b44be9c7ba49e506115a188.tar.gz |
grunt: Enabling backlight lid control module
Enabling backlight control module with active low mode enabled.
BUG=b:72007261
BRANCH=none
TEST=Booted grunt board and verified lid sensor toggles backlight
Change-Id: I14a6eec01c4cda6fcb4b821b9a4b6f266b8fe78b
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/872234
Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | board/grunt/board.c | 20 | ||||
-rw-r--r-- | board/grunt/board.h | 2 |
2 files changed, 14 insertions, 8 deletions
diff --git a/board/grunt/board.c b/board/grunt/board.c index 600151e655..deac1ead57 100644 --- a/board/grunt/board.c +++ b/board/grunt/board.c @@ -219,20 +219,24 @@ static void board_init(void) } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); -static void board_chipset_resume(void) -{ - /* Turn on display backlight (active low GPIO). */ - gpio_set_level(GPIO_ENABLE_BACKLIGHT_L, 0); -} -DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); - static void board_chipset_suspend(void) { - /* Turn off display backlight (active low GPIO). */ + /* + * Turn off display backlight. This ensures that the backlight stays off + * in S3, no matter what the AP has it set to. The AP also controls it. + * This is here more for legacy reasons. + */ gpio_set_level(GPIO_ENABLE_BACKLIGHT_L, 1); } DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); +static void board_chipset_resume(void) +{ + /* Allow display backlight to turn on. See above backlight comment */ + gpio_set_level(GPIO_ENABLE_BACKLIGHT_L, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); + /** * Power on (or off) a single TCPC. * minimum on/off delays are included. diff --git a/board/grunt/board.h b/board/grunt/board.h index 973b9e76cd..bcec4887f7 100644 --- a/board/grunt/board.h +++ b/board/grunt/board.h @@ -24,6 +24,8 @@ #define CONFIG_SPI_FLASH_W25Q80 /* Internal SPI flash type. */ #define CONFIG_ADC +#define CONFIG_BACKLIGHT_LID +#define CONFIG_BACKLIGHT_LID_ACTIVE_LOW #define CONFIG_BOARD_VERSION #define CONFIG_I2C #define CONFIG_I2C_MASTER |