conex.c (52173c5f3f6476eb9100691ec47b10d6740eed4a) conex.c (37d5efb01910752d8d3846a2c4db0528c1dfa137)
1/*
2 * Connexant Cx11646 library
3 * Copyright (C) 2004 Michel Xhaard mxhaard@magic.fr
4 *
5 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 67 unchanged lines hidden (view full) ---

76
77 usb_control_msg(dev,
78 usb_rcvctrlpipe(dev, 0),
79 0,
80 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
81 0,
82 index, gspca_dev->usb_buf, len,
83 500);
1/*
2 * Connexant Cx11646 library
3 * Copyright (C) 2004 Michel Xhaard mxhaard@magic.fr
4 *
5 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by

--- 67 unchanged lines hidden (view full) ---

76
77 usb_control_msg(dev,
78 usb_rcvctrlpipe(dev, 0),
79 0,
80 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
81 0,
82 index, gspca_dev->usb_buf, len,
83 500);
84 PDEBUG(D_USBI, "reg read [%02x] -> %02x ..",
85 index, gspca_dev->usb_buf[0]);
84 gspca_dbg(gspca_dev, D_USBI, "reg read [%02x] -> %02x ..\n",
85 index, gspca_dev->usb_buf[0]);
86}
87
88/* the bytes to write are in gspca_dev->usb_buf */
89static void reg_w_val(struct gspca_dev *gspca_dev,
90 __u16 index,
91 __u8 val)
92{
93 struct usb_device *dev = gspca_dev->dev;

--- 13 unchanged lines hidden (view full) ---

107 __u16 len)
108{
109 struct usb_device *dev = gspca_dev->dev;
110
111 if (len > USB_BUF_SZ) {
112 gspca_err(gspca_dev, "reg_w: buffer overflow\n");
113 return;
114 }
86}
87
88/* the bytes to write are in gspca_dev->usb_buf */
89static void reg_w_val(struct gspca_dev *gspca_dev,
90 __u16 index,
91 __u8 val)
92{
93 struct usb_device *dev = gspca_dev->dev;

--- 13 unchanged lines hidden (view full) ---

107 __u16 len)
108{
109 struct usb_device *dev = gspca_dev->dev;
110
111 if (len > USB_BUF_SZ) {
112 gspca_err(gspca_dev, "reg_w: buffer overflow\n");
113 return;
114 }
115 PDEBUG(D_USBO, "reg write [%02x] = %02x..", index, *buffer);
115 gspca_dbg(gspca_dev, D_USBO, "reg write [%02x] = %02x..\n",
116 index, *buffer);
116
117 memcpy(gspca_dev->usb_buf, buffer, len);
118 usb_control_msg(dev,
119 usb_sndctrlpipe(dev, 0),
120 0,
121 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
122 0,
123 index, gspca_dev->usb_buf, len, 500);

--- 838 unchanged lines hidden ---
117
118 memcpy(gspca_dev->usb_buf, buffer, len);
119 usb_control_msg(dev,
120 usb_sndctrlpipe(dev, 0),
121 0,
122 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
123 0,
124 index, gspca_dev->usb_buf, len, 500);

--- 838 unchanged lines hidden ---