Lines Matching refs:vbus
34 struct regulator *vbus;
69 int id, vbus, ret;
77 vbus = info->vbus_gpiod ?
82 else if (vbus)
87 dev_dbg(info->dev, "role %d/%d, gpios: id %d, vbus %d\n",
88 info->last_role, role, id, vbus);
97 if (info->last_role == USB_ROLE_HOST && info->vbus)
98 regulator_disable(info->vbus);
104 if (role == USB_ROLE_HOST && info->vbus) {
105 ret = regulator_enable(info->vbus);
107 dev_err(info->dev, "enable vbus regulator failed\n");
112 if (info->vbus)
113 dev_dbg(info->dev, "vbus regulator is %s\n",
114 regulator_is_enabled(info->vbus) ? "enabled" : "disabled");
193 info->vbus_gpiod = devm_gpiod_get_optional(dev, "vbus", GPIOD_IN);
216 if (of_find_property(dev->parent->of_node, "vbus-supply", NULL))
221 info->vbus = devm_regulator_get_optional(dev, "vbus");
222 if (PTR_ERR(info->vbus) == -ENODEV)
223 info->vbus = NULL;
225 info->vbus = devm_regulator_get(dev, "vbus");
228 if (IS_ERR(info->vbus)) {
229 if (PTR_ERR(info->vbus) != -EPROBE_DEFER)
230 dev_err(dev, "failed to get vbus: %ld\n", PTR_ERR(info->vbus));
231 return PTR_ERR(info->vbus);
299 if (info->last_role == USB_ROLE_HOST && info->vbus)
300 regulator_disable(info->vbus);