mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-15 22:41:38 +00:00
usb: acpi: add helper to check port lpm capability using acpi _DSM
Add a helper to evaluate ACPI usb device specific method (_DSM) provided in case the USB3 port shouldn't enter U1 and U2 link states. This _DSM was added as port specific retimer configuration may lead to exit latencies growing beyond U1/U2 exit limits, and OS needs a way to find which ports can't support U1/U2 link power management states. This _DSM is also used by windows: Link: https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/usb-device-specific-method---dsm- Some patch issues found in testing resolved by Ron Lee Cc: stable@vger.kernel.org Tested-by: Ron Lee <ron.lee@intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20230116142216.1141605-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0522b9a165
commit
cd702d18c8
@@ -774,11 +774,14 @@ extern struct device *usb_intf_get_dma_device(struct usb_interface *intf);
|
||||
extern int usb_acpi_set_power_state(struct usb_device *hdev, int index,
|
||||
bool enable);
|
||||
extern bool usb_acpi_power_manageable(struct usb_device *hdev, int index);
|
||||
extern int usb_acpi_port_lpm_incapable(struct usb_device *hdev, int index);
|
||||
#else
|
||||
static inline int usb_acpi_set_power_state(struct usb_device *hdev, int index,
|
||||
bool enable) { return 0; }
|
||||
static inline bool usb_acpi_power_manageable(struct usb_device *hdev, int index)
|
||||
{ return true; }
|
||||
static inline int usb_acpi_port_lpm_incapable(struct usb_device *hdev, int index)
|
||||
{ return 0; }
|
||||
#endif
|
||||
|
||||
/* USB autosuspend and autoresume */
|
||||
|
||||
Reference in New Issue
Block a user