__func__, action, attached_dev);
switch (attached_dev) {
+#if defined(CONFIG_IFCONN_NOTIFIER)
+ case ATTACHED_DEV_TA_MUIC:
+ if (action == IFCONN_NOTIFY_ID_DETACH)
+ send_otg_notify(o_notify, NOTIFY_EVENT_CHARGER, 0);
+ else if (action == IFCONN_NOTIFY_ID_ATTACH)
+ send_otg_notify(o_notify, NOTIFY_EVENT_CHARGER, 1);
+ else
+ pr_err("%s - ACTION Error!\n", __func__);
+ break;
+#endif
case ATTACHED_DEV_USB_MUIC:
case ATTACHED_DEV_CDP_MUIC:
case ATTACHED_DEV_UNOFFICIAL_ID_USB_MUIC:
.vbus_drive = otg_accessory_power,
.set_host = exynos_set_host,
.set_peripheral = exynos_set_peripheral,
+#if defined(CONFIG_IFCONN_NOTIFIER)
+ .charger_detect = 0,
+#endif
.vbus_detect_gpio = -1,
.is_wakelock = 0,
.booting_delay_sec = 10,
if (n->pre_peri_delay_us)
usleep_range(n->pre_peri_delay_us * 1000,
n->pre_peri_delay_us * 1000);
+#if defined(CONFIG_IFCONN_NOTIFIER)
+ pr_info("Charger status in usb detect = %d\n", n->charger_detect);
+ if (n->set_peripheral && n->charger_detect == 0)
+ n->set_peripheral(true);
+#else
if (n->set_peripheral)
n->set_peripheral(true);
+#endif
} else {
u_notify->ndev.mode = NOTIFY_NONE_MODE;
if (n->set_peripheral)
case NOTIFY_EVENT_CHARGER:
if (n->set_charger)
n->set_charger(enable);
+#if defined(CONFIG_IFCONN_NOTIFIER)
+ pr_info("%s charger detect = %d\n", __func__, enable);
+ if (enable)
+ n->charger_detect = 1;
+ else
+ n->charger_detect = 0;
+#endif
break;
case NOTIFY_EVENT_MMDOCK:
enable_ovc(u_notify, enable);
int pre_peri_delay_us;
int sec_whitelist_enable;
int speed;
+#if defined(CONFIG_IFCONN_NOTIFIER)
+ int charger_detect;
+#endif
const char *muic_name;
int (*pre_gpio)(int gpio, int use);
int (*post_gpio)(int gpio, int use);