summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-01-11 00:22:12 +1100
committerCommit Bot <commit-bot@chromium.org>2022-01-11 00:25:58 +0000
commitc3f4cbfa51f900b7387732ce0ba6c21c62fb71fb (patch)
tree1cd1660040e2d7660df1fb3f5220c894a8ebaf1c
parentb44d10f8f79cadb259cc7ab79714a0919fc0c4c8 (diff)
downloadchrome-ec-c3f4cbfa51f900b7387732ce0ba6c21c62fb71fb.tar.gz
nissa: Add missing interrupts for nivviks
Add the IMU and WP interrupts for nivviks. BUG=b:201000681 TEST=zmake configure -b nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ib80ae84b67f51d155b601af4b56113d6e2bc8920 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3377445 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
-rw-r--r--zephyr/projects/nissa/include/gpio_map.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/zephyr/projects/nissa/include/gpio_map.h b/zephyr/projects/nissa/include/gpio_map.h
index 661f8d403e..bf05e52396 100644
--- a/zephyr/projects/nissa/include/gpio_map.h
+++ b/zephyr/projects/nissa/include/gpio_map.h
@@ -36,9 +36,17 @@
#define AP_PROCHOT_INT(gpio, edge)
#endif
+#ifdef CONFIG_PLATFORM_EC_SWITCH
+ #define WP_INT() GPIO_INT(GPIO_WP_L, \
+ GPIO_INT_EDGE_BOTH, \
+ switch_interrupt)
+#else
+ #define WP_INT()
+#endif
+
#ifdef CONFIG_PLATFORM_EC_POWER_BUTTON
- #define PWRBTN_INT() GPIO_INT(GPIO_POWER_BUTTON_L, \
- GPIO_INT_EDGE_BOTH, \
+ #define PWRBTN_INT() GPIO_INT(GPIO_POWER_BUTTON_L, \
+ GPIO_INT_EDGE_BOTH, \
power_button_interrupt)
#else
#define PWRBTN_INT()
@@ -52,6 +60,14 @@
#define LID_INT()
#endif
+#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_LSM6DSO_AS_BASE
+ #define LSM6DSO_INT() GPIO_INT(GPIO_EC_IMU_INT_L, \
+ GPIO_INT_EDGE_FALLING, \
+ lsm6dso_interrupt)
+#else
+ #define LSM6DSO_INT()
+#endif
+
#ifdef CONFIG_PLATFORM_EC_VOLUME_BUTTONS
#define VOLBTN_INT(pin) GPIO_INT(pin, \
GPIO_INT_EDGE_BOTH, \
@@ -70,7 +86,9 @@
#define EC_CROS_GPIO_INTERRUPTS \
+ WP_INT() \
LID_INT() \
+ LSM6DSO_INT() \
PWRBTN_INT() \
VOLBTN_INT(GPIO_VOLUME_DOWN_L) \
VOLBTN_INT(GPIO_VOLUME_UP_L) \