aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index d4f9de1acd45..f8506ed0f97b 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -561,7 +561,6 @@ struct usb_device {
561 struct usb3_lpm_parameters u1_params; 561 struct usb3_lpm_parameters u1_params;
562 struct usb3_lpm_parameters u2_params; 562 struct usb3_lpm_parameters u2_params;
563 unsigned lpm_disable_count; 563 unsigned lpm_disable_count;
564 unsigned hub_initiated_lpm_disable_count;
565}; 564};
566#define to_usb_device(d) container_of(d, struct usb_device, dev) 565#define to_usb_device(d) container_of(d, struct usb_device, dev)
567 566
@@ -634,6 +633,17 @@ extern void usb_enable_lpm(struct usb_device *udev);
634extern int usb_unlocked_disable_lpm(struct usb_device *udev); 633extern int usb_unlocked_disable_lpm(struct usb_device *udev);
635extern void usb_unlocked_enable_lpm(struct usb_device *udev); 634extern void usb_unlocked_enable_lpm(struct usb_device *udev);
636 635
636extern int usb_disable_ltm(struct usb_device *udev);
637extern void usb_enable_ltm(struct usb_device *udev);
638
639static inline bool usb_device_supports_ltm(struct usb_device *udev)
640{
641 if (udev->speed != USB_SPEED_SUPER || !udev->bos || !udev->bos->ss_cap)
642 return false;
643 return udev->bos->ss_cap->bmAttributes & USB_LTM_SUPPORT;
644}
645
646
637/*-------------------------------------------------------------------------*/ 647/*-------------------------------------------------------------------------*/
638 648
639/* for drivers using iso endpoints */ 649/* for drivers using iso endpoints */