---
name: "gadget_is_otg"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/gadget_is_otg"
---

# gadget\_is\_otg(9)

return true iff the hardware is OTG-ready

## NAME

gadget\_is\_otg - return true iff the hardware is OTG-ready

## SYNOPSIS

**int gadget\_is\_otg(struct usb\_gadget \*** *g***);**

## ARGUMENTS

*g*

controller that might have a Mini-AB connector

## DESCRIPTION

This is a runtime test, since kernels with a USB-OTG stack sometimes run on boards which only have a Mini-B (or Mini-A) connector.

## AUTHOR

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

Author.

## COPYRIGHT
