summaryrefslogtreecommitdiff
path: root/common/gpio.c
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2017-06-05 20:24:10 -0700
committerCommit Bot <commit-bot@chromium.org>2020-02-07 23:09:55 +0000
commit341cc2da402e23dc9ff09072058f79d5ec0c40c6 (patch)
tree512c995b1c86a6d1dc3bff45eeb58bc6e483b4e4 /common/gpio.c
parentca4bec7b0eab93cc3a0ccd5437e96f650c0274d5 (diff)
downloadchrome-ec-341cc2da402e23dc9ff09072058f79d5ec0c40c6.tar.gz
g: add gpio_set_wakepin() to configure wake pins
Cr50 needs a cleaner way to enable and disable wakepins. This change adds gpio_set_wakepin() to enable the wake pin or disable. The gpio_set_flags() or gpio_set_flags_by_mask() remain unaffecting wake-pin configuration. This patch increases the flash usage by 16 bytes. BUG=b:35587259 BRANCH=cr50 TEST=verify pinmux has the same output before and after the change on octopus. Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/533674 Tested-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org> Change-Id: I0387c673aedc046ce9cf6b5f0d683c40f3079281 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2044355
Diffstat (limited to 'common/gpio.c')
-rw-r--r--common/gpio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/gpio.c b/common/gpio.c
index 69aae0572e..c59065a60c 100644
--- a/common/gpio.c
+++ b/common/gpio.c
@@ -218,4 +218,10 @@ int signal_is_gpio(int signal)
&& (signal < GPIO_SIGNAL_START + GPIO_COUNT));
}
+__attribute__((weak)) void gpio_set_wakepin(enum gpio_signal signal,
+ uint32_t flags)
+{
+ /* Some chips may need their own implementations */
+}
+
/*****************************************************************************/