---
name: "usb_gadget_set_selfpowered"
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_set_selfpowered"
---

# usb\_gadget\_set\_selfpowered(9)

sets the device selfpowered feature.

## NAME

usb\_gadget\_set\_selfpowered - sets the device selfpowered feature.

## SYNOPSIS

**int usb\_gadget\_set\_selfpowered(struct usb\_gadget \*** *gadget***);**

## ARGUMENTS

*gadget*

the device being declared as self-powered

## DESCRIPTION

this affects the device status reported by the hardware driver to reflect that it now has a local power supply.

returns zero on success, else negative errno.

## AUTHOR

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

Author.

## COPYRIGHT
