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 <[email protected]>
  • Loading branch information
josuah committed May 21, 2024
1 parent 34c84ec commit ce289c7
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 14 deletions.
8 changes: 4 additions & 4 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-keep-sorted-stop

Check failure on line 13 in drivers/video/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

KeepSorted

drivers/video/CMakeLists.txt:13 sorted block is not sorted, sort by running: "ex -s -c '10,12 sort i|x' drivers/video/CMakeLists.txt"
14 changes: 4 additions & 10 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/sensor/Kconfig"

# zephyr-keep-sorted-start
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/Kconfig.stm32_dcmi"

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

Check failure on line 40 in drivers/video/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

KeepSorted

drivers/video/Kconfig:40 sorted block is not sorted, sort by running: "ex -s -c '37,39 sort i|x' drivers/video/Kconfig"

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 ce289c7

Please sign in to comment.