drivers: video: introduce CONFIG_VIDEO_LOG_LEVEL
Zephyr drivers have typically one log level defined per class. The video
drivers were making exception. This adds the missing log level for video
drivers.
Since all headers had to be modified, this also:
- Update the log initialization to the new syntax from 5e34681
- Sort the #include list to something like #41543
Signed-off-by: Josuah Demangeon <me@josuah.net>
This commit is contained in:
parent
fe72c4b447
commit
0ac91da3a4
12 changed files with 36 additions and 44 deletions
|
@ -13,6 +13,10 @@ menuconfig VIDEO
|
||||||
|
|
||||||
if VIDEO
|
if VIDEO
|
||||||
|
|
||||||
|
module = VIDEO
|
||||||
|
module-str = video
|
||||||
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
|
|
||||||
config VIDEO_INIT_PRIORITY
|
config VIDEO_INIT_PRIORITY
|
||||||
int "Video initialization priority"
|
int "Video initialization priority"
|
||||||
default 60
|
default 60
|
||||||
|
|
|
@ -17,7 +17,3 @@ config VIDEO_STM32_DCMI
|
||||||
select USE_STM32_HAL_DMA_EX if $(DT_STM32_DCMI_HAS_DMA)
|
select USE_STM32_HAL_DMA_EX if $(DT_STM32_DCMI_HAS_DMA)
|
||||||
help
|
help
|
||||||
Enable driver for STM32 Digital camera interface periheral.
|
Enable driver for STM32 Digital camera interface periheral.
|
||||||
|
|
||||||
module = STM32_DCMI
|
|
||||||
module-str = stm32_dcmi
|
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
|
||||||
|
|
|
@ -6,17 +6,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DT_DRV_COMPAT aptina_mt9m114
|
#define DT_DRV_COMPAT aptina_mt9m114
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/sys/byteorder.h>
|
#include <zephyr/sys/byteorder.h>
|
||||||
|
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
#include <zephyr/drivers/i2c.h>
|
#include <zephyr/drivers/i2c.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
|
LOG_MODULE_REGISTER(video_mt9m114, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
#include <zephyr/logging/log.h>
|
|
||||||
LOG_MODULE_REGISTER(mt9m114);
|
|
||||||
|
|
||||||
#define MT9M114_CHIP_ID_VAL 0x2481
|
#define MT9M114_CHIP_ID_VAL 0x2481
|
||||||
|
|
||||||
|
|
|
@ -5,16 +5,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DT_DRV_COMPAT ovti_ov2640
|
#define DT_DRV_COMPAT ovti_ov2640
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
#include <zephyr/drivers/i2c.h>
|
#include <zephyr/drivers/i2c.h>
|
||||||
#include <zephyr/drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
|
LOG_MODULE_REGISTER(video_ov2640, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
#include <zephyr/logging/log.h>
|
|
||||||
LOG_MODULE_REGISTER(ov2640);
|
|
||||||
|
|
||||||
/* DSP register bank FF=0x00*/
|
/* DSP register bank FF=0x00*/
|
||||||
#define QS 0x44
|
#define QS 0x44
|
||||||
|
|
|
@ -6,17 +6,15 @@
|
||||||
|
|
||||||
#define DT_DRV_COMPAT ovti_ov5640
|
#define DT_DRV_COMPAT ovti_ov5640
|
||||||
|
|
||||||
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
|
#include <zephyr/logging/log.h>
|
||||||
|
#include <zephyr/sys/byteorder.h>
|
||||||
#include <zephyr/drivers/i2c.h>
|
#include <zephyr/drivers/i2c.h>
|
||||||
#include <zephyr/drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
#include <zephyr/kernel.h>
|
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
|
LOG_MODULE_REGISTER(video_ov5640, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
#include <zephyr/logging/log.h>
|
|
||||||
LOG_MODULE_REGISTER(ov5640);
|
|
||||||
|
|
||||||
#include <zephyr/sys/byteorder.h>
|
|
||||||
|
|
||||||
#define CHIP_ID_REG 0x300a
|
#define CHIP_ID_REG 0x300a
|
||||||
#define CHIP_ID_VAL 0x5640
|
#define CHIP_ID_VAL 0x5640
|
||||||
|
|
|
@ -9,10 +9,9 @@
|
||||||
#include <zephyr/drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
#include <zephyr/drivers/i2c.h>
|
#include <zephyr/drivers/i2c.h>
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
|
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_REGISTER(ov7670);
|
|
||||||
|
LOG_MODULE_REGISTER(video_ov7670, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
|
|
||||||
/* Initialization register structure */
|
/* Initialization register structure */
|
||||||
struct ov7670_reg {
|
struct ov7670_reg {
|
||||||
|
|
|
@ -5,18 +5,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DT_DRV_COMPAT ovti_ov7725
|
#define DT_DRV_COMPAT ovti_ov7725
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/device.h>
|
#include <zephyr/device.h>
|
||||||
|
|
||||||
#include <zephyr/sys/byteorder.h>
|
#include <zephyr/sys/byteorder.h>
|
||||||
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
#include <zephyr/drivers/i2c.h>
|
#include <zephyr/drivers/i2c.h>
|
||||||
#include <zephyr/drivers/gpio.h>
|
#include <zephyr/drivers/gpio.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
|
LOG_MODULE_REGISTER(video_ov7725, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
#include <zephyr/logging/log.h>
|
|
||||||
LOG_MODULE_REGISTER(ov7725);
|
|
||||||
|
|
||||||
#define OV7725_REVISION 0x7721U
|
#define OV7725_REVISION 0x7721U
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#include <zephyr/kernel.h>
|
|
||||||
|
|
||||||
|
#include <zephyr/kernel.h>
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
|
|
||||||
K_HEAP_DEFINE(video_buffer_pool,
|
K_HEAP_DEFINE(video_buffer_pool,
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
#define DT_DRV_COMPAT nxp_imx_csi
|
#define DT_DRV_COMPAT nxp_imx_csi
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
#include <zephyr/irq.h>
|
||||||
|
#include <zephyr/drivers/video.h>
|
||||||
|
#include <zephyr/drivers/pinctrl.h>
|
||||||
|
|
||||||
#include <fsl_csi.h>
|
#include <fsl_csi.h>
|
||||||
|
|
||||||
|
@ -14,10 +17,6 @@
|
||||||
#include <fsl_cache.h>
|
#include <fsl_cache.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <zephyr/drivers/video.h>
|
|
||||||
#include <zephyr/drivers/pinctrl.h>
|
|
||||||
#include <zephyr/irq.h>
|
|
||||||
|
|
||||||
struct video_mcux_csi_config {
|
struct video_mcux_csi_config {
|
||||||
CSI_Type *base;
|
CSI_Type *base;
|
||||||
const struct device *source_dev;
|
const struct device *source_dev;
|
||||||
|
|
|
@ -6,14 +6,13 @@
|
||||||
|
|
||||||
#define DT_DRV_COMPAT nxp_mipi_csi2rx
|
#define DT_DRV_COMPAT nxp_mipi_csi2rx
|
||||||
|
|
||||||
#include <fsl_mipi_csi2rx.h>
|
|
||||||
|
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
|
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_REGISTER(mipi_csi);
|
|
||||||
|
#include <fsl_mipi_csi2rx.h>
|
||||||
|
|
||||||
|
LOG_MODULE_REGISTER(video_mipi_csi2rx, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Two data lanes are set by default as 2-lanes camera sensors are
|
* Two data lanes are set by default as 2-lanes camera sensors are
|
||||||
|
|
|
@ -7,10 +7,12 @@
|
||||||
#define DT_DRV_COMPAT st_stm32_dcmi
|
#define DT_DRV_COMPAT st_stm32_dcmi
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
#include <zephyr/irq.h>
|
||||||
|
#include <zephyr/logging/log.h>
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
#include <zephyr/drivers/pinctrl.h>
|
#include <zephyr/drivers/pinctrl.h>
|
||||||
#include <zephyr/irq.h>
|
|
||||||
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
|
#include <zephyr/drivers/clock_control/stm32_clock_control.h>
|
||||||
#include <zephyr/drivers/clock_control.h>
|
#include <zephyr/drivers/clock_control.h>
|
||||||
#include <zephyr/drivers/dma.h>
|
#include <zephyr/drivers/dma.h>
|
||||||
|
@ -18,8 +20,7 @@
|
||||||
|
|
||||||
#include <stm32_ll_dma.h>
|
#include <stm32_ll_dma.h>
|
||||||
|
|
||||||
#include <zephyr/logging/log.h>
|
LOG_MODULE_REGISTER(video_stm32_dcmi, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
LOG_MODULE_REGISTER(video_stm32_dcmi, CONFIG_STM32_DCMI_LOG_LEVEL);
|
|
||||||
|
|
||||||
K_HEAP_DEFINE(video_stm32_buffer_pool, CONFIG_VIDEO_BUFFER_POOL_SZ_MAX);
|
K_HEAP_DEFINE(video_stm32_buffer_pool, CONFIG_VIDEO_BUFFER_POOL_SZ_MAX);
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,14 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define DT_DRV_COMPAT zephyr_sw_generator
|
||||||
|
|
||||||
#include <zephyr/kernel.h>
|
#include <zephyr/kernel.h>
|
||||||
|
|
||||||
#include <zephyr/drivers/video.h>
|
#include <zephyr/drivers/video.h>
|
||||||
|
|
||||||
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
|
|
||||||
#include <zephyr/logging/log.h>
|
#include <zephyr/logging/log.h>
|
||||||
LOG_MODULE_REGISTER(video_sw_generator);
|
|
||||||
|
LOG_MODULE_REGISTER(video_sw_generator, CONFIG_VIDEO_LOG_LEVEL);
|
||||||
|
|
||||||
#define VIDEO_PATTERN_COLOR_BAR 0
|
#define VIDEO_PATTERN_COLOR_BAR 0
|
||||||
#define VIDEO_PATTERN_FPS 30
|
#define VIDEO_PATTERN_FPS 30
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue