EHCI: update PM methods in ehci-tegra.c
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 1 May 2012 15:28:49 +0000 (11:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 May 2012 18:06:36 +0000 (14:06 -0400)
commitebf20de453042c066a289b90dd14d59de03dba2f
treea705f2a68b1f51f5eecef1336e7523f6bb26e591
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a
EHCI: update PM methods in ehci-tegra.c

This patch (as1547) rearranges the Power Management parts of the
ehci-tegra driver to match the conventions used in other EHCI platform
drivers.  In particular, the controller should not be powered down by
the root hub's suspend routine; the controller's power level should be
managed by the controller's own PM methods.

The end result of the patch is that the standard ehci_bus_suspend()
and ehci_bus_resume() methods can be used instead of special-purpose
routines.  The driver now uses the standard dev_pm_ops methods instead
of legacy power management.  Since there is no supported wakeup
mechanism for the controller, runtime suspend is forbidden by default
(this can be overridden via sysfs, if desired).

These adjustments are needed in order to make ehci-tegra compatible
with recent changes to the USB core.  The core now checks the root
hub's status following bus suspend; if the controller is automatically
powered down during bus suspend then the check will fail and the root
hub will be resumed immediately.  Doing the controller power-down in a
separate method avoids this problem.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-tegra.c