Lines Matching full:vbus

58 /* sunxi has the phy id/vbus pins not connected, so we use the force bits */
95 * otherwise we get Vbus errors
122 struct regulator *vbus; member
434 /* Fallback: report vbus as high */ in sun4i_usb_phy0_get_vbus_det()
451 * generate vbus change interrupts when the board is driving in sun4i_usb_phy0_poll()
452 * vbus using the N_VBUSEN pin on the pmic, so we must poll in sun4i_usb_phy0_poll()
453 * when using the pmic for vbus-det _and_ we're driving vbus. in sun4i_usb_phy0_poll()
468 if (!phy->vbus || phy->regulator_on) in sun4i_usb_phy_power_on()
471 /* For phy0 only turn on Vbus if we don't have an ext. Vbus */ in sun4i_usb_phy_power_on()
474 dev_warn(&_phy->dev, "External vbus detected, not enabling our own vbus\n"); in sun4i_usb_phy_power_on()
478 ret = regulator_enable(phy->vbus); in sun4i_usb_phy_power_on()
484 /* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */ in sun4i_usb_phy_power_on()
496 if (!phy->vbus || !phy->regulator_on) in sun4i_usb_phy_power_off()
499 regulator_disable(phy->vbus); in sun4i_usb_phy_power_off()
503 * phy0 vbus typically slowly discharges, sometimes this causes the in sun4i_usb_phy_power_off()
504 * Vbus gpio to not trigger an edge irq on Vbus off, so force a rescan. in sun4i_usb_phy_power_off()
610 /* id-change, force session end if we've no vbus detection */ in sun4i_usb_phy0_id_vbus_det_scan()
665 /* vbus or id changed, let the pins settle and then scan them */ in sun4i_usb_phy0_id_vbus_det_irq()
753 dev_err(dev, "Couldn't request VBUS detect GPIO\n"); in sun4i_usb_phy_probe()
761 dev_err(dev, "Couldn't get the VBUS power supply\n"); in sun4i_usb_phy_probe()
791 phy->vbus = devm_regulator_get_optional(dev, name); in sun4i_usb_phy_probe()
792 if (IS_ERR(phy->vbus)) { in sun4i_usb_phy_probe()
793 if (PTR_ERR(phy->vbus) == -EPROBE_DEFER) { in sun4i_usb_phy_probe()
800 phy->vbus = NULL; in sun4i_usb_phy_probe()
873 "usb0-vbus-det", data); in sun4i_usb_phy_probe()
875 dev_err(dev, "Err requesting vbus-det-irq: %d\n", ret); in sun4i_usb_phy_probe()