usb: otg: tegra: detect device cable through pmu
Rohith Seelaboyina [Wed, 21 Aug 2013 04:38:05 +0000 (09:38 +0530)]
Device cable and OTG cable should be detected through pmu
as extcon framework notifies when change is detected
in either vbus or id, registering for notifications to only
one of them will lead to handling notifications for
unwanted events.

Bug 1345401

Change-Id: I0da42fbf715bbcf32bf3741ab045997c43cebf77
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/263872
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

arch/arm/mach-tegra/board-ardbeg.c
drivers/usb/phy/tegra-otg.c

index 365432b..9663a43 100644 (file)
@@ -696,10 +696,11 @@ static void ardbeg_usb_init(void)
                        tegra_otg_pdata.id_extcon_dev_name = "as3722-extcon";
                        break;
                case BOARD_E1736:
+               case BOARD_E1735:
+                       /* Device cable is detected through PMU Interrupt */
                        tegra_udc_pdata.support_pmu_vbus = true;
                        tegra_ehci1_utmi_pdata.support_pmu_vbus = true;
                        tegra_otg_pdata.vbus_extcon_dev_name = "palmas-extcon";
-               case BOARD_E1735:
                        /* Host cable is detected through PMU Interrupt */
                        tegra_udc_pdata.id_det_type = TEGRA_USB_PMU_ID;
                        tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_PMU_ID;
index d8bb4f7..77517da 100644 (file)
@@ -842,7 +842,7 @@ static int tegra_otg_suspend(struct device *dev)
 
        mutex_lock(&tegra->irq_work_mutex);
        DBG("%s(%d) BEGIN state : %s\n", __func__, __LINE__,
-                               tegra_state_name(tegra->phy->state));
+                               tegra_state_name(tegra->phy.state));
 
        pm_runtime_get_sync(dev);
        clk_prepare_enable(tegra->clk);