Home
last modified time | relevance | path

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

123

/drivers/usb/common/
Dusb-conn-gpio.c34 struct regulator *vbus; member
69 int id, vbus, ret; in usb_conn_detect_cable() local
77 vbus = info->vbus_gpiod ? in usb_conn_detect_cable()
82 else if (vbus) in usb_conn_detect_cable()
88 usb_role_string(info->last_role), usb_role_string(role), id, vbus); in usb_conn_detect_cable()
97 if (info->last_role == USB_ROLE_HOST && info->vbus) in usb_conn_detect_cable()
98 regulator_disable(info->vbus); in usb_conn_detect_cable()
104 if (role == USB_ROLE_HOST && info->vbus) { in usb_conn_detect_cable()
105 ret = regulator_enable(info->vbus); in usb_conn_detect_cable()
112 if (info->vbus) in usb_conn_detect_cable()
[all …]
/drivers/phy/socionext/
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()
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()
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/
Dphy-samsung-usb2.c29 if (drv->vbus) { in samsung_usb2_phy_power_on()
30 ret = regulator_enable(drv->vbus); in samsung_usb2_phy_power_on()
56 if (drv->vbus) in samsung_usb2_phy_power_on()
57 regulator_disable(drv->vbus); in samsung_usb2_phy_power_on()
79 if (drv->vbus) in samsung_usb2_phy_power_off()
80 ret = regulator_disable(drv->vbus); in samsung_usb2_phy_power_off()
214 drv->vbus = devm_regulator_get(dev, "vbus"); in samsung_usb2_phy_probe()
215 if (IS_ERR(drv->vbus)) { in samsung_usb2_phy_probe()
216 ret = PTR_ERR(drv->vbus); in samsung_usb2_phy_probe()
219 drv->vbus = NULL; in samsung_usb2_phy_probe()
Dphy-exynos5-usbdrd.c210 struct regulator *vbus; member
503 if (phy_drd->vbus) { in exynos5_usbdrd_phy_power_on()
504 ret = regulator_enable(phy_drd->vbus); in exynos5_usbdrd_phy_power_on()
542 if (phy_drd->vbus) in exynos5_usbdrd_phy_power_off()
543 regulator_disable(phy_drd->vbus); in exynos5_usbdrd_phy_power_off()
888 phy_drd->vbus = devm_regulator_get(dev, "vbus"); in exynos5_usbdrd_phy_probe()
889 if (IS_ERR(phy_drd->vbus)) { in exynos5_usbdrd_phy_probe()
890 ret = PTR_ERR(phy_drd->vbus); in exynos5_usbdrd_phy_probe()
895 phy_drd->vbus = NULL; in exynos5_usbdrd_phy_probe()
/drivers/usb/phy/
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()
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()
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()
Dphy-mv-usb.c174 if (mvotg->pdata->vbus == NULL) { in mv_otg_init_irq()
295 if (mvotg->pdata->vbus) { in mv_otg_update_inputs()
296 if (mvotg->pdata->vbus->poll() == VBUS_HIGH) { in mv_otg_update_inputs()
489 if (mvotg->pdata->vbus) in mv_otg_irq()
769 if (pdata->vbus) { in mv_otg_probe()
771 retval = devm_request_threaded_irq(&pdev->dev, pdata->vbus->irq, in mv_otg_probe()
779 pdata->vbus = NULL; in mv_otg_probe()
/drivers/phy/motorola/
Dphy-cpcap-usb.c132 struct iio_channel *vbus; member
144 error = iio_read_channel_processed(ddata->vbus, &value); in cpcap_usb_vbus_valid()
228 bool vbus = false; in cpcap_usb_detect() local
237 vbus = cpcap_usb_vbus_valid(ddata); in cpcap_usb_detect()
255 if (vbus && s.id_ground && ddata->docked) { in cpcap_usb_detect()
264 if (vbus && s.id_ground && !ddata->vbus_provider) { in cpcap_usb_detect()
313 vbus = cpcap_usb_vbus_valid(ddata); in cpcap_usb_detect()
316 if (vbus) { in cpcap_usb_detect()
575 ddata->vbus = devm_iio_channel_get(ddata->dev, "vbus"); in cpcap_usb_init_iio()
576 if (IS_ERR(ddata->vbus)) { in cpcap_usb_init_iio()
[all …]
/drivers/usb/dwc3/
Ddwc3-meson-g12a.c266 struct regulator *vbus; member
501 if (priv->vbus) { in dwc3_meson_g12a_otg_mode_set()
503 ret = regulator_disable(priv->vbus); in dwc3_meson_g12a_otg_mode_set()
505 ret = regulator_enable(priv->vbus); in dwc3_meson_g12a_otg_mode_set()
725 priv->vbus = devm_regulator_get_optional(dev, "vbus"); in dwc3_meson_g12a_probe()
726 if (IS_ERR(priv->vbus)) { in dwc3_meson_g12a_probe()
727 if (PTR_ERR(priv->vbus) == -EPROBE_DEFER) in dwc3_meson_g12a_probe()
728 return PTR_ERR(priv->vbus); in dwc3_meson_g12a_probe()
729 priv->vbus = NULL; in dwc3_meson_g12a_probe()
764 if (priv->vbus) { in dwc3_meson_g12a_probe()
[all …]
/drivers/phy/renesas/
Dphy-rcar-gen3-usb2.c115 struct regulator *vbus; member
184 static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus) in rcar_gen3_enable_vbus_ctrl() argument
191 dev_vdbg(ch->dev, "%s: %08x, %d\n", __func__, val, vbus); in rcar_gen3_enable_vbus_ctrl()
198 if (vbus) in rcar_gen3_enable_vbus_ctrl()
507 if (channel->vbus) { in rcar_gen3_phy_usb2_power_on()
508 ret = regulator_enable(channel->vbus); in rcar_gen3_phy_usb2_power_on()
539 if (channel->vbus) in rcar_gen3_phy_usb2_power_off()
540 ret = regulator_disable(channel->vbus); in rcar_gen3_phy_usb2_power_off()
723 channel->vbus = devm_regulator_get_optional(dev, "vbus"); in rcar_gen3_phy_usb2_probe()
724 if (IS_ERR(channel->vbus)) { in rcar_gen3_phy_usb2_probe()
[all …]
/drivers/phy/freescale/
Dphy-fsl-imx8mq-usb.c38 struct regulator *vbus; member
110 ret = regulator_enable(imx_phy->vbus); in imx8mq_phy_power_on()
122 regulator_disable(imx_phy->vbus); in imx8mq_phy_power_off()
179 imx_phy->vbus = devm_regulator_get(dev, "vbus"); in imx8mq_usb_phy_probe()
180 if (IS_ERR(imx_phy->vbus)) in imx8mq_usb_phy_probe()
181 return PTR_ERR(imx_phy->vbus); in imx8mq_usb_phy_probe()
/drivers/phy/rockchip/
Dphy-rockchip-usb.c77 struct regulator *vbus; member
100 if (phy->vbus) in rockchip_usb_phy480m_disable()
101 regulator_disable(phy->vbus); in rockchip_usb_phy480m_disable()
158 if (phy->vbus) { in rockchip_usb_phy_power_on()
161 ret = regulator_enable(phy->vbus); in rockchip_usb_phy_power_on()
291 rk_phy->vbus = devm_regulator_get_optional(&rk_phy->phy->dev, "vbus"); in rockchip_usb_phy_init()
292 if (IS_ERR(rk_phy->vbus)) { in rockchip_usb_phy_init()
293 if (PTR_ERR(rk_phy->vbus) == -EPROBE_DEFER) in rockchip_usb_phy_init()
294 return PTR_ERR(rk_phy->vbus); in rockchip_usb_phy_init()
295 rk_phy->vbus = NULL; in rockchip_usb_phy_init()
/drivers/phy/
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/phy/st/
Dphy-stm32-usbphyc.c60 struct regulator *vbus; member
301 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_on()
302 return regulator_enable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_on()
311 if (usbphyc_phy->vbus) in stm32_usbphyc_phy_power_off()
312 return regulator_disable(usbphyc_phy->vbus); in stm32_usbphyc_phy_power_off()
549 usbphyc->phys[port]->vbus = devm_regulator_get_optional(&phy->dev, "vbus"); in stm32_usbphyc_probe()
550 if (IS_ERR(usbphyc->phys[port]->vbus)) { in stm32_usbphyc_probe()
551 ret = PTR_ERR(usbphyc->phys[port]->vbus); in stm32_usbphyc_probe()
554 usbphyc->phys[port]->vbus = NULL; in stm32_usbphyc_probe()
/drivers/usb/musb/
Ddavinci.c40 struct gpio_desc *vbus; member
146 gpiod_set_value_cansleep(glue->vbus, glue->vbus_state); in evm_deferred_drvvbus()
156 if (!glue->vbus) in davinci_musb_source_power()
169 gpiod_set_value_cansleep(glue->vbus, glue->vbus_state); in davinci_musb_source_power()
527 glue->vbus = devm_gpiod_get_optional(&pdev->dev, NULL, GPIOD_OUT_LOW); in davinci_probe()
528 if (IS_ERR(glue->vbus)) { in davinci_probe()
529 ret = PTR_ERR(glue->vbus); in davinci_probe()
/drivers/usb/host/
Dohci-pxa27x.c125 struct regulator *vbus[3]; member
176 struct regulator *vbus = pxa_ohci->vbus[port]; in pxa27x_ohci_set_vbus_power() local
179 if (IS_ERR_OR_NULL(vbus)) in pxa27x_ohci_set_vbus_power()
183 ret = regulator_enable(vbus); in pxa27x_ohci_set_vbus_power()
185 ret = regulator_disable(vbus); in pxa27x_ohci_set_vbus_power()
476 pxa_ohci->vbus[i] = devm_regulator_get(&pdev->dev, name); in ohci_hcd_pxa27x_probe()
/drivers/usb/mtu3/
Dmtu3_dr.c105 struct regulator *vbus = otg_sx->vbus; in ssusb_set_vbus() local
109 if (!vbus) in ssusb_set_vbus()
115 ret = regulator_enable(vbus); in ssusb_set_vbus()
121 regulator_disable(vbus); in ssusb_set_vbus()
/drivers/extcon/
Dextcon-usb-gpio.c63 int id, vbus; in usb_extcon_detect_cable() local
71 vbus = info->vbus_gpiod ? in usb_extcon_detect_cable()
77 if (!vbus) in usb_extcon_detect_cable()
83 if (vbus) in usb_extcon_detect_cable()
/drivers/phy/broadcom/
Dphy-bcm-ns2-usbdrd.c241 int vbus; in extcon_work() local
248 vbus = gpiod_get_value_cansleep(driver->vbus_gpiod); in extcon_work()
250 if (!id && vbus) { /* Host connected */ in extcon_work()
255 } else if (id && !vbus) { /* Disconnected */ in extcon_work()
259 } else if (id && vbus) { /* Device connected */ in extcon_work()
/drivers/phy/allwinner/
Dphy-sun4i-usb.c133 struct regulator *vbus; member
429 if (!phy->vbus || phy->regulator_on) in sun4i_usb_phy_power_on()
439 ret = regulator_enable(phy->vbus); 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()
754 phy->vbus = devm_regulator_get_optional(dev, name); in sun4i_usb_phy_probe()
755 if (IS_ERR(phy->vbus)) { in sun4i_usb_phy_probe()
756 if (PTR_ERR(phy->vbus) == -EPROBE_DEFER) { in sun4i_usb_phy_probe()
763 phy->vbus = NULL; in sun4i_usb_phy_probe()
/drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/
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/usb/cdns3/
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()

123