summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2022-02-09 17:02:42 -0700
committerCommit Bot <commit-bot@chromium.org>2022-02-11 01:00:02 +0000
commit86bc4ab6082ccff0d9d63ca2364a37df0ffa859f (patch)
tree3b84fec47454b4342c69ab0aab092244b9279401
parent087f08bd46a7d4dbdf14bdecfb59ca9c3ecf088d (diff)
downloadchrome-ec-86bc4ab6082ccff0d9d63ca2364a37df0ffa859f.tar.gz
zephyr: Don't include gpio_map.h for tests
gpio_map.h is only used in one test, and I plan to move some gpios into native_posix.dts, so I don't want all tests to have to create a gpio_map.h file. BRANCH=None BUG=b:214256453 TEST=zmake testall Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I4003d2eca9a5446f83fde4d28c2da4b873052ea5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3451265 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
-rw-r--r--zephyr/dts/bindings/gpio/gpio-enum-name.yaml7
-rw-r--r--zephyr/shim/include/board.h3
-rw-r--r--zephyr/test/drivers/include/gpio_map.h11
-rw-r--r--zephyr/test/drivers/overlay.dts2
4 files changed, 7 insertions, 16 deletions
diff --git a/zephyr/dts/bindings/gpio/gpio-enum-name.yaml b/zephyr/dts/bindings/gpio/gpio-enum-name.yaml
index 7e4e80f1f0..de6f9e90ce 100644
--- a/zephyr/dts/bindings/gpio/gpio-enum-name.yaml
+++ b/zephyr/dts/bindings/gpio/gpio-enum-name.yaml
@@ -42,6 +42,7 @@ properties:
- GPIO_EC_CHG_LED_Y_C1
- GPIO_EC_DPBRDG_HPD_ODL
- GPIO_EC_INT_L
+ - GPIO_EC_KB_BL_EN_L
- GPIO_EC_PCH_SYS_PWROK
- GPIO_EC_PMIC_EN_ODL
- GPIO_EC_PMIC_WATCHDOG_L
@@ -76,7 +77,6 @@ properties:
- GPIO_ID_1_USB_C0_C2_TCPC_RST_ODL
- GPIO_IMVP9_VRRDY_OD
- GPIO_KBD_KSO2
- - GPIO_EC_KB_BL_EN_L
- GPIO_LID_ACCEL_INT_L
- GPIO_LID_OPEN
- GPIO_PACKET_MODE_EN
@@ -115,6 +115,7 @@ properties:
- GPIO_SYS_RESET_L
- GPIO_SYS_RST_ODL
- GPIO_TABLET_MODE_L
+ - GPIO_TEMP_SENSOR_POWER
- GPIO_TEST
- GPIO_USB_A0_OC_ODL
- GPIO_USB_C0_BC12_INT_L
@@ -141,15 +142,15 @@ properties:
- GPIO_USB_C1_PD_RST_L
- GPIO_USB_C1_PPC_INT_ODL
- GPIO_USB_C1_RST_ODL
- - GPIO_USB_C1_RT_RST_R_ODL
- GPIO_USB_C1_RT_RST_ODL
+ - GPIO_USB_C1_RT_RST_R_ODL
- GPIO_USB_C1_SWCTL_INT_ODL
- GPIO_USB_C1_TCPC_INT_ODL
- GPIO_USB_C1_TCPC_RST_L
- GPIO_USB_C2_BC12_INT_ODL
- GPIO_USB_C2_PPC_INT_ODL
- - GPIO_VCCST_PWRGD_OD
- GPIO_VBOB_EN
+ - GPIO_VCCST_PWRGD_OD
- GPIO_VOLUME_DOWN_L
- GPIO_VOLUME_UP_L
- GPIO_WARM_RESET_L
diff --git a/zephyr/shim/include/board.h b/zephyr/shim/include/board.h
index 8acdca7983..74caadfeef 100644
--- a/zephyr/shim/include/board.h
+++ b/zephyr/shim/include/board.h
@@ -7,6 +7,7 @@
#define __BOARD_H
#include <devicetree.h>
+#include "common.h"
/* Included shimed version of gpio signal. */
#include "gpio_signal.h"
@@ -15,7 +16,7 @@
#include "power/power.h"
/* Include board specific gpio mapping/aliases if named_pgios node exists */
-#if DT_NODE_EXISTS(DT_PATH(named_gpios))
+#if !defined(TEST_BUILD) && DT_NODE_EXISTS(DT_PATH(named_gpios))
#include "gpio_map.h"
#endif
diff --git a/zephyr/test/drivers/include/gpio_map.h b/zephyr/test/drivers/include/gpio_map.h
deleted file mode 100644
index 54af7c76df..0000000000
--- a/zephyr/test/drivers/include/gpio_map.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef __ZEPHYR_GPIO_MAP_H
-#define __ZEPHYR_GPIO_MAP_H
-
-#define GPIO_TEMP_SENSOR_POWER GPIO_PG_EC_DSW_PWROK
-
-#endif /* __ZEPHYR_GPIO_MAP_H */
diff --git a/zephyr/test/drivers/overlay.dts b/zephyr/test/drivers/overlay.dts
index 4d0996fbf5..d3111c6f76 100644
--- a/zephyr/test/drivers/overlay.dts
+++ b/zephyr/test/drivers/overlay.dts
@@ -42,7 +42,7 @@
};
pg_ec_dsw_pwrok {
gpios = <&gpio0 4 GPIO_INPUT>;
- enum-name = "GPIO_PG_EC_DSW_PWROK";
+ enum-name = "GPIO_TEMP_SENSOR_POWER";
};
gpio_ec_pch_wake_odl: ec_pch_wake_odl {
gpios = <&gpio0 5 GPIO_OUT_HIGH>;