Home
last modified time | relevance | path

Searched refs:bitbang (Results 1 – 25 of 25) sorted by relevance

/drivers/net/ethernet/freescale/fs_enet/
Dmii-bitbang.c60 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio_dir() local
63 bb_set(bitbang->dir, bitbang->mdio_msk); in mdio_dir()
65 bb_clr(bitbang->dir, bitbang->mdio_msk); in mdio_dir()
68 in_be32(bitbang->dir); in mdio_dir()
73 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio_read() local
74 return bb_read(bitbang->dat, bitbang->mdio_msk); in mdio_read()
79 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio() local
82 bb_set(bitbang->dat, bitbang->mdio_msk); in mdio()
84 bb_clr(bitbang->dat, bitbang->mdio_msk); in mdio()
87 in_be32(bitbang->dat); in mdio()
[all …]
DMakefile12 obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
/drivers/spi/
Dspi-bitbang.c187 struct spi_bitbang *bitbang; in spi_bitbang_setup() local
191 bitbang = spi_master_get_devdata(spi->master); in spi_bitbang_setup()
201 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)]; in spi_bitbang_setup()
205 retval = bitbang->setup_transfer(spi, NULL); in spi_bitbang_setup()
217 spin_lock_irqsave(&bitbang->lock, flags); in spi_bitbang_setup()
218 if (!bitbang->busy) { in spi_bitbang_setup()
219 bitbang->chipselect(spi, BITBANG_CS_INACTIVE); in spi_bitbang_setup()
222 spin_unlock_irqrestore(&bitbang->lock, flags); in spi_bitbang_setup()
260 struct spi_bitbang *bitbang = in bitbang_work() local
265 spin_lock_irqsave(&bitbang->lock, flags); in bitbang_work()
[all …]
Dspi-sh-sci.c31 struct spi_bitbang bitbang; member
136 sp->bitbang.master = spi_master_get(master); in sh_sci_spi_probe()
137 sp->bitbang.master->bus_num = sp->info->bus_num; in sh_sci_spi_probe()
138 sp->bitbang.master->num_chipselect = sp->info->num_chipselect; in sh_sci_spi_probe()
139 sp->bitbang.chipselect = sh_sci_spi_chipselect; in sh_sci_spi_probe()
141 sp->bitbang.txrx_word[SPI_MODE_0] = sh_sci_spi_txrx_mode0; in sh_sci_spi_probe()
142 sp->bitbang.txrx_word[SPI_MODE_1] = sh_sci_spi_txrx_mode1; in sh_sci_spi_probe()
143 sp->bitbang.txrx_word[SPI_MODE_2] = sh_sci_spi_txrx_mode2; in sh_sci_spi_probe()
144 sp->bitbang.txrx_word[SPI_MODE_3] = sh_sci_spi_txrx_mode3; in sh_sci_spi_probe()
159 ret = spi_bitbang_start(&sp->bitbang); in sh_sci_spi_probe()
[all …]
Dspi-gpio.c48 struct spi_bitbang bitbang; member
102 spi_gpio = container_of(bang, struct spi_gpio, bitbang); in spi_to_spi_gpio()
472 spi_gpio->bitbang.master = spi_master_get(master); in spi_gpio_probe()
473 spi_gpio->bitbang.chipselect = spi_gpio_chipselect; in spi_gpio_probe()
476 spi_gpio->bitbang.txrx_word[SPI_MODE_0] = spi_gpio_txrx_word_mode0; in spi_gpio_probe()
477 spi_gpio->bitbang.txrx_word[SPI_MODE_1] = spi_gpio_txrx_word_mode1; in spi_gpio_probe()
478 spi_gpio->bitbang.txrx_word[SPI_MODE_2] = spi_gpio_txrx_word_mode2; in spi_gpio_probe()
479 spi_gpio->bitbang.txrx_word[SPI_MODE_3] = spi_gpio_txrx_word_mode3; in spi_gpio_probe()
481 spi_gpio->bitbang.txrx_word[SPI_MODE_0] = spi_gpio_spec_txrx_word_mode0; in spi_gpio_probe()
482 spi_gpio->bitbang.txrx_word[SPI_MODE_1] = spi_gpio_spec_txrx_word_mode1; in spi_gpio_probe()
[all …]
Dspi-lm70llp.c84 struct spi_bitbang bitbang; member
225 pp->bitbang.master = spi_master_get(master); in spi_lm70llp_attach()
226 pp->bitbang.chipselect = lm70_chipselect; in spi_lm70llp_attach()
227 pp->bitbang.txrx_word[SPI_MODE_0] = lm70_txrx; in spi_lm70llp_attach()
228 pp->bitbang.flags = SPI_3WIRE; in spi_lm70llp_attach()
250 status = spi_bitbang_start(&pp->bitbang); in spi_lm70llp_attach()
276 pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info); in spi_lm70llp_attach()
291 spi_bitbang_stop(&pp->bitbang); in spi_lm70llp_attach()
313 spi_bitbang_stop(&pp->bitbang); in spi_lm70llp_detach()
321 (void) spi_master_put(pp->bitbang.master); in spi_lm70llp_detach()
Dspi-butterfly.c69 struct spi_bitbang bitbang; member
228 pp->bitbang.master = spi_master_get(master); in butterfly_attach()
229 pp->bitbang.chipselect = butterfly_chipselect; in butterfly_attach()
230 pp->bitbang.txrx_word[SPI_MODE_0] = butterfly_txrx_word_mode0; in butterfly_attach()
273 status = spi_bitbang_start(&pp->bitbang); in butterfly_attach()
287 pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]); in butterfly_attach()
305 (void) spi_master_put(pp->bitbang.master); in butterfly_attach()
325 status = spi_bitbang_stop(&pp->bitbang); in butterfly_detach()
334 (void) spi_master_put(pp->bitbang.master); in butterfly_detach()
Dspi-ath79.c39 struct spi_bitbang bitbang; member
236 sp->bitbang.master = spi_master_get(master); in ath79_spi_probe()
237 sp->bitbang.chipselect = ath79_spi_chipselect; in ath79_spi_probe()
238 sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0; in ath79_spi_probe()
239 sp->bitbang.setup_transfer = spi_bitbang_setup_transfer; in ath79_spi_probe()
240 sp->bitbang.flags = SPI_CS_HIGH; in ath79_spi_probe()
275 ret = spi_bitbang_start(&sp->bitbang); in ath79_spi_probe()
291 spi_master_put(sp->bitbang.master); in ath79_spi_probe()
300 spi_bitbang_stop(&sp->bitbang); in ath79_spi_remove()
306 spi_master_put(sp->bitbang.master); in ath79_spi_remove()
Dspi-altera.c50 struct spi_bitbang bitbang; member
240 hw->bitbang.master = spi_master_get(master); in altera_spi_probe()
241 if (!hw->bitbang.master) in altera_spi_probe()
243 hw->bitbang.setup_transfer = altera_spi_setupxfer; in altera_spi_probe()
244 hw->bitbang.chipselect = altera_spi_chipsel; in altera_spi_probe()
245 hw->bitbang.txrx_bufs = altera_spi_txrx; in altera_spi_probe()
275 hw->bitbang.master->dev.of_node = pdev->dev.of_node; in altera_spi_probe()
278 err = spi_bitbang_start(&hw->bitbang); in altera_spi_probe()
296 struct spi_master *master = hw->bitbang.master; in altera_spi_remove()
298 spi_bitbang_stop(&hw->bitbang); in altera_spi_remove()
Dspi-oc-tiny.c43 struct spi_bitbang bitbang; member
269 hw->bitbang.master->dev.of_node = pdev->dev.of_node; in tiny_spi_of_probe()
309 hw->bitbang.master = spi_master_get(master); in tiny_spi_probe()
310 if (!hw->bitbang.master) in tiny_spi_probe()
312 hw->bitbang.setup_transfer = tiny_spi_setup_transfer; in tiny_spi_probe()
313 hw->bitbang.chipselect = tiny_spi_chipselect; in tiny_spi_probe()
314 hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs; in tiny_spi_probe()
355 hw->bitbang.master->num_chipselect = max(1, hw->gpio_cs_count); in tiny_spi_probe()
358 err = spi_bitbang_start(&hw->bitbang); in tiny_spi_probe()
379 struct spi_master *master = hw->bitbang.master; in tiny_spi_remove()
[all …]
Dspi-s3c24xx.c60 struct spi_bitbang bitbang; member
216 spin_lock(&hw->bitbang.lock); in s3c24xx_spi_setup()
217 if (!hw->bitbang.busy) { in s3c24xx_spi_setup()
218 hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE); in s3c24xx_spi_setup()
221 spin_unlock(&hw->bitbang.lock); in s3c24xx_spi_setup()
554 hw->bitbang.master = hw->master; in s3c24xx_spi_probe()
555 hw->bitbang.setup_transfer = s3c24xx_spi_setupxfer; in s3c24xx_spi_probe()
556 hw->bitbang.chipselect = s3c24xx_spi_chipsel; in s3c24xx_spi_probe()
557 hw->bitbang.txrx_bufs = s3c24xx_spi_txrx; in s3c24xx_spi_probe()
562 dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang); in s3c24xx_spi_probe()
[all …]
Dspi-omap-uwire.c97 struct spi_bitbang bitbang; member
476 spi_master_put(uwire->bitbang.master); in uwire_off()
526 uwire->bitbang.master = master; in uwire_probe()
527 uwire->bitbang.chipselect = uwire_chipselect; in uwire_probe()
528 uwire->bitbang.setup_transfer = uwire_setup_transfer; in uwire_probe()
529 uwire->bitbang.txrx_bufs = uwire_txrx; in uwire_probe()
531 status = spi_bitbang_start(&uwire->bitbang); in uwire_probe()
546 status = spi_bitbang_stop(&uwire->bitbang); in uwire_remove()
Dspi-xilinx.c80 struct spi_bitbang bitbang; member
372 xspi->bitbang.master = spi_master_get(master); in xilinx_spi_init()
373 xspi->bitbang.chipselect = xilinx_spi_chipselect; in xilinx_spi_init()
374 xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; in xilinx_spi_init()
375 xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; in xilinx_spi_init()
376 xspi->bitbang.master->setup = xilinx_spi_setup; in xilinx_spi_init()
424 ret = spi_bitbang_start(&xspi->bitbang); in xilinx_spi_init()
452 spi_bitbang_stop(&xspi->bitbang); in xilinx_spi_deinit()
457 spi_master_put(xspi->bitbang.master); in xilinx_spi_deinit()
Dspi-sh-msiof.c34 struct spi_bitbang bitbang; /* must be first for spi_bitbang.c */ member
708 p->bitbang.master = master; in sh_msiof_spi_probe()
709 p->bitbang.chipselect = sh_msiof_spi_chipselect; in sh_msiof_spi_probe()
710 p->bitbang.setup_transfer = sh_msiof_spi_setup_transfer; in sh_msiof_spi_probe()
711 p->bitbang.txrx_bufs = sh_msiof_spi_txrx; in sh_msiof_spi_probe()
712 p->bitbang.txrx_word[SPI_MODE_0] = sh_msiof_spi_txrx_word; in sh_msiof_spi_probe()
713 p->bitbang.txrx_word[SPI_MODE_1] = sh_msiof_spi_txrx_word; in sh_msiof_spi_probe()
714 p->bitbang.txrx_word[SPI_MODE_2] = sh_msiof_spi_txrx_word; in sh_msiof_spi_probe()
715 p->bitbang.txrx_word[SPI_MODE_3] = sh_msiof_spi_txrx_word; in sh_msiof_spi_probe()
717 ret = spi_bitbang_start(&p->bitbang); in sh_msiof_spi_probe()
[all …]
Dspi-nuc900.c51 struct spi_bitbang bitbang; member
379 hw->bitbang.master = hw->master; in nuc900_spi_probe()
380 hw->bitbang.setup_transfer = nuc900_spi_setupxfer; in nuc900_spi_probe()
381 hw->bitbang.chipselect = nuc900_spi_chipsel; in nuc900_spi_probe()
382 hw->bitbang.txrx_bufs = nuc900_spi_txrx; in nuc900_spi_probe()
383 hw->bitbang.master->setup = nuc900_spi_setup; in nuc900_spi_probe()
431 err = spi_bitbang_start(&hw->bitbang); in nuc900_spi_probe()
464 spi_bitbang_stop(&hw->bitbang); in nuc900_spi_remove()
Dspi-ppc4xx.c116 struct spi_bitbang bitbang; member
218 spin_lock(&hw->bitbang.lock); in spi_ppc4xx_setupxfer()
219 if (!hw->bitbang.busy) { in spi_ppc4xx_setupxfer()
220 hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE); in spi_ppc4xx_setupxfer()
223 spin_unlock(&hw->bitbang.lock); in spi_ppc4xx_setupxfer()
460 bbp = &hw->bitbang; in spi_ppc4xx_of_probe()
568 spi_bitbang_stop(&hw->bitbang); in spi_ppc4xx_of_remove()
Dspi-sirf.c124 struct spi_bitbang bitbang; member
553 sspi->bitbang.master = spi_master_get(master); in spi_sirfsoc_probe()
554 sspi->bitbang.chipselect = spi_sirfsoc_chipselect; in spi_sirfsoc_probe()
555 sspi->bitbang.setup_transfer = spi_sirfsoc_setup_transfer; in spi_sirfsoc_probe()
556 sspi->bitbang.txrx_bufs = spi_sirfsoc_transfer; in spi_sirfsoc_probe()
557 sspi->bitbang.master->setup = spi_sirfsoc_setup; in spi_sirfsoc_probe()
559 sspi->bitbang.master->dev.of_node = pdev->dev.of_node; in spi_sirfsoc_probe()
586 ret = spi_bitbang_start(&sspi->bitbang); in spi_sirfsoc_probe()
614 spi_bitbang_stop(&sspi->bitbang); in spi_sirfsoc_remove()
Dspi-davinci.c121 struct spi_bitbang bitbang; member
423 struct device *sdev = dspi->bitbang.master->dev.parent; in davinci_spi_check_error()
746 struct device *sdev = dspi->bitbang.master->dev.parent; in davinci_spi_request_dma()
920 dspi->bitbang.master = spi_master_get(master); in davinci_spi_probe()
921 if (dspi->bitbang.master == NULL) { in davinci_spi_probe()
938 dspi->bitbang.chipselect = davinci_spi_chipselect; in davinci_spi_probe()
939 dspi->bitbang.setup_transfer = davinci_spi_setup_transfer; in davinci_spi_probe()
943 dspi->bitbang.flags = SPI_NO_CS | SPI_LSB_FIRST | SPI_LOOP; in davinci_spi_probe()
945 dspi->bitbang.flags |= SPI_READY; in davinci_spi_probe()
954 dspi->bitbang.txrx_bufs = davinci_spi_bufs; in davinci_spi_probe()
[all …]
Dspi-imx.c84 struct spi_bitbang bitbang; member
790 spi_imx->bitbang.master = spi_master_get(master); in spi_imx_probe()
808 spi_imx->bitbang.chipselect = spi_imx_chipselect; in spi_imx_probe()
809 spi_imx->bitbang.setup_transfer = spi_imx_setupxfer; in spi_imx_probe()
810 spi_imx->bitbang.txrx_bufs = spi_imx_transfer; in spi_imx_probe()
811 spi_imx->bitbang.master->setup = spi_imx_setup; in spi_imx_probe()
812 spi_imx->bitbang.master->cleanup = spi_imx_cleanup; in spi_imx_probe()
813 spi_imx->bitbang.master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; in spi_imx_probe()
879 ret = spi_bitbang_start(&spi_imx->bitbang); in spi_imx_probe()
916 spi_bitbang_stop(&spi_imx->bitbang); in spi_imx_remove()
Dspi-au1550.c54 struct spi_bitbang bitbang; member
848 hw->bitbang.master = hw->master; in au1550_spi_probe()
849 hw->bitbang.setup_transfer = au1550_spi_setupxfer; in au1550_spi_probe()
850 hw->bitbang.chipselect = au1550_spi_chipsel; in au1550_spi_probe()
851 hw->bitbang.master->setup = au1550_spi_setup; in au1550_spi_probe()
852 hw->bitbang.txrx_bufs = au1550_spi_txrx_bufs; in au1550_spi_probe()
928 err = spi_bitbang_start(&hw->bitbang); in au1550_spi_probe()
978 spi_bitbang_stop(&hw->bitbang); in au1550_spi_remove()
DMakefile21 obj-$(CONFIG_SPI_BITBANG) += spi-bitbang.o
DKconfig118 With a few GPIO pins, your system can bitbang the SPI protocol.
/drivers/net/phy/
Dmdio-gpio.c65 struct mdio_gpio_info *bitbang = in mdio_dir() local
69 gpio_direction_output(bitbang->mdio, 1); in mdio_dir()
71 gpio_direction_input(bitbang->mdio); in mdio_dir()
76 struct mdio_gpio_info *bitbang = in mdio_get() local
79 return gpio_get_value(bitbang->mdio); in mdio_get()
84 struct mdio_gpio_info *bitbang = in mdio_set() local
87 gpio_set_value(bitbang->mdio, what); in mdio_set()
92 struct mdio_gpio_info *bitbang = in mdc_set() local
95 gpio_set_value(bitbang->mdc, what); in mdc_set()
111 struct mdio_gpio_info *bitbang; in mdio_gpio_bus_init() local
[all …]
DMakefile20 obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
/drivers/net/ethernet/renesas/
Dsh_eth.c1032 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_mmd_ctrl() local
1034 if (bitbang->set_gate) in sh_mmd_ctrl()
1035 bitbang->set_gate(bitbang->addr); in sh_mmd_ctrl()
1038 bb_set(bitbang->addr, bitbang->mmd_msk); in sh_mmd_ctrl()
1040 bb_clr(bitbang->addr, bitbang->mmd_msk); in sh_mmd_ctrl()
1046 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_set_mdio() local
1048 if (bitbang->set_gate) in sh_set_mdio()
1049 bitbang->set_gate(bitbang->addr); in sh_set_mdio()
1052 bb_set(bitbang->addr, bitbang->mdo_msk); in sh_set_mdio()
1054 bb_clr(bitbang->addr, bitbang->mdo_msk); in sh_set_mdio()
[all …]