XenevaOS
Loading...
Searching...
No Matches
XenevaOS
BaseHdr
linux
usb
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
7
enum
usb_dr_mode
{
8
USB_DR_MODE_UNKNOWN
,
9
USB_DR_MODE_HOST
,
10
USB_DR_MODE_PERIPHERAL
,
11
USB_DR_MODE_OTG
,
12
};
13
14
struct
usb_otg_caps
{
15
u16
otg_rev
;
16
bool
hnp_support
;
17
bool
srp_support
;
18
bool
adp_support
;
19
};
20
21
enum
usb_otg_state
{
22
OTG_STATE_UNDEFINED
= 0,
23
OTG_STATE_B_IDLE
,
24
OTG_STATE_B_SRP_INIT
,
25
OTG_STATE_B_PERIPHERAL
,
26
OTG_STATE_B_WAIT_ACON
,
27
OTG_STATE_B_HOST
,
28
OTG_STATE_A_IDLE
,
29
OTG_STATE_A_WAIT_VRISE
,
30
OTG_STATE_A_WAIT_BCON
,
31
OTG_STATE_A_HOST
,
32
OTG_STATE_A_SUSPEND
,
33
OTG_STATE_A_PERIPHERAL
,
34
OTG_STATE_A_WAIT_VFAIL
,
35
OTG_STATE_A_VBUS_ERR
,
36
};
37
38
struct
usb_otg
{
39
u8
default_a
;
40
struct
usb_phy*
phy
;
41
struct
usb_bus
*
host
;
42
struct
usb_gadget*
gadget
;
43
enum
usb_otg_state
state
;
44
45
int (*
set_host
)(
struct
usb_otg
* otg,
struct
usb_bus
*
host
);
46
47
};
kernel.h
u8
uint8_t u8
Definition
kernel.h:20
u16
uint16_t u16
Definition
kernel.h:21
usb_otg_state
usb_otg_state
Definition
otg.h:21
OTG_STATE_B_WAIT_ACON
@ OTG_STATE_B_WAIT_ACON
Definition
otg.h:26
OTG_STATE_B_SRP_INIT
@ OTG_STATE_B_SRP_INIT
Definition
otg.h:24
OTG_STATE_UNDEFINED
@ OTG_STATE_UNDEFINED
Definition
otg.h:22
OTG_STATE_A_WAIT_BCON
@ OTG_STATE_A_WAIT_BCON
Definition
otg.h:30
OTG_STATE_A_WAIT_VFAIL
@ OTG_STATE_A_WAIT_VFAIL
Definition
otg.h:34
OTG_STATE_B_IDLE
@ OTG_STATE_B_IDLE
Definition
otg.h:23
OTG_STATE_B_PERIPHERAL
@ OTG_STATE_B_PERIPHERAL
Definition
otg.h:25
OTG_STATE_A_PERIPHERAL
@ OTG_STATE_A_PERIPHERAL
Definition
otg.h:33
OTG_STATE_A_HOST
@ OTG_STATE_A_HOST
Definition
otg.h:31
OTG_STATE_A_VBUS_ERR
@ OTG_STATE_A_VBUS_ERR
Definition
otg.h:35
OTG_STATE_A_WAIT_VRISE
@ OTG_STATE_A_WAIT_VRISE
Definition
otg.h:29
OTG_STATE_B_HOST
@ OTG_STATE_B_HOST
Definition
otg.h:27
OTG_STATE_A_IDLE
@ OTG_STATE_A_IDLE
Definition
otg.h:28
OTG_STATE_A_SUSPEND
@ OTG_STATE_A_SUSPEND
Definition
otg.h:32
usb_dr_mode
usb_dr_mode
Definition
otg.h:7
USB_DR_MODE_PERIPHERAL
@ USB_DR_MODE_PERIPHERAL
Definition
otg.h:10
USB_DR_MODE_HOST
@ USB_DR_MODE_HOST
Definition
otg.h:9
USB_DR_MODE_UNKNOWN
@ USB_DR_MODE_UNKNOWN
Definition
otg.h:8
USB_DR_MODE_OTG
@ USB_DR_MODE_OTG
Definition
otg.h:11
usb_bus
Definition
ch9.h:164
usb_otg_caps
Definition
otg.h:14
usb_otg_caps::adp_support
bool adp_support
Definition
otg.h:18
usb_otg_caps::srp_support
bool srp_support
Definition
otg.h:17
usb_otg_caps::hnp_support
bool hnp_support
Definition
otg.h:16
usb_otg_caps::otg_rev
u16 otg_rev
Definition
otg.h:15
usb_otg
Definition
otg.h:38
usb_otg::phy
struct usb_phy * phy
Definition
otg.h:40
usb_otg::set_host
int(* set_host)(struct usb_otg *otg, struct usb_bus *host)
Definition
otg.h:45
usb_otg::gadget
struct usb_gadget * gadget
Definition
otg.h:42
usb_otg::state
enum usb_otg_state state
Definition
otg.h:43
usb_otg::host
struct usb_bus * host
Definition
otg.h:41
usb_otg::default_a
u8 default_a
Definition
otg.h:39
Generated by
1.9.8