Symbol: fsm
drivers/input/touchscreen/ti_am335x_tsc.c
279
unsigned int fsm, status, irqclr = 0;
drivers/input/touchscreen/ti_am335x_tsc.c
291
fsm = titsc_readl(ts_dev, REG_ADCFSM);
drivers/input/touchscreen/ti_am335x_tsc.c
292
if (fsm == ADCFSM_STEPID) {
drivers/isdn/mISDN/fsm.c
21
mISDN_FsmNew(struct Fsm *fsm,
drivers/isdn/mISDN/fsm.c
26
fsm->jumpmatrix =
drivers/isdn/mISDN/fsm.c
27
kzalloc(array3_size(sizeof(FSMFNPTR), fsm->state_count,
drivers/isdn/mISDN/fsm.c
28
fsm->event_count),
drivers/isdn/mISDN/fsm.c
30
if (fsm->jumpmatrix == NULL)
drivers/isdn/mISDN/fsm.c
34
if ((fnlist[i].state >= fsm->state_count) ||
drivers/isdn/mISDN/fsm.c
35
(fnlist[i].event >= fsm->event_count)) {
drivers/isdn/mISDN/fsm.c
38
i, (long)fnlist[i].state, (long)fsm->state_count,
drivers/isdn/mISDN/fsm.c
39
(long)fnlist[i].event, (long)fsm->event_count);
drivers/isdn/mISDN/fsm.c
41
fsm->jumpmatrix[fsm->state_count * fnlist[i].event +
drivers/isdn/mISDN/fsm.c
48
mISDN_FsmFree(struct Fsm *fsm)
drivers/isdn/mISDN/fsm.c
50
kfree((void *) fsm->jumpmatrix);
drivers/isdn/mISDN/fsm.c
59
if ((fi->state >= fi->fsm->state_count) ||
drivers/isdn/mISDN/fsm.c
60
(event >= fi->fsm->event_count)) {
drivers/isdn/mISDN/fsm.c
63
(long)fi->state, (long)fi->fsm->state_count, event,
drivers/isdn/mISDN/fsm.c
64
(long)fi->fsm->event_count);
drivers/isdn/mISDN/fsm.c
67
r = fi->fsm->jumpmatrix[fi->fsm->state_count * event + fi->state];
drivers/isdn/mISDN/fsm.c
71
fi->fsm->strState[fi->state],
drivers/isdn/mISDN/fsm.c
72
fi->fsm->strEvent[event]);
drivers/isdn/mISDN/fsm.c
78
fi->fsm->strState[fi->state],
drivers/isdn/mISDN/fsm.c
79
fi->fsm->strEvent[event]);
drivers/isdn/mISDN/fsm.c
91
fi->fsm->strState[newstate]);
drivers/isdn/mISDN/fsm.h
29
struct Fsm *fsm;
drivers/isdn/mISDN/layer1.c
382
nl1->l1m.fsm = &l1fsm_s;
drivers/isdn/mISDN/layer2.c
2197
l2->l2m.fsm = &l2fsm;
drivers/isdn/mISDN/tei.c
1061
l2->tm->tei_m.fsm = &teifsmu;
drivers/isdn/mISDN/tei.c
1069
l2->tm->tei_m.fsm = &teifsmn;
drivers/isdn/mISDN/tei.c
1369
mgr->deact.fsm = &deactfsm;
drivers/isdn/mISDN/tei.c
817
l2->tm->tei_m.fsm = &teifsmn;
drivers/leds/leds-cht-wcove.c
123
ret = regmap_update_bits(led->regmap, led->regs->fsm,
drivers/leds/leds-cht-wcove.c
237
ret = regmap_update_bits(led->regmap, led->regs->fsm,
drivers/leds/leds-cht-wcove.c
248
ret = regmap_update_bits(led->regmap, led->regs->fsm,
drivers/leds/leds-cht-wcove.c
322
ret = regmap_read(led->regmap, led->regs->fsm, &saved_regs->fsm);
drivers/leds/leds-cht-wcove.c
333
regmap_write(led->regmap, led->regs->fsm, saved_regs->fsm);
drivers/leds/leds-cht-wcove.c
54
u16 fsm;
drivers/leds/leds-cht-wcove.c
64
unsigned int fsm;
drivers/leds/leds-cht-wcove.c
85
.fsm = CHT_WC_LED1_FSM,
drivers/leds/leds-cht-wcove.c
93
.fsm = CHT_WC_LED2_FSM,
drivers/mmc/host/bcm2835.c
1158
u32 edm, fsm;
drivers/mmc/host/bcm2835.c
1187
fsm = edm & SDEDM_FSM_MASK;
drivers/mmc/host/bcm2835.c
1189
if ((fsm != SDEDM_FSM_IDENTMODE) &&
drivers/mmc/host/bcm2835.c
1190
(fsm != SDEDM_FSM_DATAMODE)) {
drivers/mmc/host/bcm2835.c
296
u32 edm, fsm;
drivers/mmc/host/bcm2835.c
299
fsm = edm & SDEDM_FSM_MASK;
drivers/mmc/host/bcm2835.c
301
if ((fsm == SDEDM_FSM_IDENTMODE) ||
drivers/mmc/host/bcm2835.c
302
(fsm == SDEDM_FSM_DATAMODE))
drivers/mmc/host/bcm2835.c
304
if (fsm == alternate_idle) {
drivers/mmc/host/bcm2835.c
762
u32 edm, fsm;
drivers/mmc/host/bcm2835.c
773
fsm = edm & SDEDM_FSM_MASK;
drivers/mmc/host/bcm2835.c
774
if (fsm == SDEDM_FSM_READWAIT ||
drivers/mmc/host/bcm2835.c
775
fsm == SDEDM_FSM_WRITESTART1)
drivers/mtd/devices/st_spi_fsm.c
1003
static void stfsm_prepare_erasesec_seq(struct stfsm *fsm,
drivers/mtd/devices/st_spi_fsm.c
1006
int addr1_cycles = fsm->info->flags & FLASH_FLAG_32BIT_ADDR ? 16 : 8;
drivers/mtd/devices/st_spi_fsm.c
1017
stfsm_search_seq_rw_configs(struct stfsm *fsm,
drivers/mtd/devices/st_spi_fsm.c
1021
int flags = fsm->info->flags;
drivers/mtd/devices/st_spi_fsm.c
1031
static void stfsm_prepare_rw_seq(struct stfsm *fsm,
drivers/mtd/devices/st_spi_fsm.c
1053
addr1_cycles = (fsm->info->flags & FLASH_FLAG_32BIT_ADDR) ? 16 : 8;
drivers/mtd/devices/st_spi_fsm.c
1099
static int stfsm_search_prepare_rw_seq(struct stfsm *fsm,
drivers/mtd/devices/st_spi_fsm.c
1105
config = stfsm_search_seq_rw_configs(fsm, cfgs);
drivers/mtd/devices/st_spi_fsm.c
1107
dev_err(fsm->dev, "failed to find suitable config\n");
drivers/mtd/devices/st_spi_fsm.c
1111
stfsm_prepare_rw_seq(fsm, seq, config);
drivers/mtd/devices/st_spi_fsm.c
1117
static int stfsm_prepare_rwe_seqs_default(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1119
uint32_t flags = fsm->info->flags;
drivers/mtd/devices/st_spi_fsm.c
1123
ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read,
drivers/mtd/devices/st_spi_fsm.c
1126
dev_err(fsm->dev,
drivers/mtd/devices/st_spi_fsm.c
1133
ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_write,
drivers/mtd/devices/st_spi_fsm.c
1136
dev_err(fsm->dev,
drivers/mtd/devices/st_spi_fsm.c
1143
stfsm_prepare_erasesec_seq(fsm, &stfsm_seq_erase_sector);
drivers/mtd/devices/st_spi_fsm.c
1148
static int stfsm_mx25_config(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1150
uint32_t flags = fsm->info->flags;
drivers/mtd/devices/st_spi_fsm.c
1159
ret = stfsm_prepare_rwe_seqs_default(fsm);
drivers/mtd/devices/st_spi_fsm.c
1168
stfsm_mx25_en_32bit_addr_seq(&fsm->stfsm_seq_en_32bit_addr);
drivers/mtd/devices/st_spi_fsm.c
1170
soc_reset = stfsm_can_handle_soc_reset(fsm);
drivers/mtd/devices/st_spi_fsm.c
1171
if (soc_reset || !fsm->booted_from_spi)
drivers/mtd/devices/st_spi_fsm.c
1174
stfsm_enter_32bit_addr(fsm, 1);
drivers/mtd/devices/st_spi_fsm.c
1179
fsm->configuration = (CFG_READ_TOGGLE_32BIT_ADDR |
drivers/mtd/devices/st_spi_fsm.c
1185
stfsm_read_status(fsm, SPINOR_OP_RDSR, &sta, 1);
drivers/mtd/devices/st_spi_fsm.c
1186
data_pads = ((fsm->stfsm_seq_read.seq_cfg >> 16) & 0x3) + 1;
drivers/mtd/devices/st_spi_fsm.c
1192
stfsm_write_status(fsm, SPINOR_OP_WRSR, sta, 1, 1);
drivers/mtd/devices/st_spi_fsm.c
1199
stfsm_write_status(fsm, SPINOR_OP_WRSR, sta, 1, 1);
drivers/mtd/devices/st_spi_fsm.c
1206
static int stfsm_n25q_config(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1208
uint32_t flags = fsm->info->flags;
drivers/mtd/devices/st_spi_fsm.c
1215
ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read,
drivers/mtd/devices/st_spi_fsm.c
1218
ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read,
drivers/mtd/devices/st_spi_fsm.c
1221
dev_err(fsm->dev,
drivers/mtd/devices/st_spi_fsm.c
1228
ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_write,
drivers/mtd/devices/st_spi_fsm.c
1231
dev_err(fsm->dev,
drivers/mtd/devices/st_spi_fsm.c
1238
stfsm_prepare_erasesec_seq(fsm, &stfsm_seq_erase_sector);
drivers/mtd/devices/st_spi_fsm.c
1242
stfsm_n25q_en_32bit_addr_seq(&fsm->stfsm_seq_en_32bit_addr);
drivers/mtd/devices/st_spi_fsm.c
1244
soc_reset = stfsm_can_handle_soc_reset(fsm);
drivers/mtd/devices/st_spi_fsm.c
1245
if (soc_reset || !fsm->booted_from_spi) {
drivers/mtd/devices/st_spi_fsm.c
1250
stfsm_enter_32bit_addr(fsm, 1);
drivers/mtd/devices/st_spi_fsm.c
1256
fsm->configuration = (CFG_WRITE_TOGGLE_32BIT_ADDR |
drivers/mtd/devices/st_spi_fsm.c
1266
stfsm_write_status(fsm, N25Q_CMD_WRVCR, vcr, 1, 0);
drivers/mtd/devices/st_spi_fsm.c
1284
static void stfsm_s25fl_read_dyb(struct stfsm *fsm, uint32_t offs, uint8_t *dby)
drivers/mtd/devices/st_spi_fsm.c
1311
stfsm_load_seq(fsm, &seq);
drivers/mtd/devices/st_spi_fsm.c
1313
stfsm_read_fifo(fsm, &tmp, 4);
drivers/mtd/devices/st_spi_fsm.c
1317
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1320
static void stfsm_s25fl_write_dyb(struct stfsm *fsm, uint32_t offs, uint8_t dby)
drivers/mtd/devices/st_spi_fsm.c
1349
stfsm_load_seq(fsm, &seq);
drivers/mtd/devices/st_spi_fsm.c
1350
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1352
stfsm_wait_busy(fsm);
drivers/mtd/devices/st_spi_fsm.c
1355
static int stfsm_s25fl_clear_status_reg(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1379
stfsm_load_seq(fsm, &seq);
drivers/mtd/devices/st_spi_fsm.c
1381
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1386
static int stfsm_s25fl_config(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1388
struct flash_info *info = fsm->info;
drivers/mtd/devices/st_spi_fsm.c
1402
ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_read,
drivers/mtd/devices/st_spi_fsm.c
1407
ret = stfsm_search_prepare_rw_seq(fsm, &fsm->stfsm_seq_write,
drivers/mtd/devices/st_spi_fsm.c
1416
ret = stfsm_prepare_rwe_seqs_default(fsm);
drivers/mtd/devices/st_spi_fsm.c
1429
stfsm_s25fl_read_dyb(fsm, offs, &dyb);
drivers/mtd/devices/st_spi_fsm.c
1431
stfsm_s25fl_write_dyb(fsm, offs, 0xff);
drivers/mtd/devices/st_spi_fsm.c
1443
stfsm_read_status(fsm, SPINOR_OP_RDCR, &cr1, 1);
drivers/mtd/devices/st_spi_fsm.c
1444
data_pads = ((fsm->stfsm_seq_read.seq_cfg >> 16) & 0x3) + 1;
drivers/mtd/devices/st_spi_fsm.c
1461
stfsm_read_status(fsm, SPINOR_OP_RDSR, &sr1, 1);
drivers/mtd/devices/st_spi_fsm.c
1463
stfsm_write_status(fsm, SPINOR_OP_WRSR, sta_wr, 2, 1);
drivers/mtd/devices/st_spi_fsm.c
1470
fsm->configuration |= CFG_S25FL_CHECK_ERROR_FLAGS;
drivers/mtd/devices/st_spi_fsm.c
1475
static int stfsm_w25q_config(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1483
ret = stfsm_prepare_rwe_seqs_default(fsm);
drivers/mtd/devices/st_spi_fsm.c
1488
stfsm_read_status(fsm, SPINOR_OP_RDCR, &sr2, 1);
drivers/mtd/devices/st_spi_fsm.c
1489
data_pads = ((fsm->stfsm_seq_read.seq_cfg >> 16) & 0x3) + 1;
drivers/mtd/devices/st_spi_fsm.c
1505
stfsm_read_status(fsm, SPINOR_OP_RDSR, &sr1, 1);
drivers/mtd/devices/st_spi_fsm.c
1507
stfsm_write_status(fsm, SPINOR_OP_WRSR, sr_wr, 2, 1);
drivers/mtd/devices/st_spi_fsm.c
1513
static int stfsm_read(struct stfsm *fsm, uint8_t *buf, uint32_t size,
drivers/mtd/devices/st_spi_fsm.c
1516
struct stfsm_seq *seq = &fsm->stfsm_seq_read;
drivers/mtd/devices/st_spi_fsm.c
1526
dev_dbg(fsm->dev, "reading %d bytes from 0x%08x\n", size, offset);
drivers/mtd/devices/st_spi_fsm.c
1529
if (fsm->configuration & CFG_READ_TOGGLE_32BIT_ADDR)
drivers/mtd/devices/st_spi_fsm.c
1530
stfsm_enter_32bit_addr(fsm, 1);
drivers/mtd/devices/st_spi_fsm.c
1548
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
1551
stfsm_read_fifo(fsm, (uint32_t *)p, size_lb);
drivers/mtd/devices/st_spi_fsm.c
1554
stfsm_read_fifo(fsm, tmp, read_mask + 1);
drivers/mtd/devices/st_spi_fsm.c
1563
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1565
stfsm_clear_fifo(fsm);
drivers/mtd/devices/st_spi_fsm.c
1568
if (fsm->configuration & CFG_READ_TOGGLE_32BIT_ADDR)
drivers/mtd/devices/st_spi_fsm.c
1569
stfsm_enter_32bit_addr(fsm, 0);
drivers/mtd/devices/st_spi_fsm.c
1574
static int stfsm_write(struct stfsm *fsm, const uint8_t *buf,
drivers/mtd/devices/st_spi_fsm.c
1577
struct stfsm_seq *seq = &fsm->stfsm_seq_write;
drivers/mtd/devices/st_spi_fsm.c
1590
dev_dbg(fsm->dev, "writing %d bytes to 0x%08x\n", size, offset);
drivers/mtd/devices/st_spi_fsm.c
1593
if (fsm->configuration & CFG_WRITE_TOGGLE_32BIT_ADDR)
drivers/mtd/devices/st_spi_fsm.c
1594
stfsm_enter_32bit_addr(fsm, 1);
drivers/mtd/devices/st_spi_fsm.c
1620
writel(0x00040000, fsm->base + SPI_FAST_SEQ_CFG);
drivers/mtd/devices/st_spi_fsm.c
1626
if (fsm->fifo_dir_delay == 0)
drivers/mtd/devices/st_spi_fsm.c
1627
readl(fsm->base + SPI_FAST_SEQ_CFG);
drivers/mtd/devices/st_spi_fsm.c
1629
udelay(fsm->fifo_dir_delay);
drivers/mtd/devices/st_spi_fsm.c
1634
stfsm_write_fifo(fsm, (uint32_t *)p, size_lb);
drivers/mtd/devices/st_spi_fsm.c
1644
stfsm_write_fifo(fsm, tmp, write_mask + 1);
drivers/mtd/devices/st_spi_fsm.c
1648
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
1651
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1654
ret = stfsm_wait_busy(fsm);
drivers/mtd/devices/st_spi_fsm.c
1655
if (ret && fsm->configuration & CFG_S25FL_CHECK_ERROR_FLAGS)
drivers/mtd/devices/st_spi_fsm.c
1656
stfsm_s25fl_clear_status_reg(fsm);
drivers/mtd/devices/st_spi_fsm.c
1659
if (fsm->configuration & CFG_WRITE_TOGGLE_32BIT_ADDR)
drivers/mtd/devices/st_spi_fsm.c
1660
stfsm_enter_32bit_addr(fsm, 0);
drivers/mtd/devices/st_spi_fsm.c
1672
struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent);
drivers/mtd/devices/st_spi_fsm.c
1675
dev_dbg(fsm->dev, "%s from 0x%08x, len %zd\n",
drivers/mtd/devices/st_spi_fsm.c
1678
mutex_lock(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
1683
stfsm_read(fsm, buf, bytes, from);
drivers/mtd/devices/st_spi_fsm.c
1692
mutex_unlock(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
1697
static int stfsm_erase_sector(struct stfsm *fsm, uint32_t offset)
drivers/mtd/devices/st_spi_fsm.c
1702
dev_dbg(fsm->dev, "erasing sector at 0x%08x\n", offset);
drivers/mtd/devices/st_spi_fsm.c
1705
if (fsm->configuration & CFG_ERASESEC_TOGGLE_32BIT_ADDR)
drivers/mtd/devices/st_spi_fsm.c
1706
stfsm_enter_32bit_addr(fsm, 1);
drivers/mtd/devices/st_spi_fsm.c
1711
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
1713
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1716
ret = stfsm_wait_busy(fsm);
drivers/mtd/devices/st_spi_fsm.c
1717
if (ret && fsm->configuration & CFG_S25FL_CHECK_ERROR_FLAGS)
drivers/mtd/devices/st_spi_fsm.c
1718
stfsm_s25fl_clear_status_reg(fsm);
drivers/mtd/devices/st_spi_fsm.c
1721
if (fsm->configuration & CFG_ERASESEC_TOGGLE_32BIT_ADDR)
drivers/mtd/devices/st_spi_fsm.c
1722
stfsm_enter_32bit_addr(fsm, 0);
drivers/mtd/devices/st_spi_fsm.c
1727
static int stfsm_erase_chip(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1731
dev_dbg(fsm->dev, "erasing chip\n");
drivers/mtd/devices/st_spi_fsm.c
1733
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
1735
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1737
return stfsm_wait_busy(fsm);
drivers/mtd/devices/st_spi_fsm.c
1748
struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent);
drivers/mtd/devices/st_spi_fsm.c
1755
dev_dbg(fsm->dev, "%s to 0x%08x, len %zd\n", __func__, (u32)to, len);
drivers/mtd/devices/st_spi_fsm.c
1760
mutex_lock(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
1766
ret = stfsm_write(fsm, b, bytes, to);
drivers/mtd/devices/st_spi_fsm.c
1782
mutex_unlock(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
1793
struct stfsm *fsm = dev_get_drvdata(mtd->dev.parent);
drivers/mtd/devices/st_spi_fsm.c
1797
dev_dbg(fsm->dev, "%s at 0x%llx, len %lld\n", __func__,
drivers/mtd/devices/st_spi_fsm.c
1803
mutex_lock(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
1807
ret = stfsm_erase_chip(fsm);
drivers/mtd/devices/st_spi_fsm.c
1812
ret = stfsm_erase_sector(fsm, addr);
drivers/mtd/devices/st_spi_fsm.c
1821
mutex_unlock(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
1826
mutex_unlock(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
1831
static void stfsm_read_jedec(struct stfsm *fsm, uint8_t *jedec)
drivers/mtd/devices/st_spi_fsm.c
1836
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
1838
stfsm_read_fifo(fsm, tmp, 8);
drivers/mtd/devices/st_spi_fsm.c
1842
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
1845
static struct flash_info *stfsm_jedec_probe(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1852
stfsm_read_jedec(fsm, id);
drivers/mtd/devices/st_spi_fsm.c
1862
dev_dbg(fsm->dev, "JEDEC = 0x%08x [%5ph]\n", jedec, id);
drivers/mtd/devices/st_spi_fsm.c
1871
dev_err(fsm->dev, "Unrecognized JEDEC id %06x\n", jedec);
drivers/mtd/devices/st_spi_fsm.c
1876
static int stfsm_set_mode(struct stfsm *fsm, uint32_t mode)
drivers/mtd/devices/st_spi_fsm.c
1882
ret = readl(fsm->base + SPI_STA_MODE_CHANGE);
drivers/mtd/devices/st_spi_fsm.c
1891
writel(mode, fsm->base + SPI_MODESELECT);
drivers/mtd/devices/st_spi_fsm.c
1896
static void stfsm_set_freq(struct stfsm *fsm, uint32_t spi_freq)
drivers/mtd/devices/st_spi_fsm.c
1901
emi_freq = clk_get_rate(fsm->clk);
drivers/mtd/devices/st_spi_fsm.c
1920
fsm->fifo_dir_delay = 0;
drivers/mtd/devices/st_spi_fsm.c
1922
fsm->fifo_dir_delay = 1;
drivers/mtd/devices/st_spi_fsm.c
1924
fsm->fifo_dir_delay = DIV_ROUND_UP(clk_div, 10);
drivers/mtd/devices/st_spi_fsm.c
1926
dev_dbg(fsm->dev, "emi_clk = %uHZ, spi_freq = %uHZ, clk_div = %u\n",
drivers/mtd/devices/st_spi_fsm.c
1929
writel(clk_div, fsm->base + SPI_CLOCKDIV);
drivers/mtd/devices/st_spi_fsm.c
1932
static int stfsm_init(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
1937
writel(SEQ_CFG_SWRESET, fsm->base + SPI_FAST_SEQ_CFG);
drivers/mtd/devices/st_spi_fsm.c
1939
writel(0, fsm->base + SPI_FAST_SEQ_CFG);
drivers/mtd/devices/st_spi_fsm.c
1942
stfsm_set_freq(fsm, STFSM_FLASH_SAFE_FREQ);
drivers/mtd/devices/st_spi_fsm.c
1945
ret = stfsm_set_mode(fsm, SPI_MODESELECT_FSM);
drivers/mtd/devices/st_spi_fsm.c
1954
fsm->base + SPI_CONFIGDATA);
drivers/mtd/devices/st_spi_fsm.c
1955
writel(STFSM_DEFAULT_WR_TIME, fsm->base + SPI_STATUS_WR_TIME_REG);
drivers/mtd/devices/st_spi_fsm.c
1962
writel(0x00000001, fsm->base + SPI_PROGRAM_ERASE_TIME);
drivers/mtd/devices/st_spi_fsm.c
1965
stfsm_clear_fifo(fsm);
drivers/mtd/devices/st_spi_fsm.c
1972
struct stfsm *fsm = platform_get_drvdata(pdev);
drivers/mtd/devices/st_spi_fsm.c
1981
fsm->booted_from_spi = true;
drivers/mtd/devices/st_spi_fsm.c
1987
fsm->reset_signal = of_property_read_bool(np, "st,reset-signal");
drivers/mtd/devices/st_spi_fsm.c
1989
fsm->reset_por = of_property_read_bool(np, "st,reset-por");
drivers/mtd/devices/st_spi_fsm.c
2006
fsm->booted_from_spi = false;
drivers/mtd/devices/st_spi_fsm.c
2019
struct stfsm *fsm;
drivers/mtd/devices/st_spi_fsm.c
2027
fsm = devm_kzalloc(&pdev->dev, sizeof(*fsm), GFP_KERNEL);
drivers/mtd/devices/st_spi_fsm.c
2028
if (!fsm)
drivers/mtd/devices/st_spi_fsm.c
2031
fsm->dev = &pdev->dev;
drivers/mtd/devices/st_spi_fsm.c
2033
platform_set_drvdata(pdev, fsm);
drivers/mtd/devices/st_spi_fsm.c
2035
fsm->base = devm_platform_ioremap_resource(pdev, 0);
drivers/mtd/devices/st_spi_fsm.c
2036
if (IS_ERR(fsm->base))
drivers/mtd/devices/st_spi_fsm.c
2037
return PTR_ERR(fsm->base);
drivers/mtd/devices/st_spi_fsm.c
2039
fsm->clk = devm_clk_get_enabled(&pdev->dev, NULL);
drivers/mtd/devices/st_spi_fsm.c
2040
if (IS_ERR(fsm->clk)) {
drivers/mtd/devices/st_spi_fsm.c
2041
dev_err(fsm->dev, "Couldn't find EMI clock.\n");
drivers/mtd/devices/st_spi_fsm.c
2042
return PTR_ERR(fsm->clk);
drivers/mtd/devices/st_spi_fsm.c
2045
mutex_init(&fsm->lock);
drivers/mtd/devices/st_spi_fsm.c
2047
ret = stfsm_init(fsm);
drivers/mtd/devices/st_spi_fsm.c
2056
info = stfsm_jedec_probe(fsm);
drivers/mtd/devices/st_spi_fsm.c
2059
fsm->info = info;
drivers/mtd/devices/st_spi_fsm.c
2070
ret = info->config(fsm);
drivers/mtd/devices/st_spi_fsm.c
2072
ret = stfsm_prepare_rwe_seqs_default(fsm);
drivers/mtd/devices/st_spi_fsm.c
2076
fsm->mtd.name = info->name;
drivers/mtd/devices/st_spi_fsm.c
2077
fsm->mtd.dev.parent = &pdev->dev;
drivers/mtd/devices/st_spi_fsm.c
2078
mtd_set_of_node(&fsm->mtd, np);
drivers/mtd/devices/st_spi_fsm.c
2079
fsm->mtd.type = MTD_NORFLASH;
drivers/mtd/devices/st_spi_fsm.c
2080
fsm->mtd.writesize = 4;
drivers/mtd/devices/st_spi_fsm.c
2081
fsm->mtd.writebufsize = fsm->mtd.writesize;
drivers/mtd/devices/st_spi_fsm.c
2082
fsm->mtd.flags = MTD_CAP_NORFLASH;
drivers/mtd/devices/st_spi_fsm.c
2083
fsm->mtd.size = info->sector_size * info->n_sectors;
drivers/mtd/devices/st_spi_fsm.c
2084
fsm->mtd.erasesize = info->sector_size;
drivers/mtd/devices/st_spi_fsm.c
2086
fsm->mtd._read = stfsm_mtd_read;
drivers/mtd/devices/st_spi_fsm.c
2087
fsm->mtd._write = stfsm_mtd_write;
drivers/mtd/devices/st_spi_fsm.c
2088
fsm->mtd._erase = stfsm_mtd_erase;
drivers/mtd/devices/st_spi_fsm.c
2094
(long long)fsm->mtd.size, (long long)(fsm->mtd.size >> 20),
drivers/mtd/devices/st_spi_fsm.c
2095
fsm->mtd.erasesize, (fsm->mtd.erasesize >> 10));
drivers/mtd/devices/st_spi_fsm.c
2097
return mtd_device_register(&fsm->mtd, NULL, 0);
drivers/mtd/devices/st_spi_fsm.c
2102
struct stfsm *fsm = platform_get_drvdata(pdev);
drivers/mtd/devices/st_spi_fsm.c
2104
WARN_ON(mtd_device_unregister(&fsm->mtd));
drivers/mtd/devices/st_spi_fsm.c
2109
struct stfsm *fsm = dev_get_drvdata(dev);
drivers/mtd/devices/st_spi_fsm.c
2111
clk_disable_unprepare(fsm->clk);
drivers/mtd/devices/st_spi_fsm.c
2118
struct stfsm *fsm = dev_get_drvdata(dev);
drivers/mtd/devices/st_spi_fsm.c
2120
return clk_prepare_enable(fsm->clk);
drivers/mtd/devices/st_spi_fsm.c
311
static int stfsm_n25q_config(struct stfsm *fsm);
drivers/mtd/devices/st_spi_fsm.c
312
static int stfsm_mx25_config(struct stfsm *fsm);
drivers/mtd/devices/st_spi_fsm.c
313
static int stfsm_s25fl_config(struct stfsm *fsm);
drivers/mtd/devices/st_spi_fsm.c
314
static int stfsm_w25q_config(struct stfsm *fsm);
drivers/mtd/devices/st_spi_fsm.c
702
static inline int stfsm_is_idle(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
704
return readl(fsm->base + SPI_FAST_SEQ_STA) & 0x10;
drivers/mtd/devices/st_spi_fsm.c
707
static inline uint32_t stfsm_fifo_available(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
709
return (readl(fsm->base + SPI_FAST_SEQ_STA) >> 5) & 0x7f;
drivers/mtd/devices/st_spi_fsm.c
712
static inline void stfsm_load_seq(struct stfsm *fsm,
drivers/mtd/devices/st_spi_fsm.c
715
void __iomem *dst = fsm->base + SPI_FAST_SEQ_TRANSFER_SIZE;
drivers/mtd/devices/st_spi_fsm.c
719
BUG_ON(!stfsm_is_idle(fsm));
drivers/mtd/devices/st_spi_fsm.c
728
static void stfsm_wait_seq(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
739
if (stfsm_is_idle(fsm))
drivers/mtd/devices/st_spi_fsm.c
745
dev_err(fsm->dev, "timeout on sequence completion\n");
drivers/mtd/devices/st_spi_fsm.c
748
static void stfsm_read_fifo(struct stfsm *fsm, uint32_t *buf, uint32_t size)
drivers/mtd/devices/st_spi_fsm.c
754
dev_dbg(fsm->dev, "Reading %d bytes from FIFO\n", size);
drivers/mtd/devices/st_spi_fsm.c
760
avail = stfsm_fifo_available(fsm);
drivers/mtd/devices/st_spi_fsm.c
768
readsl(fsm->base + SPI_FAST_SEQ_DATA_REG, buf, words);
drivers/mtd/devices/st_spi_fsm.c
799
static void stfsm_clear_fifo(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
805
words = stfsm_fifo_available(fsm);
drivers/mtd/devices/st_spi_fsm.c
808
readl(fsm->base + SPI_FAST_SEQ_DATA_REG);
drivers/mtd/devices/st_spi_fsm.c
809
dev_dbg(fsm->dev, "cleared %d words from FIFO\n", words);
drivers/mtd/devices/st_spi_fsm.c
818
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
819
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
820
words = stfsm_fifo_available(fsm);
drivers/mtd/devices/st_spi_fsm.c
825
dev_err(fsm->dev, "failed to clear bytes from the data FIFO\n");
drivers/mtd/devices/st_spi_fsm.c
830
readl(fsm->base + SPI_FAST_SEQ_DATA_REG);
drivers/mtd/devices/st_spi_fsm.c
832
dev_dbg(fsm->dev, "cleared %d byte(s) from the data FIFO\n", 4 - i);
drivers/mtd/devices/st_spi_fsm.c
835
static int stfsm_write_fifo(struct stfsm *fsm, const uint32_t *buf,
drivers/mtd/devices/st_spi_fsm.c
840
dev_dbg(fsm->dev, "writing %d bytes to FIFO\n", size);
drivers/mtd/devices/st_spi_fsm.c
844
writesl(fsm->base + SPI_FAST_SEQ_DATA_REG, buf, words);
drivers/mtd/devices/st_spi_fsm.c
849
static int stfsm_enter_32bit_addr(struct stfsm *fsm, int enter)
drivers/mtd/devices/st_spi_fsm.c
851
struct stfsm_seq *seq = &fsm->stfsm_seq_en_32bit_addr;
drivers/mtd/devices/st_spi_fsm.c
859
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
861
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
866
static uint8_t stfsm_wait_busy(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
879
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
889
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
891
stfsm_read_fifo(fsm, &status, 4);
drivers/mtd/devices/st_spi_fsm.c
896
if ((fsm->configuration & CFG_S25FL_CHECK_ERROR_FLAGS) &&
drivers/mtd/devices/st_spi_fsm.c
903
writel(seq->seq_cfg, fsm->base + SPI_FAST_SEQ_CFG);
drivers/mtd/devices/st_spi_fsm.c
908
dev_err(fsm->dev, "timeout on wait_busy\n");
drivers/mtd/devices/st_spi_fsm.c
913
static int stfsm_read_status(struct stfsm *fsm, uint8_t cmd,
drivers/mtd/devices/st_spi_fsm.c
921
dev_dbg(fsm->dev, "read 'status' register [0x%02x], %d byte(s)\n",
drivers/mtd/devices/st_spi_fsm.c
929
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
931
stfsm_read_fifo(fsm, &tmp, 4);
drivers/mtd/devices/st_spi_fsm.c
936
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
941
static int stfsm_write_status(struct stfsm *fsm, uint8_t cmd,
drivers/mtd/devices/st_spi_fsm.c
946
dev_dbg(fsm->dev,
drivers/mtd/devices/st_spi_fsm.c
958
stfsm_load_seq(fsm, seq);
drivers/mtd/devices/st_spi_fsm.c
960
stfsm_wait_seq(fsm);
drivers/mtd/devices/st_spi_fsm.c
963
stfsm_wait_busy(fsm);
drivers/mtd/devices/st_spi_fsm.c
988
static bool stfsm_can_handle_soc_reset(struct stfsm *fsm)
drivers/mtd/devices/st_spi_fsm.c
991
if (fsm->reset_signal && fsm->info->flags & FLASH_FLAG_RESET)
drivers/mtd/devices/st_spi_fsm.c
995
if (fsm->reset_por)
drivers/net/ethernet/brocade/bna/bfa_cs.h
60
typedef void (*bfa_fsm_t)(void *fsm, int event);
drivers/net/ethernet/brocade/bna/bfa_cs.h
68
static void oc ## _sm_ ## st(otype * fsm, etype event); \
drivers/net/ethernet/brocade/bna/bfa_cs.h
69
static void oc ## _sm_ ## st ## _entry(otype * fsm)
drivers/net/ethernet/brocade/bna/bfa_cs.h
72
(_fsm)->fsm = (_state); \
drivers/net/ethernet/brocade/bna/bfa_cs.h
76
#define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
drivers/net/ethernet/brocade/bna/bfa_cs.h
77
#define bfa_fsm_cmp_state(_fsm, _state) ((_fsm)->fsm == (_state))
drivers/net/ethernet/brocade/bna/bfa_ioc.c
2863
enum bfa_ioc_state ioc_st = ioc_sm_to_state(ioc_sm_table, ioc->fsm);
drivers/net/ethernet/brocade/bna/bfa_ioc.c
2868
iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
drivers/net/ethernet/brocade/bna/bfa_ioc.c
2986
iocpf_st = iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
drivers/net/ethernet/brocade/bna/bfa_ioc.h
153
void (*fsm)(struct bfa_iocpf *s, enum iocpf_event e);
drivers/net/ethernet/brocade/bna/bfa_ioc.h
163
void (*fsm)(struct bfa_ioc *s, enum ioc_event e);
drivers/net/ethernet/brocade/bna/bfa_msgq.h
61
void (*fsm)(struct bfa_msgq_cmdq *s, enum cmdq_event e);
drivers/net/ethernet/brocade/bna/bfa_msgq.h
89
void (*fsm)(struct bfa_msgq_rspq *s, enum rspq_event e);
drivers/net/ethernet/brocade/bna/bna_enet.c
1260
if (enet->fsm != bna_enet_sm_stopped)
drivers/net/ethernet/brocade/bna/bna_enet.c
1754
if (ioceth->fsm == bna_ioceth_sm_ready) {
drivers/net/ethernet/brocade/bna/bna_enet.c
1759
if (ioceth->fsm == bna_ioceth_sm_stopped)
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
1959
if (rx->fsm == bna_rx_sm_stopped)
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
2538
if (rx->fsm != bna_rx_sm_stopped)
drivers/net/ethernet/brocade/bna/bna_tx_rx.c
3526
if (tx->fsm != bna_tx_sm_stopped)
drivers/net/ethernet/brocade/bna/bna_types.h
318
void (*fsm)(struct bna_ioceth *s, enum bna_ioceth_event e);
drivers/net/ethernet/brocade/bna/bna_types.h
342
void (*fsm)(struct bna_enet *s, enum bna_enet_event e);
drivers/net/ethernet/brocade/bna/bna_types.h
370
void (*fsm)(struct bna_ethport *s, enum bna_ethport_event e);
drivers/net/ethernet/brocade/bna/bna_types.h
472
void (*fsm)(struct bna_tx *s, enum bna_tx_event e);
drivers/net/ethernet/brocade/bna/bna_types.h
714
void (*fsm)(struct bna_rxf *s, enum bna_rxf_event e);
drivers/net/ethernet/brocade/bna/bna_types.h
793
void (*fsm)(struct bna_rx *s, enum bna_rx_event e);
drivers/s390/net/ctcm_fsms.c
1017
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
1020
if (!(gptr && (fsm_getstate(gptr->fsm) != MPCG_STATE_READY)))
drivers/s390/net/ctcm_fsms.c
1038
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
1091
fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
1094
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
1351
fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_fsms.c
1424
fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_fsms.c
1427
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_fsms.c
1447
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_fsms.c
1500
fsm_getstate(gptr->fsm), ch->protocol);
drivers/s390/net/ctcm_fsms.c
1516
fsm_event(priv->fsm, DEV_EVENT_TXUP, dev);
drivers/s390/net/ctcm_fsms.c
1553
fsm_getstate(fi), fsm_getstate(grp->fsm));
drivers/s390/net/ctcm_fsms.c
1558
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_fsms.c
1585
fsm_event(priv->fsm, DEV_EVENT_RXUP, dev);
drivers/s390/net/ctcm_fsms.c
1595
static void ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_fsms.c
1604
fsm_getstate_str(ch->fsm), fsm_getstate_str(grp->fsm));
drivers/s390/net/ctcm_fsms.c
1606
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_fsms.c
1611
if (fsm_getstate(ch->fsm) == CH_XID0_PENDING) {
drivers/s390/net/ctcm_fsms.c
1616
fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch);
drivers/s390/net/ctcm_fsms.c
1618
} else if (fsm_getstate(ch->fsm) < CH_XID7_PENDING1)
drivers/s390/net/ctcm_fsms.c
1620
fsm_newstate(ch->fsm, CH_XID7_PENDING1);
drivers/s390/net/ctcm_fsms.c
1627
if (fsm_getstate(ch->fsm) < CH_XID7_PENDING1)
drivers/s390/net/ctcm_fsms.c
1628
fsm_newstate(ch->fsm, CH_XID7_PENDING1);
drivers/s390/net/ctcm_fsms.c
1634
switch (fsm_getstate(ch->fsm)) {
drivers/s390/net/ctcm_fsms.c
1636
fsm_newstate(ch->fsm, CH_XID7_PENDING1);
drivers/s390/net/ctcm_fsms.c
1639
fsm_newstate(ch->fsm, CH_XID7_PENDING3);
drivers/s390/net/ctcm_fsms.c
1642
fsm_event(grp->fsm, MPCG_EVENT_XID7DONE, dev);
drivers/s390/net/ctcm_fsms.c
1654
static void ctcmpc_chx_attnbusy(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_fsms.c
1663
fsm_getstate_str(ch->fsm), fsm_getstate_str(grp->fsm));
drivers/s390/net/ctcm_fsms.c
1667
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_fsms.c
1673
fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW);
drivers/s390/net/ctcm_fsms.c
1690
if (fsm_getstate(ch->fsm) == CH_XID0_INPROGRESS) {
drivers/s390/net/ctcm_fsms.c
1691
fsm_newstate(ch->fsm, CH_XID0_PENDING) ;
drivers/s390/net/ctcm_fsms.c
1695
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_fsms.c
1715
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_fsms.c
1725
fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch);
drivers/s390/net/ctcm_fsms.c
1740
static void ctcmpc_chx_resend(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_fsms.c
1747
fsm_event(grp->fsm, MPCG_EVENT_XID0DO, ch);
drivers/s390/net/ctcm_fsms.c
1756
static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_fsms.c
1780
if (fsm_getstate(wch->fsm) != CTC_STATE_TXIDLE) {
drivers/s390/net/ctcm_fsms.c
179
static void ctcmpc_chx_attn(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_fsms.c
1795
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_fsms.c
182
static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_fsms.c
1822
fsm_newstate(wch->fsm, CTC_STATE_TX);
drivers/s390/net/ctcm_fsms.c
199
fsm_event(ch->fsm, CTC_EVENT_IO_EBUSY, ch);
drivers/s390/net/ctcm_fsms.c
204
fsm_event(ch->fsm, CTC_EVENT_IO_ENODEV, ch);
drivers/s390/net/ctcm_fsms.c
2080
fsm_event(ch->fsm, CTC_EVENT_START, ch);
drivers/s390/net/ctcm_fsms.c
209
fsm_event(ch->fsm, CTC_EVENT_IO_UNKNOWN, ch);
drivers/s390/net/ctcm_fsms.c
2102
fsm_event(ch->fsm, CTC_EVENT_STOP, ch);
drivers/s390/net/ctcm_fsms.c
2108
fsm_newstate(priv->mpcg->fsm, MPCG_STATE_RESET);
drivers/s390/net/ctcm_fsms.c
2127
fsm_event(priv->fsm, DEV_EVENT_STOP, dev);
drivers/s390/net/ctcm_fsms.c
2129
fsm_newstate(priv->mpcg->fsm, MPCG_STATE_RESET);
drivers/s390/net/ctcm_fsms.c
343
fsm_event(priv->fsm, DEV_EVENT_TXUP, ch->netdev);
drivers/s390/net/ctcm_fsms.c
460
fsm_event(priv->fsm, DEV_EVENT_TXUP, dev);
drivers/s390/net/ctcm_fsms.c
495
fsm_event(priv->fsm, DEV_EVENT_RXUP, dev);
drivers/s390/net/ctcm_fsms.c
531
fsm_event(priv->fsm, DEV_EVENT_RXUP, dev);
drivers/s390/net/ctcm_fsms.c
717
fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
726
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
812
fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
815
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
882
fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
920
fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
944
fsm_event(priv->fsm, DEV_EVENT_RXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
945
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
drivers/s390/net/ctcm_fsms.c
949
fsm_newstate(ch2->fsm, CTC_STATE_DTERM);
drivers/s390/net/ctcm_fsms.c
974
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
drivers/s390/net/ctcm_main.c
1025
if (grp->fsm)
drivers/s390/net/ctcm_main.c
1026
kfree_fsm(grp->fsm);
drivers/s390/net/ctcm_main.c
1033
if (priv->fsm) {
drivers/s390/net/ctcm_main.c
1034
kfree_fsm(priv->fsm);
drivers/s390/net/ctcm_main.c
1035
priv->fsm = NULL;
drivers/s390/net/ctcm_main.c
1101
priv->fsm = init_fsm("ctcmdev", dev_state_names, dev_event_names,
drivers/s390/net/ctcm_main.c
1104
if (priv->fsm == NULL) {
drivers/s390/net/ctcm_main.c
1109
fsm_newstate(priv->fsm, DEV_STATE_STOPPED);
drivers/s390/net/ctcm_main.c
1110
fsm_settimer(priv->fsm, &priv->restart_timer);
drivers/s390/net/ctcm_main.c
1207
fsm_event(ch->fsm, CTC_EVENT_SC_UNKNOWN, ch);
drivers/s390/net/ctcm_main.c
1228
fsm_event(ch->fsm, CTC_EVENT_ATTNBUSY, ch);
drivers/s390/net/ctcm_main.c
1230
fsm_event(ch->fsm, CTC_EVENT_BUSY, ch);
drivers/s390/net/ctcm_main.c
1234
fsm_event(ch->fsm, CTC_EVENT_ATTN, ch);
drivers/s390/net/ctcm_main.c
1241
fsm_event(ch->fsm, CTC_EVENT_FINSTAT, ch);
drivers/s390/net/ctcm_main.c
1243
fsm_event(ch->fsm, CTC_EVENT_IRQ, ch);
drivers/s390/net/ctcm_main.c
1396
ch->fsm = init_fsm(ch->id, ctc_ch_state_names,
drivers/s390/net/ctcm_main.c
1401
ch->fsm = init_fsm(ch->id, ctc_ch_state_names,
drivers/s390/net/ctcm_main.c
1406
if (ch->fsm == NULL)
drivers/s390/net/ctcm_main.c
1409
fsm_newstate(ch->fsm, CTC_STATE_IDLE);
drivers/s390/net/ctcm_main.c
1428
fsm_settimer(ch->fsm, &ch->timer);
drivers/s390/net/ctcm_main.c
1433
fsm_settimer(ch->fsm, &ch->sweep_timer);
drivers/s390/net/ctcm_main.c
1446
kfree_fsm(ch->fsm);
drivers/s390/net/ctcm_main.c
1561
strscpy(priv->fsm->name, dev->name, sizeof(priv->fsm->name));
drivers/s390/net/ctcm_main.c
1624
if (priv->fsm)
drivers/s390/net/ctcm_main.c
1625
kfree_fsm(priv->fsm);
drivers/s390/net/ctcm_main.c
191
fsm_newstate(ch->fsm, CTC_STATE_IDLE);
drivers/s390/net/ctcm_main.c
218
kfree_fsm(ch->fsm);
drivers/s390/net/ctcm_main.c
270
fsm_newstate(ch->fsm, CTC_STATE_STOPPED);
drivers/s390/net/ctcm_main.c
322
fsm_event(ch->fsm, CTC_EVENT_UC_RCRESET, ch);
drivers/s390/net/ctcm_main.c
330
fsm_event(ch->fsm, CTC_EVENT_UC_RSRESET, ch);
drivers/s390/net/ctcm_main.c
340
fsm_event(ch->fsm, CTC_EVENT_UC_HWFAIL, ch);
drivers/s390/net/ctcm_main.c
348
fsm_event(ch->fsm, CTC_EVENT_UC_RXPARITY, ch);
drivers/s390/net/ctcm_main.c
358
fsm_event(ch->fsm, CTC_EVENT_UC_TXTIMEOUT, ch);
drivers/s390/net/ctcm_main.c
360
fsm_event(ch->fsm, CTC_EVENT_UC_TXPARITY, ch);
drivers/s390/net/ctcm_main.c
372
fsm_event(ch->fsm, CTC_EVENT_UC_ZERO, ch);
drivers/s390/net/ctcm_main.c
377
fsm_event(ch->fsm, CTC_EVENT_UC_UNKNOWN, ch);
drivers/s390/net/ctcm_main.c
430
fsm_event(priv->fsm, DEV_EVENT_START, dev);
drivers/s390/net/ctcm_main.c
448
fsm_event(priv->fsm, DEV_EVENT_STOP, dev);
drivers/s390/net/ctcm_main.c
479
if (fsm_getstate(ch->fsm) != CTC_STATE_TXIDLE) {
drivers/s390/net/ctcm_main.c
567
fsm_newstate(ch->fsm, CTC_STATE_TX);
drivers/s390/net/ctcm_main.c
639
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_main.c
662
ch->id, fsm_getstate_str(ch->fsm));
drivers/s390/net/ctcm_main.c
664
if ((fsm_getstate(ch->fsm) != CTC_STATE_TXIDLE) || grp->in_sweep) {
drivers/s390/net/ctcm_main.c
785
fsm_newstate(ch->fsm, CTC_STATE_TX);
drivers/s390/net/ctcm_main.c
818
fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_main.c
853
if (fsm_getstate(priv->fsm) != DEV_STATE_RUNNING) {
drivers/s390/net/ctcm_main.c
854
fsm_event(priv->fsm, DEV_EVENT_START, dev);
drivers/s390/net/ctcm_main.c
909
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_main.c
924
if ((fsm_getstate(priv->fsm) != DEV_STATE_RUNNING) ||
drivers/s390/net/ctcm_main.c
925
(fsm_getstate(grp->fsm) < MPCG_STATE_XID2INITW)) {
drivers/s390/net/ctcm_main.c
944
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_main.c
958
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_main.h
195
fsm_instance *fsm; /* finite state machine of this channel */
drivers/s390/net/ctcm_main.h
212
fsm_instance *fsm;
drivers/s390/net/ctcm_mpc.c
1006
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
1012
fsm_getstate_str(grp->fsm), grp->num_channel_paths,
drivers/s390/net/ctcm_mpc.c
1062
if ((fsm_getstate(grp->fsm) == MPCG_STATE_FLOWC) ||
drivers/s390/net/ctcm_mpc.c
1063
((fsm_getstate(grp->fsm) == MPCG_STATE_READY) &&
drivers/s390/net/ctcm_mpc.c
1087
if (unlikely(fsm_getstate(grp->fsm) != MPCG_STATE_READY))
drivers/s390/net/ctcm_mpc.c
112
static void mpc_action_nop(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
113
static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
1136
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
117
static void mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
118
static void mpc_action_doxid0(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
1186
fsm_event(grp->fsm, MPCG_EVENT_XID2, mpcginfo);
drivers/s390/net/ctcm_mpc.c
1188
fsm_event(grp->fsm, MPCG_EVENT_DISCONC, mpcginfo);
drivers/s390/net/ctcm_mpc.c
119
static void mpc_action_doxid7(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
120
static void mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
1207
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
121
static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
122
static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg);
drivers/s390/net/ctcm_mpc.c
1233
while ((fsm_getstate(grp->fsm) != MPCG_STATE_FLOWC) &&
drivers/s390/net/ctcm_mpc.c
1241
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
1266
grp->fsm = init_fsm("mpcg", mpcg_state_names, mpcg_event_names,
drivers/s390/net/ctcm_mpc.c
1269
if (grp->fsm == NULL) {
drivers/s390/net/ctcm_mpc.c
1274
fsm_newstate(grp->fsm, MPCG_STATE_RESET);
drivers/s390/net/ctcm_mpc.c
1275
fsm_settimer(grp->fsm, &grp->timer);
drivers/s390/net/ctcm_mpc.c
1280
kfree_fsm(grp->fsm);
drivers/s390/net/ctcm_mpc.c
1300
kfree_fsm(grp->fsm);
drivers/s390/net/ctcm_mpc.c
1353
grp->saved_state = fsm_getstate(grp->fsm);
drivers/s390/net/ctcm_mpc.c
1354
fsm_newstate(grp->fsm, MPCG_STATE_INOP);
drivers/s390/net/ctcm_mpc.c
1414
fsm_newstate(grp->fsm, MPCG_STATE_RESET);
drivers/s390/net/ctcm_mpc.c
1422
fsm_newstate(grp->fsm, MPCG_STATE_RESET);
drivers/s390/net/ctcm_mpc.c
1451
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_mpc.c
1456
if ((fsm_getstate(rch->fsm) == CH_XID0_PENDING) &&
drivers/s390/net/ctcm_mpc.c
1457
(fsm_getstate(wch->fsm) == CH_XID0_PENDING))
drivers/s390/net/ctcm_mpc.c
1461
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
1492
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
1649
static void mpc_action_side_xid(fsm_instance *fsm, void *arg, int side)
drivers/s390/net/ctcm_mpc.c
1806
static void mpc_action_xside_xid(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_mpc.c
1808
mpc_action_side_xid(fsm, arg, XSIDE);
drivers/s390/net/ctcm_mpc.c
1815
static void mpc_action_yside_xid(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_mpc.c
1817
mpc_action_side_xid(fsm, arg, YSIDE);
drivers/s390/net/ctcm_mpc.c
1824
static void mpc_action_doxid0(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_mpc.c
1841
fsm_newstate(ch->fsm, CH_XID0_INPROGRESS);
drivers/s390/net/ctcm_mpc.c
1845
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_mpc.c
1856
fsm_event(grp->fsm, MPCG_EVENT_DOIO, ch);
drivers/s390/net/ctcm_mpc.c
1865
static void mpc_action_doxid7(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_mpc.c
1890
if (fsm_getstate(ch->fsm) == CH_XID7_PENDING1) {
drivers/s390/net/ctcm_mpc.c
1891
fsm_newstate(ch->fsm, CH_XID7_PENDING2);
drivers/s390/net/ctcm_mpc.c
1897
} else if (fsm_getstate(ch->fsm) < CH_XID7_PENDING2) {
drivers/s390/net/ctcm_mpc.c
1898
fsm_newstate(ch->fsm, CH_XID7_PENDING2);
drivers/s390/net/ctcm_mpc.c
1907
if (fsm_getstate(ch->fsm) < CH_XID7_PENDING4) {
drivers/s390/net/ctcm_mpc.c
1908
fsm_newstate(ch->fsm, CH_XID7_PENDING4);
drivers/s390/net/ctcm_mpc.c
1914
} else if (fsm_getstate(ch->fsm) == CH_XID7_PENDING3) {
drivers/s390/net/ctcm_mpc.c
1915
fsm_newstate(ch->fsm, CH_XID7_PENDING4);
drivers/s390/net/ctcm_mpc.c
1924
fsm_event(grp->fsm, MPCG_EVENT_DOIO, ch);
drivers/s390/net/ctcm_mpc.c
1934
static void mpc_action_rcvd_xid0(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_mpc.c
1947
if (fsm_getstate(ch->fsm) < CH_XID7_PENDING)
drivers/s390/net/ctcm_mpc.c
1948
fsm_newstate(ch->fsm, CH_XID7_PENDING);
drivers/s390/net/ctcm_mpc.c
1956
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_mpc.c
1958
fsm_newstate(grp->fsm, MPCG_STATE_XID2INITX);
drivers/s390/net/ctcm_mpc.c
1962
fsm_newstate(grp->fsm, MPCG_STATE_XID0IOWAIX);
drivers/s390/net/ctcm_mpc.c
1967
fsm_newstate(grp->fsm, MPCG_STATE_XID7INITW);
drivers/s390/net/ctcm_mpc.c
1969
fsm_event(grp->fsm, MPCG_EVENT_XID2DONE, dev);
drivers/s390/net/ctcm_mpc.c
1974
fsm_newstate(grp->fsm, MPCG_STATE_XID7INITI);
drivers/s390/net/ctcm_mpc.c
1976
fsm_event(grp->fsm, MPCG_EVENT_XID2DONE, dev);
drivers/s390/net/ctcm_mpc.c
1986
fsm_getstate_str(grp->fsm), fsm_getstate_str(ch->fsm));
drivers/s390/net/ctcm_mpc.c
1996
static void mpc_action_rcvd_xid7(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_mpc.c
2014
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_mpc.c
2016
fsm_newstate(grp->fsm, MPCG_STATE_XID7INITZ);
drivers/s390/net/ctcm_mpc.c
2020
fsm_newstate(grp->fsm, MPCG_STATE_XID7INITX);
drivers/s390/net/ctcm_mpc.c
2031
fsm_newstate(grp->fsm, MPCG_STATE_XID7INITF);
drivers/s390/net/ctcm_mpc.c
2034
fsm_event(grp->fsm, MPCG_EVENT_XID7DONE, dev);
drivers/s390/net/ctcm_mpc.c
347
CTCM_FUNTAIL, dev->name, fsm_getstate_str(grp->fsm));
drivers/s390/net/ctcm_mpc.c
349
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_mpc.c
371
fsm_event(priv->fsm, DEV_EVENT_START, dev);
drivers/s390/net/ctcm_mpc.c
385
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
417
CTCM_FUNTAIL, dev->name, fsm_getstate_str(grp->fsm));
drivers/s390/net/ctcm_mpc.c
422
switch (fsm_getstate(grp->fsm)) {
drivers/s390/net/ctcm_mpc.c
437
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
459
if ((fsm_getstate(rch->fsm) > CH_XID0_PENDING) ||
drivers/s390/net/ctcm_mpc.c
460
(fsm_getstate(wch->fsm) > CH_XID0_PENDING)) {
drivers/s390/net/ctcm_mpc.c
467
fsm_newstate(grp->fsm, MPCG_STATE_XID0IOWAIT);
drivers/s390/net/ctcm_mpc.c
475
(fsm_getstate(rch->fsm) == CH_XID0_PENDING))
drivers/s390/net/ctcm_mpc.c
476
fsm_event(grp->fsm, MPCG_EVENT_XID0DO, rch);
drivers/s390/net/ctcm_mpc.c
489
(fsm_getstate(wch->fsm) == CH_XID0_PENDING))
drivers/s390/net/ctcm_mpc.c
490
fsm_event(grp->fsm, MPCG_EVENT_XID0DO, wch);
drivers/s390/net/ctcm_mpc.c
542
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
573
mpcg_state = fsm_getstate(grp->fsm);
drivers/s390/net/ctcm_mpc.c
582
fsm_newstate(grp->fsm, MPCG_STATE_FLOWC);
drivers/s390/net/ctcm_mpc.c
588
fsm_newstate(grp->fsm, MPCG_STATE_READY);
drivers/s390/net/ctcm_mpc.c
672
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
814
static void mpc_action_go_ready(fsm_instance *fsm, int event, void *arg)
drivers/s390/net/ctcm_mpc.c
838
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
876
fsm_newstate(grp->fsm, MPCG_STATE_READY);
drivers/s390/net/ctcm_mpc.c
884
ctcmpc_chx_rxidle(ch->fsm, CTC_EVENT_START, ch);
drivers/s390/net/ctcm_mpc.c
893
ctcm_chx_txidle(ch->fsm, CTC_EVENT_START, ch);
drivers/s390/net/ctcm_mpc.c
933
fsm_getstate_str(grp->fsm), grp->num_channel_paths,
drivers/s390/net/ctcm_mpc.c
952
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
drivers/s390/net/ctcm_mpc.c
979
fsm_newstate(ch->fsm, CH_XID0_PENDING);
drivers/s390/net/ctcm_mpc.c
983
(fsm_getstate(grp->fsm) < MPCG_STATE_XID2INITW)) {
drivers/s390/net/ctcm_mpc.c
984
fsm_newstate(grp->fsm, MPCG_STATE_XID2INITW);
drivers/s390/net/ctcm_mpc.h
199
fsm_instance *fsm; /* group xid fsm */
drivers/s390/net/ctcm_sysfs.c
89
fsm_getstate_str(priv->fsm));
drivers/s390/net/ctcm_sysfs.c
91
fsm_getstate_str(priv->channel[CTCM_READ]->fsm));
drivers/s390/net/ctcm_sysfs.c
93
fsm_getstate_str(priv->channel[CTCM_WRITE]->fsm));
drivers/s390/net/fsm.c
24
fsm *f;
drivers/s390/net/fsm.c
35
f = kzalloc_obj(fsm, order);
drivers/s390/net/fsm.h
65
fsm *f;
drivers/scsi/bfa/bfa.h
230
bfa_iocfs_fsm_t fsm;
drivers/scsi/bfa/bfa_cs.h
188
static void oc ## _sm_ ## st(otype * fsm, etype event)
drivers/scsi/bfa/bfa_cs.h
208
typedef void (*bfa_fsm_t)(void *fsm, int event);
drivers/scsi/bfa/bfa_cs.h
217
static void oc ## _sm_ ## st(otype * fsm, etype event); \
drivers/scsi/bfa/bfa_cs.h
218
static void oc ## _sm_ ## st ## _entry(otype * fsm)
drivers/scsi/bfa/bfa_cs.h
221
(_fsm)->fsm = (_state); \
drivers/scsi/bfa/bfa_cs.h
225
#define bfa_fsm_send_event(_fsm, _event) ((_fsm)->fsm((_fsm), (_event)))
drivers/scsi/bfa/bfa_cs.h
226
#define bfa_fsm_get_state(_fsm) ((_fsm)->fsm)
drivers/scsi/bfa/bfa_cs.h
227
#define bfa_fsm_cmp_state(_fsm, _state) ((_fsm)->fsm == (_state))
drivers/scsi/bfa/bfa_fcs.h
117
typedef void (*bfa_fcs_lport_fdmi_sm_t)(struct bfa_fcs_lport_fdmi_s *fsm, enum port_fdmi_event);
drivers/scsi/bfa/bfa_fcs.h
142
typedef void (*bfa_fcs_lport_ms_sm_t)(struct bfa_fcs_lport_ms_s *fsm, enum port_ms_event);
drivers/scsi/bfa/bfa_fcs.h
199
typedef void (*bfa_fcs_lport_sm_t)(struct bfa_fcs_lport_s *fsm, enum bfa_fcs_lport_event);
drivers/scsi/bfa/bfa_fcs.h
266
typedef void (*bfa_fcs_fabric_sm_t)(struct bfa_fcs_fabric_s *fsm, enum bfa_fcs_fabric_event);
drivers/scsi/bfa/bfa_fcs.h
456
typedef void (*bfa_fcs_vport_sm_t)(struct bfa_fcs_vport_s *fsm, enum bfa_fcs_vport_event);
drivers/scsi/bfa/bfa_fcs.h
66
typedef void (*bfa_fcs_lport_ns_sm_t)(struct bfa_fcs_lport_ns_s *fsm, enum vport_ns_event);
drivers/scsi/bfa/bfa_fcs.h
91
typedef void (*bfa_fcs_lport_scn_sm_t)(struct bfa_fcs_lport_scn_s *fsm, enum port_scn_event);
drivers/scsi/bfa/bfa_ioc.c
2796
enum bfa_ioc_state ioc_st = bfa_ioc_sm_to_state(ioc_sm_table, ioc->fsm);
drivers/scsi/bfa/bfa_ioc.c
2801
iocpf_st = bfa_iocpf_sm_to_state(iocpf_sm_table, ioc->iocpf.fsm);
drivers/scsi/bfa/bfa_ioc.h
279
typedef void (*bfa_ioc_sm_t)(struct bfa_ioc_s *fsm, enum ioc_event);
drivers/scsi/bfa/bfa_ioc.h
322
typedef void (*bfa_iocpf_sm_t)(struct bfa_iocpf_s *fsm, enum iocpf_event);
drivers/scsi/bfa/bfa_ioc.h
325
bfa_iocpf_sm_t fsm;
drivers/scsi/bfa/bfa_ioc.h
333
bfa_ioc_sm_t fsm;
drivers/scsi/bfa/bfa_ioc.h
818
typedef void (*bfa_dconf_sm_t)(struct bfa_dconf_mod_s *fsm, enum bfa_dconf_event);
drivers/usb/chipidea/ci.h
224
struct otg_fsm fsm;
drivers/usb/chipidea/core.c
1290
if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) &&
drivers/usb/chipidea/core.c
1302
if ((ci->fsm.otg->state == OTG_STATE_A_IDLE) &&
drivers/usb/chipidea/core.c
1303
(ci->fsm.a_bus_drop == 1) && (ci->fsm.a_bus_req == 0)) {
drivers/usb/chipidea/core.c
1305
ci->fsm.a_srp_det = 1;
drivers/usb/chipidea/core.c
1306
ci->fsm.a_bus_drop = 0;
drivers/usb/chipidea/core.c
1308
ci->fsm.id = 1;
drivers/usb/chipidea/debug.c
190
struct otg_fsm *fsm;
drivers/usb/chipidea/debug.c
195
fsm = &ci->fsm;
drivers/usb/chipidea/debug.c
202
seq_printf(s, "a_bus_drop: %d\n", fsm->a_bus_drop);
drivers/usb/chipidea/debug.c
204
seq_printf(s, "a_bus_req: %d\n", fsm->a_bus_req);
drivers/usb/chipidea/debug.c
206
seq_printf(s, "a_srp_det: %d\n", fsm->a_srp_det);
drivers/usb/chipidea/debug.c
208
seq_printf(s, "a_vbus_vld: %d\n", fsm->a_vbus_vld);
drivers/usb/chipidea/debug.c
210
seq_printf(s, "b_conn: %d\n", fsm->b_conn);
drivers/usb/chipidea/debug.c
212
seq_printf(s, "adp_change: %d\n", fsm->adp_change);
drivers/usb/chipidea/debug.c
214
seq_printf(s, "power_up: %d\n", fsm->power_up);
drivers/usb/chipidea/debug.c
216
seq_printf(s, "a_bus_resume: %d\n", fsm->a_bus_resume);
drivers/usb/chipidea/debug.c
218
seq_printf(s, "a_bus_suspend: %d\n", fsm->a_bus_suspend);
drivers/usb/chipidea/debug.c
220
seq_printf(s, "a_conn: %d\n", fsm->a_conn);
drivers/usb/chipidea/debug.c
222
seq_printf(s, "b_bus_req: %d\n", fsm->b_bus_req);
drivers/usb/chipidea/debug.c
224
seq_printf(s, "b_bus_suspend: %d\n", fsm->b_bus_suspend);
drivers/usb/chipidea/debug.c
226
seq_printf(s, "b_se0_srp: %d\n", fsm->b_se0_srp);
drivers/usb/chipidea/debug.c
228
seq_printf(s, "b_ssend_srp: %d\n", fsm->b_ssend_srp);
drivers/usb/chipidea/debug.c
230
seq_printf(s, "b_sess_vld: %d\n", fsm->b_sess_vld);
drivers/usb/chipidea/debug.c
232
seq_printf(s, "b_srp_done: %d\n", fsm->b_srp_done);
drivers/usb/chipidea/debug.c
234
seq_printf(s, "drv_vbus: %d\n", fsm->drv_vbus);
drivers/usb/chipidea/debug.c
236
seq_printf(s, "loc_conn: %d\n", fsm->loc_conn);
drivers/usb/chipidea/debug.c
238
seq_printf(s, "loc_sof: %d\n", fsm->loc_sof);
drivers/usb/chipidea/debug.c
240
seq_printf(s, "adp_prb: %d\n", fsm->adp_prb);
drivers/usb/chipidea/debug.c
242
seq_printf(s, "id: %d\n", fsm->id);
drivers/usb/chipidea/debug.c
244
seq_printf(s, "protocol: %d\n", fsm->protocol);
drivers/usb/chipidea/otg_fsm.c
105
mutex_lock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
107
ci->fsm.a_bus_drop = 0;
drivers/usb/chipidea/otg_fsm.c
109
ci->fsm.a_bus_drop = 1;
drivers/usb/chipidea/otg_fsm.c
110
ci->fsm.a_bus_req = 0;
drivers/usb/chipidea/otg_fsm.c
114
mutex_unlock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
129
t = scnprintf(next, size, "%d\n", ci->fsm.b_bus_req);
drivers/usb/chipidea/otg_fsm.c
145
mutex_lock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
147
ci->fsm.b_bus_req = 0;
drivers/usb/chipidea/otg_fsm.c
149
ci->fsm.b_bus_req = 1;
drivers/usb/chipidea/otg_fsm.c
150
if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) {
drivers/usb/chipidea/otg_fsm.c
152
mutex_unlock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
158
mutex_unlock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
173
mutex_lock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
175
ci->fsm.a_clr_err = 1;
drivers/usb/chipidea/otg_fsm.c
178
mutex_unlock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
288
ci->fsm.a_wait_vrise_tmout = 1;
drivers/usb/chipidea/otg_fsm.c
294
ci->fsm.a_wait_vfall_tmout = 1;
drivers/usb/chipidea/otg_fsm.c
300
ci->fsm.a_wait_bcon_tmout = 1;
drivers/usb/chipidea/otg_fsm.c
306
ci->fsm.a_aidl_bdis_tmout = 1;
drivers/usb/chipidea/otg_fsm.c
312
ci->fsm.b_ase0_brst_tmout = 1;
drivers/usb/chipidea/otg_fsm.c
318
ci->fsm.a_bidl_adis_tmout = 1;
drivers/usb/chipidea/otg_fsm.c
324
ci->fsm.a_bus_suspend = 1;
drivers/usb/chipidea/otg_fsm.c
330
ci->fsm.b_se0_srp = 1;
drivers/usb/chipidea/otg_fsm.c
336
ci->fsm.b_srp_done = 1;
drivers/usb/chipidea/otg_fsm.c
342
ci->fsm.b_srp_done = 1;
drivers/usb/chipidea/otg_fsm.c
343
ci->fsm.b_bus_req = 0;
drivers/usb/chipidea/otg_fsm.c
344
if (ci->fsm.power_up)
drivers/usb/chipidea/otg_fsm.c
345
ci->fsm.power_up = 0;
drivers/usb/chipidea/otg_fsm.c
353
ci->fsm.b_ssend_srp = 1;
drivers/usb/chipidea/otg_fsm.c
355
if (ci->fsm.otg->state == OTG_STATE_B_IDLE)
drivers/usb/chipidea/otg_fsm.c
40
t = scnprintf(next, size, "%d\n", ci->fsm.a_bus_req);
drivers/usb/chipidea/otg_fsm.c
435
static void ci_otg_fsm_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer t)
drivers/usb/chipidea/otg_fsm.c
437
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
drivers/usb/chipidea/otg_fsm.c
444
static void ci_otg_fsm_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer t)
drivers/usb/chipidea/otg_fsm.c
446
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
drivers/usb/chipidea/otg_fsm.c
457
static void ci_otg_drv_vbus(struct otg_fsm *fsm, int on)
drivers/usb/chipidea/otg_fsm.c
460
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
drivers/usb/chipidea/otg_fsm.c
482
fsm->a_srp_det = 0;
drivers/usb/chipidea/otg_fsm.c
483
fsm->power_up = 0;
drivers/usb/chipidea/otg_fsm.c
491
fsm->a_bus_drop = 1;
drivers/usb/chipidea/otg_fsm.c
492
fsm->a_bus_req = 0;
drivers/usb/chipidea/otg_fsm.c
499
static void ci_otg_loc_conn(struct otg_fsm *fsm, int on)
drivers/usb/chipidea/otg_fsm.c
501
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
drivers/usb/chipidea/otg_fsm.c
518
static void ci_otg_loc_sof(struct otg_fsm *fsm, int on)
drivers/usb/chipidea/otg_fsm.c
522
if (!fsm->otg->host)
drivers/usb/chipidea/otg_fsm.c
525
udev = usb_hub_find_child(fsm->otg->host->root_hub, 1);
drivers/usb/chipidea/otg_fsm.c
541
static void ci_otg_start_pulse(struct otg_fsm *fsm)
drivers/usb/chipidea/otg_fsm.c
543
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
drivers/usb/chipidea/otg_fsm.c
552
static int ci_otg_start_host(struct otg_fsm *fsm, int on)
drivers/usb/chipidea/otg_fsm.c
554
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
drivers/usb/chipidea/otg_fsm.c
56
mutex_lock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
566
static int ci_otg_start_gadget(struct otg_fsm *fsm, int on)
drivers/usb/chipidea/otg_fsm.c
568
struct ci_hdrc *ci = container_of(fsm, struct ci_hdrc, fsm);
drivers/usb/chipidea/otg_fsm.c
58
ci->fsm.a_bus_req = 0;
drivers/usb/chipidea/otg_fsm.c
595
if (ci->fsm.id && !(ci->driver) &&
drivers/usb/chipidea/otg_fsm.c
596
ci->fsm.otg->state < OTG_STATE_A_IDLE)
drivers/usb/chipidea/otg_fsm.c
600
if (otg_statemachine(&ci->fsm)) {
drivers/usb/chipidea/otg_fsm.c
601
if (ci->fsm.otg->state == OTG_STATE_A_IDLE) {
drivers/usb/chipidea/otg_fsm.c
61
if (ci->fsm.a_bus_drop) {
drivers/usb/chipidea/otg_fsm.c
610
if ((ci->fsm.id) || (ci->id_event) ||
drivers/usb/chipidea/otg_fsm.c
611
(ci->fsm.power_up)) {
drivers/usb/chipidea/otg_fsm.c
62
mutex_unlock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
622
} else if (ci->fsm.otg->state == OTG_STATE_B_IDLE) {
drivers/usb/chipidea/otg_fsm.c
623
if (ci->fsm.b_sess_vld) {
drivers/usb/chipidea/otg_fsm.c
624
ci->fsm.power_up = 0;
drivers/usb/chipidea/otg_fsm.c
631
} else if (ci->fsm.otg->state == OTG_STATE_A_HOST) {
drivers/usb/chipidea/otg_fsm.c
647
struct otg_fsm *fsm = &ci->fsm;
drivers/usb/chipidea/otg_fsm.c
65
ci->fsm.a_bus_req = 1;
drivers/usb/chipidea/otg_fsm.c
653
switch (ci->fsm.otg->state) {
drivers/usb/chipidea/otg_fsm.c
656
fsm->b_conn = 1;
drivers/usb/chipidea/otg_fsm.c
657
fsm->a_bus_req = 1;
drivers/usb/chipidea/otg_fsm.c
66
if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) {
drivers/usb/chipidea/otg_fsm.c
663
fsm->b_sess_vld = 1;
drivers/usb/chipidea/otg_fsm.c
672
if (fsm->a_bus_suspend == 1)
drivers/usb/chipidea/otg_fsm.c
673
fsm->a_bus_suspend = 0;
drivers/usb/chipidea/otg_fsm.c
678
fsm->a_conn = 0;
drivers/usb/chipidea/otg_fsm.c
679
fsm->b_bus_req = 0;
drivers/usb/chipidea/otg_fsm.c
68
mutex_unlock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
685
fsm->b_bus_suspend = 1;
drivers/usb/chipidea/otg_fsm.c
698
if (fsm->b_bus_suspend == 1) {
drivers/usb/chipidea/otg_fsm.c
700
fsm->b_bus_suspend = 0;
drivers/usb/chipidea/otg_fsm.c
706
fsm->b_conn = 0;
drivers/usb/chipidea/otg_fsm.c
718
fsm->b_conn = 0;
drivers/usb/chipidea/otg_fsm.c
724
fsm->a_conn = 1;
drivers/usb/chipidea/otg_fsm.c
74
mutex_unlock(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
743
struct otg_fsm *fsm = &ci->fsm;
drivers/usb/chipidea/otg_fsm.c
747
fsm->id = (otgsc & OTGSC_ID) ? 1 : 0;
drivers/usb/chipidea/otg_fsm.c
752
fsm->a_srp_det = 1;
drivers/usb/chipidea/otg_fsm.c
753
fsm->a_bus_drop = 0;
drivers/usb/chipidea/otg_fsm.c
756
if (fsm->id == 0) {
drivers/usb/chipidea/otg_fsm.c
757
fsm->a_bus_drop = 0;
drivers/usb/chipidea/otg_fsm.c
758
fsm->a_bus_req = 1;
drivers/usb/chipidea/otg_fsm.c
764
fsm->b_sess_vld = 1;
drivers/usb/chipidea/otg_fsm.c
767
fsm->b_ssend_srp = 0;
drivers/usb/chipidea/otg_fsm.c
769
fsm->b_sess_vld = 0;
drivers/usb/chipidea/otg_fsm.c
770
if (fsm->id)
drivers/usb/chipidea/otg_fsm.c
776
fsm->a_vbus_vld = 1;
drivers/usb/chipidea/otg_fsm.c
778
fsm->a_vbus_vld = 0;
drivers/usb/chipidea/otg_fsm.c
779
fsm->b_conn = 0;
drivers/usb/chipidea/otg_fsm.c
806
ci->fsm.otg = &ci->otg;
drivers/usb/chipidea/otg_fsm.c
807
ci->fsm.power_up = 1;
drivers/usb/chipidea/otg_fsm.c
808
ci->fsm.id = hw_read_otgsc(ci, OTGSC_ID) ? 1 : 0;
drivers/usb/chipidea/otg_fsm.c
809
ci->fsm.otg->state = OTG_STATE_UNDEFINED;
drivers/usb/chipidea/otg_fsm.c
810
ci->fsm.ops = &ci_otg_ops;
drivers/usb/chipidea/otg_fsm.c
812
ci->fsm.host_req_flag = devm_kzalloc(ci->dev, 1, GFP_KERNEL);
drivers/usb/chipidea/otg_fsm.c
813
if (!ci->fsm.host_req_flag)
drivers/usb/chipidea/otg_fsm.c
816
mutex_init(&ci->fsm.lock);
drivers/usb/chipidea/otg_fsm.c
836
if (ci->fsm.id) {
drivers/usb/chipidea/otg_fsm.c
837
ci->fsm.b_ssend_srp =
drivers/usb/chipidea/otg_fsm.c
839
ci->fsm.b_sess_vld =
drivers/usb/chipidea/otg_fsm.c
89
t = scnprintf(next, size, "%d\n", ci->fsm.a_bus_drop);
drivers/usb/chipidea/udc.c
2136
if (ci_otg_is_fsm_mode(ci) && ci->fsm.id) {
drivers/usb/chipidea/udc.c
2154
mutex_lock(&ci->fsm.lock);
drivers/usb/chipidea/udc.c
2155
if (ci->fsm.otg->state == OTG_STATE_A_PERIPHERAL) {
drivers/usb/chipidea/udc.c
2156
ci->fsm.a_bidl_adis_tmout = 1;
drivers/usb/chipidea/udc.c
2158
} else if (ci->fsm.otg->state == OTG_STATE_B_PERIPHERAL) {
drivers/usb/chipidea/udc.c
2159
ci->fsm.protocol = PROTO_UNDEF;
drivers/usb/chipidea/udc.c
2160
ci->fsm.otg->state = OTG_STATE_UNDEFINED;
drivers/usb/chipidea/udc.c
2162
mutex_unlock(&ci->fsm.lock);
drivers/usb/common/usb-otg-fsm.c
100
fsm->a_suspend_req_inf = 0;
drivers/usb/common/usb-otg-fsm.c
103
otg_del_timer(fsm, A_BIDL_ADIS);
drivers/usb/common/usb-otg-fsm.c
104
fsm->a_bidl_adis_tmout = 0;
drivers/usb/common/usb-otg-fsm.c
105
if (fsm->otg->gadget)
drivers/usb/common/usb-otg-fsm.c
106
fsm->otg->gadget->host_request_flag = 0;
drivers/usb/common/usb-otg-fsm.c
109
otg_del_timer(fsm, A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
110
fsm->a_wait_vfall_tmout = 0;
drivers/usb/common/usb-otg-fsm.c
111
otg_del_timer(fsm, A_WAIT_VRISE);
drivers/usb/common/usb-otg-fsm.c
122
struct otg_fsm *fsm = container_of(to_delayed_work(work),
drivers/usb/common/usb-otg-fsm.c
125
enum usb_otg_state state = fsm->otg->state;
drivers/usb/common/usb-otg-fsm.c
132
udev = usb_hub_find_child(fsm->otg->host->root_hub, 1);
drivers/usb/common/usb-otg-fsm.c
134
dev_err(fsm->otg->host->controller,
drivers/usb/common/usb-otg-fsm.c
139
*fsm->host_req_flag = 0;
drivers/usb/common/usb-otg-fsm.c
147
fsm->host_req_flag,
drivers/usb/common/usb-otg-fsm.c
155
flag = *fsm->host_req_flag;
drivers/usb/common/usb-otg-fsm.c
158
schedule_delayed_work(&fsm->hnp_polling_work,
drivers/usb/common/usb-otg-fsm.c
169
if (!fsm->otg->host->b_hnp_enable) {
drivers/usb/common/usb-otg-fsm.c
177
fsm->otg->host->b_hnp_enable = 1;
drivers/usb/common/usb-otg-fsm.c
179
fsm->a_bus_req = 0;
drivers/usb/common/usb-otg-fsm.c
181
fsm->b_bus_req = 0;
drivers/usb/common/usb-otg-fsm.c
184
otg_statemachine(fsm);
drivers/usb/common/usb-otg-fsm.c
187
static void otg_start_hnp_polling(struct otg_fsm *fsm)
drivers/usb/common/usb-otg-fsm.c
193
if (!fsm->host_req_flag)
drivers/usb/common/usb-otg-fsm.c
196
if (!fsm->hnp_work_inited) {
drivers/usb/common/usb-otg-fsm.c
197
INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work);
drivers/usb/common/usb-otg-fsm.c
198
fsm->hnp_work_inited = true;
drivers/usb/common/usb-otg-fsm.c
201
schedule_delayed_work(&fsm->hnp_polling_work,
drivers/usb/common/usb-otg-fsm.c
206
static int otg_set_state(struct otg_fsm *fsm, enum usb_otg_state new_state)
drivers/usb/common/usb-otg-fsm.c
208
if (fsm->otg->state == new_state)
drivers/usb/common/usb-otg-fsm.c
211
otg_leave_state(fsm, fsm->otg->state);
drivers/usb/common/usb-otg-fsm.c
214
otg_drv_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
215
otg_chrg_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
216
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
217
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
222
otg_start_adp_sns(fsm);
drivers/usb/common/usb-otg-fsm.c
223
otg_set_protocol(fsm, PROTO_UNDEF);
drivers/usb/common/usb-otg-fsm.c
224
otg_add_timer(fsm, B_SE0_SRP);
drivers/usb/common/usb-otg-fsm.c
227
otg_start_pulse(fsm);
drivers/usb/common/usb-otg-fsm.c
228
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
229
otg_set_protocol(fsm, PROTO_UNDEF);
drivers/usb/common/usb-otg-fsm.c
230
otg_add_timer(fsm, B_SRP_FAIL);
drivers/usb/common/usb-otg-fsm.c
233
otg_chrg_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
234
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
235
otg_set_protocol(fsm, PROTO_GADGET);
drivers/usb/common/usb-otg-fsm.c
236
otg_loc_conn(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
239
otg_chrg_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
240
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
241
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
242
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
243
otg_add_timer(fsm, B_ASE0_BRST);
drivers/usb/common/usb-otg-fsm.c
244
fsm->a_bus_suspend = 0;
drivers/usb/common/usb-otg-fsm.c
247
otg_chrg_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
248
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
249
otg_loc_sof(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
250
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
251
usb_bus_start_enum(fsm->otg->host,
drivers/usb/common/usb-otg-fsm.c
252
fsm->otg->host->otg_port);
drivers/usb/common/usb-otg-fsm.c
253
otg_start_hnp_polling(fsm);
drivers/usb/common/usb-otg-fsm.c
256
otg_drv_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
257
otg_chrg_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
258
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
259
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
260
otg_start_adp_prb(fsm);
drivers/usb/common/usb-otg-fsm.c
261
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
264
otg_drv_vbus(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
265
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
266
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
267
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
268
otg_add_timer(fsm, A_WAIT_VRISE);
drivers/usb/common/usb-otg-fsm.c
271
otg_drv_vbus(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
272
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
273
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
274
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
275
otg_add_timer(fsm, A_WAIT_BCON);
drivers/usb/common/usb-otg-fsm.c
278
otg_drv_vbus(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
279
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
280
otg_loc_sof(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
281
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
286
if (!fsm->a_bus_req || fsm->a_suspend_req_inf)
drivers/usb/common/usb-otg-fsm.c
287
otg_add_timer(fsm, A_WAIT_ENUM);
drivers/usb/common/usb-otg-fsm.c
288
otg_start_hnp_polling(fsm);
drivers/usb/common/usb-otg-fsm.c
29
static int otg_set_protocol(struct otg_fsm *fsm, int protocol)
drivers/usb/common/usb-otg-fsm.c
291
otg_drv_vbus(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
292
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
293
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
294
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
295
otg_add_timer(fsm, A_AIDL_BDIS);
drivers/usb/common/usb-otg-fsm.c
299
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
300
otg_set_protocol(fsm, PROTO_GADGET);
drivers/usb/common/usb-otg-fsm.c
301
otg_drv_vbus(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
302
otg_loc_conn(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
303
otg_add_timer(fsm, A_BIDL_ADIS);
drivers/usb/common/usb-otg-fsm.c
306
otg_drv_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
307
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
308
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
309
otg_set_protocol(fsm, PROTO_HOST);
drivers/usb/common/usb-otg-fsm.c
310
otg_add_timer(fsm, A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
313
otg_drv_vbus(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
314
otg_loc_conn(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
315
otg_loc_sof(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
316
otg_set_protocol(fsm, PROTO_UNDEF);
drivers/usb/common/usb-otg-fsm.c
322
fsm->otg->state = new_state;
drivers/usb/common/usb-otg-fsm.c
323
fsm->state_changed = 1;
drivers/usb/common/usb-otg-fsm.c
328
int otg_statemachine(struct otg_fsm *fsm)
drivers/usb/common/usb-otg-fsm.c
33
if (fsm->protocol != protocol) {
drivers/usb/common/usb-otg-fsm.c
332
mutex_lock(&fsm->lock);
drivers/usb/common/usb-otg-fsm.c
334
state = fsm->otg->state;
drivers/usb/common/usb-otg-fsm.c
335
fsm->state_changed = 0;
drivers/usb/common/usb-otg-fsm.c
340
VDBG("fsm->id = %d\n", fsm->id);
drivers/usb/common/usb-otg-fsm.c
341
if (fsm->id)
drivers/usb/common/usb-otg-fsm.c
342
otg_set_state(fsm, OTG_STATE_B_IDLE);
drivers/usb/common/usb-otg-fsm.c
344
otg_set_state(fsm, OTG_STATE_A_IDLE);
drivers/usb/common/usb-otg-fsm.c
347
if (!fsm->id)
drivers/usb/common/usb-otg-fsm.c
348
otg_set_state(fsm, OTG_STATE_A_IDLE);
drivers/usb/common/usb-otg-fsm.c
349
else if (fsm->b_sess_vld && fsm->otg->gadget)
drivers/usb/common/usb-otg-fsm.c
35
fsm->protocol, protocol);
drivers/usb/common/usb-otg-fsm.c
350
otg_set_state(fsm, OTG_STATE_B_PERIPHERAL);
drivers/usb/common/usb-otg-fsm.c
351
else if ((fsm->b_bus_req || fsm->adp_change || fsm->power_up) &&
drivers/usb/common/usb-otg-fsm.c
352
fsm->b_ssend_srp && fsm->b_se0_srp)
drivers/usb/common/usb-otg-fsm.c
353
otg_set_state(fsm, OTG_STATE_B_SRP_INIT);
drivers/usb/common/usb-otg-fsm.c
356
if (!fsm->id || fsm->b_srp_done)
drivers/usb/common/usb-otg-fsm.c
357
otg_set_state(fsm, OTG_STATE_B_IDLE);
drivers/usb/common/usb-otg-fsm.c
360
if (!fsm->id || !fsm->b_sess_vld)
drivers/usb/common/usb-otg-fsm.c
361
otg_set_state(fsm, OTG_STATE_B_IDLE);
drivers/usb/common/usb-otg-fsm.c
362
else if (fsm->b_bus_req && fsm->otg->
drivers/usb/common/usb-otg-fsm.c
363
gadget->b_hnp_enable && fsm->a_bus_suspend)
drivers/usb/common/usb-otg-fsm.c
364
otg_set_state(fsm, OTG_STATE_B_WAIT_ACON);
drivers/usb/common/usb-otg-fsm.c
367
if (fsm->a_conn)
drivers/usb/common/usb-otg-fsm.c
368
otg_set_state(fsm, OTG_STATE_B_HOST);
drivers/usb/common/usb-otg-fsm.c
369
else if (!fsm->id || !fsm->b_sess_vld)
drivers/usb/common/usb-otg-fsm.c
37
if (fsm->protocol == PROTO_HOST)
drivers/usb/common/usb-otg-fsm.c
370
otg_set_state(fsm, OTG_STATE_B_IDLE);
drivers/usb/common/usb-otg-fsm.c
371
else if (fsm->a_bus_resume || fsm->b_ase0_brst_tmout) {
drivers/usb/common/usb-otg-fsm.c
372
fsm->b_ase0_brst_tmout = 0;
drivers/usb/common/usb-otg-fsm.c
373
otg_set_state(fsm, OTG_STATE_B_PERIPHERAL);
drivers/usb/common/usb-otg-fsm.c
377
if (!fsm->id || !fsm->b_sess_vld)
drivers/usb/common/usb-otg-fsm.c
378
otg_set_state(fsm, OTG_STATE_B_IDLE);
drivers/usb/common/usb-otg-fsm.c
379
else if (!fsm->b_bus_req || !fsm->a_conn || fsm->test_device)
drivers/usb/common/usb-otg-fsm.c
38
ret = otg_start_host(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
380
otg_set_state(fsm, OTG_STATE_B_PERIPHERAL);
drivers/usb/common/usb-otg-fsm.c
383
if (fsm->id)
drivers/usb/common/usb-otg-fsm.c
384
otg_set_state(fsm, OTG_STATE_B_IDLE);
drivers/usb/common/usb-otg-fsm.c
385
else if (!fsm->a_bus_drop && (fsm->a_bus_req ||
drivers/usb/common/usb-otg-fsm.c
386
fsm->a_srp_det || fsm->adp_change || fsm->power_up))
drivers/usb/common/usb-otg-fsm.c
387
otg_set_state(fsm, OTG_STATE_A_WAIT_VRISE);
drivers/usb/common/usb-otg-fsm.c
39
else if (fsm->protocol == PROTO_GADGET)
drivers/usb/common/usb-otg-fsm.c
390
if (fsm->a_vbus_vld)
drivers/usb/common/usb-otg-fsm.c
391
otg_set_state(fsm, OTG_STATE_A_WAIT_BCON);
drivers/usb/common/usb-otg-fsm.c
392
else if (fsm->id || fsm->a_bus_drop ||
drivers/usb/common/usb-otg-fsm.c
393
fsm->a_wait_vrise_tmout)
drivers/usb/common/usb-otg-fsm.c
394
otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
397
if (!fsm->a_vbus_vld)
drivers/usb/common/usb-otg-fsm.c
398
otg_set_state(fsm, OTG_STATE_A_VBUS_ERR);
drivers/usb/common/usb-otg-fsm.c
399
else if (fsm->b_conn)
drivers/usb/common/usb-otg-fsm.c
40
ret = otg_start_gadget(fsm, 0);
drivers/usb/common/usb-otg-fsm.c
400
otg_set_state(fsm, OTG_STATE_A_HOST);
drivers/usb/common/usb-otg-fsm.c
401
else if (fsm->id || fsm->a_bus_drop || fsm->a_wait_bcon_tmout)
drivers/usb/common/usb-otg-fsm.c
402
otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
405
if (fsm->id || fsm->a_bus_drop)
drivers/usb/common/usb-otg-fsm.c
406
otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
407
else if ((!fsm->a_bus_req || fsm->a_suspend_req_inf) &&
drivers/usb/common/usb-otg-fsm.c
408
fsm->otg->host->b_hnp_enable)
drivers/usb/common/usb-otg-fsm.c
409
otg_set_state(fsm, OTG_STATE_A_SUSPEND);
drivers/usb/common/usb-otg-fsm.c
410
else if (!fsm->b_conn)
drivers/usb/common/usb-otg-fsm.c
411
otg_set_state(fsm, OTG_STATE_A_WAIT_BCON);
drivers/usb/common/usb-otg-fsm.c
412
else if (!fsm->a_vbus_vld)
drivers/usb/common/usb-otg-fsm.c
413
otg_set_state(fsm, OTG_STATE_A_VBUS_ERR);
drivers/usb/common/usb-otg-fsm.c
416
if (!fsm->b_conn && fsm->otg->host->b_hnp_enable)
drivers/usb/common/usb-otg-fsm.c
417
otg_set_state(fsm, OTG_STATE_A_PERIPHERAL);
drivers/usb/common/usb-otg-fsm.c
418
else if (!fsm->b_conn && !fsm->otg->host->b_hnp_enable)
drivers/usb/common/usb-otg-fsm.c
419
otg_set_state(fsm, OTG_STATE_A_WAIT_BCON);
drivers/usb/common/usb-otg-fsm.c
420
else if (fsm->a_bus_req || fsm->b_bus_resume)
drivers/usb/common/usb-otg-fsm.c
421
otg_set_state(fsm, OTG_STATE_A_HOST);
drivers/usb/common/usb-otg-fsm.c
422
else if (fsm->id || fsm->a_bus_drop || fsm->a_aidl_bdis_tmout)
drivers/usb/common/usb-otg-fsm.c
423
otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
424
else if (!fsm->a_vbus_vld)
drivers/usb/common/usb-otg-fsm.c
425
otg_set_state(fsm, OTG_STATE_A_VBUS_ERR);
drivers/usb/common/usb-otg-fsm.c
428
if (fsm->id || fsm->a_bus_drop)
drivers/usb/common/usb-otg-fsm.c
429
otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
430
else if (fsm->a_bidl_adis_tmout || fsm->b_bus_suspend)
drivers/usb/common/usb-otg-fsm.c
431
otg_set_state(fsm, OTG_STATE_A_WAIT_BCON);
drivers/usb/common/usb-otg-fsm.c
432
else if (!fsm->a_vbus_vld)
drivers/usb/common/usb-otg-fsm.c
433
otg_set_state(fsm, OTG_STATE_A_VBUS_ERR);
drivers/usb/common/usb-otg-fsm.c
436
if (fsm->a_wait_vfall_tmout)
drivers/usb/common/usb-otg-fsm.c
437
otg_set_state(fsm, OTG_STATE_A_IDLE);
drivers/usb/common/usb-otg-fsm.c
440
if (fsm->id || fsm->a_bus_drop || fsm->a_clr_err)
drivers/usb/common/usb-otg-fsm.c
441
otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL);
drivers/usb/common/usb-otg-fsm.c
446
mutex_unlock(&fsm->lock);
drivers/usb/common/usb-otg-fsm.c
448
VDBG("quit statemachine, changed = %d\n", fsm->state_changed);
drivers/usb/common/usb-otg-fsm.c
449
return fsm->state_changed;
drivers/usb/common/usb-otg-fsm.c
46
ret = otg_start_host(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
48
ret = otg_start_gadget(fsm, 1);
drivers/usb/common/usb-otg-fsm.c
52
fsm->protocol = protocol;
drivers/usb/common/usb-otg-fsm.c
60
static void otg_leave_state(struct otg_fsm *fsm, enum usb_otg_state old_state)
drivers/usb/common/usb-otg-fsm.c
64
otg_del_timer(fsm, B_SE0_SRP);
drivers/usb/common/usb-otg-fsm.c
65
fsm->b_se0_srp = 0;
drivers/usb/common/usb-otg-fsm.c
66
fsm->adp_sns = 0;
drivers/usb/common/usb-otg-fsm.c
67
fsm->adp_prb = 0;
drivers/usb/common/usb-otg-fsm.c
70
fsm->data_pulse = 0;
drivers/usb/common/usb-otg-fsm.c
71
fsm->b_srp_done = 0;
drivers/usb/common/usb-otg-fsm.c
74
if (fsm->otg->gadget)
drivers/usb/common/usb-otg-fsm.c
75
fsm->otg->gadget->host_request_flag = 0;
drivers/usb/common/usb-otg-fsm.c
78
otg_del_timer(fsm, B_ASE0_BRST);
drivers/usb/common/usb-otg-fsm.c
79
fsm->b_ase0_brst_tmout = 0;
drivers/usb/common/usb-otg-fsm.c
84
fsm->adp_prb = 0;
drivers/usb/common/usb-otg-fsm.c
87
otg_del_timer(fsm, A_WAIT_VRISE);
drivers/usb/common/usb-otg-fsm.c
88
fsm->a_wait_vrise_tmout = 0;
drivers/usb/common/usb-otg-fsm.c
91
otg_del_timer(fsm, A_WAIT_BCON);
drivers/usb/common/usb-otg-fsm.c
92
fsm->a_wait_bcon_tmout = 0;
drivers/usb/common/usb-otg-fsm.c
95
otg_del_timer(fsm, A_WAIT_ENUM);
drivers/usb/common/usb-otg-fsm.c
98
otg_del_timer(fsm, A_AIDL_BDIS);
drivers/usb/common/usb-otg-fsm.c
99
fsm->a_aidl_bdis_tmout = 0;
drivers/usb/phy/phy-fsl-usb.c
118
void fsl_otg_chrg_vbus(struct otg_fsm *fsm, int on)
drivers/usb/phy/phy-fsl-usb.c
154
void fsl_otg_drv_vbus(struct otg_fsm *fsm, int on)
drivers/usb/phy/phy-fsl-usb.c
172
void fsl_otg_loc_conn(struct otg_fsm *fsm, int on)
drivers/usb/phy/phy-fsl-usb.c
191
void fsl_otg_loc_sof(struct otg_fsm *fsm, int on)
drivers/usb/phy/phy-fsl-usb.c
206
void fsl_otg_start_pulse(struct otg_fsm *fsm)
drivers/usb/phy/phy-fsl-usb.c
219
fsl_otg_add_timer(fsm, b_data_pulse_tmr);
drivers/usb/phy/phy-fsl-usb.c
236
fsl_otg_chrg_vbus(&fsl_otg_dev->fsm, 1);
drivers/usb/phy/phy-fsl-usb.c
238
fsl_otg_add_timer(&fsl_otg_dev->fsm, b_vbus_pulse_tmr);
drivers/usb/phy/phy-fsl-usb.c
243
fsl_otg_chrg_vbus(&fsl_otg_dev->fsm, 0);
drivers/usb/phy/phy-fsl-usb.c
251
fsl_otg_add_timer(&fsl_otg_dev->fsm, b_srp_wait_tmr);
drivers/usb/phy/phy-fsl-usb.c
260
fsl_otg_dev->fsm.b_sess_vld)
drivers/usb/phy/phy-fsl-usb.c
261
fsl_otg_dev->fsm.b_srp_done = 1;
drivers/usb/phy/phy-fsl-usb.c
273
fsl_otg_add_timer(&fsl_otg_dev->fsm, a_wait_enum_tmr);
drivers/usb/phy/phy-fsl-usb.c
275
otg_statemachine(&fsl_otg_dev->fsm);
drivers/usb/phy/phy-fsl-usb.c
285
int fsl_otg_init_timers(struct otg_fsm *fsm)
drivers/usb/phy/phy-fsl-usb.c
289
(unsigned long)&fsm->a_wait_vrise_tmout);
drivers/usb/phy/phy-fsl-usb.c
294
(unsigned long)&fsm->a_wait_bcon_tmout);
drivers/usb/phy/phy-fsl-usb.c
299
(unsigned long)&fsm->a_aidl_bdis_tmout);
drivers/usb/phy/phy-fsl-usb.c
304
(unsigned long)&fsm->b_ase0_brst_tmout);
drivers/usb/phy/phy-fsl-usb.c
309
(unsigned long)&fsm->b_se0_srp);
drivers/usb/phy/phy-fsl-usb.c
314
(unsigned long)&fsm->b_srp_done);
drivers/usb/phy/phy-fsl-usb.c
319
(unsigned long)&fsm);
drivers/usb/phy/phy-fsl-usb.c
394
void fsl_otg_add_timer(struct otg_fsm *fsm, void *gtimer)
drivers/usb/phy/phy-fsl-usb.c
412
static void fsl_otg_fsm_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer t)
drivers/usb/phy/phy-fsl-usb.c
420
fsl_otg_add_timer(fsm, timer);
drivers/usb/phy/phy-fsl-usb.c
424
void fsl_otg_del_timer(struct otg_fsm *fsm, void *gtimer)
drivers/usb/phy/phy-fsl-usb.c
434
static void fsl_otg_fsm_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer t)
drivers/usb/phy/phy-fsl-usb.c
442
fsl_otg_del_timer(fsm, timer);
drivers/usb/phy/phy-fsl-usb.c
458
int fsl_otg_start_host(struct otg_fsm *fsm, int on)
drivers/usb/phy/phy-fsl-usb.c
460
struct usb_otg *otg = fsm->otg;
drivers/usb/phy/phy-fsl-usb.c
474
fsm->a_vbus_vld =
drivers/usb/phy/phy-fsl-usb.c
485
if (fsm->id) {
drivers/usb/phy/phy-fsl-usb.c
487
fsl_otg_drv_vbus(fsm, 1);
drivers/usb/phy/phy-fsl-usb.c
510
if (fsm->id)
drivers/usb/phy/phy-fsl-usb.c
512
fsl_otg_drv_vbus(fsm, 0);
drivers/usb/phy/phy-fsl-usb.c
525
int fsl_otg_start_gadget(struct otg_fsm *fsm, int on)
drivers/usb/phy/phy-fsl-usb.c
527
struct usb_otg *otg = fsm->otg;
drivers/usb/phy/phy-fsl-usb.c
564
otg_dev->fsm.a_bus_drop = 0;
drivers/usb/phy/phy-fsl-usb.c
565
otg_dev->fsm.a_bus_req = 1;
drivers/usb/phy/phy-fsl-usb.c
571
otg->host->is_b_host = otg_dev->fsm.id;
drivers/usb/phy/phy-fsl-usb.c
585
struct otg_fsm *fsm = &otg_dev->fsm;
drivers/usb/phy/phy-fsl-usb.c
588
fsm->protocol = PROTO_UNDEF;
drivers/usb/phy/phy-fsl-usb.c
594
otg_statemachine(&otg_dev->fsm);
drivers/usb/phy/phy-fsl-usb.c
619
otg_dev->fsm.b_bus_req = 0;
drivers/usb/phy/phy-fsl-usb.c
620
otg_statemachine(&otg_dev->fsm);
drivers/usb/phy/phy-fsl-usb.c
625
otg->gadget->is_a_peripheral = !otg_dev->fsm.id;
drivers/usb/phy/phy-fsl-usb.c
627
otg_dev->fsm.b_bus_req = 1;
drivers/usb/phy/phy-fsl-usb.c
630
pr_debug("ID pin=%d\n", otg_dev->fsm.id);
drivers/usb/phy/phy-fsl-usb.c
631
if (otg_dev->fsm.id == 1) {
drivers/usb/phy/phy-fsl-usb.c
632
fsl_otg_start_host(&otg_dev->fsm, 0);
drivers/usb/phy/phy-fsl-usb.c
633
otg_drv_vbus(&otg_dev->fsm, 0);
drivers/usb/phy/phy-fsl-usb.c
634
fsl_otg_start_gadget(&otg_dev->fsm, 1);
drivers/usb/phy/phy-fsl-usb.c
653
struct otg_fsm *fsm = &og->fsm;
drivers/usb/phy/phy-fsl-usb.c
655
if (fsm->id) { /* switch to gadget */
drivers/usb/phy/phy-fsl-usb.c
656
fsl_otg_start_host(fsm, 0);
drivers/usb/phy/phy-fsl-usb.c
657
otg_drv_vbus(fsm, 0);
drivers/usb/phy/phy-fsl-usb.c
658
fsl_otg_start_gadget(fsm, 1);
drivers/usb/phy/phy-fsl-usb.c
674
otg_dev->fsm.b_bus_req = 1;
drivers/usb/phy/phy-fsl-usb.c
675
otg_statemachine(&otg_dev->fsm);
drivers/usb/phy/phy-fsl-usb.c
695
otg_dev->fsm.a_bus_req = 0;
drivers/usb/phy/phy-fsl-usb.c
696
otg_statemachine(&otg_dev->fsm);
drivers/usb/phy/phy-fsl-usb.c
709
struct otg_fsm *fsm = &((struct fsl_otg *)dev_id)->fsm;
drivers/usb/phy/phy-fsl-usb.c
720
fsm->id = (otg_sc & OTGSC_STS_USB_ID) ? 1 : 0;
drivers/usb/phy/phy-fsl-usb.c
721
otg->default_a = (fsm->id == 0);
drivers/usb/phy/phy-fsl-usb.c
726
fsm->id = (otg_sc & OTGSC_STS_USB_ID) ? 1 : 0;
drivers/usb/phy/phy-fsl-usb.c
727
otg->default_a = (fsm->id == 0);
drivers/usb/phy/phy-fsl-usb.c
729
if (fsm->id)
drivers/usb/phy/phy-fsl-usb.c
730
fsm->b_conn = 0;
drivers/usb/phy/phy-fsl-usb.c
732
fsm->a_conn = 0;
drivers/usb/phy/phy-fsl-usb.c
735
otg->host->is_b_host = fsm->id;
drivers/usb/phy/phy-fsl-usb.c
737
otg->gadget->is_a_peripheral = !fsm->id;
drivers/usb/phy/phy-fsl-usb.c
738
VDBG("ID int (ID is %d)\n", fsm->id);
drivers/usb/phy/phy-fsl-usb.c
740
if (fsm->id) { /* switch to gadget */
drivers/usb/phy/phy-fsl-usb.c
748
fsl_otg_start_gadget(fsm, 0);
drivers/usb/phy/phy-fsl-usb.c
749
otg_drv_vbus(fsm, 1);
drivers/usb/phy/phy-fsl-usb.c
750
fsl_otg_start_host(fsm, 1);
drivers/usb/phy/phy-fsl-usb.c
795
status = fsl_otg_init_timers(&fsl_otg_tc->fsm);
drivers/usb/phy/phy-fsl-usb.c
800
mutex_init(&fsl_otg_tc->fsm.lock);
drivers/usb/phy/phy-fsl-usb.c
803
fsl_otg_tc->fsm.ops = &fsl_otg_ops;
drivers/usb/phy/phy-fsl-usb.c
837
struct otg_fsm *fsm;
drivers/usb/phy/phy-fsl-usb.c
844
fsm = &p_otg->fsm;
drivers/usb/phy/phy-fsl-usb.c
848
fsm->otg = p_otg->phy.otg;
drivers/usb/phy/phy-fsl-usb.c
946
p_otg->fsm.id = 1;
drivers/usb/phy/phy-fsl-usb.c
949
p_otg->fsm.id = 0;
drivers/usb/phy/phy-fsl-usb.c
952
pr_debug("initial ID pin=%d\n", p_otg->fsm.id);
drivers/usb/phy/phy-fsl-usb.h
359
struct otg_fsm fsm;
drivers/usb/phy/phy-fsl-usb.h
376
void fsl_otg_add_timer(struct otg_fsm *fsm, void *timer);
drivers/usb/phy/phy-fsl-usb.h
377
void fsl_otg_del_timer(struct otg_fsm *fsm, void *timer);
fs/ext4/fsmap.c
349
struct ext4_fsmap *fsm;
fs/ext4/fsmap.c
351
fsm = kmalloc_obj(*fsm, GFP_NOFS);
fs/ext4/fsmap.c
352
if (!fsm)
fs/ext4/fsmap.c
354
fsm->fmr_device = 0;
fs/ext4/fsmap.c
355
fsm->fmr_flags = 0;
fs/ext4/fsmap.c
356
fsm->fmr_physical = fsb;
fs/ext4/fsmap.c
357
fsm->fmr_owner = owner;
fs/ext4/fsmap.c
358
fsm->fmr_length = len;
fs/ext4/fsmap.c
359
list_add_tail(&fsm->fmr_list, meta_list);
include/linux/usb/otg-fsm.h
191
void (*chrg_vbus)(struct otg_fsm *fsm, int on);
include/linux/usb/otg-fsm.h
192
void (*drv_vbus)(struct otg_fsm *fsm, int on);
include/linux/usb/otg-fsm.h
193
void (*loc_conn)(struct otg_fsm *fsm, int on);
include/linux/usb/otg-fsm.h
194
void (*loc_sof)(struct otg_fsm *fsm, int on);
include/linux/usb/otg-fsm.h
195
void (*start_pulse)(struct otg_fsm *fsm);
include/linux/usb/otg-fsm.h
196
void (*start_adp_prb)(struct otg_fsm *fsm);
include/linux/usb/otg-fsm.h
197
void (*start_adp_sns)(struct otg_fsm *fsm);
include/linux/usb/otg-fsm.h
198
void (*add_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer);
include/linux/usb/otg-fsm.h
199
void (*del_timer)(struct otg_fsm *fsm, enum otg_fsm_timer timer);
include/linux/usb/otg-fsm.h
200
int (*start_host)(struct otg_fsm *fsm, int on);
include/linux/usb/otg-fsm.h
201
int (*start_gadget)(struct otg_fsm *fsm, int on);
include/linux/usb/otg-fsm.h
205
static inline int otg_chrg_vbus(struct otg_fsm *fsm, int on)
include/linux/usb/otg-fsm.h
207
if (!fsm->ops->chrg_vbus)
include/linux/usb/otg-fsm.h
209
fsm->ops->chrg_vbus(fsm, on);
include/linux/usb/otg-fsm.h
213
static inline int otg_drv_vbus(struct otg_fsm *fsm, int on)
include/linux/usb/otg-fsm.h
215
if (!fsm->ops->drv_vbus)
include/linux/usb/otg-fsm.h
217
if (fsm->drv_vbus != on) {
include/linux/usb/otg-fsm.h
218
fsm->drv_vbus = on;
include/linux/usb/otg-fsm.h
219
fsm->ops->drv_vbus(fsm, on);
include/linux/usb/otg-fsm.h
224
static inline int otg_loc_conn(struct otg_fsm *fsm, int on)
include/linux/usb/otg-fsm.h
226
if (!fsm->ops->loc_conn)
include/linux/usb/otg-fsm.h
228
if (fsm->loc_conn != on) {
include/linux/usb/otg-fsm.h
229
fsm->loc_conn = on;
include/linux/usb/otg-fsm.h
230
fsm->ops->loc_conn(fsm, on);
include/linux/usb/otg-fsm.h
235
static inline int otg_loc_sof(struct otg_fsm *fsm, int on)
include/linux/usb/otg-fsm.h
237
if (!fsm->ops->loc_sof)
include/linux/usb/otg-fsm.h
239
if (fsm->loc_sof != on) {
include/linux/usb/otg-fsm.h
240
fsm->loc_sof = on;
include/linux/usb/otg-fsm.h
241
fsm->ops->loc_sof(fsm, on);
include/linux/usb/otg-fsm.h
246
static inline int otg_start_pulse(struct otg_fsm *fsm)
include/linux/usb/otg-fsm.h
248
if (!fsm->ops->start_pulse)
include/linux/usb/otg-fsm.h
250
if (!fsm->data_pulse) {
include/linux/usb/otg-fsm.h
251
fsm->data_pulse = 1;
include/linux/usb/otg-fsm.h
252
fsm->ops->start_pulse(fsm);
include/linux/usb/otg-fsm.h
257
static inline int otg_start_adp_prb(struct otg_fsm *fsm)
include/linux/usb/otg-fsm.h
259
if (!fsm->ops->start_adp_prb)
include/linux/usb/otg-fsm.h
261
if (!fsm->adp_prb) {
include/linux/usb/otg-fsm.h
262
fsm->adp_sns = 0;
include/linux/usb/otg-fsm.h
263
fsm->adp_prb = 1;
include/linux/usb/otg-fsm.h
264
fsm->ops->start_adp_prb(fsm);
include/linux/usb/otg-fsm.h
269
static inline int otg_start_adp_sns(struct otg_fsm *fsm)
include/linux/usb/otg-fsm.h
271
if (!fsm->ops->start_adp_sns)
include/linux/usb/otg-fsm.h
273
if (!fsm->adp_sns) {
include/linux/usb/otg-fsm.h
274
fsm->adp_sns = 1;
include/linux/usb/otg-fsm.h
275
fsm->ops->start_adp_sns(fsm);
include/linux/usb/otg-fsm.h
280
static inline int otg_add_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer)
include/linux/usb/otg-fsm.h
282
if (!fsm->ops->add_timer)
include/linux/usb/otg-fsm.h
284
fsm->ops->add_timer(fsm, timer);
include/linux/usb/otg-fsm.h
288
static inline int otg_del_timer(struct otg_fsm *fsm, enum otg_fsm_timer timer)
include/linux/usb/otg-fsm.h
290
if (!fsm->ops->del_timer)
include/linux/usb/otg-fsm.h
292
fsm->ops->del_timer(fsm, timer);
include/linux/usb/otg-fsm.h
296
static inline int otg_start_host(struct otg_fsm *fsm, int on)
include/linux/usb/otg-fsm.h
298
if (!fsm->ops->start_host)
include/linux/usb/otg-fsm.h
300
return fsm->ops->start_host(fsm, on);
include/linux/usb/otg-fsm.h
303
static inline int otg_start_gadget(struct otg_fsm *fsm, int on)
include/linux/usb/otg-fsm.h
305
if (!fsm->ops->start_gadget)
include/linux/usb/otg-fsm.h
307
return fsm->ops->start_gadget(fsm, on);
include/linux/usb/otg-fsm.h
310
int otg_statemachine(struct otg_fsm *fsm);
lib/ts_fsm.c
136
struct ts_fsm *fsm = ts_config_priv(conf);
lib/ts_fsm.c
160
strict = fsm->tokens[0].recur != TS_FSM_HEAD_IGNORE;
lib/ts_fsm.c
165
for (tok_idx = 0; tok_idx < fsm->ntokens; tok_idx++) {
lib/ts_fsm.c
166
cur = &fsm->tokens[tok_idx];
lib/ts_fsm.c
168
if (likely(tok_idx < (fsm->ntokens - 1)))
lib/ts_fsm.c
169
next = &fsm->tokens[tok_idx + 1];
lib/ts_fsm.c
260
struct ts_fsm *fsm;
lib/ts_fsm.c
263
size_t priv_size = sizeof(*fsm) + len;
lib/ts_fsm.c
287
fsm = ts_config_priv(conf);
lib/ts_fsm.c
288
fsm->ntokens = ntokens;
lib/ts_fsm.c
289
memcpy(fsm->tokens, pattern, len);
lib/ts_fsm.c
291
for (i = 0; i < fsm->ntokens; i++) {
lib/ts_fsm.c
292
struct ts_fsm_token *t = &fsm->tokens[i];
lib/ts_fsm.c
304
struct ts_fsm *fsm = ts_config_priv(conf);
lib/ts_fsm.c
305
return fsm->tokens;
lib/ts_fsm.c
310
struct ts_fsm *fsm = ts_config_priv(conf);
lib/ts_fsm.c
311
return fsm->ntokens * sizeof(struct ts_fsm_token);