• Home
  • Raw
  • Download

Lines Matching refs:fsm

203 	void	(*chrg_vbus)(struct otg_fsm *fsm, int on);
204 void (*drv_vbus)(struct otg_fsm *fsm, int on);
205 void (*loc_conn)(struct otg_fsm *fsm, int on);
206 void (*loc_sof)(struct otg_fsm *fsm, int on);
207 void (*start_pulse)(struct otg_fsm *fsm);
208 void (*start_adp_prb)(struct otg_fsm *fsm);
209 void (*start_adp_sns)(struct otg_fsm *fsm);
210 void (*add_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer);
211 void (*del_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer);
212 int (*start_host)(struct otg_fsm *fsm, int on);
213 int (*start_gadget)(struct otg_fsm *fsm, int on);
217 static inline int otg_chrg_vbus(struct otg_fsm *fsm, int on) in otg_chrg_vbus() argument
219 if (!fsm->ops->chrg_vbus) in otg_chrg_vbus()
221 fsm->ops->chrg_vbus(fsm, on); in otg_chrg_vbus()
225 static inline int otg_drv_vbus(struct otg_fsm *fsm, int on) in otg_drv_vbus() argument
227 if (!fsm->ops->drv_vbus) in otg_drv_vbus()
229 if (fsm->drv_vbus != on) { in otg_drv_vbus()
230 fsm->drv_vbus = on; in otg_drv_vbus()
231 fsm->ops->drv_vbus(fsm, on); in otg_drv_vbus()
236 static inline int otg_loc_conn(struct otg_fsm *fsm, int on) in otg_loc_conn() argument
238 if (!fsm->ops->loc_conn) in otg_loc_conn()
240 if (fsm->loc_conn != on) { in otg_loc_conn()
241 fsm->loc_conn = on; in otg_loc_conn()
242 fsm->ops->loc_conn(fsm, on); in otg_loc_conn()
247 static inline int otg_loc_sof(struct otg_fsm *fsm, int on) in otg_loc_sof() argument
249 if (!fsm->ops->loc_sof) in otg_loc_sof()
251 if (fsm->loc_sof != on) { in otg_loc_sof()
252 fsm->loc_sof = on; in otg_loc_sof()
253 fsm->ops->loc_sof(fsm, on); in otg_loc_sof()
258 static inline int otg_start_pulse(struct otg_fsm *fsm) in otg_start_pulse() argument
260 if (!fsm->ops->start_pulse) in otg_start_pulse()
262 if (!fsm->data_pulse) { in otg_start_pulse()
263 fsm->data_pulse = 1; in otg_start_pulse()
264 fsm->ops->start_pulse(fsm); in otg_start_pulse()
269 static inline int otg_start_adp_prb(struct otg_fsm *fsm) in otg_start_adp_prb() argument
271 if (!fsm->ops->start_adp_prb) in otg_start_adp_prb()
273 if (!fsm->adp_prb) { in otg_start_adp_prb()
274 fsm->adp_sns = 0; in otg_start_adp_prb()
275 fsm->adp_prb = 1; in otg_start_adp_prb()
276 fsm->ops->start_adp_prb(fsm); in otg_start_adp_prb()
281 static inline int otg_start_adp_sns(struct otg_fsm *fsm) in otg_start_adp_sns() argument
283 if (!fsm->ops->start_adp_sns) in otg_start_adp_sns()
285 if (!fsm->adp_sns) { in otg_start_adp_sns()
286 fsm->adp_sns = 1; in otg_start_adp_sns()
287 fsm->ops->start_adp_sns(fsm); in otg_start_adp_sns()
292 static inline int otg_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer) in otg_add_timer() argument
294 if (!fsm->ops->add_timer) in otg_add_timer()
296 fsm->ops->add_timer(fsm, timer); in otg_add_timer()
300 static inline int otg_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer) in otg_del_timer() argument
302 if (!fsm->ops->del_timer) in otg_del_timer()
304 fsm->ops->del_timer(fsm, timer); in otg_del_timer()
308 static inline int otg_start_host(struct otg_fsm *fsm, int on) in otg_start_host() argument
310 if (!fsm->ops->start_host) in otg_start_host()
312 return fsm->ops->start_host(fsm, on); in otg_start_host()
315 static inline int otg_start_gadget(struct otg_fsm *fsm, int on) in otg_start_gadget() argument
317 if (!fsm->ops->start_gadget) in otg_start_gadget()
319 return fsm->ops->start_gadget(fsm, on); in otg_start_gadget()
322 int otg_statemachine(struct otg_fsm *fsm);