mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
USB: Add a sysfs file to show LTM capabilities.
USB 3.0 devices can optionally support Latency Tolerance Messaging (LTM). Add a new sysfs file in the device directory to show whether a device is LTM capable. This file will be present for both USB 2.0 and USB 3.0 devices. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:
parent
f74631e342
commit
024f117c2f
4 changed files with 30 additions and 7 deletions
|
@ -636,6 +636,14 @@ extern void usb_unlocked_enable_lpm(struct usb_device *udev);
|
|||
extern int usb_disable_ltm(struct usb_device *udev);
|
||||
extern void usb_enable_ltm(struct usb_device *udev);
|
||||
|
||||
static inline bool usb_device_supports_ltm(struct usb_device *udev)
|
||||
{
|
||||
if (udev->speed != USB_SPEED_SUPER || !udev->bos || !udev->bos->ss_cap)
|
||||
return false;
|
||||
return udev->bos->ss_cap->bmAttributes & USB_LTM_SUPPORT;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/* for drivers using iso endpoints */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue