Lines Matching full:vbus
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()
146 /* VBUS change IRQ handler */
153 dev_dbg(&pdev->dev, "VBUS %s (gadget: %s)\n", in gpio_vbus_irq()
196 gpio_vbus->vbus = 0; /* start with disconnected */ in gpio_vbus_set_peripheral()
220 /* draw max 0 mA from vbus in suspend mode; or the previously in gpio_vbus_set_suspend()
251 gpio_vbus->phy.label = "gpio-vbus"; in gpio_vbus_probe()
260 /* Look up the VBUS sensing GPIO */ in gpio_vbus_probe()
261 gpio_vbus->vbus_gpiod = devm_gpiod_get(dev, "vbus", GPIOD_IN); in gpio_vbus_probe()
264 dev_err(&pdev->dev, "can't request vbus gpio, err: %d\n", err); in gpio_vbus_probe()
281 * The VBUS sensing GPIO should have a pulldown, which will normally be in gpio_vbus_probe()
282 * part of a resistor ladder turning a 4.0V-5.25V level on VBUS into a in gpio_vbus_probe()
365 MODULE_ALIAS("platform:gpio-vbus");
380 .name = "gpio-vbus",