0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __DRIVERS_USB_CHIPIDEA_OTG_FSM_H
0009 #define __DRIVERS_USB_CHIPIDEA_OTG_FSM_H
0010
0011 #include <linux/usb/otg-fsm.h>
0012
0013
0014
0015
0016
0017
0018 #define TA_WAIT_VRISE (100)
0019
0020
0021
0022
0023
0024
0025 #define TA_WAIT_VFALL (1000)
0026
0027
0028
0029 #define TA_WAIT_BCON (10000)
0030
0031
0032
0033
0034 #define TA_AIDL_BDIS (5000)
0035
0036
0037
0038 #define TA_BIDL_ADIS (500)
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #define TB_DATA_PLS (10)
0049
0050
0051
0052 #define TB_SRP_FAIL (6000)
0053
0054
0055
0056 #define TB_ASE0_BRST (155)
0057
0058 #define TB_SE0_SRP (1000)
0059
0060 #define TB_SSEND_SRP (1500)
0061
0062 #define TB_AIDL_BDIS (20)
0063
0064 #if IS_ENABLED(CONFIG_USB_OTG_FSM)
0065
0066 int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci);
0067 int ci_otg_fsm_work(struct ci_hdrc *ci);
0068 irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci);
0069 void ci_hdrc_otg_fsm_start(struct ci_hdrc *ci);
0070 void ci_hdrc_otg_fsm_remove(struct ci_hdrc *ci);
0071
0072 #else
0073
0074 static inline int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci)
0075 {
0076 return 0;
0077 }
0078
0079 static inline int ci_otg_fsm_work(struct ci_hdrc *ci)
0080 {
0081 return -ENXIO;
0082 }
0083
0084 static inline irqreturn_t ci_otg_fsm_irq(struct ci_hdrc *ci)
0085 {
0086 return IRQ_NONE;
0087 }
0088
0089 static inline void ci_hdrc_otg_fsm_start(struct ci_hdrc *ci)
0090 {
0091
0092 }
0093
0094 static inline void ci_hdrc_otg_fsm_remove(struct ci_hdrc *ci)
0095 {
0096
0097 }
0098
0099 #endif
0100
0101 #endif