.battery_tmp_tbl = tps_batt_table,
.tblsize = ARRAY_SIZE(tps_batt_table),
};
-static struct twl4030_usb_data tps80032_usb_data = {
- .usb_mode = T2_USB_MODE_ULPI,
+
+int rk30_phy_init(){}
+int rk30_phy_exit(){}
+int rk30_phy_power(){}
+int rk30_phy_set_clk(){}
+int rk30_phy_suspend(){}
+static struct twl4030_usb_data tps80032_usbphy_data = {
+ .phy_init = rk30_phy_init,
+ .phy_exit = rk30_phy_exit,
+ .phy_power = rk30_phy_power,
+ .phy_set_clock = rk30_phy_set_clk,
+ .phy_suspend = rk30_phy_suspend,
+
};
static struct twl4030_ins sleep_on_seq[] __initdata = {
/*
.madc = &tps80032_madc_data,
.bci = &tps80032_bci_data,
- .usb = &tps80032_usb_data,
+ .usb = &tps80032_usbphy_data,
// .power = &tps80032_scripts_data,
/* Regulators */
.ldo1 = &tps80032_ldo1,
#include <linux/slab.h>
#include <linux/delay.h>
-#include <plat/usb.h>
+//#include <plat/usb.h>
/* usb register definitions */
#define USB_VENDOR_ID_LSB 0x00
#define CONTROLLER_STAT1 0x03
#define VBUS_DET BIT(2)
+extern int get_msc_connect_flag(void);
+
+
struct twl6030_usb {
struct otg_transceiver otg;
struct device *dev;
regulator_enable(twl->usb3v3);
twl6030_phy_suspend(&twl->otg, 0);
- charger_type = omap4_charger_detect();
+ if(0 == get_msc_connect_flag())
+ charger_type = POWER_SUPPLY_TYPE_USB_DCP;
+ else
+ charger_type = POWER_SUPPLY_TYPE_USB;
+
twl6030_phy_suspend(&twl->otg, 1);
if ((charger_type == POWER_SUPPLY_TYPE_USB_CDP)
|| (charger_type == POWER_SUPPLY_TYPE_USB)) {