Home
last modified time | relevance | path

Searched refs:vbus (Results 1 – 25 of 60) sorted by relevance

123

/drivers/usb/common/
A Dusb-conn-gpio.c39 struct regulator *vbus; member
74 int id, vbus, ret; in usb_conn_detect_cable() local
82 vbus = info->vbus_gpiod ? in usb_conn_detect_cable()
87 else if (vbus) in usb_conn_detect_cable()
103 regulator_disable(info->vbus); in usb_conn_detect_cable()
110 ret = regulator_enable(info->vbus); in usb_conn_detect_cable()
117 if (info->vbus) in usb_conn_detect_cable()
228 if (PTR_ERR(info->vbus) == -ENODEV) in usb_conn_probe()
229 info->vbus = NULL; in usb_conn_probe()
231 if (IS_ERR(info->vbus)) in usb_conn_probe()
[all …]
/drivers/phy/socionext/
A Dphy-uniphier-usb2.c42 struct regulator *vbus; member
52 if (priv->vbus) in uniphier_u2phy_power_on()
53 ret = regulator_enable(priv->vbus); in uniphier_u2phy_power_on()
62 if (priv->vbus) in uniphier_u2phy_power_off()
63 regulator_disable(priv->vbus); in uniphier_u2phy_power_off()
140 priv->vbus = devm_regulator_get_optional(dev, "vbus"); in uniphier_u2phy_probe()
141 if (IS_ERR(priv->vbus)) { in uniphier_u2phy_probe()
142 if (PTR_ERR(priv->vbus) == -EPROBE_DEFER) { in uniphier_u2phy_probe()
143 ret = PTR_ERR(priv->vbus); in uniphier_u2phy_probe()
146 priv->vbus = NULL; in uniphier_u2phy_probe()
A Dphy-uniphier-usb3ss.c59 struct regulator *vbus; member
124 if (priv->vbus) { in uniphier_u3ssphy_power_on()
125 ret = regulator_enable(priv->vbus); in uniphier_u3ssphy_power_on()
146 if (priv->vbus) in uniphier_u3ssphy_power_off()
147 regulator_disable(priv->vbus); in uniphier_u3ssphy_power_off()
267 priv->vbus = devm_regulator_get_optional(dev, "vbus"); in uniphier_u3ssphy_probe()
268 if (IS_ERR(priv->vbus)) { in uniphier_u3ssphy_probe()
269 if (PTR_ERR(priv->vbus) == -EPROBE_DEFER) in uniphier_u3ssphy_probe()
270 return PTR_ERR(priv->vbus); in uniphier_u3ssphy_probe()
271 priv->vbus = NULL; in uniphier_u3ssphy_probe()
A Dphy-uniphier-usb3hs.c73 struct regulator *vbus; member
220 if (priv->vbus) { in uniphier_u3hsphy_power_on()
221 ret = regulator_enable(priv->vbus); in uniphier_u3hsphy_power_on()
242 if (priv->vbus) in uniphier_u3hsphy_power_off()
243 regulator_disable(priv->vbus); in uniphier_u3hsphy_power_off()
376 priv->vbus = devm_regulator_get_optional(dev, "vbus"); in uniphier_u3hsphy_probe()
377 if (IS_ERR(priv->vbus)) { in uniphier_u3hsphy_probe()
378 if (PTR_ERR(priv->vbus) == -EPROBE_DEFER) in uniphier_u3hsphy_probe()
379 return PTR_ERR(priv->vbus); in uniphier_u3hsphy_probe()
380 priv->vbus = NULL; in uniphier_u3hsphy_probe()
/drivers/phy/samsung/
A Dphy-samsung-usb2.c27 if (drv->vbus) { in samsung_usb2_phy_power_on()
28 ret = regulator_enable(drv->vbus); in samsung_usb2_phy_power_on()
54 if (drv->vbus) in samsung_usb2_phy_power_on()
55 regulator_disable(drv->vbus); in samsung_usb2_phy_power_on()
77 if (drv->vbus) in samsung_usb2_phy_power_off()
78 ret = regulator_disable(drv->vbus); in samsung_usb2_phy_power_off()
212 drv->vbus = devm_regulator_get(dev, "vbus"); in samsung_usb2_phy_probe()
213 if (IS_ERR(drv->vbus)) { in samsung_usb2_phy_probe()
214 ret = PTR_ERR(drv->vbus); in samsung_usb2_phy_probe()
217 drv->vbus = NULL; in samsung_usb2_phy_probe()
/drivers/phy/renesas/
A Dphy-rcar-gen3-usb2.c127 struct regulator *vbus; member
208 if (ch->vbus) in rcar_gen3_enable_vbus_ctrl()
209 regulator_hardware_enable(ch->vbus, vbus); in rcar_gen3_enable_vbus_ctrl()
216 if (vbus) in rcar_gen3_enable_vbus_ctrl()
531 if (channel->vbus) { in rcar_gen3_phy_usb2_power_on()
532 ret = regulator_enable(channel->vbus); in rcar_gen3_phy_usb2_power_on()
572 if (channel->vbus) in rcar_gen3_phy_usb2_power_off()
573 ret = regulator_disable(channel->vbus); in rcar_gen3_phy_usb2_power_off()
815 if (IS_ERR(channel->vbus)) { in rcar_gen3_phy_usb2_probe()
817 ret = PTR_ERR(channel->vbus); in rcar_gen3_phy_usb2_probe()
[all …]
/drivers/usb/phy/
A Dphy-omap-otg.c24 bool vbus; member
52 if (!otg_dev->id && otg_dev->vbus) in omap_otg_set_mode()
55 else if (otg_dev->vbus) in omap_otg_set_mode()
80 otg_dev->vbus = event; in omap_otg_vbus_notifier()
125 otg_dev->vbus = extcon_get_state(extcon, EXTCON_USB); in omap_otg_probe()
133 otg_dev->vbus); in omap_otg_probe()
A Dphy-gpio-vbus-usb.c39 int vbus; member
96 int status, vbus; in gpio_vbus_work() local
101 vbus = is_vbus_powered(gpio_vbus); in gpio_vbus_work()
102 if ((vbus ^ gpio_vbus->vbus) == 0) in gpio_vbus_work()
104 gpio_vbus->vbus = vbus; in gpio_vbus_work()
112 if (vbus) { in gpio_vbus_work()
196 gpio_vbus->vbus = 0; /* start with disconnected */ in gpio_vbus_set_peripheral()
A Dphy-generic.c105 int vbus, status; in nop_gpio_vbus_thread() local
107 vbus = gpiod_get_value(nop->gpiod_vbus); in nop_gpio_vbus_thread()
108 if ((vbus ^ nop->vbus) == 0) in nop_gpio_vbus_thread()
110 nop->vbus = vbus; in nop_gpio_vbus_thread()
112 if (vbus) { in nop_gpio_vbus_thread()
/drivers/usb/typec/tcpm/
A Dtcpci_mt6370.c29 struct regulator *vbus; member
85 ret = regulator_is_enabled(priv->vbus); in mt6370_tcpc_set_vbus()
90 return regulator_disable(priv->vbus); in mt6370_tcpc_set_vbus()
93 return regulator_enable(priv->vbus); in mt6370_tcpc_set_vbus()
156 priv->vbus = devm_regulator_get_optional(dev, "vbus"); in mt6370_tcpc_probe()
157 if (!IS_ERR(priv->vbus)) in mt6370_tcpc_probe()
A Dtcpci_rt1711h.c66 struct regulator *vbus; member
164 ret = regulator_enable(chip->vbus); in rt1711h_set_vbus()
166 ret = regulator_disable(chip->vbus); in rt1711h_set_vbus()
372 chip->vbus = devm_regulator_get(&client->dev, "vbus"); in rt1711h_probe()
373 if (IS_ERR(chip->vbus)) in rt1711h_probe()
374 return PTR_ERR(chip->vbus); in rt1711h_probe()
/drivers/phy/motorola/
A Dphy-cpcap-usb.c123 struct iio_channel *vbus; member
219 bool vbus = false; in cpcap_usb_detect() local
228 vbus = cpcap_usb_vbus_valid(ddata); in cpcap_usb_detect()
246 if (vbus && s.id_ground && ddata->docked) { in cpcap_usb_detect()
255 if (vbus && s.id_ground && !ddata->vbus_provider) { in cpcap_usb_detect()
304 vbus = cpcap_usb_vbus_valid(ddata); in cpcap_usb_detect()
307 if (vbus) { in cpcap_usb_detect()
567 if (IS_ERR(ddata->vbus)) { in cpcap_usb_init_iio()
568 error = PTR_ERR(ddata->vbus); in cpcap_usb_init_iio()
572 if (!ddata->vbus->indio_dev) { in cpcap_usb_init_iio()
[all …]
/drivers/usb/dwc3/
A Ddwc3-meson-g12a.c260 struct regulator *vbus; member
495 if (priv->vbus) { in dwc3_meson_g12a_otg_mode_set()
499 ret = regulator_enable(priv->vbus); in dwc3_meson_g12a_otg_mode_set()
717 if (IS_ERR(priv->vbus)) { in dwc3_meson_g12a_probe()
719 return PTR_ERR(priv->vbus); in dwc3_meson_g12a_probe()
720 priv->vbus = NULL; in dwc3_meson_g12a_probe()
755 if (priv->vbus) { in dwc3_meson_g12a_probe()
756 ret = regulator_enable(priv->vbus); in dwc3_meson_g12a_probe()
819 if (priv->vbus) in dwc3_meson_g12a_probe()
820 regulator_disable(priv->vbus); in dwc3_meson_g12a_probe()
[all …]
/drivers/phy/rockchip/
A Dphy-rockchip-usb.c76 struct regulator *vbus; member
99 if (phy->vbus) in rockchip_usb_phy480m_disable()
100 regulator_disable(phy->vbus); in rockchip_usb_phy480m_disable()
157 if (phy->vbus) { in rockchip_usb_phy_power_on()
160 ret = regulator_enable(phy->vbus); in rockchip_usb_phy_power_on()
290 rk_phy->vbus = devm_regulator_get_optional(&rk_phy->phy->dev, "vbus"); in rockchip_usb_phy_init()
291 if (IS_ERR(rk_phy->vbus)) { in rockchip_usb_phy_init()
292 if (PTR_ERR(rk_phy->vbus) == -EPROBE_DEFER) in rockchip_usb_phy_init()
293 return PTR_ERR(rk_phy->vbus); in rockchip_usb_phy_init()
294 rk_phy->vbus = NULL; in rockchip_usb_phy_init()
/drivers/phy/
A Dphy-lgm-usb.c42 struct regulator *vbus; member
127 ret = regulator_enable(ta->vbus); in phy_set_vbus()
129 ret = regulator_disable(ta->vbus); in phy_set_vbus()
216 ta->vbus = devm_regulator_get(dev, "vbus"); in phy_probe()
217 if (IS_ERR(ta->vbus)) in phy_probe()
218 return PTR_ERR(ta->vbus); in phy_probe()
/drivers/usb/host/
A Dohci-pxa27x.c121 struct regulator *vbus[3]; member
172 struct regulator *vbus = pxa_ohci->vbus[port]; in pxa27x_ohci_set_vbus_power() local
175 if (IS_ERR_OR_NULL(vbus)) in pxa27x_ohci_set_vbus_power()
179 ret = regulator_enable(vbus); in pxa27x_ohci_set_vbus_power()
181 ret = regulator_disable(vbus); in pxa27x_ohci_set_vbus_power()
457 pxa_ohci->vbus[i] = devm_regulator_get(&pdev->dev, name); in ohci_hcd_pxa27x_probe()
/drivers/usb/mtu3/
A Dmtu3_dr.c106 struct regulator *vbus = otg_sx->vbus; in ssusb_set_vbus() local
110 if (!vbus) in ssusb_set_vbus()
116 ret = regulator_enable(vbus); in ssusb_set_vbus()
122 regulator_disable(vbus); in ssusb_set_vbus()
/drivers/extcon/
A Dextcon-usb-gpio.c62 int id, vbus; in usb_extcon_detect_cable() local
70 vbus = info->vbus_gpiod ? in usb_extcon_detect_cable()
76 if (!vbus) in usb_extcon_detect_cable()
82 if (vbus) in usb_extcon_detect_cable()
/drivers/phy/st/
A Dphy-stm32-usbphyc.c139 struct regulator *vbus; member
384 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_on()
385 return regulator_enable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_on()
394 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_off()
395 return regulator_disable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_off()
731 usbphyc->phys[port]->vbus = devm_regulator_get_optional(&phy->dev, "vbus"); in stm32_usbphyc_probe()
732 if (IS_ERR(usbphyc->phys[port]->vbus)) { in stm32_usbphyc_probe()
733 ret = PTR_ERR(usbphyc->phys[port]->vbus); in stm32_usbphyc_probe()
736 usbphyc->phys[port]->vbus = NULL; in stm32_usbphyc_probe()
/drivers/phy/broadcom/
A Dphy-bcm-ns2-usbdrd.c231 int vbus; in extcon_work() local
238 vbus = gpiod_get_value_cansleep(driver->vbus_gpiod); in extcon_work()
240 if (!id && vbus) { /* Host connected */ in extcon_work()
245 } else if (id && !vbus) { /* Disconnected */ in extcon_work()
249 } else if (id && vbus) { /* Device connected */ in extcon_work()
/drivers/phy/allwinner/
A Dphy-sun4i-usb.c121 struct regulator *vbus; member
467 if (!phy->vbus || phy->regulator_on) in sun4i_usb_phy_power_on()
477 ret = regulator_enable(phy->vbus); 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()
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()
/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/
A Dbase.c54 int vbus = nv_rd16i2cr(i2c, addr, bus_reg); in nvkm_iccsense_poll_lane() local
56 if (vshunt < 0 || vbus < 0) in nvkm_iccsense_poll_lane()
60 vbus >>= bus_shift; in nvkm_iccsense_poll_lane()
62 return vbus * vshunt * lsb / shunt; in nvkm_iccsense_poll_lane()
/drivers/phy/freescale/
A Dphy-fsl-imx8mq-usb.c112 struct regulator *vbus; member
625 ret = regulator_enable(imx_phy->vbus); in imx8mq_phy_power_on()
637 regulator_disable(imx_phy->vbus); in imx8mq_phy_power_off()
696 imx_phy->vbus = devm_regulator_get(dev, "vbus"); in imx8mq_usb_phy_probe()
697 if (IS_ERR(imx_phy->vbus)) in imx8mq_usb_phy_probe()
698 return dev_err_probe(dev, PTR_ERR(imx_phy->vbus), "failed to get vbus\n"); in imx8mq_usb_phy_probe()
/drivers/usb/cdns3/
A Dcore.c215 int id, vbus; in cdns_hw_role_state_machine() local
227 vbus = cdns_get_vbus(cdns); in cdns_hw_role_state_machine()
245 else if (vbus) in cdns_hw_role_state_machine()
253 if (!vbus) in cdns_hw_role_state_machine()
A Ddrd.c98 int vbus; in cdns_get_vbus() local
100 vbus = !!(readl(&cdns->otg_regs->sts) & OTGSTS_VBUS_VALID); in cdns_get_vbus()
101 dev_dbg(cdns->dev, "OTG VBUS: %d", vbus); in cdns_get_vbus()
103 return vbus; in cdns_get_vbus()

Completed in 74 milliseconds

123