summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/otg_fsm.h
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-04-23 15:56:48 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-24 12:56:35 -0700
commit826cfe751f3e1faf4a63b65245f5ee3a7efeb763 (patch)
tree99e33fcb1d99b158f923543dfca4d8c9576c4359 /drivers/usb/chipidea/otg_fsm.h
parent95f5555fa0f0176da338e8f42bca08f236032832 (diff)
downloadlinux-826cfe751f3e1faf4a63b65245f5ee3a7efeb763.tar.gz
linux-826cfe751f3e1faf4a63b65245f5ee3a7efeb763.tar.bz2
linux-826cfe751f3e1faf4a63b65245f5ee3a7efeb763.zip
usb: chipidea: add OTG fsm operation functions implementation
Add OTG HNP and SRP operation functions implementation: - charge vbus - drive vbus - connection signaling - drive sof - start data pulse - add fsm timer - delete fsm timer - start host - start gadget Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/otg_fsm.h')
-rw-r--r--drivers/usb/chipidea/otg_fsm.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/otg_fsm.h b/drivers/usb/chipidea/otg_fsm.h
index bf20a851b601..4d0dfe6900d6 100644
--- a/drivers/usb/chipidea/otg_fsm.h
+++ b/drivers/usb/chipidea/otg_fsm.h
@@ -13,6 +13,31 @@
#include <linux/usb/otg-fsm.h>
+enum ci_otg_fsm_timer_index {
+ /*
+ * CI specific timers, start from the end
+ * of standard and auxiliary OTG timers
+ */
+ B_DATA_PLS = NUM_OTG_FSM_TIMERS,
+ B_SSEND_SRP,
+ B_SESS_VLD,
+
+ NUM_CI_OTG_FSM_TIMERS,
+};
+
+struct ci_otg_fsm_timer {
+ unsigned long expires; /* Number of count increase to timeout */
+ unsigned long count; /* Tick counter */
+ void (*function)(void *, unsigned long); /* Timeout function */
+ unsigned long data; /* Data passed to function */
+ struct list_head list;
+};
+
+struct ci_otg_fsm_timer_list {
+ struct ci_otg_fsm_timer *timer_list[NUM_CI_OTG_FSM_TIMERS];
+ struct list_head active_timers;
+};
+
#ifdef CONFIG_USB_OTG_FSM
int ci_hdrc_otg_fsm_init(struct ci_hdrc *ci);