Lines Matching refs:usb_dev

47 	struct usb_device *usb_dev;  member
80 struct usb_device *usb_dev = atusb->usb_dev; in atusb_write_subreg() local
84 dev_dbg(&usb_dev->dev, "%s: 0x%02x <- 0x%02x\n", __func__, reg, value); in atusb_write_subreg()
86 ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV, in atusb_write_subreg()
98 ret = usb_control_msg_send(usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_write_subreg()
110 ret = usb_control_msg_recv(lp->usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV, in atusb_read_subreg()
139 struct usb_device *usb_dev = atusb->usb_dev; in atusb_submit_rx_urb() local
146 dev_warn_ratelimited(&usb_dev->dev, in atusb_submit_rx_urb()
154 usb_fill_bulk_urb(urb, usb_dev, usb_rcvbulkpipe(usb_dev, 1), in atusb_submit_rx_urb()
171 struct usb_device *usb_dev = atusb->usb_dev; in atusb_work_urbs() local
186 dev_warn_ratelimited(&usb_dev->dev, in atusb_work_urbs()
196 struct usb_device *usb_dev = atusb->usb_dev; in atusb_tx_done() local
199 dev_dbg(&usb_dev->dev, "%s (0x%02x/0x%02x)\n", __func__, seq, expect); in atusb_tx_done()
218 struct usb_device *usb_dev = urb->dev; in atusb_in_good() local
225 dev_dbg(&usb_dev->dev, "atusb_in: zero-sized URB ?\n"); in atusb_in_good()
256 dev_dbg(&usb_dev->dev, "atusb_in: frame len %d+1 > URB %u-1\n", in atusb_in_good()
262 dev_dbg(&usb_dev->dev, "atusb_in: frame corrupted\n"); in atusb_in_good()
267 dev_dbg(&usb_dev->dev, "atusb_in: rx len %d lqi 0x%02x\n", len, lqi); in atusb_in_good()
276 struct usb_device *usb_dev = urb->dev; in atusb_in() local
280 dev_dbg(&usb_dev->dev, "%s: status %d len %d\n", __func__, in atusb_in()
288 dev_dbg(&usb_dev->dev, "%s: URB error %d\n", __func__, urb->status); in atusb_in()
340 struct usb_device *usb_dev = atusb->usb_dev; in atusb_xmit() local
343 dev_dbg(&usb_dev->dev, "%s (%d)\n", __func__, skb->len); in atusb_xmit()
349 usb_fill_control_urb(atusb->tx_urb, usb_dev, in atusb_xmit()
350 usb_sndctrlpipe(usb_dev, 0), in atusb_xmit()
354 dev_dbg(&usb_dev->dev, "%s done (%d)\n", __func__, ret); in atusb_xmit()
370 struct device *dev = &atusb->usb_dev->dev; in atusb_set_hw_addr_filt()
376 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_set_hw_addr_filt()
379 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_set_hw_addr_filt()
387 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_set_hw_addr_filt()
390 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_set_hw_addr_filt()
400 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_set_hw_addr_filt()
419 struct usb_device *usb_dev = atusb->usb_dev; in atusb_start() local
422 dev_dbg(&usb_dev->dev, "%s\n", __func__); in atusb_start()
424 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_RX_MODE, ATUSB_REQ_TO_DEV, 1, 0, in atusb_start()
435 struct usb_device *usb_dev = atusb->usb_dev; in atusb_stop() local
437 dev_dbg(&usb_dev->dev, "%s\n", __func__); in atusb_stop()
439 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_RX_MODE, ATUSB_REQ_TO_DEV, 0, 0, in atusb_stop()
736 struct usb_device *usb_dev = atusb->usb_dev; in atusb_get_and_show_revision() local
742 ret = usb_control_msg_recv(atusb->usb_dev, 0, ATUSB_ID, ATUSB_REQ_FROM_DEV, 0, 0, in atusb_get_and_show_revision()
771 dev_info(&usb_dev->dev, in atusb_get_and_show_revision()
777 dev_info(&usb_dev->dev, in atusb_get_and_show_revision()
780 dev_info(&usb_dev->dev, "Please update to version 0.2 or newer"); in atusb_get_and_show_revision()
788 struct usb_device *usb_dev = atusb->usb_dev; in atusb_get_and_show_build() local
796 ret = usb_control_msg(atusb->usb_dev, usb_rcvctrlpipe(usb_dev, 0), ATUSB_BUILD, in atusb_get_and_show_build()
800 dev_info(&usb_dev->dev, "Firmware: build %s\n", build); in atusb_get_and_show_build()
809 struct usb_device *usb_dev = atusb->usb_dev; in atusb_get_and_conf_chip() local
815 ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV, in atusb_get_and_conf_chip()
820 ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV, in atusb_get_and_conf_chip()
825 ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV, in atusb_get_and_conf_chip()
830 ret = usb_control_msg_recv(usb_dev, 0, ATUSB_REG_READ, ATUSB_REQ_FROM_DEV, in atusb_get_and_conf_chip()
852 dev_err(&usb_dev->dev, in atusb_get_and_conf_chip()
890 dev_err(&usb_dev->dev, in atusb_get_and_conf_chip()
899 dev_info(&usb_dev->dev, "ATUSB: %s version %d\n", chip, version_num); in atusb_get_and_conf_chip()
910 struct usb_device *usb_dev = atusb->usb_dev; in atusb_set_extended_addr() local
925 ret = usb_control_msg_recv(atusb->usb_dev, 0, ATUSB_EUI64_READ, ATUSB_REQ_FROM_DEV, 0, 0, in atusb_set_extended_addr()
928 dev_err(&usb_dev->dev, "failed to fetch extended address, random address set\n"); in atusb_set_extended_addr()
936 dev_info(&usb_dev->dev, "no permanent extended address found, random address set\n"); in atusb_set_extended_addr()
941 dev_info(&usb_dev->dev, "Read permanent extended address %8phC from device\n", in atusb_set_extended_addr()
953 struct usb_device *usb_dev = interface_to_usbdev(interface); in atusb_probe() local
964 atusb->usb_dev = usb_get_dev(usb_dev); in atusb_probe()
984 hw->parent = &usb_dev->dev; in atusb_probe()
986 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_RF_RESET, ATUSB_REQ_TO_DEV, 0, 0, in atusb_probe()
998 dev_err(&atusb->usb_dev->dev, in atusb_probe()
1012 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_probe()
1042 usb_control_msg_send(atusb->usb_dev, 0, ATUSB_REG_WRITE, ATUSB_REQ_TO_DEV, in atusb_probe()
1049 dev_err(&atusb->usb_dev->dev, in atusb_probe()
1058 usb_put_dev(usb_dev); in atusb_probe()
1067 dev_dbg(&atusb->usb_dev->dev, "%s\n", __func__); in atusb_disconnect()
1079 usb_put_dev(atusb->usb_dev); in atusb_disconnect()