usb_pcwd          167 drivers/watchdog/pcwd_usb.c 	struct usb_pcwd_private *usb_pcwd =
usb_pcwd          169 drivers/watchdog/pcwd_usb.c 	unsigned char *data = usb_pcwd->intr_buffer;
usb_pcwd          170 drivers/watchdog/pcwd_usb.c 	struct device *dev = &usb_pcwd->interface->dev;
usb_pcwd          193 drivers/watchdog/pcwd_usb.c 	usb_pcwd->cmd_command  = data[0];
usb_pcwd          194 drivers/watchdog/pcwd_usb.c 	usb_pcwd->cmd_data_msb = data[1];
usb_pcwd          195 drivers/watchdog/pcwd_usb.c 	usb_pcwd->cmd_data_lsb = data[2];
usb_pcwd          198 drivers/watchdog/pcwd_usb.c 	atomic_set(&usb_pcwd->cmd_received, 1);
usb_pcwd          207 drivers/watchdog/pcwd_usb.c static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd,
usb_pcwd          215 drivers/watchdog/pcwd_usb.c 	if ((!usb_pcwd) || (!usb_pcwd->exists))
usb_pcwd          229 drivers/watchdog/pcwd_usb.c 	dev_dbg(&usb_pcwd->interface->dev,
usb_pcwd          233 drivers/watchdog/pcwd_usb.c 	atomic_set(&usb_pcwd->cmd_received, 0);
usb_pcwd          235 drivers/watchdog/pcwd_usb.c 	if (usb_control_msg(usb_pcwd->udev, usb_sndctrlpipe(usb_pcwd->udev, 0),
usb_pcwd          237 drivers/watchdog/pcwd_usb.c 			0x0200, usb_pcwd->interface_number, buf, 6,
usb_pcwd          239 drivers/watchdog/pcwd_usb.c 		dev_dbg(&usb_pcwd->interface->dev,
usb_pcwd          249 drivers/watchdog/pcwd_usb.c 		if (atomic_read(&usb_pcwd->cmd_received))
usb_pcwd          253 drivers/watchdog/pcwd_usb.c 	if ((got_response) && (cmd == usb_pcwd->cmd_command)) {
usb_pcwd          255 drivers/watchdog/pcwd_usb.c 		*msb = usb_pcwd->cmd_data_msb;
usb_pcwd          256 drivers/watchdog/pcwd_usb.c 		*lsb = usb_pcwd->cmd_data_lsb;
usb_pcwd          264 drivers/watchdog/pcwd_usb.c static int usb_pcwd_start(struct usb_pcwd_private *usb_pcwd)
usb_pcwd          271 drivers/watchdog/pcwd_usb.c 	retval = usb_pcwd_send_command(usb_pcwd, CMD_ENABLE_WATCHDOG,
usb_pcwd          282 drivers/watchdog/pcwd_usb.c static int usb_pcwd_stop(struct usb_pcwd_private *usb_pcwd)
usb_pcwd          289 drivers/watchdog/pcwd_usb.c 	retval = usb_pcwd_send_command(usb_pcwd, CMD_DISABLE_WATCHDOG,
usb_pcwd          300 drivers/watchdog/pcwd_usb.c static int usb_pcwd_keepalive(struct usb_pcwd_private *usb_pcwd)
usb_pcwd          305 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_TRIGGER, &dummy, &dummy);
usb_pcwd          310 drivers/watchdog/pcwd_usb.c static int usb_pcwd_set_heartbeat(struct usb_pcwd_private *usb_pcwd, int t)
usb_pcwd          319 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_WRITE_WATCHDOG_TIMEOUT, &msb, &lsb);
usb_pcwd          325 drivers/watchdog/pcwd_usb.c static int usb_pcwd_get_temperature(struct usb_pcwd_private *usb_pcwd,
usb_pcwd          330 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_READ_TEMP, &msb, &lsb);
usb_pcwd          341 drivers/watchdog/pcwd_usb.c static int usb_pcwd_get_timeleft(struct usb_pcwd_private *usb_pcwd,
usb_pcwd          348 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_READ_WATCHDOG_TIMEOUT, &msb, &lsb);
usb_pcwd          584 drivers/watchdog/pcwd_usb.c static inline void usb_pcwd_delete(struct usb_pcwd_private *usb_pcwd)
usb_pcwd          586 drivers/watchdog/pcwd_usb.c 	usb_free_urb(usb_pcwd->intr_urb);
usb_pcwd          587 drivers/watchdog/pcwd_usb.c 	if (usb_pcwd->intr_buffer != NULL)
usb_pcwd          588 drivers/watchdog/pcwd_usb.c 		usb_free_coherent(usb_pcwd->udev, usb_pcwd->intr_size,
usb_pcwd          589 drivers/watchdog/pcwd_usb.c 				  usb_pcwd->intr_buffer, usb_pcwd->intr_dma);
usb_pcwd          590 drivers/watchdog/pcwd_usb.c 	kfree(usb_pcwd);
usb_pcwd          605 drivers/watchdog/pcwd_usb.c 	struct usb_pcwd_private *usb_pcwd = NULL;
usb_pcwd          644 drivers/watchdog/pcwd_usb.c 	usb_pcwd = kzalloc(sizeof(struct usb_pcwd_private), GFP_KERNEL);
usb_pcwd          645 drivers/watchdog/pcwd_usb.c 	if (usb_pcwd == NULL)
usb_pcwd          648 drivers/watchdog/pcwd_usb.c 	usb_pcwd_device = usb_pcwd;
usb_pcwd          650 drivers/watchdog/pcwd_usb.c 	mutex_init(&usb_pcwd->mtx);
usb_pcwd          651 drivers/watchdog/pcwd_usb.c 	usb_pcwd->udev = udev;
usb_pcwd          652 drivers/watchdog/pcwd_usb.c 	usb_pcwd->interface = interface;
usb_pcwd          653 drivers/watchdog/pcwd_usb.c 	usb_pcwd->interface_number = iface_desc->desc.bInterfaceNumber;
usb_pcwd          654 drivers/watchdog/pcwd_usb.c 	usb_pcwd->intr_size = (le16_to_cpu(endpoint->wMaxPacketSize) > 8 ?
usb_pcwd          658 drivers/watchdog/pcwd_usb.c 	usb_pcwd->intr_buffer = usb_alloc_coherent(udev, usb_pcwd->intr_size,
usb_pcwd          659 drivers/watchdog/pcwd_usb.c 					GFP_ATOMIC, &usb_pcwd->intr_dma);
usb_pcwd          660 drivers/watchdog/pcwd_usb.c 	if (!usb_pcwd->intr_buffer) {
usb_pcwd          666 drivers/watchdog/pcwd_usb.c 	usb_pcwd->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
usb_pcwd          667 drivers/watchdog/pcwd_usb.c 	if (!usb_pcwd->intr_urb)
usb_pcwd          671 drivers/watchdog/pcwd_usb.c 	usb_fill_int_urb(usb_pcwd->intr_urb, udev, pipe,
usb_pcwd          672 drivers/watchdog/pcwd_usb.c 			usb_pcwd->intr_buffer, usb_pcwd->intr_size,
usb_pcwd          673 drivers/watchdog/pcwd_usb.c 			usb_pcwd_intr_done, usb_pcwd, endpoint->bInterval);
usb_pcwd          674 drivers/watchdog/pcwd_usb.c 	usb_pcwd->intr_urb->transfer_dma = usb_pcwd->intr_dma;
usb_pcwd          675 drivers/watchdog/pcwd_usb.c 	usb_pcwd->intr_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
usb_pcwd          678 drivers/watchdog/pcwd_usb.c 	if (usb_submit_urb(usb_pcwd->intr_urb, GFP_KERNEL)) {
usb_pcwd          685 drivers/watchdog/pcwd_usb.c 	usb_pcwd->exists = 1;
usb_pcwd          688 drivers/watchdog/pcwd_usb.c 	usb_pcwd_stop(usb_pcwd);
usb_pcwd          691 drivers/watchdog/pcwd_usb.c 	got_fw_rev = usb_pcwd_send_command(usb_pcwd, CMD_GET_FIRMWARE_VERSION,
usb_pcwd          701 drivers/watchdog/pcwd_usb.c 	usb_pcwd_send_command(usb_pcwd, CMD_GET_DIP_SWITCH_SETTINGS, &dummy,
usb_pcwd          715 drivers/watchdog/pcwd_usb.c 	if (usb_pcwd_set_heartbeat(usb_pcwd, heartbeat)) {
usb_pcwd          716 drivers/watchdog/pcwd_usb.c 		usb_pcwd_set_heartbeat(usb_pcwd, WATCHDOG_HEARTBEAT);
usb_pcwd          742 drivers/watchdog/pcwd_usb.c 	usb_set_intfdata(interface, usb_pcwd);
usb_pcwd          754 drivers/watchdog/pcwd_usb.c 	if (usb_pcwd)
usb_pcwd          755 drivers/watchdog/pcwd_usb.c 		usb_pcwd_delete(usb_pcwd);
usb_pcwd          771 drivers/watchdog/pcwd_usb.c 	struct usb_pcwd_private *usb_pcwd;
usb_pcwd          776 drivers/watchdog/pcwd_usb.c 	usb_pcwd = usb_get_intfdata(interface);
usb_pcwd          779 drivers/watchdog/pcwd_usb.c 	mutex_lock(&usb_pcwd->mtx);
usb_pcwd          783 drivers/watchdog/pcwd_usb.c 		usb_pcwd_stop(usb_pcwd);
usb_pcwd          786 drivers/watchdog/pcwd_usb.c 	usb_pcwd->exists = 0;
usb_pcwd          793 drivers/watchdog/pcwd_usb.c 	mutex_unlock(&usb_pcwd->mtx);
usb_pcwd          796 drivers/watchdog/pcwd_usb.c 	usb_pcwd_delete(usb_pcwd);