static void msm_otg_late_power_work(struct work_struct *w)
{
	struct msm_otg *motg = container_of((struct delayed_work *)w,
				struct msm_otg, late_power_work);
	int booster = sec_get_notification(HNOTIFY_BOOSTER);

	pr_info("%s, ID=%d, booster=%d\n", __func__,
			test_bit(ID, &motg->inputs), booster);

	if (!test_bit(ID, &motg->inputs) && (booster == NOTIFY_POWER_OFF)) {
		msm_hsusb_vbus_power(motg, 0);
		msleep(100);
		msm_hsusb_vbus_power(motg, 1);
	}
}
Exemplo n.º 2
0
int max77803_muic_host_notify_cb(int enable)
{
	int ret = 0;
	sec_otg_notify(enable ? HNOTIFY_OTG_POWER_ON : HNOTIFY_OTG_POWER_OFF);
	ret = sec_get_notification(HNOTIFY_MODE);
	pr_info("%s: host_notify mode : %d\n", __func__, ret);
	return ret;
}