diff options
author | Diana Z <dzigterman@chromium.org> | 2022-01-26 15:00:13 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-27 18:53:44 +0000 |
commit | c590e40132ac94719cf154258881a450f72201e9 (patch) | |
tree | 963d6d519fbcb1ec234fd0fd890b84cc8977dbf5 /common | |
parent | 3669703252e152a43df9dd4dadc5d2d702660bab (diff) | |
download | chrome-ec-c590e40132ac94719cf154258881a450f72201e9.tar.gz |
Zephyr: Create a CONFIG for keyboard backlight enable
Rather than relying on the GPIO to be defined in the board's h file,
instead define a CONFIG option which can more easily be used with the
zephyr build.
BRANCH=None
BUG=b:216496315
TEST=zmake testall, compare_builds.sh on three boards with changed .h
files and two ranom boards that don't use the config
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I9b8970d6a094a10247a4fb3b7c01fdfea4ded3e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3418857
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/keyboard_backlight.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/keyboard_backlight.c b/common/keyboard_backlight.c index 3c90b96cc5..24a8ae56dd 100644 --- a/common/keyboard_backlight.c +++ b/common/keyboard_backlight.c @@ -57,7 +57,7 @@ int kblight_get(void) int kblight_enable(int enable) { -#ifdef GPIO_EN_KEYBOARD_BACKLIGHT +#ifdef CONFIG_KBLIGHT_ENABLE_PIN gpio_set_level(GPIO_EN_KEYBOARD_BACKLIGHT, enable); #endif if (!kblight.drv || !kblight.drv->enable) @@ -67,7 +67,7 @@ int kblight_enable(int enable) int kblight_get_enabled(void) { -#ifdef GPIO_EN_KEYBOARD_BACKLIGHT +#ifdef CONFIG_KBLIGHT_ENABLE_PIN if (!gpio_get_level(GPIO_EN_KEYBOARD_BACKLIGHT)) return 0; #endif |