diff options
author | Jett Rink <jettrink@chromium.org> | 2020-10-23 10:08:38 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-15 03:54:45 +0000 |
commit | 287363ad8bb4c18fbbca090043b76a7020fbeaf2 (patch) | |
tree | beee0a760c7f79e1a87b9261cb4ece028b561f87 | |
parent | cab69396fac1673feb56bdb1c2ee3870948b0003 (diff) | |
download | chrome-ec-287363ad8bb4c18fbbca090043b76a7020fbeaf2.tar.gz |
volteer: add EC_CROS_GPIO_INTERRUPT define
Define the EC_CROS_GPIO_INTERRUPT with an example of how to use it to
allow us to bind platform/ec gpio irq handlers
BUG=b:169935802
TEST=use with volteer power button to print message on both edges
Change-Id: Iead9ad54cec567443be00d7ea07c714455156371
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2495006
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630135
-rw-r--r-- | zephyr/projects/volteer/include/gpio_map.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/zephyr/projects/volteer/include/gpio_map.h b/zephyr/projects/volteer/include/gpio_map.h index 97b75b035a..5c28546540 100644 --- a/zephyr/projects/volteer/include/gpio_map.h +++ b/zephyr/projects/volteer/include/gpio_map.h @@ -20,5 +20,21 @@ #define GPIO_EN_PP3300_A NAMED_GPIO(en_pp3300_a) #define GPIO_EN_PP5000_A NAMED_GPIO(en_pp5000_a) +/* + * Set EC_CROS_GPIO_INTERRUPTS to a space-separated list of GPIO_INT items. + * + * Each GPIO_INT requires three parameters: + * gpio_signal - The enum gpio_signal for the interrupt gpio + * interrupt_flags - The interrupt-related flags (e.g. GPIO_INT_EDGE_BOTH) + * handler - The platform/ec interrupt handler. + * + * Ensure that this files includes all necessary headers to declare all + * referenced handler functions. + * + * For example, one could use the follow definition: + * #define EC_CROS_GPIO_INTERRUPTS \ + * GPIO_INT(NAMED_GPIO(h1_ec_pwr_btn_odl), GPIO_INT_EDGE_BOTH, button_print) + */ +#define EC_CROS_GPIO_INTERRUPTS #endif /* __ZEPHYR_GPIO_MAP_H */ |