summaryrefslogtreecommitdiff
path: root/zephyr/include
diff options
context:
space:
mode:
authorHyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com>2021-03-19 20:52:30 -0700
committerCommit Bot <commit-bot@chromium.org>2021-03-24 02:10:38 +0000
commit3c5dd8f4b8d96d73545668b327bb2706b67ffb9d (patch)
tree40e86aa5bc77ca8f487881556f34b78a670ade0e /zephyr/include
parent2a731332de85391482029130ca88874b93dcc03e (diff)
downloadchrome-ec-3c5dd8f4b8d96d73545668b327bb2706b67ffb9d.tar.gz
zephyr: DT: basic support for motion sensor
This change allows sensor drivers to create motion sensor entry using the information from DT. BUG=b:173507858 BRANCH=none TEST=make buildall -j8 build volteer on zephyr Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> Change-Id: I1cae9760492966601c1d98050764a2e93b4fc013 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2778816 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/include')
-rw-r--r--zephyr/include/dt-bindings/motionsense/utils.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/zephyr/include/dt-bindings/motionsense/utils.h b/zephyr/include/dt-bindings/motionsense/utils.h
new file mode 100644
index 0000000000..7f0e5f5fc8
--- /dev/null
+++ b/zephyr/include/dt-bindings/motionsense/utils.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright 2021 Google LLC.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#ifndef DT_BINDINGS_UTILS_H
+#define DT_BINDINGS_UTILS_H
+
+#define BIT(x) (1U << (x))
+#define ROUND_UP_FLAG BIT(31)
+#define USEC_PER_MSEC 1000
+
+#endif /* DT_BINDINGS_UTILS_H */