From b911a6a6e796318775dbc50a70d8fb5b87a36210 Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Tue, 16 Aug 2011 15:09:31 +0530 Subject: tegra: usb: phy: preresume action for HSIC Added preresume action for HSIC. This is needed for modem L2 state. BUG 828389 Change-Id: Ifbb9105741f87840d6b607109bc448704600903f Reviewed-on: http://git-master/r/47296 Reviewed-by: Varun Colbert Tested-by: Varun Colbert --- arch/arm/mach-tegra/include/mach/usb_phy.h | 1 + arch/arm/mach-tegra/usb_phy.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/include/mach/usb_phy.h b/arch/arm/mach-tegra/include/mach/usb_phy.h index 40d5d09e739b..ab7811cad208 100644 --- a/arch/arm/mach-tegra/include/mach/usb_phy.h +++ b/arch/arm/mach-tegra/include/mach/usb_phy.h @@ -60,6 +60,7 @@ struct tegra_uhsic_config { u8 elastic_underrun_limit; u8 elastic_overrun_limit; int (*postsuspend)(void); + int (*preresume)(void); }; enum tegra_usb_phy_port_speed { diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 040211fca6e5..7ce45f27175d 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -1274,6 +1274,16 @@ static int uhsic_phy_postsuspend(struct tegra_usb_phy *phy, bool is_dpd) return 0; } +static int uhsic_phy_preresume(struct tegra_usb_phy *phy, bool is_dpd) +{ + struct tegra_uhsic_config *uhsic_config = phy->config; + + if (uhsic_config->preresume) + uhsic_config->preresume(); + + return 0; +} + static int uhsic_phy_postresume(struct tegra_usb_phy *phy, bool is_dpd) { #ifdef CONFIG_ARCH_TEGRA_2x_SOC @@ -2096,7 +2106,7 @@ void tegra_usb_phy_preresume(struct tegra_usb_phy *phy, bool is_dpd) utmi_phy_preresume, NULL, NULL, - NULL, + uhsic_phy_preresume, }; if (preresume[phy->usb_phy_type]) -- cgit v1.2.3