diff options
author | Jett Rink <jettrink@chromium.org> | 2020-10-14 13:58:40 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-21 21:24:14 +0000 |
commit | b81af1233e23497ca8317f2669947398d0142e12 (patch) | |
tree | fb70584fedaa44810587cc11c888de7def9893dc /zephyr/shim/include/board.h | |
parent | 65d7595dfe16963f31fb057ca93ba2f7334ecb0a (diff) | |
download | chrome-ec-b81af1233e23497ca8317f2669947398d0142e12.tar.gz |
zephyr: add initial gpio shim
Add the gpioget and gpioset commands to zephyr build. This requires
a minimum set of platform/ec gpio_ API functions. Add the minimum set of
gpio_ functions. More can be added later depending on future uses
BRANCH=none
BUG=b:169935802
TEST=verify gpioget and gpioset console command work on volteer
TEST=verify that posix-ec compiles without any named_gpios in DT
Change-Id: Ie6f0b4505aa17c50c01b71fc4ea5b59393f39fce
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2488141
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/shim/include/board.h')
-rw-r--r-- | zephyr/shim/include/board.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/zephyr/shim/include/board.h b/zephyr/shim/include/board.h index 01f9344a8a..62bb1b23e2 100644 --- a/zephyr/shim/include/board.h +++ b/zephyr/shim/include/board.h @@ -6,6 +6,13 @@ #ifndef __BOARD_H #define __BOARD_H -/* Intentionally empty. */ +#include <devicetree.h> + +/* Included shimed version of gpio signal. */ +#include <gpio_signal.h> +/* Include board specific gpio mapping/aliases if named_pgios node exists */ +#if DT_NODE_EXISTS(DT_PATH(named_gpios)) +#include <gpio_map.h> +#endif #endif /* __BOARD_H */ |