diff options
author | Keith Short <keithshort@chromium.org> | 2020-02-14 15:21:50 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-27 20:50:08 +0000 |
commit | c2f751f107d88d910f4631eeb8c6f4f9a99b9d81 (patch) | |
tree | ea4742de3a983c9b98fb452cf7f79c5fbbf849a1 /include/button.h | |
parent | 6c0c6ec6b08a14ea0c1e612d585cdb825bb2f1cf (diff) | |
download | chrome-ec-c2f751f107d88d910f4631eeb8c6f4f9a99b9d81.tar.gz |
volteer: Configure EC_VOLUP_BTN_ODL for next build
Update the GPIO assignment for the EC_VOLUP_BTN_ODL signal for the next
board build.
BUG=b:144933528
BRANCH=none
TEST=make buildall
TEST=Verify volume buttons with board ID=0
Change-Id: I28e53573b6a6a9ba7e5df0458ded8b988c25ac04
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2065489
Reviewed-by: caveh jalali <caveh@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include/button.h')
-rw-r--r-- | include/button.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/button.h b/include/button.h index 3c6a350b3b..2961625bea 100644 --- a/include/button.h +++ b/include/button.h @@ -51,7 +51,11 @@ enum button { }; /* Table of buttons for the board. */ +#ifndef CONFIG_BUTTONS_RUNTIME_CONFIG extern const struct button_config buttons[]; +#else +extern struct button_config buttons[]; +#endif /* * Buttons used to decide whether recovery is requested or not @@ -65,6 +69,17 @@ extern const int recovery_buttons_count; void button_init(void); /* + * Reassign a button GPIO signal at runtime. + * + * @param button_type Button type to reassign + * @param gpio GPIO to assign to the button + * + * Returns EC_SUCCESS if button change is accepted and made active, + * EC_ERROR_* otherwise. + */ +int button_reassign_gpio(enum button button_type, enum gpio_signal gpio); + +/* * Interrupt handler for button. * * @param signal Signal which triggered the interrupt. |