Skip to content

Commit

Permalink
drivers: video: i2c: new category to group all sensors
Browse files Browse the repository at this point in the history
Video processing devices sometimes include external chips often
configured on I2C: sensors, flash, motors, decoders, ISPs...

This commit groups the sensor on a new I2C directory layout akin
to Linux's drivers/media/i2c.

The Kconfig CMakeLists.txt is slightly adjusted for the occasion,
to look like the other drivers directories.

Signed-off-by: Josuah Demangeon <[email protected]>
  • Loading branch information
josuah committed Jul 28, 2024
1 parent b5fdbc2 commit 988c355
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 20 deletions.
11 changes: 5 additions & 6 deletions drivers/video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 5 additions & 14 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions drivers/video/i2c/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions drivers/video/i2c/Kconfig
Original file line number Diff line number Diff line change
@@ -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
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.
File renamed without changes.
File renamed without changes.

0 comments on commit 988c355

Please sign in to comment.