---
name: "usb_gadget_vbus_draw"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_gadget_vbus_draw"
---

# usb\_gadget\_vbus\_draw(9)

constrain controller's VBUS power usage

## NAME

usb\_gadget\_vbus\_draw - constrain controller's VBUS power usage

## SYNOPSIS

**int usb\_gadget\_vbus\_draw(struct usb\_gadget \*** *gadget***, unsigned** *mA***);**

## ARGUMENTS

*gadget*

The device whose VBUS usage is being described

*mA*

How much current to draw, in milliAmperes. This should be twice the value listed in the configuration descriptor bMaxPower field.

## DESCRIPTION

This call is used by gadget drivers during SET\_CONFIGURATION calls, reporting how much power the device may consume. For example, this could affect how quickly batteries are recharged.

Returns zero on success, else negative errno.

## AUTHOR

**David Brownell** \<dbrownell@users.sourceforge.net\>

Author.

## COPYRIGHT
