| /kernel/linux/linux-5.10/drivers/usb/common/ |
| D | usb-conn-gpio.c | 34 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 …]
|
| /kernel/linux/linux-4.19/drivers/usb/phy/ |
| D | phy-gpio-vbus-usb.c | 3 * gpio-vbus.c - simple GPIO VBUS sensing driver for B peripheral devices 25 * A simple GPIO VBUS sensing driver for B peripheral only devices 27 * a regulator to limit the current drawn from VBUS. 38 int vbus; member 44 * This driver relies on "both edges" triggering. VBUS has 100 msec to 88 int vbus; in is_vbus_powered() local 90 vbus = gpio_get_value(pdata->gpio_vbus); in is_vbus_powered() 92 vbus = !vbus; in is_vbus_powered() 94 return vbus; in is_vbus_powered() 102 int gpio, status, vbus; in gpio_vbus_work() local [all …]
|
| D | phy-omap-otg.c | 24 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()
|
| /kernel/linux/linux-5.10/drivers/usb/phy/ |
| D | phy-gpio-vbus-usb.c | 3 * 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 …]
|
| D | phy-omap-otg.c | 24 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()
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/usb/ |
| D | usb-nop-xceiv.txt | 21 - 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.
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/usb/ |
| D | usb-nop-xceiv.txt | 21 - 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.
|
| D | mediatek,musb.txt | 29 - vbus-gpios : input GPIO for USB VBUS pin. 30 - vbus-supply : reference to the VBUS regulator, needed when supports 55 vbus-supply = <&usb_vbus>;
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/regulator/ |
| D | qcom,usb-vbus-regulator.yaml | 4 $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";
|
| /kernel/linux/linux-5.10/drivers/phy/socionext/ |
| D | phy-uniphier-usb2.c | 42 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()
|
| D | phy-uniphier-usb3ss.c | 57 struct regulator *vbus; member 122 if (priv->vbus) { in uniphier_u3ssphy_power_on() 123 ret = regulator_enable(priv->vbus); in uniphier_u3ssphy_power_on() 144 if (priv->vbus) in uniphier_u3ssphy_power_off() 145 regulator_disable(priv->vbus); in uniphier_u3ssphy_power_off() 265 priv->vbus = devm_regulator_get_optional(dev, "vbus"); in uniphier_u3ssphy_probe() 266 if (IS_ERR(priv->vbus)) { in uniphier_u3ssphy_probe() 267 if (PTR_ERR(priv->vbus) == -EPROBE_DEFER) in uniphier_u3ssphy_probe() 268 return PTR_ERR(priv->vbus); in uniphier_u3ssphy_probe() 269 priv->vbus = NULL; in uniphier_u3ssphy_probe()
|
| /kernel/linux/linux-4.19/drivers/extcon/ |
| D | extcon-usb-gpio.c | 53 * "USB" = VBUS and "USB-HOST" = !ID, so we have: 56 * even if VBUS is on. 58 * State | ID | VBUS 66 * - VBUS only - we want to distinguish between [1] and [2], so ID is always 1. 67 * - ID only - we want to distinguish between [1] and [4], so VBUS = ID. 71 int id, vbus; in usb_extcon_detect_cable() local 76 /* check ID and VBUS and update cable state */ in usb_extcon_detect_cable() 79 vbus = info->vbus_gpiod ? in usb_extcon_detect_cable() 85 if (!vbus) in usb_extcon_detect_cable() 91 if (vbus) in usb_extcon_detect_cable() [all …]
|
| /kernel/linux/linux-5.10/drivers/extcon/ |
| D | extcon-usb-gpio.c | 45 * "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 …]
|
| /kernel/linux/linux-4.19/drivers/phy/allwinner/ |
| D | phy-sun4i-usb.c | 68 /* sunxi has the phy id/vbus pins not connected, so we use the force bits */ 104 * otherwise we get Vbus errors 140 struct regulator *vbus; member 399 /* Fallback: report vbus as high */ in sun4i_usb_phy0_get_vbus_det() 416 * generate vbus change interrupts when the board is driving in sun4i_usb_phy0_poll() 417 * vbus using the N_VBUSEN pin on the pmic, so we must poll in sun4i_usb_phy0_poll() 418 * when using the pmic for vbus-det _and_ we're driving vbus. in sun4i_usb_phy0_poll() 434 if (!phy->vbus || phy->regulator_on) in sun4i_usb_phy_power_on() 437 /* For phy0 only turn on Vbus if we don't have an ext. Vbus */ in sun4i_usb_phy_power_on() 440 dev_warn(&_phy->dev, "External vbus detected, not enabling our own vbus\n"); in sun4i_usb_phy_power_on() [all …]
|
| /kernel/linux/linux-5.10/drivers/phy/allwinner/ |
| D | phy-sun4i-usb.c | 60 /* 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 …]
|
| /kernel/linux/linux-4.19/drivers/phy/samsung/ |
| D | phy-samsung-usb2.c | 32 if (drv->vbus) { in samsung_usb2_phy_power_on() 33 ret = regulator_enable(drv->vbus); in samsung_usb2_phy_power_on() 59 if (drv->vbus) in samsung_usb2_phy_power_on() 60 regulator_disable(drv->vbus); in samsung_usb2_phy_power_on() 82 if (drv->vbus) in samsung_usb2_phy_power_off() 83 ret = regulator_disable(drv->vbus); in samsung_usb2_phy_power_off() 216 drv->vbus = devm_regulator_get(dev, "vbus"); in samsung_usb2_phy_probe() 217 if (IS_ERR(drv->vbus)) { in samsung_usb2_phy_probe() 218 ret = PTR_ERR(drv->vbus); in samsung_usb2_phy_probe() 221 drv->vbus = NULL; in samsung_usb2_phy_probe()
|
| /kernel/linux/linux-5.10/drivers/phy/samsung/ |
| D | phy-samsung-usb2.c | 29 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()
|
| /kernel/linux/linux-5.10/drivers/regulator/ |
| D | qcom_usb_vbus-regulator.c | 3 // 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");
|
| /kernel/linux/linux-5.10/drivers/phy/motorola/ |
| D | phy-cpcap-usb.c | 132 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 …]
|
| /kernel/linux/linux-4.19/arch/arm/boot/dts/ |
| D | sunxi-common-regulators.dtsi | 2 * 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";
|
| /kernel/linux/linux-5.10/arch/arm/boot/dts/ |
| D | sunxi-common-regulators.dtsi | 2 * 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";
|
| D | imx6qdl-prti6q.dtsi | 21 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 = <®_usb_h1_vbus>; 76 vbus-supply = <®_usb_otg_vbus>;
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/phy/ |
| D | sun4i-usb-phy.txt | 41 - usb0_vbus_det-gpios : gpio phandle for detecting the presence of usb0 vbus 42 - usb0_vbus_power-supply: power-supply phandle for usb0 vbus presence detect 43 - usb0_vbus-supply : regulator phandle for controller usb0 vbus 44 - usb1_vbus-supply : regulator phandle for controller usb1 vbus 45 - usb2_vbus-supply : regulator phandle for controller usb2 vbus 46 - usb3_vbus-supply : regulator phandle for controller usb3 vbus
|
| /kernel/linux/linux-5.10/drivers/usb/musb/ |
| D | davinci.c | 40 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 …]
|
| /kernel/linux/linux-4.19/drivers/phy/renesas/ |
| D | phy-rcar-gen3-usb2.c | 92 struct regulator *vbus; member 139 static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus) in rcar_gen3_enable_vbus_ctrl() argument 144 dev_vdbg(&ch->phy->dev, "%s: %08x, %d\n", __func__, val, vbus); in rcar_gen3_enable_vbus_ctrl() 145 if (vbus) in rcar_gen3_enable_vbus_ctrl() 342 if (channel->vbus) { in rcar_gen3_phy_usb2_power_on() 343 ret = regulator_enable(channel->vbus); in rcar_gen3_phy_usb2_power_on() 362 if (channel->vbus) in rcar_gen3_phy_usb2_power_off() 363 ret = regulator_disable(channel->vbus); in rcar_gen3_phy_usb2_power_off() 479 channel->vbus = devm_regulator_get_optional(dev, "vbus"); in rcar_gen3_phy_usb2_probe() 480 if (IS_ERR(channel->vbus)) { in rcar_gen3_phy_usb2_probe() [all …]
|