Lines Matching refs:d

27 static int gp8psk_get_fw_version(struct dvb_usb_device *d, u8 *fw_vers)  in gp8psk_get_fw_version()  argument
29 return (gp8psk_usb_in_op(d, GET_FW_VERS, 0, 0, fw_vers, 6)); in gp8psk_get_fw_version()
32 static int gp8psk_get_fpga_version(struct dvb_usb_device *d, u8 *fpga_vers) in gp8psk_get_fpga_version() argument
34 return (gp8psk_usb_in_op(d, GET_FPGA_VERS, 0, 0, fpga_vers, 1)); in gp8psk_get_fpga_version()
37 static void gp8psk_info(struct dvb_usb_device *d) in gp8psk_info() argument
41 if (!gp8psk_get_fw_version(d, fw_vers)) in gp8psk_info()
48 if (!gp8psk_get_fpga_version(d, &fpga_vers)) in gp8psk_info()
54 int gp8psk_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen) in gp8psk_usb_in_op() argument
58 if ((ret = mutex_lock_interruptible(&d->usb_mutex))) in gp8psk_usb_in_op()
62 ret = usb_control_msg(d->udev, in gp8psk_usb_in_op()
63 usb_rcvctrlpipe(d->udev,0), in gp8psk_usb_in_op()
81 mutex_unlock(&d->usb_mutex); in gp8psk_usb_in_op()
86 int gp8psk_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, in gp8psk_usb_out_op() argument
94 if ((ret = mutex_lock_interruptible(&d->usb_mutex))) in gp8psk_usb_out_op()
97 if (usb_control_msg(d->udev, in gp8psk_usb_out_op()
98 usb_sndctrlpipe(d->udev,0), in gp8psk_usb_out_op()
107 mutex_unlock(&d->usb_mutex); in gp8psk_usb_out_op()
112 static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d) in gp8psk_load_bcm4500fw() argument
119 &d->udev->dev)) != 0) { in gp8psk_load_bcm4500fw()
128 if (gp8psk_usb_out_op(d, LOAD_BCM4500,1,0,NULL, 0)) in gp8psk_load_bcm4500fw()
147 if (dvb_usb_generic_write(d, buf, buflen)) { in gp8psk_load_bcm4500fw()
164 static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) in gp8psk_power_ctrl() argument
167 int gp_product_id = le16_to_cpu(d->udev->descriptor.idProduct); in gp8psk_power_ctrl()
170 gp8psk_usb_in_op(d, GET_8PSK_CONFIG,0,0,&status,1); in gp8psk_power_ctrl()
173 gp8psk_usb_out_op(d, CW3K_INIT, 1, 0, NULL, 0); in gp8psk_power_ctrl()
174 if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1)) in gp8psk_power_ctrl()
176 gp8psk_info(d); in gp8psk_power_ctrl()
181 if(gp8psk_load_bcm4500fw(d)) in gp8psk_power_ctrl()
185 if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, in gp8psk_power_ctrl()
191 if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) in gp8psk_power_ctrl()
194 if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) in gp8psk_power_ctrl()
198 if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) in gp8psk_power_ctrl()
201 if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) in gp8psk_power_ctrl()
204 gp8psk_usb_out_op(d, CW3K_INIT, 0, 0, NULL, 0); in gp8psk_power_ctrl()
209 int gp8psk_bcm4500_reload(struct dvb_usb_device *d) in gp8psk_bcm4500_reload() argument
212 int gp_product_id = le16_to_cpu(d->udev->descriptor.idProduct); in gp8psk_bcm4500_reload()
214 if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) in gp8psk_bcm4500_reload()
217 if (gp8psk_usb_in_op(d, BOOT_8PSK, 1, 0, &buf, 1)) in gp8psk_bcm4500_reload()
221 if (gp8psk_load_bcm4500fw(d)) in gp8psk_bcm4500_reload()