Lines Matching full:vbus

57 /* sunxi has the phy id/vbus pins not connected, so we use the force bits */
94 * otherwise we get Vbus errors
121 struct regulator *vbus; member
433 /* Fallback: report vbus as high */ in sun4i_usb_phy0_get_vbus_det()
450 * generate vbus change interrupts when the board is driving in sun4i_usb_phy0_poll()
451 * vbus using the N_VBUSEN pin on the pmic, so we must poll in sun4i_usb_phy0_poll()
452 * when using the pmic for vbus-det _and_ we're driving vbus. in sun4i_usb_phy0_poll()
467 if (!phy->vbus || phy->regulator_on) in sun4i_usb_phy_power_on()
470 /* For phy0 only turn on Vbus if we don't have an ext. Vbus */ in sun4i_usb_phy_power_on()
473 dev_warn(&_phy->dev, "External vbus detected, not enabling our own vbus\n"); in sun4i_usb_phy_power_on()
477 ret = regulator_enable(phy->vbus); in sun4i_usb_phy_power_on()
483 /* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */ in sun4i_usb_phy_power_on()
495 if (!phy->vbus || !phy->regulator_on) in sun4i_usb_phy_power_off()
498 regulator_disable(phy->vbus); in sun4i_usb_phy_power_off()
502 * phy0 vbus typically slowly discharges, sometimes this causes the in sun4i_usb_phy_power_off()
503 * Vbus gpio to not trigger an edge irq on Vbus off, so force a rescan. in sun4i_usb_phy_power_off()
609 /* id-change, force session end if we've no vbus detection */ in sun4i_usb_phy0_id_vbus_det_scan()
664 /* vbus or id changed, let the pins settle and then scan them */ in sun4i_usb_phy0_id_vbus_det_irq()
752 dev_err(dev, "Couldn't request VBUS detect GPIO\n"); in sun4i_usb_phy_probe()
760 dev_err(dev, "Couldn't get the VBUS power supply\n"); in sun4i_usb_phy_probe()
790 phy->vbus = devm_regulator_get_optional(dev, name); in sun4i_usb_phy_probe()
791 if (IS_ERR(phy->vbus)) { in sun4i_usb_phy_probe()
792 if (PTR_ERR(phy->vbus) == -EPROBE_DEFER) { in sun4i_usb_phy_probe()
799 phy->vbus = NULL; in sun4i_usb_phy_probe()
872 "usb0-vbus-det", data); in sun4i_usb_phy_probe()
874 dev_err(dev, "Err requesting vbus-det-irq: %d\n", ret); in sun4i_usb_phy_probe()