Searched refs:fsm (Results 1 - 25 of 60) sorted by relevance

123

/drivers/usb/common/
H A Dusb-otg-fsm.c31 #include <linux/usb/otg-fsm.h>
34 static int otg_set_protocol(struct otg_fsm *fsm, int protocol) argument
38 if (fsm->protocol != protocol) {
39 VDBG("Changing role fsm->protocol= %d; new protocol= %d\n",
40 fsm->protocol, protocol);
42 if (fsm->protocol == PROTO_HOST)
43 ret = otg_start_host(fsm, 0);
44 else if (fsm->protocol == PROTO_GADGET)
45 ret = otg_start_gadget(fsm, 0);
51 ret = otg_start_host(fsm,
67 otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state) argument
124 otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state) argument
244 otg_statemachine(struct otg_fsm *fsm) argument
[all...]
H A DMakefile9 obj-$(CONFIG_USB_OTG_FSM) += usb-otg-fsm.o
/drivers/isdn/hisax/
H A Dfsm.c1 /* $Id: fsm.c,v 1.14.6.4 2001/09/23 22:24:47 kai Exp $
25 FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount) argument
29 fsm->jumpmatrix =
30 kzalloc(sizeof(FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL);
31 if (!fsm->jumpmatrix)
35 if ((fnlist[i].state >= fsm->state_count) || (fnlist[i].event >= fsm->event_count)) {
37 i, (long)fnlist[i].state, (long)fsm->state_count,
38 (long)fnlist[i].event, (long)fsm
46 FsmFree(struct Fsm *fsm) argument
[all...]
H A Dst5481_d.c289 FsmEvent(&adapter->d_out.fsm, EV_DOUT_STOPPED, NULL);
304 if (d_out->fsm.state != ST_DOUT_NORMAL)
330 FsmChangeState(&d_out->fsm, ST_DOUT_WAIT_FOR_UNDERRUN);
372 FsmEvent(&adapter->d_out.fsm, EV_DOUT_RESETED, NULL);
403 FsmEvent(&adapter->d_out.fsm, EV_DOUT_COMPLETE, (void *) buf_nr);
408 static void dout_start_xmit(struct FsmInst *fsm, int event, void *arg) argument
411 struct st5481_adapter *adapter = fsm->userdata;
437 FsmChangeState(&d_out->fsm, ST_DOUT_SHORT_INIT);
439 FsmChangeState(&d_out->fsm, ST_DOUT_LONG_INIT);
462 static void dout_short_fifo(struct FsmInst *fsm, in argument
471 dout_end_short_frame(struct FsmInst *fsm, int event, void *arg) argument
479 dout_long_enable_fifo(struct FsmInst *fsm, int event, void *arg) argument
488 dout_long_den(struct FsmInst *fsm, int event, void *arg) argument
498 dout_reset(struct FsmInst *fsm, int event, void *arg) argument
507 dout_stop(struct FsmInst *fsm, int event, void *arg) argument
516 dout_underrun(struct FsmInst *fsm, int event, void *arg) argument
528 dout_check_busy(struct FsmInst *fsm, int event, void *arg) argument
537 dout_reseted(struct FsmInst *fsm, int event, void *arg) argument
548 dout_complete(struct FsmInst *fsm, int event, void *arg) argument
556 dout_ignore(struct FsmInst *fsm, int event, void *arg) argument
[all...]
H A Dfsm.h1 /* $Id: fsm.h,v 1.3.2.2 2001/09/23 22:24:47 kai Exp $
30 struct Fsm *fsm; member in struct:FsmInst
50 int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount);
51 void FsmFree(struct Fsm *fsm);
/drivers/mtd/devices/
H A Dst_spi_fsm.c314 static int stfsm_n25q_config(struct stfsm *fsm);
315 static int stfsm_mx25_config(struct stfsm *fsm);
316 static int stfsm_s25fl_config(struct stfsm *fsm);
317 static int stfsm_w25q_config(struct stfsm *fsm);
688 static inline int stfsm_is_idle(struct stfsm *fsm) argument
690 return readl(fsm->base + SPI_FAST_SEQ_STA) & 0x10;
693 static inline uint32_t stfsm_fifo_available(struct stfsm *fsm) argument
695 return (readl(fsm->base + SPI_FAST_SEQ_STA) >> 5) & 0x7f;
698 static void stfsm_clear_fifo(struct stfsm *fsm) argument
703 avail = stfsm_fifo_available(fsm);
714 stfsm_load_seq(struct stfsm *fsm, const struct stfsm_seq *seq) argument
730 stfsm_wait_seq(struct stfsm *fsm) argument
750 stfsm_read_fifo(struct stfsm *fsm, uint32_t *buf, uint32_t size) argument
775 stfsm_write_fifo(struct stfsm *fsm, const uint32_t *buf, uint32_t size) argument
789 stfsm_enter_32bit_addr(struct stfsm *fsm, int enter) argument
806 stfsm_wait_busy(struct stfsm *fsm) argument
853 stfsm_read_status(struct stfsm *fsm, uint8_t cmd, uint8_t *data, int bytes) argument
881 stfsm_write_status(struct stfsm *fsm, uint8_t cmd, uint16_t data, int bytes, int wait_busy) argument
928 stfsm_can_handle_soc_reset(struct stfsm *fsm) argument
943 stfsm_prepare_erasesec_seq(struct stfsm *fsm, struct stfsm_seq *seq) argument
957 stfsm_search_seq_rw_configs(struct stfsm *fsm, struct seq_rw_config cfgs[]) argument
971 stfsm_prepare_rw_seq(struct stfsm *fsm, struct stfsm_seq *seq, struct seq_rw_config *cfg) argument
1039 stfsm_search_prepare_rw_seq(struct stfsm *fsm, struct stfsm_seq *seq, struct seq_rw_config *cfgs) argument
1057 stfsm_prepare_rwe_seqs_default(struct stfsm *fsm) argument
1088 stfsm_mx25_config(struct stfsm *fsm) argument
1146 stfsm_n25q_config(struct stfsm *fsm) argument
1224 stfsm_s25fl_read_dyb(struct stfsm *fsm, uint32_t offs, uint8_t *dby) argument
1260 stfsm_s25fl_write_dyb(struct stfsm *fsm, uint32_t offs, uint8_t dby) argument
1295 stfsm_s25fl_clear_status_reg(struct stfsm *fsm) argument
1326 stfsm_s25fl_config(struct stfsm *fsm) argument
1415 stfsm_w25q_config(struct stfsm *fsm) argument
1453 stfsm_read(struct stfsm *fsm, uint8_t *buf, uint32_t size, uint32_t offset) argument
1514 stfsm_write(struct stfsm *fsm, const uint8_t *buf, uint32_t size, uint32_t offset) argument
1612 struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent); local
1637 stfsm_erase_sector(struct stfsm *fsm, uint32_t offset) argument
1667 stfsm_erase_chip(struct stfsm *fsm) argument
1688 struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent); local
1733 struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent); local
1775 stfsm_read_jedec(struct stfsm *fsm, uint8_t *jedec) argument
1789 stfsm_jedec_probe(struct stfsm *fsm) argument
1821 stfsm_set_mode(struct stfsm *fsm, uint32_t mode) argument
1841 stfsm_set_freq(struct stfsm *fsm, uint32_t spi_freq) argument
1878 stfsm_init(struct stfsm *fsm) argument
1918 struct stfsm *fsm = platform_get_drvdata(pdev); local
1967 struct stfsm *fsm; local
2056 struct stfsm *fsm = platform_get_drvdata(pdev); local
[all...]
/drivers/usb/chipidea/
H A Dotg_fsm.c14 * This file mainly handles OTG fsm, it includes OTG fsm operations
59 t = scnprintf(next, size, "%d\n", ci->fsm.a_bus_req);
75 mutex_lock(&ci->fsm.lock);
77 ci->fsm.a_bus_req = 0;
80 if (ci->fsm.a_bus_drop) {
81 mutex_unlock(&ci->fsm.lock);
84 ci->fsm.a_bus_req = 1;
88 mutex_unlock(&ci->fsm.lock);
103 t = scnprintf(next, size, "%d\n", ci->fsm
364 struct otg_fsm *fsm = &ci->fsm; local
437 ci_otg_fsm_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) argument
446 ci_otg_fsm_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) argument
459 ci_otg_drv_vbus(struct otg_fsm *fsm, int on) argument
494 ci_otg_loc_conn(struct otg_fsm *fsm, int on) argument
510 ci_otg_loc_sof(struct otg_fsm *fsm, int on) argument
526 ci_otg_start_pulse(struct otg_fsm *fsm) argument
536 ci_otg_start_host(struct otg_fsm *fsm, int on) argument
553 ci_otg_start_gadget(struct otg_fsm *fsm, int on) argument
624 struct otg_fsm *fsm = &ci->fsm; local
721 struct otg_fsm *fsm = &ci->fsm; local
[all...]
H A Ddebug.c12 #include <linux/usb/otg-fsm.h>
214 struct otg_fsm *fsm; local
219 fsm = &ci->fsm;
226 seq_printf(s, "a_bus_drop: %d\n", fsm->a_bus_drop);
228 seq_printf(s, "a_bus_req: %d\n", fsm->a_bus_req);
230 seq_printf(s, "a_srp_det: %d\n", fsm->a_srp_det);
232 seq_printf(s, "a_vbus_vld: %d\n", fsm->a_vbus_vld);
234 seq_printf(s, "b_conn: %d\n", fsm->b_conn);
236 seq_printf(s, "adp_change: %d\n", fsm
[all...]
H A Dotg_fsm.h14 #include <linux/usb/otg-fsm.h>
/drivers/usb/phy/
H A Dphy-fsl-usb.c136 void fsl_otg_chrg_vbus(struct otg_fsm *fsm, int on) argument
172 void fsl_otg_drv_vbus(struct otg_fsm *fsm, int on) argument
190 void fsl_otg_loc_conn(struct otg_fsm *fsm, int on) argument
209 void fsl_otg_loc_sof(struct otg_fsm *fsm, int on) argument
224 void fsl_otg_start_pulse(struct otg_fsm *fsm) argument
237 fsl_otg_add_timer(fsm, b_data_pulse_tmr);
254 fsl_otg_chrg_vbus(&fsl_otg_dev->fsm, 1);
256 fsl_otg_add_timer(&fsl_otg_dev->fsm, b_vbus_pulse_tmr);
261 fsl_otg_chrg_vbus(&fsl_otg_dev->fsm, 0);
269 fsl_otg_add_timer(&fsl_otg_dev->fsm, b_srp_wait_tm
303 fsl_otg_init_timers(struct otg_fsm *fsm) argument
412 fsl_otg_add_timer(struct otg_fsm *fsm, void *gtimer) argument
430 fsl_otg_fsm_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) argument
442 fsl_otg_del_timer(struct otg_fsm *fsm, void *gtimer) argument
452 fsl_otg_fsm_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer t) argument
498 fsl_otg_start_host(struct otg_fsm *fsm, int on) argument
564 fsl_otg_start_gadget(struct otg_fsm *fsm, int on) argument
624 struct otg_fsm *fsm = &otg_dev->fsm; local
703 struct otg_fsm *fsm = &og->fsm; local
759 struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm; local
888 struct otg_fsm *fsm; local
1016 struct otg_fsm *fsm = &fsl_otg_dev->fsm; local
[all...]
/drivers/net/ethernet/brocade/bna/
H A Dbfa_cs.h36 static void oc ## _sm_ ## st(otype * fsm, etype event)
52 typedef void (*bfa_fsm_t)(void *fsm, int event);
60 static void oc ## _sm_ ## st(otype * fsm, etype event); \
61 static void oc ## _sm_ ## st ## _entry(otype * fsm)
64 (_fsm)->fsm = (bfa_fsm_t)(_state); \
68 #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
69 #define bfa_fsm_get_state(_fsm) ((_fsm)->fsm)
71 ((_fsm)->fsm == (bfa_fsm_t)(_state))
H A Dbfa_msgq.h66 bfa_fsm_t fsm; member in struct:bfa_msgq_cmdq
92 bfa_fsm_t fsm; member in struct:bfa_msgq_rspq
/drivers/isdn/mISDN/
H A Dfsm.c25 #include "fsm.h"
30 mISDN_FsmNew(struct Fsm *fsm, argument
35 fsm->jumpmatrix = kzalloc(sizeof(FSMFNPTR) * fsm->state_count *
36 fsm->event_count, GFP_KERNEL);
39 if ((fnlist[i].state >= fsm->state_count) ||
40 (fnlist[i].event >= fsm->event_count)) {
43 i, (long)fnlist[i].state, (long)fsm->state_count,
44 (long)fnlist[i].event, (long)fsm->event_count);
46 fsm
52 mISDN_FsmFree(struct Fsm *fsm) argument
[all...]
H A Dfsm.h38 struct Fsm *fsm; member in struct:FsmInst
H A DMakefile11 mISDN_core-objs := core.o fsm.o socket.o clock.o hwchannel.o stack.o layer1.o layer2.o tei.o timerdev.o
/drivers/net/irda/
H A Dsir_dev.c32 /* substate handler of the config-fsm to handle the cases where we want
38 struct sir_fsm *fsm = &dev->fsm; local
43 next_state = fsm->substate; /* default: stay in current substate */
46 switch(fsm->substate) {
88 fsm->substate = next_state;
100 * On entry, fsm->sem is always locked and the netdev xmit queue stopped.
106 struct sir_dev *dev = container_of(work, struct sir_dev, fsm.work.work);
107 struct sir_fsm *fsm = &dev->fsm; local
287 struct sir_fsm *fsm = &dev->fsm; local
[all...]
H A Dmcp2120-sir.c100 unsigned state = dev->fsm.substate;
162 dev->fsm.substate = state;
186 unsigned state = dev->fsm.substate;
220 dev->fsm.substate = state;
H A Dgirbil-sir.c124 unsigned state = dev->fsm.substate;
186 dev->fsm.substate = state;
207 unsigned state = dev->fsm.substate;
248 dev->fsm.substate = state;
H A Dtekram-sir.c128 unsigned state = dev->fsm.substate;
187 dev->fsm.substate = state;
/drivers/s390/net/
H A DMakefile6 obj-$(CONFIG_CTCM) += ctcm.o fsm.o
7 obj-$(CONFIG_NETIUCV) += netiucv.o fsm.o
H A Dctcm_mpc.c111 static void mpc_action_nop(fsm_instance *fsm, int event, void *arg);
112 static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg);
116 static void mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg);
117 static void mpc_action_doxid0(fsm_instance *fsm, int event, void *arg);
118 static void mpc_action_doxid7(fsm_instance *fsm, int event, void *arg);
119 static void mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg);
120 static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg);
121 static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg);
356 CTCM_FUNTAIL, dev->name, fsm_getstate_str(grp->fsm));
358 switch (fsm_getstate(grp->fsm)) {
839 mpc_action_go_ready(fsm_instance *fsm, int event, void *arg) argument
1678 mpc_action_side_xid(fsm_instance *fsm, void *arg, int side) argument
1836 mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg) argument
1845 mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg) argument
1854 mpc_action_doxid0(fsm_instance *fsm, int event, void *arg) argument
1895 mpc_action_doxid7(fsm_instance *fsm, int event, void *arg) argument
1967 mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg) argument
2030 mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg) argument
[all...]
H A Dctcm_main.c191 fsm_newstate(ch->fsm, CTC_STATE_IDLE);
218 kfree_fsm(ch->fsm);
270 fsm_newstate(ch->fsm, CTC_STATE_STOPPED);
322 fsm_event(ch->fsm, CTC_EVENT_UC_RCRESET, ch);
330 fsm_event(ch->fsm, CTC_EVENT_UC_RSRESET, ch);
340 fsm_event(ch->fsm, CTC_EVENT_UC_HWFAIL, ch);
348 fsm_event(ch->fsm, CTC_EVENT_UC_RXPARITY, ch);
358 fsm_event(ch->fsm, CTC_EVENT_UC_TXTIMEOUT, ch);
360 fsm_event(ch->fsm, CTC_EVENT_UC_TXPARITY, ch);
372 fsm_event(ch->fsm, CTC_EVENT_UC_ZER
[all...]
H A Dctcm_fsms.c44 #include "fsm.h"
179 static void ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg);
182 static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg);
199 fsm_event(ch->fsm, CTC_EVENT_IO_EBUSY, ch);
204 fsm_event(ch->fsm, CTC_EVENT_IO_ENODEV, ch);
209 fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch);
346 fsm_event(priv->fsm, DEV_EVENT_TXUP, ch->netdev);
464 fsm_event(priv->fsm, DEV_EVENT_TXUP, dev);
500 fsm_event(priv->fsm, DEV_EVENT_RXUP, dev);
537 fsm_event(priv->fsm, DEV_EVENT_RXU
1601 ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg) argument
1660 ctcmpc_chx_attnbusy(fsm_instance *fsm, int event, void *arg) argument
1745 ctcmpc_chx_resend(fsm_instance *fsm, int event, void *arg) argument
1761 ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg) argument
[all...]
H A Dnetiucv.c69 #include "fsm.h"
200 fsm_instance *fsm; member in struct:iucv_connection
228 fsm_instance *fsm; member in struct:netiucv_priv
541 fsm_event(conn->fsm, CONN_EVENT_RX, &ev);
552 fsm_event(conn->fsm, CONN_EVENT_TXDONE, &ev);
559 fsm_event(conn->fsm, CONN_EVENT_CONN_ACK, conn);
584 fsm_event(conn->fsm, CONN_EVENT_CONN_REQ, &ev);
597 fsm_event(conn->fsm, CONN_EVENT_CONN_REJ, conn);
604 fsm_event(conn->fsm, CONN_EVENT_CONN_SUS, conn);
611 fsm_event(conn->fsm, CONN_EVENT_CONN_RE
[all...]
/drivers/scsi/bfa/
H A Dbfa_cs.h228 static void oc ## _sm_ ## st(otype * fsm, etype event)
248 typedef void (*bfa_fsm_t)(void *fsm, int event);
257 static void oc ## _sm_ ## st(otype * fsm, etype event); \
258 static void oc ## _sm_ ## st ## _entry(otype * fsm)
261 (_fsm)->fsm = (bfa_fsm_t)(_state); \
265 #define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
266 #define bfa_fsm_get_state(_fsm) ((_fsm)->fsm)
268 ((_fsm)->fsm == (bfa_fsm_t)(_state))

Completed in 299 milliseconds

123