Merge tag 'for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux...
[deliverable/linux.git] / drivers / usb / chipidea / ci.h
index e53287aff9161163c5e7f48330c54e5ca55845b1..6d6200e37b71e02b0e0d4a67cdd35f160f61de3b 100644 (file)
@@ -106,6 +106,18 @@ enum ci_role {
        CI_ROLE_END,
 };
 
+enum ci_revision {
+       CI_REVISION_1X = 10,    /* Revision 1.x */
+       CI_REVISION_20 = 20, /* Revision 2.0 */
+       CI_REVISION_21, /* Revision 2.1 */
+       CI_REVISION_22, /* Revision 2.2 */
+       CI_REVISION_23, /* Revision 2.3 */
+       CI_REVISION_24, /* Revision 2.4 */
+       CI_REVISION_25, /* Revision 2.5 */
+       CI_REVISION_25_PLUS, /* Revision above than 2.5 */
+       CI_REVISION_UNKNOWN = 99, /* Unknown Revision */
+};
+
 /**
  * struct ci_role_driver - host/gadget role driver
  * @start: start this role
@@ -150,7 +162,10 @@ struct hw_bank {
  * @role: current role
  * @is_otg: if the device is otg-capable
  * @fsm: otg finite state machine
- * @fsm_timer: pointer to timer list of otg fsm
+ * @otg_fsm_hrtimer: hrtimer for otg fsm timers
+ * @hr_timeouts: time out list for active otg fsm timers
+ * @enabled_otg_timer_bits: bits of enabled otg timers
+ * @next_otg_timer: next nearest enabled timer to be expired
  * @work: work for role changing
  * @wq: workqueue thread
  * @qh_pool: allocation pool for queue heads
@@ -181,6 +196,7 @@ struct hw_bank {
  * @supports_runtime_pm: if runtime pm is supported
  * @in_lpm: if the core in low power mode
  * @wakeup_int: if wakeup interrupt occur
+ * @rev: The revision number for controller
  */
 struct ci_hdrc {
        struct device                   *dev;
@@ -192,7 +208,10 @@ struct ci_hdrc {
        bool                            is_otg;
        struct usb_otg                  otg;
        struct otg_fsm                  fsm;
-       struct ci_otg_fsm_timer_list    *fsm_timer;
+       struct hrtimer                  otg_fsm_hrtimer;
+       ktime_t                         hr_timeouts[NUM_OTG_FSM_TIMERS];
+       unsigned                        enabled_otg_timer_bits;
+       enum otg_fsm_timer              next_otg_timer;
        struct work_struct              work;
        struct workqueue_struct         *wq;
 
@@ -226,6 +245,7 @@ struct ci_hdrc {
        bool                            supports_runtime_pm;
        bool                            in_lpm;
        bool                            wakeup_int;
+       enum ci_revision                rev;
 };
 
 static inline struct ci_role_driver *ci_role(struct ci_hdrc *ci)
This page took 0.031855 seconds and 5 git commands to generate.