diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index a0bee5a28d1a..a232b7ece1f6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -394,6 +394,22 @@ enum usb_port_connect_type { | |||
394 | }; | 394 | }; |
395 | 395 | ||
396 | /* | 396 | /* |
397 | * USB 2.0 Link Power Management (LPM) parameters. | ||
398 | */ | ||
399 | struct usb2_lpm_parameters { | ||
400 | /* Best effort service latency indicate how long the host will drive | ||
401 | * resume on an exit from L1. | ||
402 | */ | ||
403 | unsigned int besl; | ||
404 | |||
405 | /* Timeout value in microseconds for the L1 inactivity (LPM) timer. | ||
406 | * When the timer counts to zero, the parent hub will initiate a LPM | ||
407 | * transition to L1. | ||
408 | */ | ||
409 | int timeout; | ||
410 | }; | ||
411 | |||
412 | /* | ||
397 | * USB 3.0 Link Power Management (LPM) parameters. | 413 | * USB 3.0 Link Power Management (LPM) parameters. |
398 | * | 414 | * |
399 | * PEL and SEL are USB 3.0 Link PM latencies for device-initiated LPM exit. | 415 | * PEL and SEL are USB 3.0 Link PM latencies for device-initiated LPM exit. |
@@ -468,6 +484,7 @@ struct usb3_lpm_parameters { | |||
468 | * @wusb: device is Wireless USB | 484 | * @wusb: device is Wireless USB |
469 | * @lpm_capable: device supports LPM | 485 | * @lpm_capable: device supports LPM |
470 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM | 486 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM |
487 | * @usb2_hw_lpm_besl_capable: device can perform USB2 hardware BESL LPM | ||
471 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled | 488 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled |
472 | * @usb3_lpm_enabled: USB3 hardware LPM enabled | 489 | * @usb3_lpm_enabled: USB3 hardware LPM enabled |
473 | * @string_langid: language ID for strings | 490 | * @string_langid: language ID for strings |
@@ -487,6 +504,7 @@ struct usb3_lpm_parameters { | |||
487 | * specific data for the device. | 504 | * specific data for the device. |
488 | * @slot_id: Slot ID assigned by xHCI | 505 | * @slot_id: Slot ID assigned by xHCI |
489 | * @removable: Device can be physically removed from this port | 506 | * @removable: Device can be physically removed from this port |
507 | * @l1_params: best effor service latency for USB2 L1 LPM state, and L1 timeout. | ||
490 | * @u1_params: exit latencies for USB3 U1 LPM state, and hub-initiated timeout. | 508 | * @u1_params: exit latencies for USB3 U1 LPM state, and hub-initiated timeout. |
491 | * @u2_params: exit latencies for USB3 U2 LPM state, and hub-initiated timeout. | 509 | * @u2_params: exit latencies for USB3 U2 LPM state, and hub-initiated timeout. |
492 | * @lpm_disable_count: Ref count used by usb_disable_lpm() and usb_enable_lpm() | 510 | * @lpm_disable_count: Ref count used by usb_disable_lpm() and usb_enable_lpm() |
@@ -538,6 +556,7 @@ struct usb_device { | |||
538 | unsigned wusb:1; | 556 | unsigned wusb:1; |
539 | unsigned lpm_capable:1; | 557 | unsigned lpm_capable:1; |
540 | unsigned usb2_hw_lpm_capable:1; | 558 | unsigned usb2_hw_lpm_capable:1; |
559 | unsigned usb2_hw_lpm_besl_capable:1; | ||
541 | unsigned usb2_hw_lpm_enabled:1; | 560 | unsigned usb2_hw_lpm_enabled:1; |
542 | unsigned usb3_lpm_enabled:1; | 561 | unsigned usb3_lpm_enabled:1; |
543 | int string_langid; | 562 | int string_langid; |
@@ -566,6 +585,7 @@ struct usb_device { | |||
566 | struct wusb_dev *wusb_dev; | 585 | struct wusb_dev *wusb_dev; |
567 | int slot_id; | 586 | int slot_id; |
568 | enum usb_device_removable removable; | 587 | enum usb_device_removable removable; |
588 | struct usb2_lpm_parameters l1_params; | ||
569 | struct usb3_lpm_parameters u1_params; | 589 | struct usb3_lpm_parameters u1_params; |
570 | struct usb3_lpm_parameters u2_params; | 590 | struct usb3_lpm_parameters u2_params; |
571 | unsigned lpm_disable_count; | 591 | unsigned lpm_disable_count; |
@@ -717,6 +737,7 @@ const struct usb_device_id *usb_match_id(struct usb_interface *interface, | |||
717 | extern int usb_match_one_id(struct usb_interface *interface, | 737 | extern int usb_match_one_id(struct usb_interface *interface, |
718 | const struct usb_device_id *id); | 738 | const struct usb_device_id *id); |
719 | 739 | ||
740 | extern int usb_for_each_dev(void *data, int (*fn)(struct usb_device *, void *)); | ||
720 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, | 741 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, |
721 | int minor); | 742 | int minor); |
722 | extern struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev, | 743 | extern struct usb_interface *usb_ifnum_to_if(const struct usb_device *dev, |