diff options
author | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-07-04 10:43:10 +0000 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-07-05 07:40:49 -0700 |
commit | 4df8c74291952f18d43fb608290db0ce7cc27d42 (patch) | |
tree | 0b13c11d9d741302e7952235ca9f148c657a5310 /drivers/usb | |
parent | 66ff68bcb9a2f5e5a110907f5c91f1cd2a2792c3 (diff) |
ARM: tegra: usb: turn off power during suspend
Turn off regulators along with clocks during suspend
Bug 991262
Reviewed-on: http://git-master/r/108820
(cherry picked from commit 41ae7ac21a2c08da0e4312b8395b380a704fa16c)
Change-Id: Ib49eec5d91571d75881f4d252d956dece1d37d60
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/105364
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index c0574ee8642d..2b9cd1a9ab4b 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -1,8 +1,8 @@ /* * EHCI-compliant USB host controller driver for NVIDIA Tegra SoCs * - * Copyright (C) 2010 Google, Inc. - * Copyright (C) 2009 - 2011 NVIDIA Corporation + * Copyright (c) 2010 Google, Inc. + * Copyright (c) 2009-2012 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -512,17 +512,15 @@ fail_hcd: #ifdef CONFIG_PM -static int tegra_ehci_resume_noirq(struct device *dev) +static int tegra_ehci_resume(struct platform_device *pdev) { - struct platform_device *pdev = to_platform_device(dev); struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); return tegra_usb_phy_power_on(tegra->phy); } -static int tegra_ehci_suspend_noirq(struct device *dev) +static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state) { - struct platform_device *pdev = to_platform_device(dev); struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev); /* bus suspend could have failed because of remote wakeup resume */ @@ -531,11 +529,6 @@ static int tegra_ehci_suspend_noirq(struct device *dev) else return tegra_usb_phy_power_off(tegra->phy); } - -static struct dev_pm_ops tegra_ehci_dev_pm_ops = { - .suspend_noirq = tegra_ehci_suspend_noirq, - .resume_noirq = tegra_ehci_resume_noirq, -}; #endif static int tegra_ehci_remove(struct platform_device *pdev) @@ -578,10 +571,11 @@ static struct platform_driver tegra_ehci_driver = { .probe = tegra_ehci_probe, .remove = tegra_ehci_remove, .shutdown = tegra_ehci_hcd_shutdown, - .driver = { - .name = driver_name, #ifdef CONFIG_PM - .pm = &tegra_ehci_dev_pm_ops, + .suspend = tegra_ehci_suspend, + .resume = tegra_ehci_resume, #endif + .driver = { + .name = driver_name, } }; |