diff options
-rw-r--r-- | zephyr/projects/npcx_evb/npcx7/gpio.dts | 1 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx7/include/gpio_map.h | 3 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx7/prj.conf | 1 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/gpio.dts | 1 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/include/gpio_map.h | 3 | ||||
-rw-r--r-- | zephyr/projects/npcx_evb/npcx9/prj.conf | 1 |
6 files changed, 8 insertions, 2 deletions
diff --git a/zephyr/projects/npcx_evb/npcx7/gpio.dts b/zephyr/projects/npcx_evb/npcx7/gpio.dts index 1f41a4dcbe..c4031dd83f 100644 --- a/zephyr/projects/npcx_evb/npcx7/gpio.dts +++ b/zephyr/projects/npcx_evb/npcx7/gpio.dts @@ -26,6 +26,7 @@ }; lid_open { gpios = <&gpioa 6 (GPIO_INPUT | GPIO_PULL_DOWN)>; + enum-name = "GPIO_LID_OPEN"; label = "LID_OPEN"; }; entering_rw { diff --git a/zephyr/projects/npcx_evb/npcx7/include/gpio_map.h b/zephyr/projects/npcx_evb/npcx7/include/gpio_map.h index 025bb78743..944a7e9760 100644 --- a/zephyr/projects/npcx_evb/npcx7/include/gpio_map.h +++ b/zephyr/projects/npcx_evb/npcx7/include/gpio_map.h @@ -24,6 +24,7 @@ * #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 +#define EC_CROS_GPIO_INTERRUPTS \ + GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/npcx_evb/npcx7/prj.conf b/zephyr/projects/npcx_evb/npcx7/prj.conf index 74ad3e6e4f..0e35e486d9 100644 --- a/zephyr/projects/npcx_evb/npcx7/prj.conf +++ b/zephyr/projects/npcx_evb/npcx7/prj.conf @@ -5,6 +5,7 @@ CONFIG_CROS_EC=y CONFIG_PLATFORM_EC=y CONFIG_PLATFORM_EC_BRINGUP=y +CONFIG_PLATFORM_EC_LID_SWITCH=y CONFIG_SHIMMED_TASKS=y CONFIG_CROS_KB_RAW_NPCX=n diff --git a/zephyr/projects/npcx_evb/npcx9/gpio.dts b/zephyr/projects/npcx_evb/npcx9/gpio.dts index 1f41a4dcbe..c4031dd83f 100644 --- a/zephyr/projects/npcx_evb/npcx9/gpio.dts +++ b/zephyr/projects/npcx_evb/npcx9/gpio.dts @@ -26,6 +26,7 @@ }; lid_open { gpios = <&gpioa 6 (GPIO_INPUT | GPIO_PULL_DOWN)>; + enum-name = "GPIO_LID_OPEN"; label = "LID_OPEN"; }; entering_rw { diff --git a/zephyr/projects/npcx_evb/npcx9/include/gpio_map.h b/zephyr/projects/npcx_evb/npcx9/include/gpio_map.h index 025bb78743..944a7e9760 100644 --- a/zephyr/projects/npcx_evb/npcx9/include/gpio_map.h +++ b/zephyr/projects/npcx_evb/npcx9/include/gpio_map.h @@ -24,6 +24,7 @@ * #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 +#define EC_CROS_GPIO_INTERRUPTS \ + GPIO_INT(GPIO_LID_OPEN, GPIO_INT_EDGE_BOTH, lid_interrupt) #endif /* __ZEPHYR_GPIO_MAP_H */ diff --git a/zephyr/projects/npcx_evb/npcx9/prj.conf b/zephyr/projects/npcx_evb/npcx9/prj.conf index 7be8dfacea..ec1e590d6b 100644 --- a/zephyr/projects/npcx_evb/npcx9/prj.conf +++ b/zephyr/projects/npcx_evb/npcx9/prj.conf @@ -5,6 +5,7 @@ CONFIG_CROS_EC=y CONFIG_PLATFORM_EC=y CONFIG_PLATFORM_EC_BRINGUP=y +CONFIG_PLATFORM_EC_LID_SWITCH=y CONFIG_SHIMMED_TASKS=y CONFIG_CROS_KB_RAW_NPCX=n |