Lines Matching full:vbus

60 /* sunxi has the phy id/vbus pins not connected, so we use the force bits */
97 * otherwise we get Vbus errors
134 struct regulator *vbus; member
396 /* Fallback: report vbus as high */ in sun4i_usb_phy0_get_vbus_det()
413 * generate vbus change interrupts when the board is driving in sun4i_usb_phy0_poll()
414 * vbus using the N_VBUSEN pin on the pmic, so we must poll in sun4i_usb_phy0_poll()
415 * when using the pmic for vbus-det _and_ we're driving vbus. in sun4i_usb_phy0_poll()
431 if (!phy->vbus || phy->regulator_on) in sun4i_usb_phy_power_on()
434 /* For phy0 only turn on Vbus if we don't have an ext. Vbus */ in sun4i_usb_phy_power_on()
437 dev_warn(&_phy->dev, "External vbus detected, not enabling our own vbus\n"); in sun4i_usb_phy_power_on()
441 ret = regulator_enable(phy->vbus); in sun4i_usb_phy_power_on()
447 /* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */ in sun4i_usb_phy_power_on()
459 if (!phy->vbus || !phy->regulator_on) in sun4i_usb_phy_power_off()
462 regulator_disable(phy->vbus); in sun4i_usb_phy_power_off()
466 * phy0 vbus typically slowly discharges, sometimes this causes the in sun4i_usb_phy_power_off()
467 * Vbus gpio to not trigger an edge irq on Vbus off, so force a rescan. in sun4i_usb_phy_power_off()
573 /* id-change, force session end if we've no vbus detection */ in sun4i_usb_phy0_id_vbus_det_scan()
628 /* vbus or id changed, let the pins settle and then scan them */ in sun4i_usb_phy0_id_vbus_det_irq()
718 dev_err(dev, "Couldn't request VBUS detect GPIO\n"); in sun4i_usb_phy_probe()
726 dev_err(dev, "Couldn't get the VBUS power supply\n"); in sun4i_usb_phy_probe()
756 phy->vbus = devm_regulator_get_optional(dev, name); in sun4i_usb_phy_probe()
757 if (IS_ERR(phy->vbus)) { in sun4i_usb_phy_probe()
758 if (PTR_ERR(phy->vbus) == -EPROBE_DEFER) { in sun4i_usb_phy_probe()
765 phy->vbus = NULL; in sun4i_usb_phy_probe()
831 "usb0-vbus-det", data); in sun4i_usb_phy_probe()
833 dev_err(dev, "Err requesting vbus-det-irq: %d\n", ret); in sun4i_usb_phy_probe()