Skip to content

Commit

Permalink
drivers: video: move all sensors to a dedicated directory
Browse files Browse the repository at this point in the history
This is meant to clearly identify all sensors and facilitate grouped
maintenace of all sensors.

This also updates the layout of the Kconfig and CMakeLists.txt to
how it is done to the root level Kconfig/CMakeLists.txt.

Signed-off-by: Josuah Demangeon <me@josuah.net>
  • Loading branch information
josuah committed May 31, 2024
1 parent 34c84ec commit ad9e425
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 16 deletions.
10 changes: 5 additions & 5 deletions drivers/video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ zephyr_library()

zephyr_library_sources(video_common.c)

add_subdirectory(sensor)

# zephyr-keep-sorted-start
zephyr_library_sources_ifdef(CONFIG_VIDEO_MCUX_CSI video_mcux_csi.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_SW_GENERATOR video_sw_generator.c)
# zephyr-keep-sorted-stop
16 changes: 5 additions & 11 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ config VIDEO_BUFFER_POOL_ALIGN
int "Alignment of the video pool’s buffer"
default 64

source "drivers/video/Kconfig.mcux_csi"

source "drivers/video/Kconfig.sw_generator"

source "drivers/video/Kconfig.mt9m114"

source "drivers/video/Kconfig.ov7725"

source "drivers/video/Kconfig.ov2640"
source "drivers/video/sensor/Kconfig"

# zephyr-keep-sorted-start
source "drivers/video/Kconfig.mcux_csi"
source "drivers/video/Kconfig.stm32_dcmi"

source "drivers/video/Kconfig.ov5640"
source "drivers/video/Kconfig.sw_generator"
# zephyr-keep-sorted-stop

endif # VIDEO
10 changes: 10 additions & 0 deletions drivers/video/sensor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

# zephyr-keep-sorted-start
zephyr_library_sources_ifdef(CONFIG_VIDEO_MT9M114 mt9m114.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_OV2640 ov2640.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_OV5640 ov5640.c)
zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7725 ov7725.c)
# zephyr-keep-sorted-stop
8 changes: 8 additions & 0 deletions drivers/video/sensor/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0

# zephyr-keep-sorted-start
source "drivers/video/sensor/Kconfig.mt9m114"
source "drivers/video/sensor/Kconfig.ov2640"
source "drivers/video/sensor/Kconfig.ov5640"
source "drivers/video/sensor/Kconfig.ov7725"
# zephyr-keep-sorted-stop
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ad9e425

Please sign in to comment.