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>
/* 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);
/* 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:
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";
}
}
/* 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;
.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,
.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,
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)
.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,
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;
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;
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;
};