summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-01-28 22:26:10 +1100
committerCommit Bot <commit-bot@chromium.org>2022-01-28 22:06:03 +0000
commit54405fe8c5d38343128179375abb9e833cf37620 (patch)
treee321dff0368945f8d813343341e63b9e1e04e02c
parentd86e62fbc9e5bcfecd6ce6f7d0a91a1ced0f1cc6 (diff)
downloadchrome-ec-54405fe8c5d38343128179375abb9e833cf37620.tar.gz
SPI0: Use Zephyr API for interrupt enabling of SPI0
Use Zephyr API for SPI0 interrupt enable. BUG=b:214608987 TEST=zmake configure -b krabby BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I2c9d06096b8d4914f57f0e73e40b15ac044c52a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3423612 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--zephyr/drivers/cros_shi/cros_shi_it8xxx2.c3
-rw-r--r--zephyr/projects/asurada/hayato/gpio.dts1
-rw-r--r--zephyr/projects/corsola/gpio_krabby.dts1
3 files changed, 2 insertions, 3 deletions
diff --git a/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c b/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c
index 64753e0833..c33686f334 100644
--- a/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c
+++ b/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c
@@ -17,6 +17,7 @@
#include "chipset.h"
#include "console.h"
+#include "gpio/gpio_int.h"
#include "host_command.h"
/* Console output macros */
@@ -370,7 +371,7 @@ static int cros_shi_ite_init(const struct device *dev)
irq_enable(DT_INST_IRQN(0));
/* Enable SPI chip select pin interrupt */
- gpio_enable_interrupt(GPIO_SPI0_CS);
+ gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_spi0_cs));
return 0;
}
diff --git a/zephyr/projects/asurada/hayato/gpio.dts b/zephyr/projects/asurada/hayato/gpio.dts
index 08ac8d4262..a39bebe4d7 100644
--- a/zephyr/projects/asurada/hayato/gpio.dts
+++ b/zephyr/projects/asurada/hayato/gpio.dts
@@ -100,7 +100,6 @@
gpio_spi0_cs: spi0_cs {
#gpio-cells = <0>;
gpios = <&gpiom 5 (GPIO_INPUT | GPIO_VOLTAGE_1P8)>;
- enum-name = "GPIO_SPI0_CS";
};
gpio_x_ec_gpio2: x_ec_gpio2 {
#gpio-cells = <0>;
diff --git a/zephyr/projects/corsola/gpio_krabby.dts b/zephyr/projects/corsola/gpio_krabby.dts
index 1debeebc6a..b2df9bc453 100644
--- a/zephyr/projects/corsola/gpio_krabby.dts
+++ b/zephyr/projects/corsola/gpio_krabby.dts
@@ -75,7 +75,6 @@
spi0_cs: spi0_cs {
#gpio-cells = <0>;
gpios = <&gpiom 5 (GPIO_INPUT | GPIO_VOLTAGE_1P8)>;
- enum-name = "GPIO_SPI0_CS";
};
x_ec_gpio2: x_ec_gpio2 {
gpios = <&gpiob 2 (GPIO_INPUT | GPIO_ODR_HIGH)>;