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