usb_gadget_vbus_draw(9)

usb_gadget_vbus_draw9

Constrain controller's vbus power usage

Usage

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.

Overview

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.

Releases

5 releases since Debian 4.0 (Etch); the text changed 4 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8

Author

David Brownell <[email protected]>

Author.

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.