summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/gpio_map.h
diff options
context:
space:
mode:
authorTomasz Michalec <tm@semihalf.com>2021-04-21 23:40:49 +0200
committerCommit Bot <commit-bot@chromium.org>2021-05-20 10:12:33 +0000
commit2a2b10cfc9c22737f4c02fa976caef3c40317847 (patch)
tree601212f09b8081f6d5a5210dbfdafe751db66cf4 /zephyr/test/drivers/gpio_map.h
parent7b271975c0b6f0f4263e85d5142cf0baed2e3414 (diff)
downloadchrome-ec-2a2b10cfc9c22737f4c02fa976caef3c40317847.tar.gz
zephyr: drivers: add thermistor test suite
Thermistor driver uses ADC to read temperature. Because of that ADC emulator is added to overlay dts. Thermistor test suite check behaviour in case of ADC error and test if conversion from ADC output to temperature is precise. BUG=b:184857072 BRANCH=none TEST=run zmake drivers test Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Icc6c779ce590d2768a382bccfb04acec657a140c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2886888 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/test/drivers/gpio_map.h')
-rw-r--r--zephyr/test/drivers/gpio_map.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/zephyr/test/drivers/gpio_map.h b/zephyr/test/drivers/gpio_map.h
index 4caa2f420d..1f67138bd2 100644
--- a/zephyr/test/drivers/gpio_map.h
+++ b/zephyr/test/drivers/gpio_map.h
@@ -9,6 +9,16 @@
#include <devicetree.h>
#include <gpio_signal.h>
+/*
+ * Without https://github.com/zephyrproject-rtos/zephyr/pull/29282, we need
+ * to manually link GPIO_ defines that platform/ec code expects to the
+ * enum gpio_signal values that are generated by device tree bindings.
+ *
+ * Note we only need to create aliases for GPIOs that are referenced in common
+ * platform/ec code.
+ */
+#define CONFIG_TEMP_SENSOR_POWER_GPIO GPIO_PG_EC_DSW_PWROK
+
#define EC_CROS_GPIO_INTERRUPTS \
GPIO_INT(GPIO_AC_PRESENT, GPIO_INT_EDGE_BOTH, extpower_interrupt)