Home
last modified time | relevance | path

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

1234

/kernel/linux/linux-5.10/drivers/media/usb/gspca/
Dxirlink_cit.c41 struct gspca_dev gspca_dev; /* !! must be the first item */ member
57 static void sd_stop0(struct gspca_dev *gspca_dev);
666 static int cit_write_reg(struct gspca_dev *gspca_dev, u16 value, u16 index) in cit_write_reg() argument
668 struct usb_device *udev = gspca_dev->dev; in cit_write_reg()
681 static int cit_read_reg(struct gspca_dev *gspca_dev, u16 index, int verbose) in cit_read_reg() argument
683 struct usb_device *udev = gspca_dev->dev; in cit_read_reg()
684 __u8 *buf = gspca_dev->usb_buf; in cit_read_reg()
697 gspca_dbg(gspca_dev, D_PROBE, "Register %04x value: %02x\n", in cit_read_reg()
712 static void cit_send_FF_04_02(struct gspca_dev *gspca_dev) in cit_send_FF_04_02() argument
714 cit_write_reg(gspca_dev, 0x00FF, 0x0127); in cit_send_FF_04_02()
[all …]
Dspca506.c21 struct gspca_dev gspca_dev; /* !! must be the first item */ member
64 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
69 usb_control_msg(gspca_dev->dev, in reg_r()
70 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r()
74 index, gspca_dev->usb_buf, length, in reg_r()
91 static void spca506_Initi2c(struct gspca_dev *gspca_dev) in spca506_Initi2c() argument
93 reg_w(gspca_dev->dev, 0x07, SAA7113_I2C_BASE_WRITE, 0x0004); in spca506_Initi2c()
96 static void spca506_WriteI2c(struct gspca_dev *gspca_dev, __u16 valeur, in spca506_WriteI2c() argument
101 reg_w(gspca_dev->dev, 0x07, reg, 0x0001); in spca506_WriteI2c()
102 reg_w(gspca_dev->dev, 0x07, valeur, 0x0000); in spca506_WriteI2c()
[all …]
Dspca500.c23 struct gspca_dev gspca_dev; /* !! must be the first item */ member
304 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
308 usb_control_msg(gspca_dev->dev, in reg_r()
309 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r()
313 index, gspca_dev->usb_buf, length, 500); in reg_r()
316 static int reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
321 gspca_dbg(gspca_dev, D_USBO, "reg write: [0x%02x] = 0x%02x\n", in reg_w()
323 ret = usb_control_msg(gspca_dev->dev, in reg_w()
324 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w()
334 static int reg_r_12(struct gspca_dev *gspca_dev, in reg_r_12() argument
[all …]
Detoms.c20 struct gspca_dev gspca_dev; /* !! must be the first item */ member
147 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
151 struct usb_device *dev = gspca_dev->dev; in reg_r()
154 gspca_err(gspca_dev, "reg_r: buffer overflow\n"); in reg_r()
163 index, gspca_dev->usb_buf, len, 500); in reg_r()
164 gspca_dbg(gspca_dev, D_USBI, "reg read [%02x] -> %02x ..\n", in reg_r()
165 index, gspca_dev->usb_buf[0]); in reg_r()
168 static void reg_w_val(struct gspca_dev *gspca_dev, in reg_w_val() argument
172 struct usb_device *dev = gspca_dev->dev; in reg_w_val()
174 gspca_dev->usb_buf[0] = val; in reg_w_val()
[all …]
Dconex.c25 struct gspca_dev gspca_dev; /* !! must be the first item */ member
57 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
61 struct usb_device *dev = gspca_dev->dev; in reg_r()
64 gspca_err(gspca_dev, "reg_r: buffer overflow\n"); in reg_r()
73 index, gspca_dev->usb_buf, len, in reg_r()
75 gspca_dbg(gspca_dev, D_USBI, "reg read [%02x] -> %02x ..\n", in reg_r()
76 index, gspca_dev->usb_buf[0]); in reg_r()
80 static void reg_w_val(struct gspca_dev *gspca_dev, in reg_w_val() argument
84 struct usb_device *dev = gspca_dev->dev; in reg_w_val()
86 gspca_dev->usb_buf[0] = val; in reg_w_val()
[all …]
Dstk014.c23 struct gspca_dev gspca_dev; /* !! must be the first item */ member
41 static u8 reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
44 struct usb_device *dev = gspca_dev->dev; in reg_r()
47 if (gspca_dev->usb_err < 0) in reg_r()
54 gspca_dev->usb_buf, 1, in reg_r()
58 gspca_dev->usb_err = ret; in reg_r()
61 return gspca_dev->usb_buf[0]; in reg_r()
65 static void reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
68 struct usb_device *dev = gspca_dev->dev; in reg_w()
71 if (gspca_dev->usb_err < 0) in reg_w()
[all …]
Dspca1528.c21 struct gspca_dev gspca_dev; /* !! must be the first item */ member
49 static void reg_r(struct gspca_dev *gspca_dev, 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, len, in reg_r()
69 gspca_dbg(gspca_dev, D_USBI, "GET %02x 0000 %04x %02x\n", req, index, in reg_r()
70 gspca_dev->usb_buf[0]); in reg_r()
73 gspca_dev->usb_err = ret; in reg_r()
78 memset(gspca_dev->usb_buf, 0, USB_BUF_SZ); in reg_r()
82 static void reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
[all …]
Dstk1135.c25 struct gspca_dev gspca_dev; /* !! must be the first item */ member
46 static u8 reg_r(struct gspca_dev *gspca_dev, u16 index) in reg_r() argument
48 struct usb_device *dev = gspca_dev->dev; in reg_r()
51 if (gspca_dev->usb_err < 0) in reg_r()
58 gspca_dev->usb_buf, 1, in reg_r()
61 gspca_dbg(gspca_dev, D_USBI, "reg_r 0x%x=0x%02x\n", in reg_r()
62 index, gspca_dev->usb_buf[0]); in reg_r()
65 gspca_dev->usb_err = ret; in reg_r()
69 return gspca_dev->usb_buf[0]; in reg_r()
73 static void reg_w(struct gspca_dev *gspca_dev, u16 index, u8 val) in reg_w() argument
[all …]
Dstv0680.c28 struct gspca_dev gspca_dev; /* !! must be the first item */ member
35 static int stv_sndctrl(struct gspca_dev *gspca_dev, int set, u8 req, u16 val, in stv_sndctrl() argument
45 pipe = usb_rcvctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
49 pipe = usb_sndctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
53 pipe = usb_rcvctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
57 pipe = usb_sndctrlpipe(gspca_dev->dev, 0); in stv_sndctrl()
61 ret = usb_control_msg(gspca_dev->dev, pipe, in stv_sndctrl()
63 val, 0, gspca_dev->usb_buf, size, 500); in stv_sndctrl()
72 static int stv0680_handle_error(struct gspca_dev *gspca_dev, int ret) in stv0680_handle_error() argument
74 stv_sndctrl(gspca_dev, 0, 0x80, 0, 0x02); /* Get Last Error */ in stv0680_handle_error()
[all …]
Dtopro.c111 struct gspca_dev gspca_dev; /* !! must be the first item */ member
975 static void reg_w(struct gspca_dev *gspca_dev, u8 index, u8 value) in reg_w() argument
977 struct usb_device *dev = gspca_dev->dev; in reg_w()
980 if (gspca_dev->usb_err < 0) in reg_w()
988 gspca_dev->usb_err = ret; in reg_w()
993 static void reg_r(struct gspca_dev *gspca_dev, u8 index) in reg_r() argument
995 struct usb_device *dev = gspca_dev->dev; in reg_r()
998 if (gspca_dev->usb_err < 0) in reg_r()
1003 0, index, gspca_dev->usb_buf, 1, 500); in reg_r()
1006 gspca_dev->usb_err = ret; in reg_r()
[all …]
Dpac7311.c64 struct gspca_dev gspca_dev; /* !! must be the first item */ member
151 static void reg_w_buf(struct gspca_dev *gspca_dev, in reg_w_buf() argument
157 if (gspca_dev->usb_err < 0) in reg_w_buf()
159 memcpy(gspca_dev->usb_buf, buffer, len); in reg_w_buf()
160 ret = usb_control_msg(gspca_dev->dev, in reg_w_buf()
161 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w_buf()
165 index, gspca_dev->usb_buf, len, in reg_w_buf()
170 gspca_dev->usb_err = ret; in reg_w_buf()
175 static void reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
181 if (gspca_dev->usb_err < 0) in reg_w()
[all …]
Dov534_9.c39 struct gspca_dev gspca_dev; /* !! must be the first item */ member
1106 static void reg_w_i(struct gspca_dev *gspca_dev, u16 reg, u8 val) in reg_w_i() argument
1108 struct usb_device *udev = gspca_dev->dev; in reg_w_i()
1111 if (gspca_dev->usb_err < 0) in reg_w_i()
1113 gspca_dev->usb_buf[0] = val; in reg_w_i()
1118 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); in reg_w_i()
1121 gspca_dev->usb_err = ret; in reg_w_i()
1125 static void reg_w(struct gspca_dev *gspca_dev, u16 reg, u8 val) in reg_w() argument
1127 gspca_dbg(gspca_dev, D_USBO, "reg_w [%04x] = %02x\n", reg, val); in reg_w()
1128 reg_w_i(gspca_dev, reg, val); in reg_w()
[all …]
Dsunplus.c24 struct gspca_dev gspca_dev; /* !! must be the first item */ member
234 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
242 gspca_err(gspca_dev, "reg_r: buffer overflow\n"); in reg_r()
246 gspca_err(gspca_dev, "reg_r: zero-length read\n"); in reg_r()
249 if (gspca_dev->usb_err < 0) in reg_r()
251 ret = usb_control_msg(gspca_dev->dev, in reg_r()
252 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r()
257 gspca_dev->usb_buf, len, in reg_r()
261 gspca_dev->usb_err = ret; in reg_r()
266 memset(gspca_dev->usb_buf, 0, USB_BUF_SZ); in reg_r()
[all …]
Dgspca.c53 static void PDEBUG_MODE(struct gspca_dev *gspca_dev, int debug, char *txt, in PDEBUG_MODE() argument
57 gspca_dbg(gspca_dev, debug, "%s %c%c%c%c %dx%d\n", in PDEBUG_MODE()
65 gspca_dbg(gspca_dev, debug, "%s 0x%08x %dx%d\n", in PDEBUG_MODE()
82 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; in int_irq() local
88 if (gspca_dev->sd_desc->int_pkt_scan(gspca_dev, in int_irq()
90 gspca_err(gspca_dev, "Unknown packet received\n"); in int_irq()
104 gspca_err(gspca_dev, "URB error %i, resubmitting\n", in int_irq()
117 static int gspca_input_connect(struct gspca_dev *dev) in gspca_input_connect()
154 static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev, in alloc_and_submit_int_urb() argument
166 gspca_dbg(gspca_dev, D_CONF, "found int in endpoint: 0x%x, buffer_len=%u, interval=%u\n", in alloc_and_submit_int_urb()
[all …]
Dov534.c49 struct gspca_dev gspca_dev; /* !! must be the first item */ member
82 static int sd_start(struct gspca_dev *gspca_dev);
83 static void sd_stopN(struct gspca_dev *gspca_dev);
658 static void ov534_reg_write(struct gspca_dev *gspca_dev, u16 reg, u8 val) in ov534_reg_write() argument
660 struct usb_device *udev = gspca_dev->dev; in ov534_reg_write()
663 if (gspca_dev->usb_err < 0) in ov534_reg_write()
666 gspca_dbg(gspca_dev, D_USBO, "SET 01 0000 %04x %02x\n", reg, val); in ov534_reg_write()
667 gspca_dev->usb_buf[0] = val; in ov534_reg_write()
672 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); in ov534_reg_write()
675 gspca_dev->usb_err = ret; in ov534_reg_write()
[all …]
Dspca561.c25 struct gspca_dev gspca_dev; /* !! must be the first item */ member
275 static void reg_w_val(struct gspca_dev *gspca_dev, __u16 index, __u8 value) in reg_w_val() argument
278 struct usb_device *dev = gspca_dev->dev; in reg_w_val()
284 gspca_dbg(gspca_dev, D_USBO, "reg write: 0x%02x:0x%02x\n", in reg_w_val()
290 static void write_vector(struct gspca_dev *gspca_dev, in write_vector() argument
297 reg_w_val(gspca_dev, data[i][1], data[i][0]); in write_vector()
303 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
306 usb_control_msg(gspca_dev->dev, in reg_r()
307 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r()
311 index, gspca_dev->usb_buf, length, 500); in reg_r()
[all …]
Dtouptek.c138 struct gspca_dev gspca_dev; /* !! must be the first item */ member
186 static int val_reply(struct gspca_dev *gspca_dev, const char *reply, int rc) in val_reply() argument
189 gspca_err(gspca_dev, "reply has error %d\n", rc); in val_reply()
193 gspca_err(gspca_dev, "Bad reply size %d\n", rc); in val_reply()
197 gspca_err(gspca_dev, "Bad reply 0x%02x\n", (int)reply[0]); in val_reply()
203 static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index) in reg_w() argument
205 char *buff = gspca_dev->usb_buf; in reg_w()
208 gspca_dbg(gspca_dev, D_USBO, in reg_w()
211 rc = usb_control_msg(gspca_dev->dev, usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_w()
213 gspca_dbg(gspca_dev, D_USBO, "rc=%d, ret={0x%02x}\n", rc, (int)buff[0]); in reg_w()
[all …]
Dmars.c24 struct gspca_dev gspca_dev; /* !! must be the first item */ member
38 static void setbrightness(struct gspca_dev *gspca_dev, s32 val);
39 static void setcolors(struct gspca_dev *gspca_dev, s32 val);
40 static void setgamma(struct gspca_dev *gspca_dev, s32 val);
41 static void setsharpness(struct gspca_dev *gspca_dev, s32 val);
68 static void reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
73 if (gspca_dev->usb_err < 0) in reg_w()
76 ret = usb_bulk_msg(gspca_dev->dev, in reg_w()
77 usb_sndbulkpipe(gspca_dev->dev, 4), in reg_w()
78 gspca_dev->usb_buf, in reg_w()
[all …]
Dsonixj.c23 struct gspca_dev gspca_dev; /* !! must be the first item */ member
1141 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
1146 if (gspca_dev->usb_err < 0) in reg_r()
1149 gspca_err(gspca_dev, "reg_r: buffer overflow\n"); in reg_r()
1153 ret = usb_control_msg(gspca_dev->dev, in reg_r()
1154 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r()
1158 gspca_dev->usb_buf, len, in reg_r()
1160 gspca_dbg(gspca_dev, D_USBI, "reg_r [%02x] -> %02x\n", in reg_r()
1161 value, gspca_dev->usb_buf[0]); in reg_r()
1164 gspca_dev->usb_err = ret; in reg_r()
[all …]
Dtv8532.c17 struct gspca_dev gspca_dev; /* !! must be the first item */ member
105 static void reg_w1(struct gspca_dev *gspca_dev, in reg_w1() argument
108 gspca_dev->usb_buf[0] = value; in reg_w1()
109 usb_control_msg(gspca_dev->dev, in reg_w1()
110 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w1()
114 index, gspca_dev->usb_buf, 1, 500); in reg_w1()
118 static void reg_w2(struct gspca_dev *gspca_dev, in reg_w2() argument
121 gspca_dev->usb_buf[0] = value; in reg_w2()
122 gspca_dev->usb_buf[1] = value >> 8; in reg_w2()
123 usb_control_msg(gspca_dev->dev, in reg_w2()
[all …]
Dpac7302.c100 struct gspca_dev gspca_dev; /* !! must be the first item */ member
232 static void reg_w_buf(struct gspca_dev *gspca_dev, in reg_w_buf() argument
238 if (gspca_dev->usb_err < 0) in reg_w_buf()
240 memcpy(gspca_dev->usb_buf, buffer, len); in reg_w_buf()
241 ret = usb_control_msg(gspca_dev->dev, in reg_w_buf()
242 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w_buf()
246 index, gspca_dev->usb_buf, len, in reg_w_buf()
251 gspca_dev->usb_err = ret; in reg_w_buf()
256 static void reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
262 if (gspca_dev->usb_err < 0) in reg_w()
[all …]
Dsn9c2028.c20 struct gspca_dev gspca_dev; /* !! must be the first item */ member
59 static int sn9c2028_command(struct gspca_dev *gspca_dev, u8 *command) in sn9c2028_command() argument
63 gspca_dbg(gspca_dev, D_USBO, "sending command %02x%02x%02x%02x%02x%02x\n", in sn9c2028_command()
67 memcpy(gspca_dev->usb_buf, command, 6); in sn9c2028_command()
68 rc = usb_control_msg(gspca_dev->dev, in sn9c2028_command()
69 usb_sndctrlpipe(gspca_dev->dev, 0), in sn9c2028_command()
72 2, 0, gspca_dev->usb_buf, 6, 500); in sn9c2028_command()
75 gspca_dev->usb_buf[0], rc); in sn9c2028_command()
82 static int sn9c2028_read1(struct gspca_dev *gspca_dev) in sn9c2028_read1() argument
86 rc = usb_control_msg(gspca_dev->dev, in sn9c2028_read1()
[all …]
Dmr97310a.c73 struct gspca_dev gspca_dev; /* !! must be the first item */ member
92 static void sd_stopN(struct gspca_dev *gspca_dev);
123 static int mr_write(struct gspca_dev *gspca_dev, int len) in mr_write() argument
127 rc = usb_bulk_msg(gspca_dev->dev, in mr_write()
128 usb_sndbulkpipe(gspca_dev->dev, 4), in mr_write()
129 gspca_dev->usb_buf, len, NULL, 500); in mr_write()
132 gspca_dev->usb_buf[0], rc); in mr_write()
137 static int mr_read(struct gspca_dev *gspca_dev, int len) in mr_read() argument
141 rc = usb_bulk_msg(gspca_dev->dev, in mr_read()
142 usb_rcvbulkpipe(gspca_dev->dev, 3), in mr_read()
[all …]
Dnw80x.c24 struct gspca_dev gspca_dev; /* !! must be the first item */ member
1526 static void reg_w(struct gspca_dev *gspca_dev, in reg_w() argument
1531 struct usb_device *dev = gspca_dev->dev; in reg_w()
1534 if (gspca_dev->usb_err < 0) in reg_w()
1537 gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x\n", in reg_w()
1540 gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x %02x ...\n", in reg_w()
1542 memcpy(gspca_dev->usb_buf, data, len); in reg_w()
1548 gspca_dev->usb_buf, in reg_w()
1553 gspca_dev->usb_err = ret; in reg_w()
1558 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
[all …]
Dvc032x.c22 struct gspca_dev gspca_dev; /* !! must be the first item */ member
2890 static void reg_r_i(struct gspca_dev *gspca_dev, in reg_r_i() argument
2897 if (gspca_dev->usb_err < 0) in reg_r_i()
2899 ret = usb_control_msg(gspca_dev->dev, in reg_r_i()
2900 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r_i()
2904 index, gspca_dev->usb_buf, len, in reg_r_i()
2908 gspca_dev->usb_err = ret; in reg_r_i()
2913 memset(gspca_dev->usb_buf, 0, USB_BUF_SZ); in reg_r_i()
2916 static void reg_r(struct gspca_dev *gspca_dev, in reg_r() argument
2921 reg_r_i(gspca_dev, req, index, len); in reg_r()
[all …]

1234