Lines Matching +full:bridge +full:- +full:enable

1 // SPDX-License-Identifier: GPL-2.0-only
25 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02},
26 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0},
27 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
28 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
29 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
30 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00},
32 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x08},
33 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
34 {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
35 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
36 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
37 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
38 {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
39 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a},
42 /* Enable double clock */
50 {BRIDGE, M5602_XB_MCU_CLK_DIV, 0x02},
51 {BRIDGE, M5602_XB_MCU_CLK_CTRL, 0xb0},
52 {BRIDGE, M5602_XB_SEN_CLK_DIV, 0x00},
53 {BRIDGE, M5602_XB_SEN_CLK_CTRL, 0xb0},
54 {BRIDGE, M5602_XB_ADC_CTRL, 0xc0},
55 {BRIDGE, M5602_XB_SENSOR_CTRL, 0x00},
57 {BRIDGE, M5602_XB_SENSOR_TYPE, 0x08},
58 {BRIDGE, M5602_XB_GPIO_DIR, 0x05},
59 {BRIDGE, M5602_XB_GPIO_DAT, 0x04},
60 {BRIDGE, M5602_XB_GPIO_EN_H, 0x06},
61 {BRIDGE, M5602_XB_GPIO_DIR_H, 0x06},
62 {BRIDGE, M5602_XB_GPIO_DAT_H, 0x00},
63 {BRIDGE, M5602_XB_GPIO_DAT, 0x00},
64 {BRIDGE, M5602_XB_I2C_CLK_DIV, 0x0a},
72 /* Enable double clock */
86 /* Enable color matrix for RGB/YUV, Delay Y channel,
89 /* Enable digital BLC, Set output mode to U Y V Y */
93 /* Enable HREF and some out of spec things */
105 /* Enable full range output */
107 /* Enable HREF at optical black, enable ADBLC bias,
108 enable ADBLC, reset timings at format change */
151 /* Enable denoise, and white-pixel erase */
156 /* Enable VARIOPIXEL */
167 {BRIDGE, M5602_XB_LINE_OF_FRAME_H, 0x82},
168 {BRIDGE, M5602_XB_LINE_OF_FRAME_L, 0x00},
169 {BRIDGE, M5602_XB_PIX_OF_LINE_H, 0x82},
170 {BRIDGE, M5602_XB_PIX_OF_LINE_L, 0x00},
171 {BRIDGE, M5602_XB_SIG_INI, 0x01}
307 return -ENODEV; in ov9650_probe()
312 /* Run the pre-init before probing the sensor */ in ov9650_probe()
327 return -ENODEV; in ov9650_probe()
330 return -ENODEV; in ov9650_probe()
336 return -ENODEV; in ov9650_probe()
339 sd->gspca_dev.cam.cam_mode = ov9650_modes; in ov9650_probe()
340 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov9650_modes); in ov9650_probe()
367 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in ov9650_init_controls()
369 sd->gspca_dev.vdev.ctrl_handler = hdl; in ov9650_init_controls()
372 sd->auto_white_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, in ov9650_init_controls()
375 sd->red_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, in ov9650_init_controls()
378 sd->blue_bal = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, in ov9650_init_controls()
382 sd->autoexpo = v4l2_ctrl_new_std_menu(hdl, &ov9650_ctrl_ops, in ov9650_init_controls()
384 sd->expo = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_EXPOSURE, in ov9650_init_controls()
387 sd->autogain = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, in ov9650_init_controls()
389 sd->gain = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_GAIN, 0, in ov9650_init_controls()
392 sd->hflip = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_HFLIP, in ov9650_init_controls()
394 sd->vflip = v4l2_ctrl_new_std(hdl, &ov9650_ctrl_ops, V4L2_CID_VFLIP, in ov9650_init_controls()
397 if (hdl->error) { in ov9650_init_controls()
399 return hdl->error; in ov9650_init_controls()
402 v4l2_ctrl_auto_cluster(3, &sd->auto_white_bal, 0, false); in ov9650_init_controls()
403 v4l2_ctrl_auto_cluster(2, &sd->autoexpo, 0, false); in ov9650_init_controls()
404 v4l2_ctrl_auto_cluster(2, &sd->autogain, 0, false); in ov9650_init_controls()
405 v4l2_ctrl_cluster(2, &sd->hflip); in ov9650_init_controls()
414 struct cam *cam = &sd->gspca_dev.cam; in ov9650_start()
416 int width = cam->cam_mode[sd->gspca_dev.curr_mode].width; in ov9650_start()
417 int height = cam->cam_mode[sd->gspca_dev.curr_mode].height; in ov9650_start()
418 int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv; in ov9650_start()
423 sd->vflip->val) || in ov9650_start()
425 !sd->vflip->val)) in ov9650_start()
426 ver_offs--; in ov9650_start()
433 if (res_init_ov9650[i][0] == BRIDGE) in ov9650_start()
548 sd->sensor = NULL; in ov9650_disconnect()
638 int hflip = sd->hflip->val; in ov9650_set_hvflip()
639 int vflip = sd->vflip->val; in ov9650_set_hvflip()
651 /* When vflip is toggled we need to readjust the bridge hsync/vsync */ in ov9650_set_hvflip()
652 if (gspca_dev->streaming) in ov9650_set_hvflip()
716 container_of(ctrl->handler, struct gspca_dev, ctrl_handler); in ov9650_s_ctrl()
720 if (!gspca_dev->streaming) in ov9650_s_ctrl()
723 switch (ctrl->id) { in ov9650_s_ctrl()
725 err = ov9650_set_auto_white_balance(gspca_dev, ctrl->val); in ov9650_s_ctrl()
726 if (err || ctrl->val) in ov9650_s_ctrl()
728 err = ov9650_set_red_balance(gspca_dev, sd->red_bal->val); in ov9650_s_ctrl()
731 err = ov9650_set_blue_balance(gspca_dev, sd->blue_bal->val); in ov9650_s_ctrl()
734 err = ov9650_set_auto_exposure(gspca_dev, ctrl->val); in ov9650_s_ctrl()
735 if (err || ctrl->val == V4L2_EXPOSURE_AUTO) in ov9650_s_ctrl()
737 err = ov9650_set_exposure(gspca_dev, sd->expo->val); in ov9650_s_ctrl()
740 err = ov9650_set_auto_gain(gspca_dev, ctrl->val); in ov9650_s_ctrl()
741 if (err || ctrl->val) in ov9650_s_ctrl()
743 err = ov9650_set_gain(gspca_dev, sd->gain->val); in ov9650_s_ctrl()
749 return -EINVAL; in ov9650_s_ctrl()