diff --git a/drivers/video/CMakeLists.txt b/drivers/video/CMakeLists.txt index 2e52d1f66ea8890..2d51a46819e16a7 100644 --- a/drivers/video/CMakeLists.txt +++ b/drivers/video/CMakeLists.txt @@ -4,12 +4,11 @@ zephyr_library() zephyr_library_sources(video_common.c) +add_subdirectory(i2c) + +# zephyr-keep-sorted-start zephyr_library_sources_ifdef(CONFIG_VIDEO_MCUX_CSI video_mcux_csi.c) zephyr_library_sources_ifdef(CONFIG_VIDEO_MCUX_MIPI_CSI2RX video_mcux_mipi_csi2rx.c) -zephyr_library_sources_ifdef(CONFIG_VIDEO_SW_GENERATOR video_sw_generator.c) -zephyr_library_sources_ifdef(CONFIG_VIDEO_MT9M114 mt9m114.c) -zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7725 ov7725.c) -zephyr_library_sources_ifdef(CONFIG_VIDEO_OV2640 ov2640.c) zephyr_library_sources_ifdef(CONFIG_VIDEO_STM32_DCMI video_stm32_dcmi.c) -zephyr_library_sources_ifdef(CONFIG_VIDEO_OV5640 ov5640.c) -zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7670 ov7670.c) +zephyr_library_sources_ifdef(CONFIG_VIDEO_SW_GENERATOR video_sw_generator.c) +# zephyr-keep-sorted-stop diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index d6a6bd3ccce669e..3bd702871328bfa 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -31,22 +31,13 @@ config VIDEO_BUFFER_POOL_ALIGN int "Alignment of the video pool’s buffer" default 64 -source "drivers/video/Kconfig.mcux_csi" +source "drivers/video/i2c/Kconfig" +# zephyr-keep-sorted-start +source "drivers/video/Kconfig.mcux_csi" source "drivers/video/Kconfig.mcux_mipi_csi2rx" - -source "drivers/video/Kconfig.sw_generator" - -source "drivers/video/Kconfig.mt9m114" - -source "drivers/video/Kconfig.ov7725" - -source "drivers/video/Kconfig.ov2640" - source "drivers/video/Kconfig.stm32_dcmi" - -source "drivers/video/Kconfig.ov5640" - -source "drivers/video/Kconfig.ov7670" +source "drivers/video/Kconfig.sw_generator" +# zephyr-keep-sorted-stop endif # VIDEO diff --git a/drivers/video/i2c/CMakeLists.txt b/drivers/video/i2c/CMakeLists.txt new file mode 100644 index 000000000000000..a9f34504d5db383 --- /dev/null +++ b/drivers/video/i2c/CMakeLists.txt @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: Apache-2.0 + +zephyr_library() + +# zephyr-keep-sorted-start +zephyr_library_sources_ifdef(CONFIG_VIDEO_MT9M114 video_mt9m114.c) +zephyr_library_sources_ifdef(CONFIG_VIDEO_OV2640 video_ov2640.c) +zephyr_library_sources_ifdef(CONFIG_VIDEO_OV5640 video_ov5640.c) +zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7670 video_ov7670.c) +zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7725 video_ov7725.c) +# zephyr-keep-sorted-stop diff --git a/drivers/video/i2c/Kconfig b/drivers/video/i2c/Kconfig new file mode 100644 index 000000000000000..6732eeea2af0283 --- /dev/null +++ b/drivers/video/i2c/Kconfig @@ -0,0 +1,13 @@ +# VIDEO drivers on I2C bus configuration options + +# Copyright (c) 2019 Linaro Limited +# Copyright (c) 2024 tinyVision.ai Inc. +# SPDX-License-Identifier: Apache-2.0 + +# zephyr-keep-sorted-start +source "drivers/video/i2c/Kconfig.mt9m114" +source "drivers/video/i2c/Kconfig.ov2640" +source "drivers/video/i2c/Kconfig.ov5640" +source "drivers/video/i2c/Kconfig.ov7670" +source "drivers/video/i2c/Kconfig.ov7725" +# zephyr-keep-sorted-stop diff --git a/drivers/video/Kconfig.mt9m114 b/drivers/video/i2c/Kconfig.mt9m114 similarity index 100% rename from drivers/video/Kconfig.mt9m114 rename to drivers/video/i2c/Kconfig.mt9m114 diff --git a/drivers/video/Kconfig.ov2640 b/drivers/video/i2c/Kconfig.ov2640 similarity index 100% rename from drivers/video/Kconfig.ov2640 rename to drivers/video/i2c/Kconfig.ov2640 diff --git a/drivers/video/Kconfig.ov5640 b/drivers/video/i2c/Kconfig.ov5640 similarity index 100% rename from drivers/video/Kconfig.ov5640 rename to drivers/video/i2c/Kconfig.ov5640 diff --git a/drivers/video/Kconfig.ov7670 b/drivers/video/i2c/Kconfig.ov7670 similarity index 100% rename from drivers/video/Kconfig.ov7670 rename to drivers/video/i2c/Kconfig.ov7670 diff --git a/drivers/video/Kconfig.ov7725 b/drivers/video/i2c/Kconfig.ov7725 similarity index 100% rename from drivers/video/Kconfig.ov7725 rename to drivers/video/i2c/Kconfig.ov7725 diff --git a/drivers/video/mt9m114.c b/drivers/video/i2c/video_mt9m114.c similarity index 100% rename from drivers/video/mt9m114.c rename to drivers/video/i2c/video_mt9m114.c diff --git a/drivers/video/ov2640.c b/drivers/video/i2c/video_ov2640.c similarity index 100% rename from drivers/video/ov2640.c rename to drivers/video/i2c/video_ov2640.c diff --git a/drivers/video/ov5640.c b/drivers/video/i2c/video_ov5640.c similarity index 100% rename from drivers/video/ov5640.c rename to drivers/video/i2c/video_ov5640.c diff --git a/drivers/video/ov7670.c b/drivers/video/i2c/video_ov7670.c similarity index 100% rename from drivers/video/ov7670.c rename to drivers/video/i2c/video_ov7670.c diff --git a/drivers/video/ov7725.c b/drivers/video/i2c/video_ov7725.c similarity index 100% rename from drivers/video/ov7725.c rename to drivers/video/i2c/video_ov7725.c