/drivers/net/ethernet/freescale/fs_enet/ |
D | mii-bitbang.c | 60 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 …]
|
D | Makefile | 13 obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
|
/drivers/net/mdio/ |
D | mdio-gpio.c | 36 struct mdio_gpio_info *bitbang) in mdio_gpio_get_data() argument 38 bitbang->mdc = devm_gpiod_get_index(dev, NULL, MDIO_GPIO_MDC, in mdio_gpio_get_data() 40 if (IS_ERR(bitbang->mdc)) in mdio_gpio_get_data() 41 return PTR_ERR(bitbang->mdc); in mdio_gpio_get_data() 43 bitbang->mdio = devm_gpiod_get_index(dev, NULL, MDIO_GPIO_MDIO, in mdio_gpio_get_data() 45 if (IS_ERR(bitbang->mdio)) in mdio_gpio_get_data() 46 return PTR_ERR(bitbang->mdio); in mdio_gpio_get_data() 48 bitbang->mdo = devm_gpiod_get_index_optional(dev, NULL, MDIO_GPIO_MDO, in mdio_gpio_get_data() 50 return PTR_ERR_OR_ZERO(bitbang->mdo); in mdio_gpio_get_data() 55 struct mdio_gpio_info *bitbang = in mdio_dir() local [all …]
|
D | Makefile | 9 obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
|
/drivers/spi/ |
D | spi-bitbang.c | 183 struct spi_bitbang *bitbang; in spi_bitbang_setup() local 187 bitbang = spi_master_get_devdata(spi->master); in spi_bitbang_setup() 198 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)]; in spi_bitbang_setup() 204 if (bitbang->setup_transfer) { in spi_bitbang_setup() 205 retval = bitbang->setup_transfer(spi, NULL); in spi_bitbang_setup() 234 struct spi_bitbang *bitbang; in spi_bitbang_bufs() local 236 bitbang = spi_master_get_devdata(spi->master); in spi_bitbang_bufs() 237 if (bitbang->set_line_direction) { in spi_bitbang_bufs() 240 err = bitbang->set_line_direction(spi, !!(t->tx_buf)); in spi_bitbang_bufs() 270 struct spi_bitbang *bitbang; in spi_bitbang_prepare_hardware() local [all …]
|
D | spi-sh-sci.c | 25 struct spi_bitbang bitbang; member 139 sp->bitbang.master = master; in sh_sci_spi_probe() 140 sp->bitbang.master->bus_num = sp->info->bus_num; in sh_sci_spi_probe() 141 sp->bitbang.master->num_chipselect = sp->info->num_chipselect; in sh_sci_spi_probe() 142 sp->bitbang.chipselect = sh_sci_spi_chipselect; in sh_sci_spi_probe() 144 sp->bitbang.txrx_word[SPI_MODE_0] = sh_sci_spi_txrx_mode0; in sh_sci_spi_probe() 145 sp->bitbang.txrx_word[SPI_MODE_1] = sh_sci_spi_txrx_mode1; in sh_sci_spi_probe() 146 sp->bitbang.txrx_word[SPI_MODE_2] = sh_sci_spi_txrx_mode2; in sh_sci_spi_probe() 147 sp->bitbang.txrx_word[SPI_MODE_3] = sh_sci_spi_txrx_mode3; in sh_sci_spi_probe() 162 ret = spi_bitbang_start(&sp->bitbang); in sh_sci_spi_probe() [all …]
|
D | spi-lm70llp.c | 71 struct spi_bitbang bitbang; member 215 pp->bitbang.master = master; in spi_lm70llp_attach() 216 pp->bitbang.chipselect = lm70_chipselect; in spi_lm70llp_attach() 217 pp->bitbang.txrx_word[SPI_MODE_0] = lm70_txrx; in spi_lm70llp_attach() 218 pp->bitbang.flags = SPI_3WIRE; in spi_lm70llp_attach() 242 status = spi_bitbang_start(&pp->bitbang); in spi_lm70llp_attach() 267 pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info); in spi_lm70llp_attach() 282 spi_bitbang_stop(&pp->bitbang); in spi_lm70llp_attach() 304 spi_bitbang_stop(&pp->bitbang); in spi_lm70llp_detach() 312 spi_master_put(pp->bitbang.master); in spi_lm70llp_detach()
|
D | spi-butterfly.c | 51 struct spi_bitbang bitbang; member 208 pp->bitbang.master = master; in butterfly_attach() 209 pp->bitbang.chipselect = butterfly_chipselect; in butterfly_attach() 210 pp->bitbang.txrx_word[SPI_MODE_0] = butterfly_txrx_word_mode0; in butterfly_attach() 252 status = spi_bitbang_start(&pp->bitbang); in butterfly_attach() 266 pp->dataflash = spi_new_device(pp->bitbang.master, &pp->info[0]); in butterfly_attach() 283 spi_master_put(pp->bitbang.master); in butterfly_attach() 302 spi_bitbang_stop(&pp->bitbang); in butterfly_detach() 311 spi_master_put(pp->bitbang.master); in butterfly_detach()
|
D | spi-ath79.c | 41 struct spi_bitbang bitbang; member 165 sp->bitbang.master = master; in ath79_spi_probe() 166 sp->bitbang.chipselect = ath79_spi_chipselect; in ath79_spi_probe() 167 sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0; in ath79_spi_probe() 168 sp->bitbang.flags = SPI_CS_HIGH; in ath79_spi_probe() 197 ret = spi_bitbang_start(&sp->bitbang); in ath79_spi_probe() 208 spi_master_put(sp->bitbang.master); in ath79_spi_probe() 217 spi_bitbang_stop(&sp->bitbang); in ath79_spi_remove() 220 spi_master_put(sp->bitbang.master); in ath79_spi_remove()
|
D | spi-xtensa-xtfpga.c | 25 struct spi_bitbang bitbang; member 96 xspi->bitbang.master = master; in xtfpga_spi_probe() 97 xspi->bitbang.chipselect = xtfpga_spi_chipselect; in xtfpga_spi_probe() 98 xspi->bitbang.txrx_word[SPI_MODE_0] = xtfpga_spi_txrx_word; in xtfpga_spi_probe() 113 ret = spi_bitbang_start(&xspi->bitbang); in xtfpga_spi_probe() 131 spi_bitbang_stop(&xspi->bitbang); in xtfpga_spi_remove()
|
D | spi-s3c24xx.c | 52 struct spi_bitbang bitbang; member 196 mutex_lock(&hw->bitbang.lock); in s3c24xx_spi_setup() 197 if (!hw->bitbang.busy) { in s3c24xx_spi_setup() 198 hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE); in s3c24xx_spi_setup() 201 mutex_unlock(&hw->bitbang.lock); in s3c24xx_spi_setup() 508 hw->bitbang.master = hw->master; in s3c24xx_spi_probe() 509 hw->bitbang.setup_transfer = s3c24xx_spi_setupxfer; in s3c24xx_spi_probe() 510 hw->bitbang.chipselect = s3c24xx_spi_chipsel; in s3c24xx_spi_probe() 511 hw->bitbang.txrx_bufs = s3c24xx_spi_txrx; in s3c24xx_spi_probe() 515 dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang); in s3c24xx_spi_probe() [all …]
|
D | spi-oc-tiny.c | 38 struct spi_bitbang bitbang; member 197 hw->bitbang.master->dev.of_node = pdev->dev.of_node; in tiny_spi_of_probe() 232 hw->bitbang.master = master; in tiny_spi_probe() 233 hw->bitbang.setup_transfer = tiny_spi_setup_transfer; in tiny_spi_probe() 234 hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs; in tiny_spi_probe() 262 err = spi_bitbang_start(&hw->bitbang); in tiny_spi_probe() 277 struct spi_master *master = hw->bitbang.master; in tiny_spi_remove() 279 spi_bitbang_stop(&hw->bitbang); in tiny_spi_remove()
|
D | spi-omap-uwire.c | 92 struct spi_bitbang bitbang; member 454 spi_master_put(uwire->bitbang.master); in uwire_off() 504 uwire->bitbang.master = master; in uwire_probe() 505 uwire->bitbang.chipselect = uwire_chipselect; in uwire_probe() 506 uwire->bitbang.setup_transfer = uwire_setup_transfer; in uwire_probe() 507 uwire->bitbang.txrx_bufs = uwire_txrx; in uwire_probe() 509 status = spi_bitbang_start(&uwire->bitbang); in uwire_probe() 522 spi_bitbang_stop(&uwire->bitbang); in uwire_remove()
|
D | spi-ppc4xx.c | 112 struct spi_bitbang bitbang; member 201 mutex_lock(&hw->bitbang.lock); in spi_ppc4xx_setupxfer() 202 if (!hw->bitbang.busy) { in spi_ppc4xx_setupxfer() 203 hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE); in spi_ppc4xx_setupxfer() 206 mutex_unlock(&hw->bitbang.lock); in spi_ppc4xx_setupxfer() 359 bbp = &hw->bitbang; in spi_ppc4xx_of_probe() 467 spi_bitbang_stop(&hw->bitbang); in spi_ppc4xx_of_remove()
|
D | spi-xilinx.c | 81 struct spi_bitbang bitbang; member 434 xspi->bitbang.master = master; in xilinx_spi_probe() 435 xspi->bitbang.chipselect = xilinx_spi_chipselect; in xilinx_spi_probe() 436 xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; in xilinx_spi_probe() 437 xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; in xilinx_spi_probe() 488 ret = spi_bitbang_start(&xspi->bitbang); in xilinx_spi_probe() 516 spi_bitbang_stop(&xspi->bitbang); in xilinx_spi_remove() 523 spi_master_put(xspi->bitbang.master); in xilinx_spi_remove()
|
D | spi-efm32.c | 70 struct spi_bitbang bitbang; member 86 #define ddata_to_dev(ddata) (&(ddata->bitbang.master->dev)) 331 ddata->bitbang.master = master; in efm32_spi_probe() 332 ddata->bitbang.setup_transfer = efm32_spi_setup_transfer; in efm32_spi_probe() 333 ddata->bitbang.txrx_bufs = efm32_spi_txrx_bufs; in efm32_spi_probe() 403 ret = spi_bitbang_start(&ddata->bitbang); in efm32_spi_probe() 424 spi_bitbang_stop(&ddata->bitbang); in efm32_spi_remove()
|
D | spi-davinci.c | 106 struct spi_bitbang bitbang; member 463 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() 931 dspi->bitbang.master = master; in davinci_spi_probe() 952 dspi->bitbang.chipselect = davinci_spi_chipselect; in davinci_spi_probe() 953 dspi->bitbang.setup_transfer = davinci_spi_setup_transfer; in davinci_spi_probe() 957 dspi->bitbang.flags = SPI_NO_CS | SPI_LSB_FIRST | SPI_LOOP | SPI_CS_WORD; in davinci_spi_probe() 959 dspi->bitbang.flags |= SPI_READY; in davinci_spi_probe() 961 dspi->bitbang.txrx_bufs = davinci_spi_bufs; in davinci_spi_probe() 996 ret = spi_bitbang_start(&dspi->bitbang); in davinci_spi_probe() [all …]
|
D | spi-imx.c | 84 struct spi_bitbang bitbang; member 1258 if (spi_imx_can_dma(spi_imx->bitbang.master, spi, t)) in spi_imx_setupxfer() 1276 struct spi_master *master = spi_imx->bitbang.master; in spi_imx_sdma_exit() 1322 spi_imx->bitbang.master->flags = SPI_MASTER_MUST_RX | in spi_imx_sdma_init() 1365 struct spi_master *master = spi_imx->bitbang.master; in spi_imx_dma_transfer() 1642 spi_imx->bitbang.master = master; in spi_imx_probe() 1659 spi_imx->bitbang.setup_transfer = spi_imx_setupxfer; in spi_imx_probe() 1660 spi_imx->bitbang.txrx_bufs = spi_imx_transfer; in spi_imx_probe() 1661 spi_imx->bitbang.master->setup = spi_imx_setup; in spi_imx_probe() 1662 spi_imx->bitbang.master->cleanup = spi_imx_cleanup; in spi_imx_probe() [all …]
|
D | spi-gpio.c | 34 struct spi_bitbang bitbang; member 82 spi_gpio = container_of(bang, struct spi_gpio, bitbang); in spi_to_spi_gpio() 406 bb = &spi_gpio->bitbang; in spi_gpio_probe() 430 status = spi_bitbang_init(&spi_gpio->bitbang); in spi_gpio_probe()
|
D | spi-au1550.c | 41 struct spi_bitbang bitbang; member 802 hw->bitbang.master = hw->master; in au1550_spi_probe() 803 hw->bitbang.setup_transfer = au1550_spi_setupxfer; in au1550_spi_probe() 804 hw->bitbang.chipselect = au1550_spi_chipsel; in au1550_spi_probe() 805 hw->bitbang.txrx_bufs = au1550_spi_txrx_bufs; in au1550_spi_probe() 882 err = spi_bitbang_start(&hw->bitbang); in au1550_spi_probe() 931 spi_bitbang_stop(&hw->bitbang); in au1550_spi_remove()
|
D | spi-sirf.c | 251 struct spi_bitbang bitbang; member 1114 sspi->bitbang.master = master; in spi_sirfsoc_probe() 1115 sspi->bitbang.chipselect = spi_sirfsoc_chipselect; in spi_sirfsoc_probe() 1116 sspi->bitbang.setup_transfer = spi_sirfsoc_setup_transfer; in spi_sirfsoc_probe() 1117 sspi->bitbang.txrx_bufs = spi_sirfsoc_transfer; in spi_sirfsoc_probe() 1118 sspi->bitbang.master->setup = spi_sirfsoc_setup; in spi_sirfsoc_probe() 1119 sspi->bitbang.master->cleanup = spi_sirfsoc_cleanup; in spi_sirfsoc_probe() 1126 sspi->bitbang.master->dev.of_node = pdev->dev.of_node; in spi_sirfsoc_probe() 1155 ret = spi_bitbang_start(&sspi->bitbang); in spi_sirfsoc_probe() 1181 spi_bitbang_stop(&sspi->bitbang); in spi_sirfsoc_remove()
|
D | Makefile | 31 obj-$(CONFIG_SPI_BITBANG) += spi-bitbang.o
|
D | Kconfig | 178 With a few GPIO pins, your system can bitbang the SPI protocol.
|
/drivers/net/ethernet/renesas/ |
D | sh_eth.c | 1178 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_mdio_ctrl() local 1181 if (bitbang->set_gate) in sh_mdio_ctrl() 1182 bitbang->set_gate(bitbang->addr); in sh_mdio_ctrl() 1184 pir = ioread32(bitbang->addr); in sh_mdio_ctrl() 1189 iowrite32(pir, bitbang->addr); in sh_mdio_ctrl() 1207 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_get_mdio() local 1209 if (bitbang->set_gate) in sh_get_mdio() 1210 bitbang->set_gate(bitbang->addr); in sh_get_mdio() 1212 return (ioread32(bitbang->addr) & PIR_MDI) != 0; in sh_get_mdio() 3050 struct bb_info *bitbang; in sh_mdio_init() local [all …]
|