]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
media: dt-bindings: media: Add macros for video interface bus types
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 24 Apr 2023 14:21:09 +0000 (16:21 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Fri, 16 Jun 2023 09:22:07 +0000 (11:22 +0200)
Add a new dt-bindings/media/video-interfaces.h header that defines
macros corresponding to the bus types from media/video-interfaces.yaml.
This allows avoiding hardcoded constants in device tree sources.

Based on linux commit f7eeb0084593 ("media: dt-bindings: media: Add macros
for video interface bus types")

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
include/dt-bindings/media/video-interfaces.h [new file with mode: 0644]

diff --git a/include/dt-bindings/media/video-interfaces.h b/include/dt-bindings/media/video-interfaces.h
new file mode 100644 (file)
index 0000000..68ac4e0
--- /dev/null
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (C) 2022 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+ */
+
+#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+
+#define MEDIA_BUS_TYPE_CSI2_CPHY               1
+#define MEDIA_BUS_TYPE_CSI1                    2
+#define MEDIA_BUS_TYPE_CCP2                    3
+#define MEDIA_BUS_TYPE_CSI2_DPHY               4
+#define MEDIA_BUS_TYPE_PARALLEL                        5
+#define MEDIA_BUS_TYPE_BT656                   6
+
+#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */