• Home
  • Raw
  • Download

Lines Matching refs:go

630 static int go7007_usb_vendor_request(struct go7007 *go, int request,  in go7007_usb_vendor_request()  argument
633 struct go7007_usb *usb = go->hpi_context; in go7007_usb_vendor_request()
649 static int go7007_usb_interface_reset(struct go7007 *go) in go7007_usb_interface_reset() argument
651 struct go7007_usb *usb = go->hpi_context; in go7007_usb_interface_reset()
654 if (go->status == STATUS_SHUTDOWN) in go7007_usb_interface_reset()
657 if (go7007_write_interrupt(go, 0x0001, 0x0001) < 0) in go7007_usb_interface_reset()
664 if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 || in go7007_usb_interface_reset()
665 go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0) in go7007_usb_interface_reset()
669 if (go7007_write_interrupt(go, 0x0001, 0x0001) < 0) in go7007_usb_interface_reset()
675 if (go7007_read_interrupt(go, &intr_val, &intr_data) < 0 || in go7007_usb_interface_reset()
677 dev_err(go->dev, "unable to reset the USB interface\n"); in go7007_usb_interface_reset()
683 static int go7007_usb_ezusb_write_interrupt(struct go7007 *go, in go7007_usb_ezusb_write_interrupt() argument
686 struct go7007_usb *usb = go->hpi_context; in go7007_usb_ezusb_write_interrupt()
697 0, HPI_STATUS_ADDR, go->usb_buf, in go7007_usb_ezusb_write_interrupt()
701 status_reg = le16_to_cpu(*((__le16 *)go->usb_buf)); in go7007_usb_ezusb_write_interrupt()
709 dev_err(go->dev, "device is hung, status reg = 0x%04x\n", status_reg); in go7007_usb_ezusb_write_interrupt()
725 dev_err(go->dev, "error in WriteInterrupt: %d\n", r); in go7007_usb_ezusb_write_interrupt()
729 static int go7007_usb_onboard_write_interrupt(struct go7007 *go, in go7007_usb_onboard_write_interrupt() argument
732 struct go7007_usb *usb = go->hpi_context; in go7007_usb_onboard_write_interrupt()
738 go->usb_buf[0] = data & 0xff; in go7007_usb_onboard_write_interrupt()
739 go->usb_buf[1] = data >> 8; in go7007_usb_onboard_write_interrupt()
740 go->usb_buf[2] = addr & 0xff; in go7007_usb_onboard_write_interrupt()
741 go->usb_buf[3] = addr >> 8; in go7007_usb_onboard_write_interrupt()
742 go->usb_buf[4] = go->usb_buf[5] = go->usb_buf[6] = go->usb_buf[7] = 0; in go7007_usb_onboard_write_interrupt()
745 0xf0f0, go->usb_buf, 8, timeout); in go7007_usb_onboard_write_interrupt()
747 dev_err(go->dev, "error in WriteInterrupt: %d\n", r); in go7007_usb_onboard_write_interrupt()
755 struct go7007 *go = (struct go7007 *)urb->context; in go7007_usb_readinterrupt_complete() local
761 go->status != STATUS_SHUTDOWN) { in go7007_usb_readinterrupt_complete()
762 dev_err(go->dev, "error in read interrupt: %d\n", urb->status); in go7007_usb_readinterrupt_complete()
764 wake_up(&go->interrupt_waitq); in go7007_usb_readinterrupt_complete()
768 dev_err(go->dev, "short read in interrupt pipe!\n"); in go7007_usb_readinterrupt_complete()
770 go->interrupt_available = 1; in go7007_usb_readinterrupt_complete()
771 go->interrupt_data = __le16_to_cpu(regs[0]); in go7007_usb_readinterrupt_complete()
772 go->interrupt_value = __le16_to_cpu(regs[1]); in go7007_usb_readinterrupt_complete()
774 go->interrupt_value, go->interrupt_data); in go7007_usb_readinterrupt_complete()
777 wake_up(&go->interrupt_waitq); in go7007_usb_readinterrupt_complete()
780 static int go7007_usb_read_interrupt(struct go7007 *go) in go7007_usb_read_interrupt() argument
782 struct go7007_usb *usb = go->hpi_context; in go7007_usb_read_interrupt()
787 dev_err(go->dev, "unable to submit interrupt urb: %d\n", r); in go7007_usb_read_interrupt()
795 struct go7007 *go = (struct go7007 *)urb->context; in go7007_usb_read_video_pipe_complete() local
798 if (!vb2_is_streaming(&go->vidq)) { in go7007_usb_read_video_pipe_complete()
799 wake_up_interruptible(&go->frame_waitq); in go7007_usb_read_video_pipe_complete()
803 dev_err(go->dev, "error in video pipe: %d\n", status); in go7007_usb_read_video_pipe_complete()
807 dev_err(go->dev, "short read in video pipe!\n"); in go7007_usb_read_video_pipe_complete()
810 go7007_parse_video_stream(go, urb->transfer_buffer, urb->actual_length); in go7007_usb_read_video_pipe_complete()
813 dev_err(go->dev, "error in video pipe: %d\n", r); in go7007_usb_read_video_pipe_complete()
818 struct go7007 *go = (struct go7007 *)urb->context; in go7007_usb_read_audio_pipe_complete() local
821 if (!vb2_is_streaming(&go->vidq)) in go7007_usb_read_audio_pipe_complete()
824 dev_err(go->dev, "error in audio pipe: %d\n", in go7007_usb_read_audio_pipe_complete()
829 dev_err(go->dev, "short read in audio pipe!\n"); in go7007_usb_read_audio_pipe_complete()
832 if (go->audio_deliver != NULL) in go7007_usb_read_audio_pipe_complete()
833 go->audio_deliver(go, urb->transfer_buffer, urb->actual_length); in go7007_usb_read_audio_pipe_complete()
836 dev_err(go->dev, "error in audio pipe: %d\n", r); in go7007_usb_read_audio_pipe_complete()
839 static int go7007_usb_stream_start(struct go7007 *go) in go7007_usb_stream_start() argument
841 struct go7007_usb *usb = go->hpi_context; in go7007_usb_stream_start()
847 dev_err(go->dev, "error submitting video urb %d: %d\n", i, r); in go7007_usb_stream_start()
851 if (!go->audio_enabled) in go7007_usb_stream_start()
857 dev_err(go->dev, "error submitting audio urb %d: %d\n", i, r); in go7007_usb_stream_start()
872 static int go7007_usb_stream_stop(struct go7007 *go) in go7007_usb_stream_stop() argument
874 struct go7007_usb *usb = go->hpi_context; in go7007_usb_stream_stop()
877 if (go->status == STATUS_SHUTDOWN) in go7007_usb_stream_stop()
881 if (go->audio_enabled) in go7007_usb_stream_stop()
887 static int go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len) in go7007_usb_send_firmware() argument
889 struct go7007_usb *usb = go->hpi_context; in go7007_usb_send_firmware()
904 static void go7007_usb_release(struct go7007 *go) in go7007_usb_release() argument
906 struct go7007_usb *usb = go->hpi_context; in go7007_usb_release()
932 kfree(go->hpi_context); in go7007_usb_release()
960 struct go7007 *go = i2c_get_adapdata(adapter); in go7007_usb_i2c_master_xfer() local
961 struct go7007_usb *usb = go->hpi_context; in go7007_usb_i2c_master_xfer()
962 u8 *buf = go->usb_buf; in go7007_usb_i2c_master_xfer()
966 if (go->status == STATUS_SHUTDOWN) in go7007_usb_i2c_master_xfer()
1010 if (go7007_usb_vendor_request(go, 0x24, 0, 0, in go7007_usb_i2c_master_xfer()
1015 if (go7007_usb_vendor_request(go, 0x25, 0, 0, buf, in go7007_usb_i2c_master_xfer()
1051 struct go7007 *go; in go7007_usb_probe() local
1121 go = go7007_alloc(&board->main_info, &intf->dev); in go7007_usb_probe()
1122 if (go == NULL) in go7007_usb_probe()
1127 kfree(go); in go7007_usb_probe()
1133 usb_make_path(usbdev, go->bus_info, sizeof(go->bus_info)); in go7007_usb_probe()
1134 go->board_id = id->driver_info; in go7007_usb_probe()
1135 strncpy(go->name, name, sizeof(go->name)); in go7007_usb_probe()
1137 go->hpi_ops = &go7007_usb_ezusb_hpi_ops; in go7007_usb_probe()
1139 go->hpi_ops = &go7007_usb_onboard_hpi_ops; in go7007_usb_probe()
1140 go->hpi_context = usb; in go7007_usb_probe()
1150 if (go->board_id == GO7007_BOARDID_SENSORAY_2250) in go7007_usb_probe()
1154 go7007_usb_readinterrupt_complete, go); in go7007_usb_probe()
1159 go7007_usb_readinterrupt_complete, go, 8); in go7007_usb_probe()
1160 usb_set_intfdata(intf, &go->v4l2_dev); in go7007_usb_probe()
1163 if (go7007_boot_encoder(go, go->board_info->flags & in go7007_usb_probe()
1169 memcpy(&go->i2c_adapter, &go7007_usb_adap_templ, in go7007_usb_probe()
1172 go->i2c_adapter.dev.parent = go->dev; in go7007_usb_probe()
1173 i2c_set_adapdata(&go->i2c_adapter, go); in go7007_usb_probe()
1174 if (i2c_add_adapter(&go->i2c_adapter) < 0) { in go7007_usb_probe()
1175 dev_err(go->dev, "error: i2c_add_adapter failed\n"); in go7007_usb_probe()
1178 go->i2c_adapter_online = 1; in go7007_usb_probe()
1187 if ((go->board_id == GO7007_BOARDID_XMEN || in go7007_usb_probe()
1188 go->board_id == GO7007_BOARDID_XMEN_III) && in go7007_usb_probe()
1189 go->i2c_adapter_online) { in go7007_usb_probe()
1193 i2c_smbus_xfer(&go->i2c_adapter, 0x21, I2C_CLIENT_SCCB, in go7007_usb_probe()
1197 go->board_id = GO7007_BOARDID_ENDURA; in go7007_usb_probe()
1199 go->board_info = &board->main_info; in go7007_usb_probe()
1200 strncpy(go->name, "Pelco Endura", in go7007_usb_probe()
1201 sizeof(go->name)); in go7007_usb_probe()
1206 go7007_read_addr(go, 0x3c81, &channel); in go7007_usb_probe()
1208 go->board_id = GO7007_BOARDID_ADLINK_MPG24; in go7007_usb_probe()
1210 go->board_info = &board->main_info; in go7007_usb_probe()
1211 go->channel_number = channel; in go7007_usb_probe()
1212 snprintf(go->name, sizeof(go->name), in go7007_usb_probe()
1216 go7007_update_board(go); in go7007_usb_probe()
1220 num_i2c_devs = go->board_info->num_i2c_devs; in go7007_usb_probe()
1223 if (go->board_id == GO7007_BOARDID_PX_TV402U) { in go7007_usb_probe()
1225 if (go7007_usb_vendor_request(go, 0x41, 0, 0, go->usb_buf, 3, in go7007_usb_probe()
1227 dev_err(go->dev, "GPIO read failed!\n"); in go7007_usb_probe()
1230 switch (go->usb_buf[0] >> 6) { in go7007_usb_probe()
1232 go->tuner_type = TUNER_SONY_BTF_PG472Z; in go7007_usb_probe()
1233 go->std = V4L2_STD_PAL; in go7007_usb_probe()
1234 strncpy(go->name, "Plextor PX-TV402U-EU", in go7007_usb_probe()
1235 sizeof(go->name)); in go7007_usb_probe()
1238 go->tuner_type = TUNER_SONY_BTF_PK467Z; in go7007_usb_probe()
1239 go->std = V4L2_STD_NTSC_M_JP; in go7007_usb_probe()
1241 strncpy(go->name, "Plextor PX-TV402U-JP", in go7007_usb_probe()
1242 sizeof(go->name)); in go7007_usb_probe()
1245 go->tuner_type = TUNER_SONY_BTF_PB463Z; in go7007_usb_probe()
1247 strncpy(go->name, "Plextor PX-TV402U-NA", in go7007_usb_probe()
1248 sizeof(go->name)); in go7007_usb_probe()
1256 if (go7007_usb_vendor_request(go, 0x40, 0x7f02, 0, in go7007_usb_probe()
1258 dev_err(go->dev, "GPIO write failed!\n"); in go7007_usb_probe()
1267 …dev_err(go->dev, "*** WARNING *** This device must be connected to a USB 2.0 port! Attempting to … in go7007_usb_probe()
1287 go7007_usb_read_video_pipe_complete, go); in go7007_usb_probe()
1304 go7007_usb_read_audio_pipe_complete, go); in go7007_usb_probe()
1310 if (go7007_register_encoder(go, num_i2c_devs) < 0) in go7007_usb_probe()
1313 go->status = STATUS_ONLINE; in go7007_usb_probe()
1317 go7007_usb_release(go); in go7007_usb_probe()
1318 kfree(go); in go7007_usb_probe()
1324 struct go7007 *go = to_go7007(usb_get_intfdata(intf)); in go7007_usb_disconnect() local
1326 mutex_lock(&go->queue_lock); in go7007_usb_disconnect()
1327 mutex_lock(&go->serialize_lock); in go7007_usb_disconnect()
1329 if (go->audio_enabled) in go7007_usb_disconnect()
1330 go7007_snd_remove(go); in go7007_usb_disconnect()
1332 go->status = STATUS_SHUTDOWN; in go7007_usb_disconnect()
1333 v4l2_device_disconnect(&go->v4l2_dev); in go7007_usb_disconnect()
1334 video_unregister_device(&go->vdev); in go7007_usb_disconnect()
1335 mutex_unlock(&go->serialize_lock); in go7007_usb_disconnect()
1336 mutex_unlock(&go->queue_lock); in go7007_usb_disconnect()
1338 v4l2_device_put(&go->v4l2_dev); in go7007_usb_disconnect()