Lines Matching +full:vga +full:- +full:format
1 // SPDX-License-Identifier: GPL-2.0-only
9 * Copyright 2006-7 Jonathan Corbet <corbet@lwn.net>
20 #include <media/v4l2-device.h>
21 #include <media/v4l2-event.h>
22 #include <media/v4l2-ctrls.h>
23 #include <media/v4l2-fwnode.h>
24 #include <media/v4l2-mediabus.h>
25 #include <media/v4l2-image-sizes.h>
29 MODULE_DESCRIPTION("A low-level driver for OmniVision ov7670 sensors");
34 MODULE_PARM_DESC(debug, "Debug level (0-1)");
73 #define COM7_FMT_CIF 0x20 /* CIF format */
74 #define COM7_FMT_QVGA 0x10 /* QVGA format */
75 #define COM7_FMT_QCIF 0x08 /* QCIF format */
76 #define COM7_RGB 0x04 /* bits 0 and 2 - RGB format */
78 #define COM7_BAYER 0x01 /* Bayer format */
87 #define REG_COM9 0x14 /* Control 9 - gain ceiling */
113 #define TSLB_YLAST 0x04 /* UYVY or VYUY - see com13 */
125 #define COM13_UVSWAP 0x01 /* V before U - w/TSLB */
127 #define COM14_DCWEN 0x10 /* DCW/PCLK-scale enable */
138 #define COM17_AECWIN 0xc0 /* AEC window - must match COM4 */
145 * Order: v-red, v-green, v-blue, u-red, u-green, u-blue
147 * They are nine-bit signed quantities, with the sign bit
148 * stored in 0x58. Sign for v-red is bit 0, and up from there.
233 struct v4l2_mbus_framefmt format; member
234 struct ov7670_format_struct *fmt; /* Current format */
258 return &container_of(ctrl->handler, struct ov7670_info, hdl)->sd; in to_sd()
265 * is really no making sense of most of these - lots of "reserved" values
268 * These settings give VGA YUYV.
285 { REG_COM7, 0 }, /* VGA */
288 * make sense - hstop is less than hstart. But they work...
377 /* Extra-weird stuff. Some sort of multiplexor register */
397 * video format.
464 * Low-level register I/O.
511 msg.addr = client->addr; in ov7670_read_i2c()
515 ret = i2c_transfer(client->adapter, &msg, 1); in ov7670_read_i2c()
524 ret = i2c_transfer(client->adapter, &msg, 1); in ov7670_read_i2c()
541 msg.addr = client->addr; in ov7670_write_i2c()
545 ret = i2c_transfer(client->adapter, &msg, 1); in ov7670_write_i2c()
558 if (info->use_smbus) in ov7670_read()
569 if (info->use_smbus) in ov7670_write()
593 while (vals->reg_num != 0xff || vals->value != 0xff) { in ov7670_write_array()
594 int ret = ov7670_write(sd, vals->reg_num, vals->value); in ov7670_write_array()
632 return -ENODEV; in ov7670_detect()
637 return -ENODEV; in ov7670_detect()
645 return -ENODEV; in ov7670_detect()
650 return -ENODEV; in ov7670_detect()
656 * Store information about the video data format. The color matrix
657 * is deeply tied into the format, so keep the relevant values here.
670 .cmatrix = { 128, -128, 0, -34, -94, 128 },
676 .cmatrix = { 179, -179, 0, -61, -176, 228 },
682 .cmatrix = { 179, -179, 0, -61, -176, 228 },
699 * QCIF mode is done (by OV) in a very strange way - it actually looks like
700 * VGA with weird scaling options - they do *not* use the canned QCIF mode
724 /* VGA */
772 * Currently, only VGA is supported. Theoretically it could be possible
792 u32 clkrc = info->clkrc; in ov7675_get_framerate()
795 if (info->pll_bypass) in ov7675_get_framerate()
801 if (info->fmt->mbus_code == MEDIA_BUS_FMT_SBGGR8_1X8) in ov7675_get_framerate()
804 tpf->numerator = 1; in ov7675_get_framerate()
805 tpf->denominator = (5 * pll_factor * info->clock_speed) / in ov7675_get_framerate()
814 ret = ov7670_write(sd, REG_CLKRC, info->clkrc); in ov7675_apply_framerate()
819 info->pll_bypass ? DBLV_BYPASS : DBLV_X4); in ov7675_apply_framerate()
836 if (tpf->numerator == 0 || tpf->denominator == 0) { in ov7675_set_framerate()
839 pll_factor = info->pll_bypass ? 1 : PLL_FACTOR; in ov7675_set_framerate()
840 clkrc = (5 * pll_factor * info->clock_speed * tpf->numerator) / in ov7675_set_framerate()
841 (4 * tpf->denominator); in ov7675_set_framerate()
842 if (info->fmt->mbus_code == MEDIA_BUS_FMT_SBGGR8_1X8) in ov7675_set_framerate()
844 clkrc--; in ov7675_set_framerate()
856 info->clkrc = clkrc; in ov7675_set_framerate()
864 * the framerate will be restored right after power-up. in ov7675_set_framerate()
866 if (info->on) in ov7675_set_framerate()
877 tpf->numerator = 1; in ov7670_get_framerate_legacy()
878 tpf->denominator = info->clock_speed; in ov7670_get_framerate_legacy()
879 if ((info->clkrc & CLK_EXT) == 0 && (info->clkrc & CLK_SCALE) > 1) in ov7670_get_framerate_legacy()
880 tpf->denominator /= (info->clkrc & CLK_SCALE); in ov7670_get_framerate_legacy()
889 if (tpf->numerator == 0 || tpf->denominator == 0) in ov7670_set_framerate_legacy()
892 div = (tpf->numerator * info->clock_speed) / tpf->denominator; in ov7670_set_framerate_legacy()
897 info->clkrc = (info->clkrc & 0x80) | div; in ov7670_set_framerate_legacy()
898 tpf->numerator = 1; in ov7670_set_framerate_legacy()
899 tpf->denominator = info->clock_speed / div; in ov7670_set_framerate_legacy()
904 * the framerate will be restored right after power-up. in ov7670_set_framerate_legacy()
906 if (info->on) in ov7670_set_framerate_legacy()
907 return ov7670_write(sd, REG_CLKRC, info->clkrc); in ov7670_set_framerate_legacy()
959 if (code->pad || code->index >= N_OV7670_FMTS) in ov7670_enum_mbus_code()
960 return -EINVAL; in ov7670_enum_mbus_code()
962 code->code = ov7670_formats[code->index].mbus_code; in ov7670_enum_mbus_code()
974 unsigned int n_win_sizes = info->devtype->n_win_sizes; in ov7670_try_fmt_internal()
978 if (ov7670_formats[index].mbus_code == fmt->code) in ov7670_try_fmt_internal()
981 /* default to first format */ in ov7670_try_fmt_internal()
983 fmt->code = ov7670_formats[0].mbus_code; in ov7670_try_fmt_internal()
990 fmt->field = V4L2_FIELD_NONE; in ov7670_try_fmt_internal()
996 if (info->min_width || info->min_height) in ov7670_try_fmt_internal()
998 wsize = info->devtype->win_sizes + i; in ov7670_try_fmt_internal()
1000 if (wsize->width < info->min_width || in ov7670_try_fmt_internal()
1001 wsize->height < info->min_height) { in ov7670_try_fmt_internal()
1010 for (wsize = info->devtype->win_sizes; in ov7670_try_fmt_internal()
1011 wsize < info->devtype->win_sizes + win_sizes_limit; wsize++) in ov7670_try_fmt_internal()
1012 if (fmt->width >= wsize->width && fmt->height >= wsize->height) in ov7670_try_fmt_internal()
1014 if (wsize >= info->devtype->win_sizes + win_sizes_limit) in ov7670_try_fmt_internal()
1015 wsize--; /* Take the smallest one */ in ov7670_try_fmt_internal()
1021 fmt->width = wsize->width; in ov7670_try_fmt_internal()
1022 fmt->height = wsize->height; in ov7670_try_fmt_internal()
1023 fmt->colorspace = ov7670_formats[index].colorspace; in ov7670_try_fmt_internal()
1025 info->format = *fmt; in ov7670_try_fmt_internal()
1033 struct ov7670_win_size *wsize = info->wsize; in ov7670_apply_fmt()
1040 * to set it absolutely here, as long as the format-specific in ov7670_apply_fmt()
1043 com7 = info->fmt->regs[0].value; in ov7670_apply_fmt()
1044 com7 |= wsize->com7_bit; in ov7670_apply_fmt()
1052 if (info->mbus_config & V4L2_MBUS_VSYNC_ACTIVE_LOW) in ov7670_apply_fmt()
1054 if (info->mbus_config & V4L2_MBUS_HSYNC_ACTIVE_LOW) in ov7670_apply_fmt()
1056 if (info->pclk_hb_disable) in ov7670_apply_fmt()
1065 ret = ov7670_write_array(sd, info->fmt->regs + 1); in ov7670_apply_fmt()
1069 ret = ov7670_set_hw(sd, wsize->hstart, wsize->hstop, wsize->vstart, in ov7670_apply_fmt()
1070 wsize->vstop); in ov7670_apply_fmt()
1074 if (wsize->regs) { in ov7670_apply_fmt()
1075 ret = ov7670_write_array(sd, wsize->regs); in ov7670_apply_fmt()
1090 ret = ov7670_write(sd, REG_CLKRC, info->clkrc); in ov7670_apply_fmt()
1098 * Set a format.
1102 struct v4l2_subdev_format *format) in ov7670_set_fmt() argument
1108 if (format->pad) in ov7670_set_fmt()
1109 return -EINVAL; in ov7670_set_fmt()
1111 if (format->which == V4L2_SUBDEV_FORMAT_TRY) { in ov7670_set_fmt()
1112 ret = ov7670_try_fmt_internal(sd, &format->format, NULL, NULL); in ov7670_set_fmt()
1115 mbus_fmt = v4l2_subdev_state_get_format(sd_state, format->pad); in ov7670_set_fmt()
1116 *mbus_fmt = format->format; in ov7670_set_fmt()
1120 ret = ov7670_try_fmt_internal(sd, &format->format, &info->fmt, &info->wsize); in ov7670_set_fmt()
1127 * the frame format will be restored right after power-up. in ov7670_set_fmt()
1129 if (info->on) in ov7670_set_fmt()
1137 struct v4l2_subdev_format *format) in ov7670_get_fmt() argument
1142 if (format->which == V4L2_SUBDEV_FORMAT_TRY) { in ov7670_get_fmt()
1144 format->format = *mbus_fmt; in ov7670_get_fmt()
1147 format->format = info->format; in ov7670_get_fmt()
1167 if (ival->which != V4L2_SUBDEV_FORMAT_ACTIVE) in ov7670_get_frame_interval()
1168 return -EINVAL; in ov7670_get_frame_interval()
1170 info->devtype->get_framerate(sd, &ival->interval); in ov7670_get_frame_interval()
1179 struct v4l2_fract *tpf = &ival->interval; in ov7670_set_frame_interval()
1186 if (ival->which != V4L2_SUBDEV_FORMAT_ACTIVE) in ov7670_set_frame_interval()
1187 return -EINVAL; in ov7670_set_frame_interval()
1189 return info->devtype->set_framerate(sd, tpf); in ov7670_set_frame_interval()
1206 unsigned int n_win_sizes = info->devtype->n_win_sizes; in ov7670_enum_frame_interval()
1209 if (fie->pad) in ov7670_enum_frame_interval()
1210 return -EINVAL; in ov7670_enum_frame_interval()
1211 if (fie->index >= ARRAY_SIZE(ov7670_frame_rates)) in ov7670_enum_frame_interval()
1212 return -EINVAL; in ov7670_enum_frame_interval()
1221 struct ov7670_win_size *win = &info->devtype->win_sizes[i]; in ov7670_enum_frame_interval()
1223 if (info->min_width && win->width < info->min_width) in ov7670_enum_frame_interval()
1225 if (info->min_height && win->height < info->min_height) in ov7670_enum_frame_interval()
1227 if (fie->width == win->width && fie->height == win->height) in ov7670_enum_frame_interval()
1231 return -EINVAL; in ov7670_enum_frame_interval()
1232 fie->interval.numerator = 1; in ov7670_enum_frame_interval()
1233 fie->interval.denominator = ov7670_frame_rates[fie->index]; in ov7670_enum_frame_interval()
1246 int num_valid = -1; in ov7670_enum_frame_size()
1247 __u32 index = fse->index; in ov7670_enum_frame_size()
1248 unsigned int n_win_sizes = info->devtype->n_win_sizes; in ov7670_enum_frame_size()
1250 if (fse->pad) in ov7670_enum_frame_size()
1251 return -EINVAL; in ov7670_enum_frame_size()
1258 struct ov7670_win_size *win = &info->devtype->win_sizes[i]; in ov7670_enum_frame_size()
1260 if (info->min_width && win->width < info->min_width) in ov7670_enum_frame_size()
1262 if (info->min_height && win->height < info->min_height) in ov7670_enum_frame_size()
1265 fse->min_width = fse->max_width = win->width; in ov7670_enum_frame_size()
1266 fse->min_height = fse->max_height = win->height; in ov7670_enum_frame_size()
1271 return -EINVAL; in ov7670_enum_frame_size()
1296 if (matrix[i] < -255) in ov7670_store_cmatrix()
1299 raw = (-1 * matrix[i]) & 0xff; in ov7670_store_cmatrix()
1317 * So here is a simple table of sine values, 0-90 degrees, in steps
1321 * carefully limited to -180 <= theta <= 180.
1337 theta = -theta; in ov7670_sine()
1338 chs = -1; in ov7670_sine()
1343 theta -= 90; in ov7670_sine()
1344 sine = 1000 - ov7670_sin_table[theta/SIN_STEP]; in ov7670_sine()
1351 theta = 90 - theta; in ov7670_cosine()
1353 theta -= 360; in ov7670_cosine()
1354 else if (theta < -180) in ov7670_cosine()
1370 matrix[i] = (info->fmt->cmatrix[i] * sat) >> 7; in ov7670_calc_cmatrix()
1384 matrix[3] = (matrix[3]*costh - matrix[0]*sinth)/1000; in ov7670_calc_cmatrix()
1385 matrix[4] = (matrix[4]*costh - matrix[1]*sinth)/1000; in ov7670_calc_cmatrix()
1386 matrix[5] = (matrix[5]*costh - matrix[2]*sinth)/1000; in ov7670_calc_cmatrix()
1403 * Some weird registers seem to store values in a sign/magnitude format!
1410 return (128 - v) | 0x80; in ov7670_abs_to_sm()
1559 "8-bar color bar",
1581 switch (ctrl->id) { in ov7670_g_volatile_ctrl()
1583 return ov7670_g_gain(sd, &info->gain->val); in ov7670_g_volatile_ctrl()
1585 return -EINVAL; in ov7670_g_volatile_ctrl()
1593 switch (ctrl->id) { in ov7670_s_ctrl()
1595 return ov7670_s_brightness(sd, ctrl->val); in ov7670_s_ctrl()
1597 return ov7670_s_contrast(sd, ctrl->val); in ov7670_s_ctrl()
1600 info->saturation->val, info->hue->val); in ov7670_s_ctrl()
1602 return ov7670_s_vflip(sd, ctrl->val); in ov7670_s_ctrl()
1604 return ov7670_s_hflip(sd, ctrl->val); in ov7670_s_ctrl()
1608 if (!ctrl->val) { in ov7670_s_ctrl()
1610 return ov7670_s_gain(sd, info->gain->val); in ov7670_s_ctrl()
1612 return ov7670_s_autogain(sd, ctrl->val); in ov7670_s_ctrl()
1616 if (ctrl->val == V4L2_EXPOSURE_MANUAL) { in ov7670_s_ctrl()
1618 return ov7670_s_exp(sd, info->exposure->val); in ov7670_s_ctrl()
1620 return ov7670_s_autoexp(sd, ctrl->val); in ov7670_s_ctrl()
1622 return ov7670_s_test_pattern(sd, ctrl->val); in ov7670_s_ctrl()
1624 return -EINVAL; in ov7670_s_ctrl()
1638 ret = ov7670_read(sd, reg->reg & 0xff, &val); in ov7670_g_register()
1639 reg->val = val; in ov7670_g_register()
1640 reg->size = 1; in ov7670_g_register()
1646 ov7670_write(sd, reg->reg & 0xff, reg->val & 0xff); in ov7670_s_register()
1655 if (info->on) in ov7670_power_on()
1658 clk_prepare_enable(info->clk); in ov7670_power_on()
1660 if (info->pwdn_gpio) in ov7670_power_on()
1661 gpiod_set_value(info->pwdn_gpio, 0); in ov7670_power_on()
1662 if (info->resetb_gpio) { in ov7670_power_on()
1663 gpiod_set_value(info->resetb_gpio, 1); in ov7670_power_on()
1665 gpiod_set_value(info->resetb_gpio, 0); in ov7670_power_on()
1667 if (info->pwdn_gpio || info->resetb_gpio || info->clk) in ov7670_power_on()
1670 info->on = true; in ov7670_power_on()
1677 if (!info->on) in ov7670_power_off()
1680 clk_disable_unprepare(info->clk); in ov7670_power_off()
1682 if (info->pwdn_gpio) in ov7670_power_off()
1683 gpiod_set_value(info->pwdn_gpio, 1); in ov7670_power_off()
1685 info->on = false; in ov7670_power_off()
1692 if (info->on == on) in ov7670_s_power()
1700 v4l2_ctrl_handler_setup(&info->hdl); in ov7670_s_power()
1709 struct v4l2_mbus_framefmt *format) in ov7670_get_default_format() argument
1713 format->width = info->devtype->win_sizes[0].width; in ov7670_get_default_format()
1714 format->height = info->devtype->win_sizes[0].height; in ov7670_get_default_format()
1715 format->colorspace = info->fmt->colorspace; in ov7670_get_default_format()
1716 format->code = info->fmt->mbus_code; in ov7670_get_default_format()
1717 format->field = V4L2_FIELD_NONE; in ov7670_get_default_format()
1722 struct v4l2_mbus_framefmt *format = in ov7670_open() local
1723 v4l2_subdev_state_get_format(fh->state, 0); in ov7670_open()
1725 ov7670_get_default_format(sd, format); in ov7670_open()
1730 /* ----------------------------------------------------------------------- */
1764 /* ----------------------------------------------------------------------- */
1768 info->pwdn_gpio = devm_gpiod_get_optional(&client->dev, "powerdown", in ov7670_init_gpio()
1770 if (IS_ERR(info->pwdn_gpio)) { in ov7670_init_gpio()
1771 dev_info(&client->dev, "can't get %s GPIO\n", "powerdown"); in ov7670_init_gpio()
1772 return PTR_ERR(info->pwdn_gpio); in ov7670_init_gpio()
1775 info->resetb_gpio = devm_gpiod_get_optional(&client->dev, "reset", in ov7670_init_gpio()
1777 if (IS_ERR(info->resetb_gpio)) { in ov7670_init_gpio()
1778 dev_info(&client->dev, "can't get %s GPIO\n", "reset"); in ov7670_init_gpio()
1779 return PTR_ERR(info->resetb_gpio); in ov7670_init_gpio()
1788 * ov7670_parse_dt() - Parse device tree to collect mbus configuration
1800 return -EINVAL; in ov7670_parse_dt()
1802 info->pclk_hb_disable = false; in ov7670_parse_dt()
1803 if (fwnode_property_present(fwnode, "ov7670,pclk-hb-disable")) in ov7670_parse_dt()
1804 info->pclk_hb_disable = true; in ov7670_parse_dt()
1808 return -EINVAL; in ov7670_parse_dt()
1817 return -EINVAL; in ov7670_parse_dt()
1819 info->mbus_config = bus_cfg.bus.parallel.flags; in ov7670_parse_dt()
1831 info = devm_kzalloc(&client->dev, sizeof(*info), GFP_KERNEL); in ov7670_probe()
1833 return -ENOMEM; in ov7670_probe()
1834 sd = &info->sd; in ov7670_probe()
1837 sd->internal_ops = &ov7670_subdev_internal_ops; in ov7670_probe()
1838 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; in ov7670_probe()
1840 info->clock_speed = 30; /* default: a guess */ in ov7670_probe()
1842 if (dev_fwnode(&client->dev)) { in ov7670_probe()
1843 ret = ov7670_parse_dt(&client->dev, info); in ov7670_probe()
1847 } else if (client->dev.platform_data) { in ov7670_probe()
1848 struct ov7670_config *config = client->dev.platform_data; in ov7670_probe()
1854 info->min_width = config->min_width; in ov7670_probe()
1855 info->min_height = config->min_height; in ov7670_probe()
1856 info->use_smbus = config->use_smbus; in ov7670_probe()
1858 if (config->clock_speed) in ov7670_probe()
1859 info->clock_speed = config->clock_speed; in ov7670_probe()
1861 if (config->pll_bypass) in ov7670_probe()
1862 info->pll_bypass = true; in ov7670_probe()
1864 if (config->pclk_hb_disable) in ov7670_probe()
1865 info->pclk_hb_disable = true; in ov7670_probe()
1868 info->clk = devm_clk_get_optional(&client->dev, "xclk"); in ov7670_probe()
1869 if (IS_ERR(info->clk)) in ov7670_probe()
1870 return PTR_ERR(info->clk); in ov7670_probe()
1878 if (info->clk) { in ov7670_probe()
1879 info->clock_speed = clk_get_rate(info->clk) / 1000000; in ov7670_probe()
1880 if (info->clock_speed < 10 || info->clock_speed > 48) { in ov7670_probe()
1881 ret = -EINVAL; in ov7670_probe()
1891 client->addr << 1, client->adapter->name); in ov7670_probe()
1895 client->addr << 1, client->adapter->name); in ov7670_probe()
1897 info->devtype = i2c_get_match_data(client); in ov7670_probe()
1898 info->fmt = &ov7670_formats[0]; in ov7670_probe()
1899 info->wsize = &info->devtype->win_sizes[0]; in ov7670_probe()
1901 ov7670_get_default_format(sd, &info->format); in ov7670_probe()
1903 info->clkrc = 0; in ov7670_probe()
1908 info->devtype->set_framerate(sd, &tpf); in ov7670_probe()
1910 v4l2_ctrl_handler_init(&info->hdl, 10); in ov7670_probe()
1911 v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1913 v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1915 v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1917 v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1919 info->saturation = v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1921 info->hue = v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1922 V4L2_CID_HUE, -180, 180, 5, 0); in ov7670_probe()
1923 info->gain = v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1925 info->auto_gain = v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1927 info->exposure = v4l2_ctrl_new_std(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1929 info->auto_exposure = v4l2_ctrl_new_std_menu(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1932 v4l2_ctrl_new_std_menu_items(&info->hdl, &ov7670_ctrl_ops, in ov7670_probe()
1934 ARRAY_SIZE(ov7670_test_pattern_menu) - 1, 0, 0, in ov7670_probe()
1936 sd->ctrl_handler = &info->hdl; in ov7670_probe()
1937 if (info->hdl.error) { in ov7670_probe()
1938 ret = info->hdl.error; in ov7670_probe()
1946 v4l2_ctrl_auto_cluster(2, &info->auto_gain, 0, true); in ov7670_probe()
1947 v4l2_ctrl_auto_cluster(2, &info->auto_exposure, in ov7670_probe()
1949 v4l2_ctrl_cluster(2, &info->saturation); in ov7670_probe()
1951 info->pad.flags = MEDIA_PAD_FL_SOURCE; in ov7670_probe()
1952 info->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; in ov7670_probe()
1953 ret = media_entity_pads_init(&info->sd.entity, 1, &info->pad); in ov7670_probe()
1957 v4l2_ctrl_handler_setup(&info->hdl); in ov7670_probe()
1959 ret = v4l2_async_register_subdev(&info->sd); in ov7670_probe()
1967 media_entity_cleanup(&info->sd.entity); in ov7670_probe()
1969 v4l2_ctrl_handler_free(&info->hdl); in ov7670_probe()
1981 v4l2_ctrl_handler_free(&info->hdl); in ov7670_remove()
1982 media_entity_cleanup(&info->sd.entity); in ov7670_remove()