Home
last modified time | relevance | path

Searched full:vbus (Results 1 – 25 of 1070) sorted by relevance

12345678910>>...43

/OK3568_Linux_fs/kernel/drivers/usb/common/
H A Dusb-conn-gpio.c34 struct regulator *vbus; member
48 * "DEVICE" = VBUS and "HOST" = !ID, so we have:
51 * even if VBUS is on.
53 * Role | ID | VBUS
61 * - VBUS only - we want to distinguish between [1] and [2], so ID is always 1
62 * - ID only - we want to distinguish between [1] and [4], so VBUS = ID
68 int id, vbus, ret; in usb_conn_detect_cable() local
73 /* check ID and VBUS */ in usb_conn_detect_cable()
76 vbus = info->vbus_gpiod ? in usb_conn_detect_cable()
81 else if (vbus) in usb_conn_detect_cable()
[all …]
/OK3568_Linux_fs/kernel/drivers/usb/phy/
H A Dphy-gpio-vbus-usb.c3 * gpio-vbus.c - simple GPIO VBUS sensing driver for B peripheral devices
24 * A simple GPIO VBUS sensing driver for B peripheral only devices
26 * a regulator to limit the current drawn from VBUS.
39 int vbus; member
45 * This driver relies on "both edges" triggering. VBUS has 100 msec to
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()
[all …]
H 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()
59 /* Set B-session end to indicate no 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()
131 "OMAP USB OTG controller rev %d.%d (%s, id=%d, vbus=%d)\n", in omap_otg_probe()
133 otg_dev->vbus); in omap_otg_probe()
H 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()
228 "vbus-detect", in usb_phy_gen_create_phy()
236 dev_err(dev, "Error requesting RESET or VBUS GPIO\n"); in usb_phy_gen_create_phy()
271 nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); in usb_phy_gen_create_phy()
276 "could not get vbus regulator\n"); in usb_phy_gen_create_phy()
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/usb/
H A Dusb-nop-xceiv.txt21 - vbus-detect-gpio: should specify the GPIO detecting a VBus insertion
23 - vbus-regulator : should specifiy the regulator supplying current drawn from
24 the VBus line (see Documentation/devicetree/bindings/regulator/regulator.txt).
35 vbus-detect-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>;
36 vbus-regulator = <&vbus_regulator>;
43 GPIO 13 detects VBus insertion, and accordingly notifies the vbus-regulator.
/OK3568_Linux_fs/u-boot/drivers/phy/
H A Dphy-rockchip-naneng-usb2.c62 * @bvalidfall_det_en: vbus valid fall detection enable register.
63 * @bvalidfall_det_st: vbus valid fall detection status register.
64 * @bvalidfall_det_clr: vbus valid fall detection clear register.
65 * @bvalidrise_det_en: vbus valid rise detection enable register.
66 * @bvalidrise_det_st: vbus valid rise detection status register.
67 * @bvalidrise_det_clr: vbus valid rise detection clear register.
85 * @utmi_bvalid: utmi vbus bvalid status register.
143 * @vbus_supply: vbus supply for usb host.
218 /* Check USB-Vbus status first */ in rockchip_chg_get_type()
272 struct udevice *vbus = NULL; in rockchip_usb2phy_check_vbus() local
[all …]
/OK3568_Linux_fs/kernel/drivers/phy/allwinner/
H A Dphy-sun4i-usb.c60 /* 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()
[all …]
/OK3568_Linux_fs/kernel/drivers/phy/socionext/
H 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()
H 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()
/OK3568_Linux_fs/kernel/drivers/extcon/
H A Dextcon-usb-gpio.c45 * "USB" = VBUS and "USB-HOST" = !ID, so we have:
48 * even if VBUS is on.
50 * State | ID | VBUS
58 * - VBUS only - we want to distinguish between [1] and [2], so ID is always 1.
59 * - ID only - we want to distinguish between [1] and [4], so VBUS = ID.
63 int id, vbus; in usb_extcon_detect_cable() local
68 /* check ID and VBUS and update cable state */ in usb_extcon_detect_cable()
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()
[all …]
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/regulator/
H A Dqcom,usb-vbus-regulator.yaml4 $id: http://devicetree.org/schemas/regulator/qcom,usb-vbus-regulator.yaml#
7 title: The Qualcomm PMIC VBUS output regulator driver
13 This regulator driver controls the VBUS output by the Qualcomm PMIC. This
20 - qcom,pm8150b-vbus-reg
24 description: VBUS output base address
37 compatible = "qcom,pm8150b-vbus-reg";
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/phy/
H A Dphy-rockchip-inno-usb2.yaml101 Phandle to a regulator that provides power to VBUS.
132 Phandle to a regulator that provides power to VBUS.
135 vbus-supply:
137 Phandle to a fixed-regulator that provides power to VBUS.
147 get vbus status. If not, it will use bvalid status bit to get vbus
150 rockchip,vbus-always-on:
152 description: when set, indicates that the otg vbus is always powered on.
158 rockchip,typec-vbus-det:
160 description: when set, check the vbus status from grf con for Type-C
H A Dphy-rockchip-naneng-usb2.txt21 - vbus-supply : regulator phandle for vbus power source.
41 * "otg-bvalid" : for the otg vbus interrupt.
46 - phy-supply : phandle to a regulator that provides power to VBUS.
48 - rockchip,vbus-always-on: when set, indicates that the otg vbus
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/mfd/
H A Dfusb302.txt8 - vbus-5v-gpios: enable/disable 5v vbus output
9 - vbus-other-gpios: enable/disable other high-voltage vbus output
24 vbus-5v-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
25 vbus-other-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
/OK3568_Linux_fs/kernel/drivers/phy/samsung/
H A 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()
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()
H A Dphy-exynos5-usbdrd.c190 * @vbus: VBUS regulator for phy
191 * @vbus_boost: Boost regulator for VBUS present on few Exynos boards
210 struct regulator *vbus; member
493 /* Enable VBUS supply */ in exynos5_usbdrd_phy_power_on()
498 "Failed to enable VBUS boost supply\n"); in exynos5_usbdrd_phy_power_on()
503 if (phy_drd->vbus) { in exynos5_usbdrd_phy_power_on()
504 ret = regulator_enable(phy_drd->vbus); in exynos5_usbdrd_phy_power_on()
506 dev_err(phy_drd->dev, "Failed to enable VBUS supply\n"); in exynos5_usbdrd_phy_power_on()
541 /* Disable VBUS supply */ in exynos5_usbdrd_phy_power_off()
542 if (phy_drd->vbus) in exynos5_usbdrd_phy_power_off()
[all …]
/OK3568_Linux_fs/kernel/drivers/phy/motorola/
H A Dphy-cpcap-usb.c132 struct iio_channel *vbus; member
144 error = iio_read_channel_processed(ddata->vbus, &value); in cpcap_usb_vbus_valid()
148 dev_err(ddata->dev, "error reading VBUS: %i\n", error); 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()
239 /* We need to kick the VBUS as USB A-host */ in cpcap_usb_detect()
241 dev_dbg(ddata->dev, "still in USB A-host mode, kicking VBUS\n"); in cpcap_usb_detect()
255 if (vbus && s.id_ground && ddata->docked) { in cpcap_usb_detect()
263 /* No VBUS needed with docks */ in cpcap_usb_detect()
264 if (vbus && s.id_ground && !ddata->vbus_provider) { in cpcap_usb_detect()
[all …]
/OK3568_Linux_fs/kernel/drivers/usb/typec/tcpm/
H A Dtcpci_husb311.c31 struct regulator *vbus; member
92 dev_dbg(chip->dev, "vbus is already %s", on ? "On" : "Off"); in husb311_set_vbus()
97 ret = regulator_enable(chip->vbus); in husb311_set_vbus()
99 ret = regulator_disable(chip->vbus); in husb311_set_vbus()
101 dev_err(chip->dev, "cannot %s vbus regulator, ret=%d", in husb311_set_vbus()
172 chip->vbus = devm_regulator_get_optional(chip->dev, "vbus"); in husb311_probe()
173 if (IS_ERR(chip->vbus)) { in husb311_probe()
174 ret = PTR_ERR(chip->vbus); in husb311_probe()
175 chip->vbus = NULL; in husb311_probe()
186 if (chip->vbus) in husb311_probe()
H A Dtcpci_et7303.c35 struct regulator *vbus; member
98 dev_dbg(chip->dev, "vbus is already %s", on ? "On" : "Off"); in et7303_set_vbus()
103 ret = regulator_enable(chip->vbus); in et7303_set_vbus()
105 ret = regulator_disable(chip->vbus); in et7303_set_vbus()
107 dev_err(chip->dev, "cannot %s vbus regulator, ret=%d", in et7303_set_vbus()
255 chip->vbus = devm_regulator_get_optional(chip->dev, "vbus"); in et7303_probe()
256 if (IS_ERR(chip->vbus)) { in et7303_probe()
257 ret = PTR_ERR(chip->vbus); in et7303_probe()
258 chip->vbus = NULL; in et7303_probe()
272 if (chip->vbus) in et7303_probe()
/OK3568_Linux_fs/kernel/include/linux/usb/
H A Dtcpm.h61 * @get_vbus: Called to read current VBUS state
75 * @set_vbus: Called to enable or disable VBUS
93 * Optional; Called to notify that vbus is now being sourced.
97 * support hardware to autonomously dischrge vbus upon disconnecting
103 * vbus threshold voltage below which the vbus discharge circuit
104 * will be turned on. requested_vbus_voltage is set to 0 when vbus
109 * detect VSAFE0V voltage level at vbus. When detection of VSAFE0V
111 * whether vbus is at VSAFE0V when needed.
112 * Returns true when vbus is at VSAFE0V, false otherwise.
/OK3568_Linux_fs/u-boot/include/power/power_delivery/
H A Dtcpm.h61 * @get_vbus: Called to read current VBUS state
75 * @set_vbus: Called to enable or disable VBUS
93 * Optional; Called to notify that vbus is now being sourced.
97 * support hardware to autonomously dischrge vbus upon disconnecting
103 * vbus threshold voltage below which the vbus discharge circuit
104 * will be turned on. requested_vbus_voltage is set to 0 when vbus
109 * detect VSAFE0V voltage level at vbus. When detection of VSAFE0V
111 * whether vbus is at VSAFE0V when needed.
112 * Returns true when vbus is at VSAFE0V, false otherwise.
/OK3568_Linux_fs/kernel/drivers/usb/musb/
H A Ddavinci.c40 struct gpio_desc *vbus; member
129 * VBUS SWITCHING IS BOARD-SPECIFIC ... at least for the DM6446 EVM,
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()
203 /* Wait till VBUS falls below SessionEnd (~0.2V); the 1.3 RTL in otg_timer()
205 * case "recover"), in routine "VBUS was valid by the time in otg_timer()
298 /* The Mentor core doesn't debounce VBUS as needed in davinci_musb_interrupt()
301 * to get VBUS errors during enumeration. in davinci_musb_interrupt()
305 * without waiting (on EVM, a **long** time) for VBUS in davinci_musb_interrupt()
[all …]
/OK3568_Linux_fs/kernel/arch/arm/boot/dts/
H A Dsunxi-common-regulators.dtsi2 * sunxi boards common regulator (ahci target power supply, usb-vbus) code
59 reg_usb0_vbus: usb0-vbus {
61 regulator-name = "usb0-vbus";
69 reg_usb1_vbus: usb1-vbus {
71 regulator-name = "usb1-vbus";
80 reg_usb2_vbus: usb2-vbus {
82 regulator-name = "usb2-vbus";
H A Dimx6qdl-prti6q.dtsi21 reg_usb_h1_vbus: regulator-h1-vbus {
23 regulator-name = "h1-vbus";
28 reg_usb_otg_vbus: regulator-otg-vbus {
30 regulator-name = "otg-vbus";
69 vbus-supply = <&reg_usb_h1_vbus>;
76 vbus-supply = <&reg_usb_otg_vbus>;
/OK3568_Linux_fs/kernel/drivers/regulator/
H A Dqcom_usb_vbus-regulator.c3 // Qualcomm PMIC VBUS output regulator driver
72 dev_err(dev, "not able to register vbus reg %d\n", ret); in qcom_usb_vbus_regulator_probe()
76 /* Disable HW logic for VBUS enable */ in qcom_usb_vbus_regulator_probe()
83 { .compatible = "qcom,pm8150b-vbus-reg" },
90 .name = "qcom-usb-vbus-regulator",
97 MODULE_DESCRIPTION("Qualcomm USB vbus regulator driver");

12345678910>>...43