Lines Matching +full:output +full:- +full:pixel +full:- +full:format
5 * SPDX-License-Identifier: Apache-2.0
15 #include <zephyr/drivers/video-controls.h>
54 /* Camera output format */
88 {0x316A, 2, 0x8270}, /* Auto txlo_row for hot pixel and linear full well optimization */
89 {0x316C, 2, 0x8270}, /* Auto txlo for hot pixel and linear full well optimization */
117 {0xC984, 2, 0x8000}, /* CAM_PORT_OUTPUT_CONTROL, for MIPI CSI-2 interface : 0x8000 */
174 #define MT9M114_VIDEO_FORMAT_CAP(width, height, format) \ argument
176 .pixelformat = (format), .width_min = (width), .width_max = (width), \
221 const struct mt9m114_config *cfg = dev->config; in mt9m114_write_reg()
233 return -ENOTSUP; in mt9m114_write_reg()
236 return i2c_burst_write16_dt(&cfg->i2c, reg_addr, value, reg_size); in mt9m114_write_reg()
242 const struct mt9m114_config *cfg = dev->config; in mt9m114_read_reg()
246 return -ENOTSUP; in mt9m114_read_reg()
249 err = i2c_burst_read16_dt(&cfg->i2c, reg_addr, value, reg_size); in mt9m114_read_reg()
264 return -ENOTSUP; in mt9m114_read_reg()
368 return -EIO; in mt9m114_set_state()
394 struct mt9m114_data *drv_data = dev->data; in mt9m114_set_fmt()
399 if (fmt->pixelformat == fmts[i].pixelformat && fmt->width >= fmts[i].width_min && in mt9m114_set_fmt()
400 fmt->width <= fmts[i].width_max && fmt->height >= fmts[i].height_min && in mt9m114_set_fmt()
401 fmt->height <= fmts[i].height_max) { in mt9m114_set_fmt()
407 if (i == (ARRAY_SIZE(fmts) - 1)) { in mt9m114_set_fmt()
408 LOG_ERR("Unsupported pixel format or resolution"); in mt9m114_set_fmt()
409 return -ENOTSUP; in mt9m114_set_fmt()
412 if (!memcmp(&drv_data->fmt, fmt, sizeof(drv_data->fmt))) { in mt9m114_set_fmt()
417 drv_data->fmt = *fmt; in mt9m114_set_fmt()
419 /* Set output pixel format */ in mt9m114_set_fmt()
420 ret = mt9m114_set_output_format(dev, fmt->pixelformat); in mt9m114_set_fmt()
422 LOG_ERR("Unable to set pixel format"); in mt9m114_set_fmt()
426 /* Set output resolution */ in mt9m114_set_fmt()
428 if (fmt->width == resolutionConfigs[i].width && in mt9m114_set_fmt()
429 fmt->height == resolutionConfigs[i].height) { in mt9m114_set_fmt()
447 struct mt9m114_data *drv_data = dev->data; in mt9m114_get_fmt()
449 *fmt = drv_data->fmt; in mt9m114_get_fmt()
467 caps->format_caps = fmts; in mt9m114_get_caps()
487 return -ENOTSUP; in mt9m114_set_ctrl()
519 return -ENODEV; in mt9m114_init()
524 return -ENODEV; in mt9m114_init()
537 /* Set default format to 480x272 RGB565 */ in mt9m114_init()
545 LOG_ERR("Unable to configure default format"); in mt9m114_init()
546 return -EIO; in mt9m114_init()
565 const struct mt9m114_config *cfg = dev->config; in mt9m114_init_0()
567 if (!device_is_ready(cfg->i2c.bus)) { in mt9m114_init_0()
569 return -ENODEV; in mt9m114_init_0()