Commit cff4dab4 authored by Anton Tikhomirov's avatar Anton Tikhomirov Committed by Felipe Balbi

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: default avatarAnton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 3294908b
...@@ -1113,7 +1113,7 @@ static long fsl_otg_ioctl(struct file *file, unsigned int cmd, ...@@ -1113,7 +1113,7 @@ static long fsl_otg_ioctl(struct file *file, unsigned int cmd,
break; break;
case SET_A_SUSPEND_REQ: case SET_A_SUSPEND_REQ:
fsl_otg_dev->fsm.a_suspend_req = arg; fsl_otg_dev->fsm.a_suspend_req_inf = arg;
break; break;
case SET_A_BUS_DROP: case SET_A_BUS_DROP:
......
...@@ -99,7 +99,7 @@ void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state) ...@@ -99,7 +99,7 @@ void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
case OTG_STATE_A_SUSPEND: case OTG_STATE_A_SUSPEND:
otg_del_timer(fsm, A_AIDL_BDIS); otg_del_timer(fsm, A_AIDL_BDIS);
fsm->a_aidl_bdis_tmout = 0; fsm->a_aidl_bdis_tmout = 0;
fsm->a_suspend_req = 0; fsm->a_suspend_req_inf = 0;
break; break;
case OTG_STATE_A_PERIPHERAL: case OTG_STATE_A_PERIPHERAL:
otg_del_timer(fsm, A_BIDL_ADIS); 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,7 +192,7 @@ int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
* When HNP is triggered while a_bus_req = 0, a_host will * When HNP is triggered while a_bus_req = 0, a_host will
* suspend too fast to complete a_set_b_hnp_en * suspend too fast to complete a_set_b_hnp_en
*/ */
if (!fsm->a_bus_req || fsm->a_suspend_req) if (!fsm->a_bus_req || fsm->a_suspend_req_inf)
otg_add_timer(fsm, A_WAIT_ENUM); otg_add_timer(fsm, A_WAIT_ENUM);
break; break;
case OTG_STATE_A_SUSPEND: case OTG_STATE_A_SUSPEND:
...@@ -307,7 +307,7 @@ int otg_statemachine(struct otg_fsm *fsm) ...@@ -307,7 +307,7 @@ int otg_statemachine(struct otg_fsm *fsm)
otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
break; break;
case OTG_STATE_A_HOST: case OTG_STATE_A_HOST:
if ((!fsm->a_bus_req || fsm->a_suspend_req) && if ((!fsm->a_bus_req || fsm->a_suspend_req_inf) &&
fsm->otg->host->b_hnp_enable) fsm->otg->host->b_hnp_enable)
otg_set_state(fsm, OTG_STATE_A_SUSPEND); otg_set_state(fsm, OTG_STATE_A_SUSPEND);
else if (fsm->id || !fsm->b_conn || fsm->a_bus_drop) else if (fsm->id || !fsm->b_conn || fsm->a_bus_drop)
......
...@@ -54,9 +54,12 @@ enum otg_fsm_timer { ...@@ -54,9 +54,12 @@ enum otg_fsm_timer {
/* OTG state machine according to the OTG spec */ /* OTG state machine according to the OTG spec */
struct otg_fsm { struct otg_fsm {
/* Input */ /* Input */
int a_bus_drop;
int a_bus_req;
int a_bus_resume; int a_bus_resume;
int a_bus_suspend; int a_bus_suspend;
int a_conn; int a_conn;
int b_bus_req;
int a_sess_vld; int a_sess_vld;
int a_srp_det; int a_srp_det;
int a_vbus_vld; int a_vbus_vld;
...@@ -72,6 +75,7 @@ struct otg_fsm { ...@@ -72,6 +75,7 @@ struct otg_fsm {
int a_set_b_hnp_en; int a_set_b_hnp_en;
int b_srp_done; int b_srp_done;
int b_hnp_enable; int b_hnp_enable;
int a_clr_err;
/* Timeout indicator for timers */ /* Timeout indicator for timers */
int a_wait_vrise_tmout; int a_wait_vrise_tmout;
...@@ -82,11 +86,11 @@ struct otg_fsm { ...@@ -82,11 +86,11 @@ struct otg_fsm {
int a_bidl_adis_tmout; int a_bidl_adis_tmout;
/* Informative variables */ /* Informative variables */
int a_bus_drop; int a_bus_drop_inf;
int a_bus_req; int a_bus_req_inf;
int a_clr_err; int a_clr_err_inf;
int a_suspend_req; int a_suspend_req_inf;
int b_bus_req; int b_bus_req_inf;
/* Output */ /* Output */
int drv_vbus; int drv_vbus;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment