XenevaOS
Loading...
Searching...
No Matches
otg.h
Go to the documentation of this file.
1
2#include <linux/kernel.h>
3
4#define OTG_VERSION_1_3 0x0130
5#define OTG_VERSION_2_0 0x0200
6
13
20
37
38struct usb_otg {
40 struct usb_phy* phy;
41 struct usb_bus* host;
42 struct usb_gadget* gadget;
44
45 int (*set_host)(struct usb_otg* otg, struct usb_bus* host);
46
47};
uint8_t u8
Definition kernel.h:20
uint16_t u16
Definition kernel.h:21
usb_otg_state
Definition otg.h:21
@ OTG_STATE_B_WAIT_ACON
Definition otg.h:26
@ OTG_STATE_B_SRP_INIT
Definition otg.h:24
@ OTG_STATE_UNDEFINED
Definition otg.h:22
@ OTG_STATE_A_WAIT_BCON
Definition otg.h:30
@ OTG_STATE_A_WAIT_VFAIL
Definition otg.h:34
@ OTG_STATE_B_IDLE
Definition otg.h:23
@ OTG_STATE_B_PERIPHERAL
Definition otg.h:25
@ OTG_STATE_A_PERIPHERAL
Definition otg.h:33
@ OTG_STATE_A_HOST
Definition otg.h:31
@ OTG_STATE_A_VBUS_ERR
Definition otg.h:35
@ OTG_STATE_A_WAIT_VRISE
Definition otg.h:29
@ OTG_STATE_B_HOST
Definition otg.h:27
@ OTG_STATE_A_IDLE
Definition otg.h:28
@ OTG_STATE_A_SUSPEND
Definition otg.h:32
usb_dr_mode
Definition otg.h:7
@ USB_DR_MODE_PERIPHERAL
Definition otg.h:10
@ USB_DR_MODE_HOST
Definition otg.h:9
@ USB_DR_MODE_UNKNOWN
Definition otg.h:8
@ USB_DR_MODE_OTG
Definition otg.h:11
Definition ch9.h:164
Definition otg.h:14
bool adp_support
Definition otg.h:18
bool srp_support
Definition otg.h:17
bool hnp_support
Definition otg.h:16
u16 otg_rev
Definition otg.h:15
Definition otg.h:38
struct usb_phy * phy
Definition otg.h:40
int(* set_host)(struct usb_otg *otg, struct usb_bus *host)
Definition otg.h:45
struct usb_gadget * gadget
Definition otg.h:42
enum usb_otg_state state
Definition otg.h:43
struct usb_bus * host
Definition otg.h:41
u8 default_a
Definition otg.h:39