]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
ARM: tegra: usb: Add vbus/id_extcon_dev to pdata
authorRohith Seelaboyina <rseelaboyina@nvidia.com>
Mon, 9 Dec 2013 08:52:16 +0000 (14:22 +0530)
committerRohith Seelaboyina <rseelaboyina@nvidia.com>
Wed, 18 Dec 2013 09:43:50 +0000 (01:43 -0800)
Move vbus/id_extcon_dev_name to usb platform data,
Add support for charging in LP0, when vbus
detection happens through pmic.

Bug 1406615

Change-Id: I50ee828134f71f63220981daf3731fff7db22878
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/344715
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
arch/arm/mach-tegra/board-ardbeg.c
arch/arm/mach-tegra/board-loki.c
arch/arm/mach-tegra/board-macallan.c
arch/arm/mach-tegra/board-pluto.c
include/linux/platform_data/tegra_usb.h

index 2d37a531d8a3ff07dbe45ead616aaa5b6ff359ca..0d52d4fcabce67111e80a3941f2b062993bf19ab 100644 (file)
@@ -593,7 +593,7 @@ static void ardbeg_usb_init(void)
                /* Host cable is detected through AMS PMU Interrupt */
                tegra_udc_pdata.id_det_type = TEGRA_USB_PMU_ID;
                tegra_ehci1_utmi_pdata.id_det_type = TEGRA_USB_PMU_ID;
-               tegra_otg_pdata.id_extcon_dev_name = "as3722-extcon";
+               tegra_ehci1_utmi_pdata.id_extcon_dev_name = "as3722-extcon";
        } else {
                /* Ardbeg */
                tegra_get_pmu_board_info(&bi);
@@ -603,7 +603,8 @@ static void ardbeg_usb_init(void)
                        /* 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;
-                       tegra_otg_pdata.id_extcon_dev_name = "as3722-extcon";
+                       tegra_ehci1_utmi_pdata.id_extcon_dev_name =
+                                                        "as3722-extcon";
                        break;
                case BOARD_E1736:
                case BOARD_E1769:
@@ -612,12 +613,15 @@ static void ardbeg_usb_init(void)
                case BOARD_P1761:
                        /* Device cable is detected through PMU Interrupt */
                        tegra_udc_pdata.support_pmu_vbus = true;
+                       tegra_udc_pdata.vbus_extcon_dev_name = "palmas-extcon";
                        tegra_ehci1_utmi_pdata.support_pmu_vbus = true;
-                       tegra_otg_pdata.vbus_extcon_dev_name = "palmas-extcon";
+                       tegra_ehci1_utmi_pdata.vbus_extcon_dev_name =
+                                                        "palmas-extcon";
                        /* 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;
-                       tegra_otg_pdata.id_extcon_dev_name = "palmas-extcon";
+                       tegra_ehci1_utmi_pdata.id_extcon_dev_name =
+                                                        "palmas-extcon";
                }
        }
 
index f8c22b97fd76670b4dd71ba1c9469aaedfb0d5b4..af197078dc81d7ea787e57d022dd6603eabea960 100644 (file)
@@ -487,8 +487,9 @@ static void loki_usb_init(void)
 
        /* Device cable is detected through PMU Interrupt */
        tegra_udc_pdata.support_pmu_vbus = true;
+       tegra_udc_pdata.vbus_extcon_dev_name = "palmas-extcon";
        tegra_ehci1_utmi_pdata.support_pmu_vbus = true;
-       tegra_otg_pdata.vbus_extcon_dev_name = "palmas-extcon";
+       tegra_ehci1_utmi_pdata.vbus_extcon_dev_name = "palmas-extcon";
 
        if (!(usb_port_owner_info & UTMI1_PORT_OWNER_XUSB)) {
                tegra_otg_device.dev.platform_data = &tegra_otg_pdata;
index 56d20aeb2a6a7df273889e04c56cb3d37ef46941..47f3d014ec210d07a8c9c8da5ceac0f5c5477923 100644 (file)
@@ -342,6 +342,7 @@ static struct tegra_usb_platform_data tegra_udc_pdata = {
        .id_det_type = TEGRA_USB_PMU_ID,
        .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
        .op_mode = TEGRA_USB_OPMODE_DEVICE,
+       .vbus_extcon_dev_name = "palmas-extcon",
        .u_data.dev = {
                .vbus_pmu_irq = 0,
                .vbus_gpio = -1,
@@ -369,6 +370,8 @@ static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
        .unaligned_dma_buf_supported = false,
        .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
        .op_mode = TEGRA_USB_OPMODE_HOST,
+       .vbus_extcon_dev_name = "palmas-extcon",
+       .id_extcon_dev_name = "palmas-extcon",
        .u_data.host = {
                .vbus_gpio = -1,
                .hot_plug = false,
@@ -392,8 +395,6 @@ static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
 static struct tegra_usb_otg_data tegra_otg_pdata = {
        .ehci_device = &tegra_ehci1_device,
        .ehci_pdata = &tegra_ehci1_utmi_pdata,
-       .vbus_extcon_dev_name = "palmas-extcon",
-       .id_extcon_dev_name = "palmas-extcon",
 };
 
 static void macallan_usb_init(void)
index 2982180a0a4838f3e9582d180f8f9434ed481a5e..a760a823394f40f77e8000189f80b4c29fa31a02 100644 (file)
@@ -677,6 +677,7 @@ static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
        .port_otg = true,
        .has_hostpc = true,
        .id_det_type = TEGRA_USB_PMU_ID,
+       .id_extcon_dev_name = "MAX77665_MUIC_ID",
        .unaligned_dma_buf_supported = false,
        .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
        .op_mode = TEGRA_USB_OPMODE_HOST,
@@ -703,7 +704,6 @@ static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
 static struct tegra_usb_otg_data tegra_otg_pdata = {
        .ehci_device = &tegra_ehci1_device,
        .ehci_pdata = &tegra_ehci1_utmi_pdata,
-       .id_extcon_dev_name = "MAX77665_MUIC_ID",
 };
 
 static struct regulator *baseband_reg;
index ab16b6bfe93978dd2bbf5945c2cdd7d5d58f9795..93c93fcf4ba848db6c2cfcccf4d623b4368dfff2 100644 (file)
@@ -127,6 +127,8 @@ struct tegra_usb_platform_data {
        bool has_hostpc;
        bool unaligned_dma_buf_supported;
        bool support_pmu_vbus;
+       char *vbus_extcon_dev_name;
+       char *id_extcon_dev_name;
        enum tegra_usb_id_detection id_det_type;
        enum tegra_usb_phy_interface phy_intf;
        enum tegra_usb_operation_mode op_mode;
@@ -150,8 +152,6 @@ struct tegra_usb_platform_data {
 struct tegra_usb_otg_data {
        struct platform_device *ehci_device;
        struct tegra_usb_platform_data *ehci_pdata;
-       char *vbus_extcon_dev_name;
-       char *id_extcon_dev_name;
        int id_det_gpio;
        bool is_xhci;
 };