static void bq24260_late_power(struct work_struct *work)
{
	struct dwc3_sec *snoti = &sec_noti;
	struct dwc3_msm *dwcm;
	
	if (!snoti) {
		pr_err("%s: dwc3_otg (snoti) is null\n", __func__);
		return;
	}

	dwcm = snoti->dwcm;
	if (!dwcm) {
		pr_err("%s: dwc3_otg (dwcm) is null\n", __func__);
		return;
	}
	
	pr_info("%s, ext_xceiv.id=%d\n", __func__, dwcm->ext_xceiv.id);

#ifdef CONFIG_USB_HOST_NOTIFY
	if (dwcm->ext_xceiv.id == DWC3_ID_GROUND) {
		if (gpio_usb_vbus_msm > 0) {
			if (gpio_get_value(gpio_usb_vbus_msm) == 0)
				bq24260_otg_control(booster_enable);
		} else {
			bq24260_otg_control(booster_enable);
		}
	}
#endif
}
示例#2
0
static void bq24260_late_power(struct work_struct *work)
{
	struct dwc3_sec *snoti = &sec_noti;
	struct dwc3_msm *dwcm;
	
	if (!snoti) {
		pr_err("%s: dwc3_otg (snoti) is null\n", __func__);
		return;
	}

	dwcm = snoti->dwcm;
	if (!dwcm) {
		pr_err("%s: dwc3_otg (dwcm) is null\n", __func__);
		return;
	}
	
	pr_info("%s, ext_xceiv.id=%d\n", __func__, dwcm->ext_xceiv.id);

	if (dwcm->ext_xceiv.id == DWC3_ID_GROUND)
		bq24260_otg_control(1);
}