summaryrefslogtreecommitdiff
path: root/include/power_button.h
diff options
context:
space:
mode:
authorEdward Hill <ecgh@chromium.org>2020-08-26 16:43:28 -0600
committerCommit Bot <commit-bot@chromium.org>2020-08-29 02:43:31 +0000
commitd986a057af8246e6062b60f223a5ecbcdd6144de (patch)
treece9ad8276ae0f4c930f02b101e777f548ed0f3c9 /include/power_button.h
parentdeed6c7cd265fe0cbfd2d64e3082cd8d8b9a2f38 (diff)
downloadchrome-ec-d986a057af8246e6062b60f223a5ecbcdd6144de.tar.gz
power_button: Add CONFIG_POWER_BUTTON_TO_PCH_CUSTOM
Allow board to provide board_pwrbtn_to_pch function to override the default behavior of gpio_set_level(GPIO_PCH_PWRBTN_L, level) as the means for asserting power button signal to PCH. BUG=b:164921478 BRANCH=zork TEST=power button timing Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I8f5ffb2759318fdc941155b60be8bf4aa7dd4771 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2378557 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'include/power_button.h')
-rw-r--r--include/power_button.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/power_button.h b/include/power_button.h
index 23fd4b1bf4..167ca21e2b 100644
--- a/include/power_button.h
+++ b/include/power_button.h
@@ -62,4 +62,11 @@ void power_button_pch_pulse(void);
*/
int64_t get_time_dsw_pwrok(void);
+/**
+ * This must be defined when CONFIG_POWER_BUTTON_TO_PCH_CUSTOM is defined. This
+ * allows a board to override the default behavior of
+ * gpio_set_level(GPIO_PCH_PWRBTN_L, level).
+ */
+void board_pwrbtn_to_pch(int level);
+
#endif /* __CROS_EC_POWER_BUTTON_H */