Lines Matching refs:req
28 static int ec168_ctrl_msg(struct dvb_usb_device *d, struct ec168_req *req) in ec168_ctrl_msg() argument
35 switch (req->cmd) { in ec168_ctrl_msg()
41 request = req->cmd; in ec168_ctrl_msg()
45 request = req->cmd; in ec168_ctrl_msg()
65 KBUILD_MODNAME, req->cmd); in ec168_ctrl_msg()
70 buf = kmalloc(req->size, GFP_KERNEL); in ec168_ctrl_msg()
78 memcpy(buf, req->data, req->size); in ec168_ctrl_msg()
87 ret = usb_control_msg(d->udev, pipe, request, requesttype, req->value, in ec168_ctrl_msg()
88 req->index, buf, req->size, EC168_USB_TIMEOUT); in ec168_ctrl_msg()
90 dvb_usb_dbg_usb_control_msg(d->udev, request, requesttype, req->value, in ec168_ctrl_msg()
91 req->index, buf, req->size); in ec168_ctrl_msg()
100 memcpy(req->data, buf, req->size); in ec168_ctrl_msg()
119 struct ec168_req req; in ec168_i2c_xfer() local
132 req.cmd = READ_DEMOD; in ec168_i2c_xfer()
133 req.value = 0; in ec168_i2c_xfer()
134 req.index = 0xff00 + msg[i].buf[0]; /* reg */ in ec168_i2c_xfer()
135 req.size = msg[i+1].len; /* bytes to read */ in ec168_i2c_xfer()
136 req.data = &msg[i+1].buf[0]; in ec168_i2c_xfer()
137 ret = ec168_ctrl_msg(d, &req); in ec168_i2c_xfer()
148 req.cmd = WRITE_DEMOD; in ec168_i2c_xfer()
149 req.value = msg[i].buf[1]; /* val */ in ec168_i2c_xfer()
150 req.index = 0xff00 + msg[i].buf[0]; /* reg */ in ec168_i2c_xfer()
151 req.size = 0; in ec168_i2c_xfer()
152 req.data = NULL; in ec168_i2c_xfer()
153 ret = ec168_ctrl_msg(d, &req); in ec168_i2c_xfer()
156 req.cmd = WRITE_I2C; in ec168_i2c_xfer()
157 req.value = msg[i].buf[0]; /* val */ in ec168_i2c_xfer()
158 req.index = 0x0100 + msg[i].addr; /* I2C addr */ in ec168_i2c_xfer()
159 req.size = msg[i].len-1; in ec168_i2c_xfer()
160 req.data = &msg[i].buf[1]; in ec168_i2c_xfer()
161 ret = ec168_ctrl_msg(d, &req); in ec168_i2c_xfer()
191 struct ec168_req req = {GET_CONFIG, 0, 1, sizeof(reply), &reply}; in ec168_identify_state() local
194 ret = ec168_ctrl_msg(d, &req); in ec168_identify_state()
215 struct ec168_req req = {DOWNLOAD_FIRMWARE, 0, 0, 0, NULL}; in ec168_download_firmware() local
224 req.size = len; in ec168_download_firmware()
225 req.data = (u8 *) &fw->data[fw->size - remaining]; in ec168_download_firmware()
226 req.index = fw->size - remaining; in ec168_download_firmware()
228 ret = ec168_ctrl_msg(d, &req); in ec168_download_firmware()
237 req.size = 0; in ec168_download_firmware()
240 req.cmd = SET_CONFIG; in ec168_download_firmware()
241 req.value = 0; in ec168_download_firmware()
242 req.index = 0x0001; in ec168_download_firmware()
243 ret = ec168_ctrl_msg(d, &req); in ec168_download_firmware()
248 req.cmd = GPIO; in ec168_download_firmware()
249 req.value = 0; in ec168_download_firmware()
250 req.index = 0x0206; in ec168_download_firmware()
251 ret = ec168_ctrl_msg(d, &req); in ec168_download_firmware()
256 req.cmd = WRITE_I2C; in ec168_download_firmware()
257 req.value = 0; in ec168_download_firmware()
258 req.index = 0x00c6; in ec168_download_firmware()
259 ret = ec168_ctrl_msg(d, &req); in ec168_download_firmware()
315 struct ec168_req req = {STREAMING_CTRL, 0x7f01, 0x0202, 0, NULL}; in ec168_streaming_ctrl() local
319 req.index = 0x0102; in ec168_streaming_ctrl()
320 return ec168_ctrl_msg(d, &req); in ec168_streaming_ctrl()