summaryrefslogtreecommitdiff
path: root/common/power_button_x86.c
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2017-04-27 12:48:08 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-05-09 23:20:07 -0700
commite8982ea3cd66941e518b829a37834a534e71b3bc (patch)
treef0c54e0a9a710c52fef3651d426476c57aa7920a /common/power_button_x86.c
parent600df851c5565237a38f5ba0edda2beef8db618c (diff)
downloadchrome-ec-e8982ea3cd66941e518b829a37834a534e71b3bc.tar.gz
Allow lid-less configuration
power_button_x86.c and switch.c assume there is a lid switch. This patch separate them so that a board with power button but with no lid can be configured properly. This patch also moves backlight control to the board directory so that only the boards with a backlight turn it on/off when power state changes. BUG=none BRANCH=none TEST=boot fizz. make buildall. Change-Id: If4070cdc4b1221fae68b35ec3497335d81f192fd Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/489602 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'common/power_button_x86.c')
-rw-r--r--common/power_button_x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/power_button_x86.c b/common/power_button_x86.c
index f83d0f81ab..658a422463 100644
--- a/common/power_button_x86.c
+++ b/common/power_button_x86.c
@@ -410,6 +410,7 @@ static void powerbtn_x86_init(void)
}
DECLARE_HOOK(HOOK_INIT, powerbtn_x86_init, HOOK_PRIO_DEFAULT);
+#ifdef CONFIG_LID_SWITCH
/**
* Handle switch changes based on lid event.
*/
@@ -420,6 +421,7 @@ static void powerbtn_x86_lid_change(void)
power_button_pch_pulse();
}
DECLARE_HOOK(HOOK_LID_CHANGE, powerbtn_x86_lid_change, HOOK_PRIO_DEFAULT);
+#endif
/**
* Handle debounced power button changing state.