]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
usb: gadget: otg: Allow device to charge in LP0
authorRohith Seelaboyina <rseelaboyina@nvidia.com>
Tue, 10 Dec 2013 04:29:35 +0000 (09:59 +0530)
committerRohith Seelaboyina <rseelaboyina@nvidia.com>
Wed, 18 Dec 2013 09:47:04 +0000 (01:47 -0800)
Add support for charging of device in LP0, when
vbus detection happens through pmic.

Bug 1406615

Change-Id: I97f92dc85de1a734dacb2446a353c89ec6f94cf4
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/344710
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/usb/phy/tegra-otg.c

index 7d9646ab9c6ebbaa06f7c5fd51ce1b62c9418bc1..94e42bc486fd35062a5779fd448ea0b99ba34ad7 100644 (file)
@@ -638,16 +638,16 @@ static int tegra_otg_conf(struct platform_device *pdev)
        tegra->phy.otg->set_peripheral = tegra_otg_set_peripheral;
 
        if (tegra->support_pmu_vbus) {
-               if (!pdata->vbus_extcon_dev_name) {
+               if (!pdata->ehci_pdata->vbus_extcon_dev_name) {
                        dev_err(&pdev->dev, "Missing vbus_extcon_dev_name!\n");
                        err = -EINVAL;
                        goto err_vbus_extcon;
                }
-               tegra->vbus_extcon_dev =
-                       extcon_get_extcon_dev(pdata->vbus_extcon_dev_name);
+               tegra->vbus_extcon_dev = extcon_get_extcon_dev(pdata->
+                                       ehci_pdata->vbus_extcon_dev_name);
                if (!tegra->vbus_extcon_dev) {
                        dev_err(&pdev->dev, "Cannot get the %s extcon dev\n",
-                                               pdata->vbus_extcon_dev_name);
+                               pdata->ehci_pdata->vbus_extcon_dev_name);
                        err = -ENODEV;
                        goto err_vbus_extcon;
                }
@@ -656,16 +656,16 @@ static int tegra_otg_conf(struct platform_device *pdev)
        }
 
        if (tegra->support_pmu_id) {
-               if (!pdata->id_extcon_dev_name) {
+               if (!pdata->ehci_pdata->id_extcon_dev_name) {
                        dev_err(&pdev->dev, "Missing id_extcon_dev_name!\n");
                        err = -EINVAL;
                        goto err_id_extcon;
                }
-               tegra->id_extcon_dev =
-                       extcon_get_extcon_dev(pdata->id_extcon_dev_name);
+               tegra->id_extcon_dev = extcon_get_extcon_dev(pdata->
+                                       ehci_pdata->id_extcon_dev_name);
                if (!tegra->id_extcon_dev) {
                        dev_err(&pdev->dev, "Cannot get the %s extcon dev\n",
-                                               pdata->id_extcon_dev_name);
+                                       pdata->ehci_pdata->id_extcon_dev_name);
                        err = -ENODEV;
                        goto err_id_extcon;
                }