Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions drivers/video/video_stm32_dcmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,28 @@ static int video_stm32_dcmi_get_caps(const struct device *dev,
return ret;
}

static inline int video_stm32_dcmi_set_ctrl(const struct device *dev, unsigned int cid, void *value)
{
const struct video_stm32_dcmi_config *config = dev->config;
int ret;

/* Forward to source dev if any */
ret = video_set_ctrl(config->sensor_dev, cid, value);

return ret;
}

static inline int video_stm32_dcmi_get_ctrl(const struct device *dev, unsigned int cid, void *value)
{
const struct video_stm32_dcmi_config *config = dev->config;
int ret;

/* Forward to source dev if any */
ret = video_get_ctrl(config->sensor_dev, cid, value);

return ret;
}

static const struct video_driver_api video_stm32_dcmi_driver_api = {
.set_format = video_stm32_dcmi_set_fmt,
.get_format = video_stm32_dcmi_get_fmt,
Expand All @@ -364,6 +386,8 @@ static const struct video_driver_api video_stm32_dcmi_driver_api = {
.enqueue = video_stm32_dcmi_enqueue,
.dequeue = video_stm32_dcmi_dequeue,
.get_caps = video_stm32_dcmi_get_caps,
.set_ctrl = video_stm32_dcmi_set_ctrl,
.get_ctrl = video_stm32_dcmi_get_ctrl,
};

static void video_stm32_dcmi_irq_config_func(const struct device *dev)
Expand Down