Lines Matching refs:d

176 static int lme2510_usb_talk(struct dvb_usb_device *d,  in lme2510_usb_talk()  argument
179 struct lme2510_state *st = d->priv; in lme2510_usb_talk()
192 ret = mutex_lock_interruptible(&d->usb_mutex); in lme2510_usb_talk()
200 ret |= lme2510_bulk_write(d->udev, buff, wlen , 0x01); in lme2510_usb_talk()
202 ret |= lme2510_bulk_read(d->udev, buff, (rlen < 64) ? in lme2510_usb_talk()
208 mutex_unlock(&d->usb_mutex); in lme2510_usb_talk()
213 static int lme2510_stream_restart(struct dvb_usb_device *d) in lme2510_stream_restart() argument
215 struct lme2510_state *st = d->priv; in lme2510_stream_restart()
221 ret = lme2510_usb_talk(d, all_pids, sizeof(all_pids), in lme2510_stream_restart()
224 ret = lme2510_usb_talk(d, stream_on, sizeof(stream_on), in lme2510_stream_restart()
229 static int lme2510_enable_pid(struct dvb_usb_device *d, u8 index, u16 pid_out) in lme2510_enable_pid() argument
231 struct lme2510_state *st = d->priv; in lme2510_enable_pid()
240 ret |= lme2510_stream_restart(d); in lme2510_enable_pid()
251 ret |= lme2510_usb_talk(d, pid_buff , in lme2510_enable_pid()
255 ret |= lme2510_stream_restart(d); in lme2510_enable_pid()
420 struct dvb_usb_device *d = adap_to_d(adap); in lme2510_int_read() local
429 lme_int->buffer = usb_alloc_coherent(d->udev, 128, GFP_ATOMIC, in lme2510_int_read()
436 d->udev, in lme2510_int_read()
437 usb_rcvintpipe(d->udev, 0xa), in lme2510_int_read()
445 ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe); in lme2510_int_read()
448 lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa), in lme2510_int_read()
460 struct dvb_usb_device *d = adap_to_d(adap); in lme2510_pid_filter_ctrl() local
468 mutex_lock(&d->i2c_mutex); in lme2510_pid_filter_ctrl()
471 ret |= lme2510_usb_talk(d, clear_pid_reg, in lme2510_pid_filter_ctrl()
479 mutex_unlock(&d->i2c_mutex); in lme2510_pid_filter_ctrl()
487 struct dvb_usb_device *d = adap_to_d(adap); in lme2510_pid_filter() local
494 mutex_lock(&d->i2c_mutex); in lme2510_pid_filter()
495 ret |= lme2510_enable_pid(d, index, pid); in lme2510_pid_filter()
496 mutex_unlock(&d->i2c_mutex); in lme2510_pid_filter()
504 static int lme2510_return_status(struct dvb_usb_device *d) in lme2510_return_status() argument
513 ret |= usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), in lme2510_return_status()
522 static int lme2510_msg(struct dvb_usb_device *d, in lme2510_msg() argument
525 struct lme2510_state *st = d->priv; in lme2510_msg()
529 return lme2510_usb_talk(d, wbuf, wlen, rbuf, rlen); in lme2510_msg()
535 struct dvb_usb_device *d = i2c_get_adapdata(adap); in lme2510_i2c_xfer() local
536 struct lme2510_state *st = d->priv; in lme2510_i2c_xfer()
542 mutex_lock(&d->i2c_mutex); in lme2510_i2c_xfer()
577 if (lme2510_msg(d, obuf, len, ibuf, 64) < 0) { in lme2510_i2c_xfer()
579 mutex_unlock(&d->i2c_mutex); in lme2510_i2c_xfer()
593 mutex_unlock(&d->i2c_mutex); in lme2510_i2c_xfer()
610 struct dvb_usb_device *d = adap_to_d(adap); in lme2510_streaming_ctrl() local
624 mutex_lock(&d->i2c_mutex); in lme2510_streaming_ctrl()
626 ret = lme2510_usb_talk(d, clear_reg_3, in lme2510_streaming_ctrl()
631 mutex_unlock(&d->i2c_mutex); in lme2510_streaming_ctrl()
645 static int lme2510_download_firmware(struct dvb_usb_device *d, in lme2510_download_firmware() argument
684 lme2510_usb_talk(d, data, wlen, data, len_in); in lme2510_download_firmware()
692 lme2510_usb_talk(d, data, len_in, data, len_in); in lme2510_download_firmware()
704 static void lme_coldreset(struct dvb_usb_device *d) in lme_coldreset() argument
710 lme2510_usb_talk(d, data, sizeof(data), data, sizeof(data)); in lme_coldreset()
722 static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) in lme_firmware_switch() argument
724 struct lme2510_state *st = d->priv; in lme_firmware_switch()
725 struct usb_device *udev = d->udev; in lme_firmware_switch()
801 lme_coldreset(d); in lme_firmware_switch()
867 struct dvb_usb_device *d = fe_to_d(fe); in dm04_lme2510_set_voltage() local
874 mutex_lock(&d->i2c_mutex); in dm04_lme2510_set_voltage()
878 ret |= lme2510_usb_talk(d, in dm04_lme2510_set_voltage()
885 ret |= lme2510_usb_talk(d, in dm04_lme2510_set_voltage()
890 mutex_unlock(&d->i2c_mutex); in dm04_lme2510_set_voltage()
902 struct dvb_usb_device *d = fe_to_d(fe); in dm04_read_status() local
903 struct lme2510_state *st = d->priv; in dm04_read_status()
916 mutex_lock(&d->i2c_mutex); in dm04_read_status()
919 ret = lme2510_stream_restart(d); in dm04_read_status()
921 mutex_unlock(&d->i2c_mutex); in dm04_read_status()
1003 struct dvb_usb_device *d = adap_to_d(adap); in lme_name() local
1005 const char *desc = d->name; in lme_name()
1018 struct dvb_usb_device *d = adap_to_d(adap); in dm04_lme2510_frontend_attach() local
1019 struct lme2510_state *st = d->priv; in dm04_lme2510_frontend_attach()
1023 switch (le16_to_cpu(d->udev->descriptor.idProduct)) { in dm04_lme2510_frontend_attach()
1028 &tda10086_config, &d->i2c_adap); in dm04_lme2510_frontend_attach()
1037 ret = lme_firmware_switch(d, 1) ? 0 : -ENODEV; in dm04_lme2510_frontend_attach()
1044 &sharp_z0194_config, &d->i2c_adap); in dm04_lme2510_frontend_attach()
1053 ret = lme_firmware_switch(d, 1) ? 0 : -ENODEV; in dm04_lme2510_frontend_attach()
1060 &d->i2c_adap); in dm04_lme2510_frontend_attach()
1070 ret = lme_firmware_switch(d, 1) ? 0 : -ENODEV; in dm04_lme2510_frontend_attach()
1077 &m88rs2000_config, &d->i2c_adap); in dm04_lme2510_frontend_attach()
1082 &d->i2c_adap); in dm04_lme2510_frontend_attach()
1103 d->rc_map = NULL; in dm04_lme2510_frontend_attach()
1126 struct dvb_usb_device *d = adap_to_d(adap); in dm04_lme2510_tuner() local
1134 &d->i2c_adap, 1)) in dm04_lme2510_tuner()
1139 &d->i2c_adap)) in dm04_lme2510_tuner()
1144 &d->i2c_adap, DVB_PLL_OPERA1)) in dm04_lme2510_tuner()
1158 lme_coldreset(d); in dm04_lme2510_tuner()
1172 static int lme2510_powerup(struct dvb_usb_device *d, int onoff) in lme2510_powerup() argument
1174 struct lme2510_state *st = d->priv; in lme2510_powerup()
1180 mutex_lock(&d->i2c_mutex); in lme2510_powerup()
1183 ret = lme2510_usb_talk(d, lnb_on, len, rbuf, rlen); in lme2510_powerup()
1185 ret = lme2510_usb_talk(d, lnb_off, len, rbuf, rlen); in lme2510_powerup()
1189 mutex_unlock(&d->i2c_mutex); in lme2510_powerup()
1194 static int lme2510_get_adapter_count(struct dvb_usb_device *d) in lme2510_get_adapter_count() argument
1199 static int lme2510_identify_state(struct dvb_usb_device *d, const char **name) in lme2510_identify_state() argument
1201 struct lme2510_state *st = d->priv; in lme2510_identify_state()
1203 usb_reset_configuration(d->udev); in lme2510_identify_state()
1205 usb_set_interface(d->udev, in lme2510_identify_state()
1206 d->props->bInterfaceNumber, 1); in lme2510_identify_state()
1210 if (lme2510_return_status(d) == 0x44) { in lme2510_identify_state()
1211 *name = lme_firmware_switch(d, 0); in lme2510_identify_state()
1222 struct dvb_usb_device *d; in lme2510_get_stream_config() local
1227 d = adap_to_d(adap); in lme2510_get_stream_config()
1235 if (!(le16_to_cpu(d->udev->descriptor.idProduct) in lme2510_get_stream_config()
1242 static int lme2510_get_rc_config(struct dvb_usb_device *d, in lme2510_get_rc_config() argument
1249 static void *lme2510_exit_int(struct dvb_usb_device *d) in lme2510_exit_int() argument
1251 struct lme2510_state *st = d->priv; in lme2510_exit_int()
1252 struct dvb_usb_adapter *adap = &d->adapter[0]; in lme2510_exit_int()
1268 usb_free_coherent(d->udev, 128, st->buffer, in lme2510_exit_int()
1276 static void lme2510_exit(struct dvb_usb_device *d) in lme2510_exit() argument
1280 if (d != NULL) { in lme2510_exit()
1281 usb_buffer = lme2510_exit_int(d); in lme2510_exit()