summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-02-10 14:47:31 -0700
committerCommit Bot <commit-bot@chromium.org>2022-02-25 21:10:27 +0000
commit4a1570d51015e6833b91007d2b16181eb8e8c2d9 (patch)
tree275cbc670c857266ba8ef715699657470a755e02
parentc555168cf63c9b8a49b783c9d410dfeb632e0601 (diff)
downloadchrome-ec-4a1570d51015e6833b91007d2b16181eb8e8c2d9.tar.gz
zephyr: Fix GPIO includes for EC chips
Code under the zephyr subdirectory should use the upstream Zephyr API for accessing GPIOs. There are name conflicts for the GPIO flags, so ensure Zephyr code always includes the Zephyr header file. BUG=b:218856245 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I2be5ca58246bbe0679127ca4a17913dcddadc807 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3489103 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
-rw-r--r--zephyr/drivers/cros_flash/cros_flash_npcx.c1
-rw-r--r--zephyr/drivers/cros_flash/cros_flash_xec.c1
-rw-r--r--zephyr/drivers/cros_system/cros_system_it8xxx2.c4
-rw-r--r--zephyr/drivers/cros_system/cros_system_npcx.c3
-rw-r--r--zephyr/drivers/cros_system/cros_system_xec.c2
-rw-r--r--zephyr/shim/chip/it8xxx2/gpio.c2
-rw-r--r--zephyr/shim/chip/npcx/gpio.c2
7 files changed, 5 insertions, 10 deletions
diff --git a/zephyr/drivers/cros_flash/cros_flash_npcx.c b/zephyr/drivers/cros_flash/cros_flash_npcx.c
index 9ed25c20e0..2a2fe57678 100644
--- a/zephyr/drivers/cros_flash/cros_flash_npcx.c
+++ b/zephyr/drivers/cros_flash/cros_flash_npcx.c
@@ -14,7 +14,6 @@
#include <soc.h>
#include "flash.h"
-#include "gpio.h"
#include "spi_flash_reg.h"
#include "write_protect.h"
#include "../drivers/flash/spi_nor.h"
diff --git a/zephyr/drivers/cros_flash/cros_flash_xec.c b/zephyr/drivers/cros_flash/cros_flash_xec.c
index 0a2a2b3dbb..f75518004d 100644
--- a/zephyr/drivers/cros_flash/cros_flash_xec.c
+++ b/zephyr/drivers/cros_flash/cros_flash_xec.c
@@ -14,7 +14,6 @@
#include <soc.h>
#include "flash.h"
-#include "gpio.h"
#include "spi_flash_reg.h"
#include "write_protect.h"
#include "../drivers/flash/spi_nor.h"
diff --git a/zephyr/drivers/cros_system/cros_system_it8xxx2.c b/zephyr/drivers/cros_system/cros_system_it8xxx2.c
index b322d71135..4e49ab85b2 100644
--- a/zephyr/drivers/cros_system/cros_system_it8xxx2.c
+++ b/zephyr/drivers/cros_system/cros_system_it8xxx2.c
@@ -6,12 +6,12 @@
#define DT_DRV_COMPAT ite_it8xxx2_gctrl
#include <device.h>
-#include <drivers/cros_system.h>
+#include <drivers/gpio.h>
#include <logging/log.h>
#include <soc.h>
#include <soc/ite_it8xxx2/reg_def_cros.h>
-#include "gpio.h"
+#include "drivers/cros_system.h"
#include "gpio/gpio_int.h"
#include "system.h"
#include "util.h"
diff --git a/zephyr/drivers/cros_system/cros_system_npcx.c b/zephyr/drivers/cros_system/cros_system_npcx.c
index b000eeec4d..17f3ab81e7 100644
--- a/zephyr/drivers/cros_system/cros_system_npcx.c
+++ b/zephyr/drivers/cros_system/cros_system_npcx.c
@@ -4,7 +4,6 @@
*/
#include <arch/arm/aarch32/cortex_m/cmsis.h>
-#include <drivers/cros_system.h>
#include <drivers/gpio.h>
#include <drivers/watchdog.h>
#include <logging/log.h>
@@ -12,7 +11,7 @@
#include <soc/nuvoton_npcx/reg_def_cros.h>
#include <sys/util.h>
-#include "gpio.h"
+#include "drivers/cros_system.h"
#include "gpio/gpio_int.h"
#include "rom_chip.h"
#include "soc_gpio.h"
diff --git a/zephyr/drivers/cros_system/cros_system_xec.c b/zephyr/drivers/cros_system/cros_system_xec.c
index 0fce933b98..76b5c95362 100644
--- a/zephyr/drivers/cros_system/cros_system_xec.c
+++ b/zephyr/drivers/cros_system/cros_system_xec.c
@@ -5,14 +5,12 @@
#include <arch/arm/aarch32/cortex_m/cmsis.h>
#include <drivers/cros_system.h>
-#include <drivers/gpio.h>
#include <drivers/watchdog.h>
#include <logging/log.h>
#include <soc.h>
#include <soc/microchip_xec/reg_def_cros.h>
#include <sys/util.h>
-#include "gpio.h"
#include "system.h"
#include "system_chip.h"
diff --git a/zephyr/shim/chip/it8xxx2/gpio.c b/zephyr/shim/chip/it8xxx2/gpio.c
index 148e1a97c9..8fb8bee2cf 100644
--- a/zephyr/shim/chip/it8xxx2/gpio.c
+++ b/zephyr/shim/chip/it8xxx2/gpio.c
@@ -4,11 +4,11 @@
*/
#include <device.h>
+#include <drivers/gpio.h>
#include <kernel.h>
#include <logging/log.h>
-#include "gpio.h"
#include "gpio/gpio.h"
LOG_MODULE_REGISTER(shim_cros_gpio, LOG_LEVEL_ERR);
diff --git a/zephyr/shim/chip/npcx/gpio.c b/zephyr/shim/chip/npcx/gpio.c
index 148e1a97c9..8fb8bee2cf 100644
--- a/zephyr/shim/chip/npcx/gpio.c
+++ b/zephyr/shim/chip/npcx/gpio.c
@@ -4,11 +4,11 @@
*/
#include <device.h>
+#include <drivers/gpio.h>
#include <kernel.h>
#include <logging/log.h>
-#include "gpio.h"
#include "gpio/gpio.h"
LOG_MODULE_REGISTER(shim_cros_gpio, LOG_LEVEL_ERR);