Home
last modified time | relevance | path

Searched refs:gspca_dev (Results 1 – 25 of 31) sorted by relevance

12

/linux-4.19.296/drivers/media/usb/gspca/
Dxirlink_cit.c51 struct gspca_dev gspca_dev; /* !! must be the first item */ member
67 static void sd_stop0(struct gspca_dev *gspca_dev);
676 static int cit_write_reg(struct gspca_dev *gspca_dev, u16 value, u16 index) in cit_write_reg() argument
678 struct usb_device *udev = gspca_dev->dev; in cit_write_reg()
691 static int cit_read_reg(struct gspca_dev *gspca_dev, u16 index, int verbose) in cit_read_reg() argument
693 struct usb_device *udev = gspca_dev->dev; in cit_read_reg()
694 __u8 *buf = gspca_dev->usb_buf; in cit_read_reg()
707 gspca_dbg(gspca_dev, D_PROBE, "Register %04x value: %02x\n", in cit_read_reg()
722 static void cit_send_FF_04_02(struct gspca_dev *gspca_dev) in cit_send_FF_04_02() argument
724 cit_write_reg(gspca_dev, 0x00FF, 0x0127); in cit_send_FF_04_02()
[all …]
Dstv0680.c38 struct gspca_dev gspca_dev; /* !! must be the first item */ member
45 static int stv_sndctrl(struct gspca_dev *gspca_dev, int set, u8 req, u16 val, in stv_sndctrl() argument
55 pipe = usb_rcvctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
59 pipe = usb_sndctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
63 pipe = usb_rcvctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
67 pipe = usb_sndctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
71 ret = usb_control_msg(gspca_dev->dev, pipe, in stv_sndctrl()
73 val, 0, gspca_dev->usb_buf, size, 500); in stv_sndctrl()
82 static int stv0680_handle_error(struct gspca_dev *gspca_dev, int ret) in stv0680_handle_error() argument
84 stv_sndctrl(gspca_dev, 0, 0x80, 0, 0x02); /* Get Last Error */ in stv0680_handle_error()
[all …]
Dstk1135.c34 struct gspca_dev gspca_dev; /* !! must be the first item */ member
55 static u8 reg_r(struct gspca_dev *gspca_dev, u16 index) in reg_r() argument
57 struct usb_device *dev = gspca_dev->dev; in reg_r()
60 if (gspca_dev->usb_err < 0) in reg_r()
67 gspca_dev->usb_buf, 1, in reg_r()
70 gspca_dbg(gspca_dev, D_USBI, "reg_r 0x%x=0x%02x\n", in reg_r()
71 index, gspca_dev->usb_buf[0]); in reg_r()
74 gspca_dev->usb_err = ret; in reg_r()
78 return gspca_dev->usb_buf[0]; in reg_r()
82 static void reg_w(struct gspca_dev *gspca_dev, u16 index, u8 val) in reg_w() argument
[all …]
Dtopro.c123 struct gspca_dev gspca_dev; /* !! must be the first item */ member
987 static void reg_w(struct gspca_dev *gspca_dev, u8 index, u8 value) in reg_w() argument
989 struct usb_device *dev = gspca_dev->dev; in reg_w()
992 if (gspca_dev->usb_err < 0) in reg_w()
1000 gspca_dev->usb_err = ret; in reg_w()
1005 static void reg_r(struct gspca_dev *gspca_dev, u8 index) in reg_r() argument
1007 struct usb_device *dev = gspca_dev->dev; in reg_r()
1010 if (gspca_dev->usb_err < 0) in reg_r()
1015 0, index, gspca_dev->usb_buf, 1, 500); in reg_r()
1018 gspca_dev->usb_err = ret; in reg_r()
[all …]
Dtv8532.c27 struct gspca_dev gspca_dev; /* !! must be the first item */ member
115 static void reg_w1(struct gspca_dev *gspca_dev, in reg_w1() argument
118 gspca_dev->usb_buf[0] = value; in reg_w1()
119 usb_control_msg(gspca_dev->dev, in reg_w1()
120 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w1()
124 index, gspca_dev->usb_buf, 1, 500); in reg_w1()
128 static void reg_w2(struct gspca_dev *gspca_dev, in reg_w2() argument
131 gspca_dev->usb_buf[0] = value; in reg_w2()
132 gspca_dev->usb_buf[1] = value >> 8; in reg_w2()
133 usb_control_msg(gspca_dev->dev, in reg_w2()
[all …]
Dsn9c2028.c29 struct gspca_dev gspca_dev; /* !! must be the first item */ member
68 static int sn9c2028_command(struct gspca_dev *gspca_dev, u8 *command) in sn9c2028_command() argument
72 gspca_dbg(gspca_dev, D_USBO, "sending command %02x%02x%02x%02x%02x%02x\n", in sn9c2028_command()
76 memcpy(gspca_dev->usb_buf, command, 6); in sn9c2028_command()
77 rc = usb_control_msg(gspca_dev->dev, in sn9c2028_command()
78 usb_sndctrlpipe(gspca_dev->dev, 0), in sn9c2028_command()
81 2, 0, gspca_dev->usb_buf, 6, 500); in sn9c2028_command()
84 gspca_dev->usb_buf[0], rc); in sn9c2028_command()
91 static int sn9c2028_read1(struct gspca_dev *gspca_dev) in sn9c2028_read1() argument
95 rc = usb_control_msg(gspca_dev->dev, in sn9c2028_read1()
[all …]
Dmr97310a.c82 struct gspca_dev gspca_dev; /* !! must be the first item */ member
101 static void sd_stopN(struct gspca_dev *gspca_dev);
132 static int mr_write(struct gspca_dev *gspca_dev, int len) in mr_write() argument
136 rc = usb_bulk_msg(gspca_dev->dev, in mr_write()
137 usb_sndbulkpipe(gspca_dev->dev, 4), in mr_write()
138 gspca_dev->usb_buf, len, NULL, 500); in mr_write()
141 gspca_dev->usb_buf[0], rc); in mr_write()
146 static int mr_read(struct gspca_dev *gspca_dev, int len) in mr_read() argument
150 rc = usb_bulk_msg(gspca_dev->dev, in mr_read()
151 usb_rcvbulkpipe(gspca_dev->dev, 3), in mr_read()
[all …]
Dnw80x.c33 struct gspca_dev gspca_dev; /* !! must be the first item */ member
1535 static void reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
1540 struct usb_device *dev = gspca_dev->dev; in reg_w()
1543 if (gspca_dev->usb_err < 0) in reg_w()
1546 gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x\n", in reg_w()
1549 gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x %02x ...\n", in reg_w()
1551 memcpy(gspca_dev->usb_buf, data, len); in reg_w()
1557 gspca_dev->usb_buf, in reg_w()
1562 gspca_dev->usb_err = ret; in reg_w()
1567 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
[all …]
Dvc032x.c31 struct gspca_dev gspca_dev; /* !! must be the first item */ member
2899 static void reg_r_i(struct gspca_dev *gspca_dev, in reg_r_i() argument
2906 if (gspca_dev->usb_err < 0) in reg_r_i()
2908 ret = usb_control_msg(gspca_dev->dev, in reg_r_i()
2909 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r_i()
2913 index, gspca_dev->usb_buf, len, in reg_r_i()
2917 gspca_dev->usb_err = ret; in reg_r_i()
2922 memset(gspca_dev->usb_buf, 0, USB_BUF_SZ); in reg_r_i()
2925 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
2930 reg_r_i(gspca_dev, req, index, len); in reg_r()
[all …]
Djl2005bcd.c39 struct gspca_dev gspca_dev; /* !! must be the first item */ member
83 static int jl2005c_write2(struct gspca_dev *gspca_dev, unsigned char *command) in jl2005c_write2() argument
87 memcpy(gspca_dev->usb_buf, command, 2); in jl2005c_write2()
88 retval = usb_bulk_msg(gspca_dev->dev, in jl2005c_write2()
89 usb_sndbulkpipe(gspca_dev->dev, 3), in jl2005c_write2()
90 gspca_dev->usb_buf, 2, NULL, 500); in jl2005c_write2()
93 gspca_dev->usb_buf[0], retval); in jl2005c_write2()
98 static int jl2005c_read1(struct gspca_dev *gspca_dev) in jl2005c_read1() argument
102 retval = usb_bulk_msg(gspca_dev->dev, in jl2005c_read1()
103 usb_rcvbulkpipe(gspca_dev->dev, 0x84), in jl2005c_read1()
[all …]
Dspca508.c29 struct gspca_dev gspca_dev; /* !! must be the first item */ member
1240 static int reg_write(struct gspca_dev *gspca_dev, u16 index, u16 value) in reg_write() argument
1243 struct usb_device *dev = gspca_dev->dev; in reg_write()
1250 gspca_dbg(gspca_dev, D_USBO, "reg write i:0x%04x = 0x%02x\n", in reg_write()
1259 static int reg_read(struct gspca_dev *gspca_dev, in reg_read() argument
1264 ret = usb_control_msg(gspca_dev->dev, in reg_read()
1265 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_read()
1270 gspca_dev->usb_buf, 1, in reg_read()
1272 gspca_dbg(gspca_dev, D_USBI, "reg read i:%04x --> %02x\n", in reg_read()
1273 index, gspca_dev->usb_buf[0]); in reg_read()
[all …]
Dautogain_functions.c24 struct gspca_dev *gspca_dev, in gspca_expo_autogain() argument
34 if (v4l2_ctrl_g_ctrl(gspca_dev->autogain) == 0) in gspca_expo_autogain()
37 orig_gain = gain = v4l2_ctrl_g_ctrl(gspca_dev->gain); in gspca_expo_autogain()
38 orig_exposure = exposure = v4l2_ctrl_g_ctrl(gspca_dev->exposure); in gspca_expo_autogain()
44 gspca_dbg(gspca_dev, D_FRAM, "autogain: lum: %d, desired: %d, steps: %d\n", in gspca_expo_autogain()
53 else if (gain > gspca_dev->gain->default_value) in gspca_expo_autogain()
55 else if (exposure > gspca_dev->exposure->minimum) in gspca_expo_autogain()
57 else if (gain > gspca_dev->gain->minimum) in gspca_expo_autogain()
62 if (gain < gspca_dev->gain->default_value) in gspca_expo_autogain()
68 else if (exposure < gspca_dev->exposure->maximum) in gspca_expo_autogain()
[all …]
Dfinepix.c37 struct gspca_dev gspca_dev; /* !! must be the first item */ member
58 static int command(struct gspca_dev *gspca_dev, in command() argument
66 memcpy(gspca_dev->usb_buf, order_values[order], 12); in command()
67 return usb_control_msg(gspca_dev->dev, in command()
68 usb_sndctrlpipe(gspca_dev->dev, 0), in command()
71 USB_RECIP_INTERFACE, 0, 0, gspca_dev->usb_buf, in command()
86 struct gspca_dev *gspca_dev = &dev->gspca_dev; in dostream() local
87 struct urb *urb = gspca_dev->urb[0]; in dostream()
92 gspca_dbg(gspca_dev, D_STREAM, "dostream started\n"); in dostream()
96 while (gspca_dev->present && gspca_dev->streaming) { in dostream()
[all …]
Dkinect.c57 struct gspca_dev gspca_dev; /* !! must be the first item */ member
129 static int send_cmd(struct gspca_dev *gspca_dev, uint16_t cmd, void *cmdbuf, in send_cmd() argument
132 struct sd *sd = (struct sd *) gspca_dev; in send_cmd()
133 struct usb_device *udev = gspca_dev->dev; in send_cmd()
154 gspca_dbg(gspca_dev, D_USBO, "Control cmd=%04x tag=%04x len=%04x: %d\n", in send_cmd()
165 gspca_dbg(gspca_dev, D_USBO, "Control reply: %d\n", actual_len); in send_cmd()
207 static int write_register(struct gspca_dev *gspca_dev, uint16_t reg, in write_register() argument
217 gspca_dbg(gspca_dev, D_USBO, "Write Reg 0x%04x <= 0x%02x\n", reg, data); in write_register()
218 res = send_cmd(gspca_dev, 0x03, cmd, 4, reply, 4); in write_register()
229 static int sd_config_video(struct gspca_dev *gspca_dev, in sd_config_video() argument
[all …]
Dgspca.h31 #define gspca_dbg(gspca_dev, level, fmt, ...) \ argument
32 v4l2_dbg(level, gspca_debug, &(gspca_dev)->v4l2_dev, \
35 #define gspca_err(gspca_dev, fmt, ...) \ argument
36 v4l2_err(&(gspca_dev)->v4l2_dev, fmt, ##__VA_ARGS__)
70 struct gspca_dev;
74 typedef int (*cam_op) (struct gspca_dev *);
75 typedef void (*cam_v_op) (struct gspca_dev *);
76 typedef int (*cam_cf_op) (struct gspca_dev *, const struct usb_device_id *);
77 typedef int (*cam_get_jpg_op) (struct gspca_dev *,
79 typedef int (*cam_set_jpg_op) (struct gspca_dev *,
[all …]
/linux-4.19.296/drivers/media/usb/gspca/stv06xx/
Dstv06xx.c41 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in stv06xx_write_bridge() local
42 struct usb_device *udev = sd->gspca_dev.dev; in stv06xx_write_bridge()
43 __u8 *buf = sd->gspca_dev.usb_buf; in stv06xx_write_bridge()
54 gspca_dbg(gspca_dev, D_CONF, "Written 0x%x to address 0x%x, status: %d\n", in stv06xx_write_bridge()
63 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in stv06xx_read_bridge() local
64 struct usb_device *udev = sd->gspca_dev.dev; in stv06xx_read_bridge()
65 __u8 *buf = sd->gspca_dev.usb_buf; in stv06xx_read_bridge()
73 gspca_dbg(gspca_dev, D_CONF, "Reading 0x%x from address 0x%x, status %d\n", in stv06xx_read_bridge()
97 struct usb_device *udev = sd->gspca_dev.dev; in stv06xx_write_sensor_finish()
98 __u8 *buf = sd->gspca_dev.usb_buf; in stv06xx_write_sensor_finish()
[all …]
Dstv06xx_vv6410.c45 struct gspca_dev *gspca_dev = in vv6410_s_ctrl() local
46 container_of(ctrl->handler, struct gspca_dev, ctrl_handler); in vv6410_s_ctrl()
51 if (!gspca_dev->streaming) in vv6410_s_ctrl()
53 err = vv6410_set_hflip(gspca_dev, ctrl->val); in vv6410_s_ctrl()
56 if (!gspca_dev->streaming) in vv6410_s_ctrl()
58 err = vv6410_set_vflip(gspca_dev, ctrl->val); in vv6410_s_ctrl()
61 err = vv6410_set_analog_gain(gspca_dev, ctrl->val); in vv6410_s_ctrl()
64 err = vv6410_set_exposure(gspca_dev, ctrl->val); in vv6410_s_ctrl()
88 sd->gspca_dev.cam.cam_mode = vv6410_mode; in vv6410_probe()
89 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(vv6410_mode); in vv6410_probe()
[all …]
Dstv06xx_pb0100.c86 struct gspca_dev *gspca_dev = in pb0100_s_ctrl() local
87 container_of(ctrl->handler, struct gspca_dev, ctrl_handler); in pb0100_s_ctrl()
88 struct sd *sd = (struct sd *)gspca_dev; in pb0100_s_ctrl()
94 err = pb0100_set_autogain(gspca_dev, ctrl->val); in pb0100_s_ctrl()
99 err = pb0100_set_gain(gspca_dev, ctrls->gain->val); in pb0100_s_ctrl()
102 err = pb0100_set_exposure(gspca_dev, ctrls->exposure->val); in pb0100_s_ctrl()
105 err = pb0100_set_autogain_target(gspca_dev, ctrl->val); in pb0100_s_ctrl()
117 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in pb0100_init_controls()
178 sd->gspca_dev.cam.cam_mode = pb0100_mode; in pb0100_probe()
179 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(pb0100_mode); in pb0100_probe()
[all …]
Dstv06xx_pb0100.h116 static int pb0100_set_gain(struct gspca_dev *gspca_dev, __s32 val);
117 static int pb0100_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
118 static int pb0100_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val);
119 static int pb0100_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
120 static int pb0100_set_autogain(struct gspca_dev *gspca_dev, __s32 val);
121 static int pb0100_set_autogain_target(struct gspca_dev *gspca_dev, __s32 val);
/linux-4.19.296/drivers/media/usb/gspca/m5602/
Dm5602_core.c59 struct gspca_dev *gspca_dev = (struct gspca_dev *) sd; in m5602_read_bridge() local
60 struct usb_device *udev = sd->gspca_dev.dev; in m5602_read_bridge()
61 __u8 *buf = sd->gspca_dev.usb_buf; in m5602_read_bridge()
69 gspca_dbg(gspca_dev, D_CONF, "Reading bridge register 0x%x containing 0x%x\n", in m5602_read_bridge()
81 struct gspca_dev *gspca_dev = (struct gspca_dev *) sd; in m5602_write_bridge() local
82 struct usb_device *udev = sd->gspca_dev.dev; in m5602_write_bridge()
83 __u8 *buf = sd->gspca_dev.usb_buf; in m5602_write_bridge()
85 gspca_dbg(gspca_dev, D_CONF, "Writing bridge register 0x%x with 0x%x\n", in m5602_write_bridge()
118 struct gspca_dev *gspca_dev = (struct gspca_dev *) sd; in m5602_read_sensor() local
157 gspca_dbg(gspca_dev, D_CONF, "Reading sensor register 0x%x containing 0x%x\n", in m5602_read_sensor()
[all …]
Dm5602_ov9650.c302 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in ov9650_probe() local
314 gspca_dbg(gspca_dev, D_PROBE, "Probing for an ov9650 sensor\n"); in ov9650_probe()
343 sd->gspca_dev.cam.cam_mode = ov9650_modes; in ov9650_probe()
344 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov9650_modes); in ov9650_probe()
371 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in ov9650_init_controls()
373 sd->gspca_dev.vdev.ctrl_handler = hdl; in ov9650_init_controls()
418 struct cam *cam = &sd->gspca_dev.cam; in ov9650_start()
420 int width = cam->cam_mode[sd->gspca_dev.curr_mode].width; in ov9650_start()
421 int height = cam->cam_mode[sd->gspca_dev.curr_mode].height; in ov9650_start()
422 int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv; in ov9650_start()
[all …]
Dm5602_po1030.c163 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in po1030_probe() local
175 gspca_dbg(gspca_dev, D_PROBE, "Probing for a po1030 sensor\n"); in po1030_probe()
200 sd->gspca_dev.cam.cam_mode = po1030_modes; in po1030_probe()
201 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(po1030_modes); in po1030_probe()
243 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in po1030_init_controls()
245 sd->gspca_dev.vdev.ctrl_handler = hdl; in po1030_init_controls()
286 struct cam *cam = &sd->gspca_dev.cam; in po1030_start()
288 int width = cam->cam_mode[sd->gspca_dev.curr_mode].width; in po1030_start()
289 int height = cam->cam_mode[sd->gspca_dev.curr_mode].height; in po1030_start()
290 int ver_offs = cam->cam_mode[sd->gspca_dev.curr_mode].priv; in po1030_start()
[all …]
Dm5602_mt9m111.c203 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in mt9m111_probe() local
215 gspca_dbg(gspca_dev, D_PROBE, "Probing for a mt9m111 sensor\n"); in mt9m111_probe()
242 sd->gspca_dev.cam.cam_mode = mt9m111_modes; in mt9m111_probe()
243 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(mt9m111_modes); in mt9m111_probe()
276 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in mt9m111_init_controls()
278 sd->gspca_dev.vdev.ctrl_handler = hdl; in mt9m111_init_controls()
316 struct cam *cam = &sd->gspca_dev.cam; in mt9m111_start()
317 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in mt9m111_start() local
319 int width = cam->cam_mode[sd->gspca_dev.curr_mode].width - 1; in mt9m111_start()
320 int height = cam->cam_mode[sd->gspca_dev.curr_mode].height; in mt9m111_start()
[all …]
Dm5602_ov7660.c244 sd->gspca_dev.cam.cam_mode = ov7660_modes; in ov7660_probe()
245 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(ov7660_modes); in ov7660_probe()
279 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in ov7660_init_controls()
281 sd->gspca_dev.vdev.ctrl_handler = hdl; in ov7660_init_controls()
327 static int ov7660_set_gain(struct gspca_dev *gspca_dev, __s32 val) in ov7660_set_gain() argument
331 struct sd *sd = (struct sd *) gspca_dev; in ov7660_set_gain()
333 gspca_dbg(gspca_dev, D_CONF, "Setting gain to %d\n", val); in ov7660_set_gain()
339 static int ov7660_set_auto_white_balance(struct gspca_dev *gspca_dev, in ov7660_set_auto_white_balance() argument
344 struct sd *sd = (struct sd *) gspca_dev; in ov7660_set_auto_white_balance()
346 gspca_dbg(gspca_dev, D_CONF, "Set auto white balance to %d\n", val); in ov7660_set_auto_white_balance()
[all …]
Dm5602_s5k83a.c171 static int s5k83a_set_flip_real(struct gspca_dev *gspca_dev,
178 struct gspca_dev *gspca_dev = (struct gspca_dev *)sd; in s5k83a_probe() local
190 gspca_dbg(gspca_dev, D_PROBE, "Probing for a s5k83a sensor\n"); in s5k83a_probe()
218 sd->gspca_dev.cam.cam_mode = s5k83a_modes; in s5k83a_probe()
219 sd->gspca_dev.cam.nmodes = ARRAY_SIZE(s5k83a_modes); in s5k83a_probe()
267 struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; in s5k83a_init_controls()
269 sd->gspca_dev.vdev.ctrl_handler = hdl; in s5k83a_init_controls()
305 if (mutex_lock_interruptible(&sd->gspca_dev.usb_lock)) in rotation_thread_function()
320 s5k83a_set_flip_real((struct gspca_dev *) sd, in rotation_thread_function()
324 mutex_unlock(&sd->gspca_dev.usb_lock); in rotation_thread_function()
[all …]

12