aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Tikhomirov <av.tikhomirov@samsung.com>2013-10-02 23:42:04 -0400
committerFelipe Balbi <balbi@ti.com>2013-10-04 10:44:48 -0400
commitcff4dab4cb95d394e9fd73f668326dac06e57b10 (patch)
tree0db13178d017c2a3bb04d0c4716a712f07208c47
parent3294908bc0f178bfd67971fdb4432f3d4e50921e (diff)
usb: phy: Rename OTG FSM informative variables
Mark informative variables with suffix '_inf' to distinguish them from other non-informative variables with the same name. If such non-informative varialbes were missed, they are created. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/phy/phy-fsl-usb.c2
-rw-r--r--drivers/usb/phy/phy-fsm-usb.c6
-rw-r--r--drivers/usb/phy/phy-fsm-usb.h14
3 files changed, 13 insertions, 9 deletions
diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c
index 649586169be5..d13ccd58a423 100644
--- a/drivers/usb/phy/phy-fsl-usb.c
+++ b/drivers/usb/phy/phy-fsl-usb.c
@@ -1113,7 +1113,7 @@ static long fsl_otg_ioctl(struct file *file, unsigned int cmd,
1113 break; 1113 break;
1114 1114
1115 case SET_A_SUSPEND_REQ: 1115 case SET_A_SUSPEND_REQ:
1116 fsl_otg_dev->fsm.a_suspend_req = arg; 1116 fsl_otg_dev->fsm.a_suspend_req_inf = arg;
1117 break; 1117 break;
1118 1118
1119 case SET_A_BUS_DROP: 1119 case SET_A_BUS_DROP:
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c
index 5e899edcaf39..cb0367c8e7a7 100644
--- a/drivers/usb/phy/phy-fsm-usb.c
+++ b/drivers/usb/phy/phy-fsm-usb.c
@@ -99,7 +99,7 @@ void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
99 case OTG_STATE_A_SUSPEND: 99 case OTG_STATE_A_SUSPEND:
100 otg_del_timer(fsm, A_AIDL_BDIS); 100 otg_del_timer(fsm, A_AIDL_BDIS);
101 fsm->a_aidl_bdis_tmout = 0; 101 fsm->a_aidl_bdis_tmout = 0;
102 fsm->a_suspend_req = 0; 102 fsm->a_suspend_req_inf = 0;
103 break; 103 break;
104 case OTG_STATE_A_PERIPHERAL: 104 case OTG_STATE_A_PERIPHERAL:
105 otg_del_timer(fsm, A_BIDL_ADIS); 105 otg_del_timer(fsm, A_BIDL_ADIS);
@@ -192,7 +192,7 @@ int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
192 * When HNP is triggered while a_bus_req = 0, a_host will 192 * When HNP is triggered while a_bus_req = 0, a_host will
193 * suspend too fast to complete a_set_b_hnp_en 193 * suspend too fast to complete a_set_b_hnp_en
194 */ 194 */
195 if (!fsm->a_bus_req || fsm->a_suspend_req) 195 if (!fsm->a_bus_req || fsm->a_suspend_req_inf)
196 otg_add_timer(fsm, A_WAIT_ENUM); 196 otg_add_timer(fsm, A_WAIT_ENUM);
197 break; 197 break;
198 case OTG_STATE_A_SUSPEND: 198 case OTG_STATE_A_SUSPEND:
@@ -307,7 +307,7 @@ int otg_statemachine(struct otg_fsm *fsm)
307 otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); 307 otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
308 break; 308 break;
309 case OTG_STATE_A_HOST: 309 case OTG_STATE_A_HOST:
310 if ((!fsm->a_bus_req || fsm->a_suspend_req) && 310 if ((!fsm->a_bus_req || fsm->a_suspend_req_inf) &&
311 fsm->otg->host->b_hnp_enable) 311 fsm->otg->host->b_hnp_enable)
312 otg_set_state(fsm, OTG_STATE_A_SUSPEND); 312 otg_set_state(fsm, OTG_STATE_A_SUSPEND);
313 else if (fsm->id || !fsm->b_conn || fsm->a_bus_drop) 313 else if (fsm->id || !fsm->b_conn || fsm->a_bus_drop)
diff --git a/drivers/usb/phy/phy-fsm-usb.h b/drivers/usb/phy/phy-fsm-usb.h
index a74e14aaa839..4049e5cc4abb 100644
--- a/drivers/usb/phy/phy-fsm-usb.h
+++ b/drivers/usb/phy/phy-fsm-usb.h
@@ -54,9 +54,12 @@ enum otg_fsm_timer {
54/* OTG state machine according to the OTG spec */ 54/* OTG state machine according to the OTG spec */
55struct otg_fsm { 55struct otg_fsm {
56 /* Input */ 56 /* Input */
57 int a_bus_drop;
58 int a_bus_req;
57 int a_bus_resume; 59 int a_bus_resume;
58 int a_bus_suspend; 60 int a_bus_suspend;
59 int a_conn; 61 int a_conn;
62 int b_bus_req;
60 int a_sess_vld; 63 int a_sess_vld;
61 int a_srp_det; 64 int a_srp_det;
62 int a_vbus_vld; 65 int a_vbus_vld;
@@ -72,6 +75,7 @@ struct otg_fsm {
72 int a_set_b_hnp_en; 75 int a_set_b_hnp_en;
73 int b_srp_done; 76 int b_srp_done;
74 int b_hnp_enable; 77 int b_hnp_enable;
78 int a_clr_err;
75 79
76 /* Timeout indicator for timers */ 80 /* Timeout indicator for timers */
77 int a_wait_vrise_tmout; 81 int a_wait_vrise_tmout;
@@ -82,11 +86,11 @@ struct otg_fsm {
82 int a_bidl_adis_tmout; 86 int a_bidl_adis_tmout;
83 87
84 /* Informative variables */ 88 /* Informative variables */
85 int a_bus_drop; 89 int a_bus_drop_inf;
86 int a_bus_req; 90 int a_bus_req_inf;
87 int a_clr_err; 91 int a_clr_err_inf;
88 int a_suspend_req; 92 int a_suspend_req_inf;
89 int b_bus_req; 93 int b_bus_req_inf;
90 94
91 /* Output */ 95 /* Output */
92 int drv_vbus; 96 int drv_vbus;