Lines Matching full:vbus

60 /* sunxi has the phy id/vbus pins not connected, so we use the force bits */
96 * otherwise we get Vbus errors
133 struct regulator *vbus; member
394 /* Fallback: report vbus as high */ in sun4i_usb_phy0_get_vbus_det()
411 * generate vbus change interrupts when the board is driving in sun4i_usb_phy0_poll()
412 * vbus using the N_VBUSEN pin on the pmic, so we must poll in sun4i_usb_phy0_poll()
413 * when using the pmic for vbus-det _and_ we're driving vbus. in sun4i_usb_phy0_poll()
429 if (!phy->vbus || phy->regulator_on) in sun4i_usb_phy_power_on()
432 /* For phy0 only turn on Vbus if we don't have an ext. Vbus */ in sun4i_usb_phy_power_on()
435 dev_warn(&_phy->dev, "External vbus detected, not enabling our own vbus\n"); in sun4i_usb_phy_power_on()
439 ret = regulator_enable(phy->vbus); in sun4i_usb_phy_power_on()
445 /* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */ in sun4i_usb_phy_power_on()
457 if (!phy->vbus || !phy->regulator_on) in sun4i_usb_phy_power_off()
460 regulator_disable(phy->vbus); in sun4i_usb_phy_power_off()
464 * phy0 vbus typically slowly discharges, sometimes this causes the in sun4i_usb_phy_power_off()
465 * Vbus gpio to not trigger an edge irq on Vbus off, so force a rescan. in sun4i_usb_phy_power_off()
571 /* id-change, force session end if we've no vbus detection */ in sun4i_usb_phy0_id_vbus_det_scan()
626 /* 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()
833 "usb0-vbus-det", data); in sun4i_usb_phy_probe()
835 dev_err(dev, "Err requesting vbus-det-irq: %d\n", ret); in sun4i_usb_phy_probe()