USB: EHCI: EHCI 1.1 addendum: Basic LPM feature support
With this patch, the LPM capable EHCI host controller can put device into L1 sleep state which is a mode that can enter/exit quickly, and reduce power consumption. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
aa4d834298
commit
48f2497014
@@ -361,6 +361,22 @@ static int ehci_pci_resume(struct usb_hcd *hcd, bool hibernated)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev)
|
||||
{
|
||||
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
||||
int rc = 0;
|
||||
|
||||
if (!udev->parent) /* udev is root hub itself, impossible */
|
||||
rc = -1;
|
||||
/* we only support lpm device connected to root hub yet */
|
||||
if (ehci->has_lpm && !udev->parent->parent) {
|
||||
rc = ehci_lpm_set_da(ehci, udev->devnum, udev->portnum);
|
||||
if (!rc)
|
||||
rc = ehci_lpm_check(ehci, udev->portnum);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static const struct hc_driver ehci_pci_hc_driver = {
|
||||
.description = hcd_name,
|
||||
.product_desc = "EHCI Host Controller",
|
||||
@@ -407,6 +423,11 @@ static const struct hc_driver ehci_pci_hc_driver = {
|
||||
.relinquish_port = ehci_relinquish_port,
|
||||
.port_handed_over = ehci_port_handed_over,
|
||||
|
||||
/*
|
||||
* call back when device connected and addressed
|
||||
*/
|
||||
.update_device = ehci_update_device,
|
||||
|
||||
.clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user