/drivers/spi/ |
D | spi_bitbang.c | 185 struct spi_bitbang *bitbang; in spi_bitbang_setup() local 189 bitbang = spi_master_get_devdata(spi->master); in spi_bitbang_setup() 194 if ((spi->mode & ~(SPI_CPOL|SPI_CPHA|bitbang->flags)) != 0) in spi_bitbang_setup() 208 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)]; in spi_bitbang_setup() 212 retval = bitbang->setup_transfer(spi, NULL); in spi_bitbang_setup() 226 spin_lock_irqsave(&bitbang->lock, flags); in spi_bitbang_setup() 227 if (!bitbang->busy) { in spi_bitbang_setup() 228 bitbang->chipselect(spi, BITBANG_CS_INACTIVE); in spi_bitbang_setup() 231 spin_unlock_irqrestore(&bitbang->lock, flags); in spi_bitbang_setup() 269 struct spi_bitbang *bitbang = in bitbang_work() local [all …]
|
D | spi_s3c24xx_gpio.c | 29 struct spi_bitbang bitbang; member 119 sp->bitbang.master = spi_master_get(master); in s3c2410_spigpio_probe() 120 sp->bitbang.master->bus_num = info->bus_num; in s3c2410_spigpio_probe() 121 sp->bitbang.master->num_chipselect = info->num_chipselect; in s3c2410_spigpio_probe() 122 sp->bitbang.chipselect = s3c2410_spigpio_chipselect; in s3c2410_spigpio_probe() 124 sp->bitbang.txrx_word[SPI_MODE_0] = s3c2410_spigpio_txrx_mode0; in s3c2410_spigpio_probe() 125 sp->bitbang.txrx_word[SPI_MODE_1] = s3c2410_spigpio_txrx_mode1; in s3c2410_spigpio_probe() 126 sp->bitbang.txrx_word[SPI_MODE_2] = s3c2410_spigpio_txrx_mode2; in s3c2410_spigpio_probe() 127 sp->bitbang.txrx_word[SPI_MODE_3] = s3c2410_spigpio_txrx_mode3; in s3c2410_spigpio_probe() 142 ret = spi_bitbang_start(&sp->bitbang); in s3c2410_spigpio_probe() [all …]
|
D | spi_sh_sci.c | 30 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 …]
|
D | spi_gpio.c | 45 struct spi_bitbang bitbang; member 98 spi_gpio = container_of(bang, struct spi_gpio, bitbang); in spi_to_pdata() 293 spi_gpio->bitbang.master = spi_master_get(master); in spi_gpio_probe() 294 spi_gpio->bitbang.chipselect = spi_gpio_chipselect; in spi_gpio_probe() 295 spi_gpio->bitbang.txrx_word[SPI_MODE_0] = spi_gpio_txrx_word_mode0; in spi_gpio_probe() 296 spi_gpio->bitbang.txrx_word[SPI_MODE_1] = spi_gpio_txrx_word_mode1; in spi_gpio_probe() 297 spi_gpio->bitbang.txrx_word[SPI_MODE_2] = spi_gpio_txrx_word_mode2; in spi_gpio_probe() 298 spi_gpio->bitbang.txrx_word[SPI_MODE_3] = spi_gpio_txrx_word_mode3; in spi_gpio_probe() 299 spi_gpio->bitbang.setup_transfer = spi_bitbang_setup_transfer; in spi_gpio_probe() 300 spi_gpio->bitbang.flags = SPI_CS_HIGH; in spi_gpio_probe() [all …]
|
D | spi_lm70llp.c | 84 struct spi_bitbang bitbang; member 229 pp->bitbang.master = spi_master_get(master); in spi_lm70llp_attach() 230 pp->bitbang.chipselect = lm70_chipselect; in spi_lm70llp_attach() 231 pp->bitbang.txrx_word[SPI_MODE_0] = lm70_txrx; in spi_lm70llp_attach() 232 pp->bitbang.flags = SPI_3WIRE; in spi_lm70llp_attach() 254 status = spi_bitbang_start(&pp->bitbang); in spi_lm70llp_attach() 280 pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info); in spi_lm70llp_attach() 295 spi_bitbang_stop(&pp->bitbang); in spi_lm70llp_attach() 317 spi_bitbang_stop(&pp->bitbang); in spi_lm70llp_detach() 325 (void) spi_master_put(pp->bitbang.master); in spi_lm70llp_detach()
|
D | xilinx_spi.c | 79 struct spi_bitbang bitbang; member 166 struct spi_bitbang *bitbang; in xilinx_spi_setup() local 171 bitbang = &xspi->bitbang; in xilinx_spi_setup() 337 xspi->bitbang.master = spi_master_get(master); in xilinx_spi_of_probe() 338 xspi->bitbang.chipselect = xilinx_spi_chipselect; in xilinx_spi_of_probe() 339 xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; in xilinx_spi_of_probe() 340 xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; in xilinx_spi_of_probe() 341 xspi->bitbang.master->setup = xilinx_spi_setup; in xilinx_spi_of_probe() 382 rc = spi_bitbang_start(&xspi->bitbang); in xilinx_spi_of_probe() 413 spi_bitbang_stop(&xspi->bitbang); in xilinx_spi_remove() [all …]
|
D | spi_butterfly.c | 68 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()
|
D | spi_s3c24xx.c | 36 struct spi_bitbang bitbang; member 139 spin_lock(&hw->bitbang.lock); in s3c24xx_spi_setupxfer() 140 if (!hw->bitbang.busy) { in s3c24xx_spi_setupxfer() 141 hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE); in s3c24xx_spi_setupxfer() 144 spin_unlock(&hw->bitbang.lock); in s3c24xx_spi_setupxfer() 298 hw->bitbang.master = hw->master; in s3c24xx_spi_probe() 299 hw->bitbang.setup_transfer = s3c24xx_spi_setupxfer; in s3c24xx_spi_probe() 300 hw->bitbang.chipselect = s3c24xx_spi_chipsel; in s3c24xx_spi_probe() 301 hw->bitbang.txrx_bufs = s3c24xx_spi_txrx; in s3c24xx_spi_probe() 302 hw->bitbang.master->setup = s3c24xx_spi_setup; in s3c24xx_spi_probe() [all …]
|
D | omap_uwire.c | 95 struct spi_bitbang bitbang; member 485 spi_master_put(uwire->bitbang.master); in uwire_off() 529 uwire->bitbang.master = master; in uwire_probe() 530 uwire->bitbang.chipselect = uwire_chipselect; in uwire_probe() 531 uwire->bitbang.setup_transfer = uwire_setup_transfer; in uwire_probe() 532 uwire->bitbang.txrx_bufs = uwire_txrx; in uwire_probe() 534 status = spi_bitbang_start(&uwire->bitbang); in uwire_probe() 549 status = spi_bitbang_stop(&uwire->bitbang); in uwire_remove()
|
D | au1550_spi.c | 52 struct spi_bitbang bitbang; member 846 hw->bitbang.master = hw->master; in au1550_spi_probe() 847 hw->bitbang.setup_transfer = au1550_spi_setupxfer; in au1550_spi_probe() 848 hw->bitbang.chipselect = au1550_spi_chipsel; in au1550_spi_probe() 849 hw->bitbang.master->setup = au1550_spi_setup; in au1550_spi_probe() 850 hw->bitbang.txrx_bufs = au1550_spi_txrx_bufs; in au1550_spi_probe() 926 err = spi_bitbang_start(&hw->bitbang); in au1550_spi_probe() 976 spi_bitbang_stop(&hw->bitbang); in au1550_spi_remove()
|
D | Kconfig | 83 With a few GPIO pins, your system can bitbang the SPI protocol.
|
/drivers/net/fs_enet/ |
D | mii-bitbang.c | 59 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio_dir() local 62 bb_set(bitbang->dir, bitbang->mdio_msk); in mdio_dir() 64 bb_clr(bitbang->dir, bitbang->mdio_msk); in mdio_dir() 67 in_be32(bitbang->dir); in mdio_dir() 72 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio_read() local 73 return bb_read(bitbang->dat, bitbang->mdio_msk); in mdio_read() 78 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in mdio() local 81 bb_set(bitbang->dat, bitbang->mdio_msk); in mdio() 83 bb_clr(bitbang->dat, bitbang->mdio_msk); in mdio() 86 in_be32(bitbang->dat); in mdio() [all …]
|
D | Makefile | 12 obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
|
/drivers/net/phy/ |
D | mdio-gpio.c | 43 struct mdio_gpio_info *bitbang = in mdio_dir() local 47 gpio_direction_output(bitbang->mdio, 1); in mdio_dir() 49 gpio_direction_input(bitbang->mdio); in mdio_dir() 54 struct mdio_gpio_info *bitbang = in mdio_get() local 57 return gpio_get_value(bitbang->mdio); in mdio_get() 62 struct mdio_gpio_info *bitbang = in mdio_set() local 65 gpio_set_value(bitbang->mdio, what); in mdio_set() 70 struct mdio_gpio_info *bitbang = in mdc_set() local 73 gpio_set_value(bitbang->mdc, what); in mdc_set() 89 struct mdio_gpio_info *bitbang; in mdio_gpio_bus_init() local [all …]
|
D | Makefile | 18 obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
|
/drivers/net/ |
D | sh_eth.c | 123 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_mmd_ctrl() local 125 bb_set(bitbang->addr, bitbang->mmd_msk); in sh_mmd_ctrl() 127 bb_clr(bitbang->addr, bitbang->mmd_msk); in sh_mmd_ctrl() 133 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_set_mdio() local 136 bb_set(bitbang->addr, bitbang->mdo_msk); in sh_set_mdio() 138 bb_clr(bitbang->addr, bitbang->mdo_msk); in sh_set_mdio() 144 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_get_mdio() local 145 return bb_read(bitbang->addr, bitbang->mdi_msk); in sh_get_mdio() 151 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_mdc_ctrl() local 154 bb_set(bitbang->addr, bitbang->mdc_msk); in sh_mdc_ctrl() [all …]
|