From 0e9cd956647cca2940d67e2ef1b6e0c35cedd145 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 30 Nov 2015 15:30:25 -0800 Subject: [PATCH] chell: Keep keyboard backlight off in hibernate If pulled up the backlight will be at 100% brightness instead of off. BUG=chrome-os-partner:48130 BRANCH=none TEST=hibernate on chell, see keyboard backlight stay off Change-Id: I30cd289b9492356407aa54e6a84b04add647bd9a Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/314936 Reviewed-by: Shawn N --- board/chell/board.c | 4 +++- board/chell/gpio.inc | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/board/chell/board.c b/board/chell/board.c index 6c31a05dc8..c3f7c85c3d 100644 --- a/board/chell/board.c +++ b/board/chell/board.c @@ -365,9 +365,11 @@ uint32_t board_get_gpio_hibernate_state(uint32_t port, uint32_t pin) GPIO_TO_PORT_MASK_PAIR(GPIO_PMIC_LDO_EN), /* The GPIO to control RTCRST is active high. */ GPIO_TO_PORT_MASK_PAIR(GPIO_PCH_RTCRST), + /* Keep keyboard backlight off, GPIO34 pin is in PWM mode */ + GPIO_TO_PORT_MASK_PAIR(GPIO_KEYBOARD_BACKLIGHT), }; - /* LED GPIOs should be driven low to turn off LEDs */ + /* Some GPIOs should be driven low in hibernate */ for (i = 0; i < ARRAY_SIZE(out_low_gpios); ++i) if (out_low_gpios[i][0] == port && out_low_gpios[i][1] == pin) return GPIO_OUTPUT | GPIO_LOW; diff --git a/board/chell/gpio.inc b/board/chell/gpio.inc index 9b579ae17e..6aab9278f6 100644 --- a/board/chell/gpio.inc +++ b/board/chell/gpio.inc @@ -89,6 +89,7 @@ GPIO(BOARD_VERSION2, PIN(7), GPIO_INPUT) GPIO(BOARD_VERSION3, PIN(10), GPIO_INPUT) GPIO(KBD_KSO2, PIN(101), GPIO_KB_OUTPUT_COL2) GPIO(PVT_CS0, PIN(146), GPIO_ODR_HIGH) +GPIO(KEYBOARD_BACKLIGHT, PIN(34), GPIO_OUT_LOW) /* * TODO(crosbug.com/p/40848): These LEDs should be under control of the mec1322