| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#ifndef __DRIVERS_USB_CHIPIDEA_OTG_FSM_H |
| 9 |
#define __DRIVERS_USB_CHIPIDEA_OTG_FSM_H |
| 10 |
|
| 11 |
#include <linux/usb/otg-fsm.h> |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#define TA_WAIT_VRISE (100) |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
#define TA_WAIT_VFALL (1000) |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
#define TA_WAIT_BCON (10000) |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
#define TA_AIDL_BDIS (5000) |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
#define TA_BIDL_ADIS (500) |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
#define TB_DATA_PLS (10) |
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
#define TB_SRP_FAIL (6000) |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
#define TB_ASE0_BRST (155) |
| 57 |
|
| 58 |
#define TB_SE0_SRP (1000) |
| 59 |
|
| 60 |
#define TB_SSEND_SRP (1500) |
| 61 |
|
| 62 |
#define TB_AIDL_BDIS (20) |
| 63 |
|
| 64 |
#if IS_ENABLED(CONFIG_USB_OTG_FSM) |
| 65 |
|
| 66 |
int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci); |
| 67 |
int ci_otg_fsm_work(struct ci_hdrc *ci); |
| 68 |
irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci); |
| 69 |
void ci_hdrc_otg_fsm_start(struct ci_hdrc *ci); |
| 70 |
void ci_hdrc_otg_fsm_remove(struct ci_hdrc *ci); |
| 71 |
|
| 72 |
#else |
| 73 |
|
| 74 |
static inline int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci) |
| 75 |
{ |
| 76 |
return 0; |
| 77 |
} |
| 78 |
|
| 79 |
static inline int ci_otg_fsm_work(struct ci_hdrc *ci) |
| 80 |
{ |
| 81 |
return -ENXIO; |
| 82 |
} |
| 83 |
|
| 84 |
static inline irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci) |
| 85 |
{ |
| 86 |
return IRQ_NONE; |
| 87 |
} |
| 88 |
|
| 89 |
static inline void ci_hdrc_otg_fsm_start(struct ci_hdrc *ci) |
| 90 |
{ |
| 91 |
|
| 92 |
} |
| 93 |
|
| 94 |
static inline void ci_hdrc_otg_fsm_remove(struct ci_hdrc *ci) |
| 95 |
{ |
| 96 |
|
| 97 |
} |
| 98 |
|
| 99 |
#endif |
| 100 |
|
| 101 |
#endif |