Home
last modified time | relevance | path

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

12

/Linux-v5.4/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 …]
DMakefile13 obj-$(CONFIG_FS_ENET_MDIO_FCC) += mii-bitbang.o
/Linux-v5.4/drivers/net/phy/
Dmdio-gpio.c36 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 …]
DMakefile28 obj-$(CONFIG_MDIO_BITBANG) += mdio-bitbang.o
/Linux-v5.4/drivers/spi/
Dspi-bitbang.c183 struct spi_bitbang *bitbang; in spi_bitbang_setup() local
185 bitbang = spi_master_get_devdata(spi->master); in spi_bitbang_setup()
195 cs->txrx_word = bitbang->txrx_word[spi->mode & (SPI_CPOL|SPI_CPHA)]; in spi_bitbang_setup()
199 if (bitbang->setup_transfer) { in spi_bitbang_setup()
200 int retval = bitbang->setup_transfer(spi, NULL); in spi_bitbang_setup()
224 struct spi_bitbang *bitbang; in spi_bitbang_bufs() local
226 bitbang = spi_master_get_devdata(spi->master); in spi_bitbang_bufs()
227 if (bitbang->set_line_direction) { in spi_bitbang_bufs()
230 err = bitbang->set_line_direction(spi, !!(t->tx_buf)); in spi_bitbang_bufs()
260 struct spi_bitbang *bitbang; in spi_bitbang_prepare_hardware() local
[all …]
Dspi-sh-sci.c25 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 …]
Dspi-lm70llp.c71 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()
Dspi-ath79.c41 struct spi_bitbang bitbang; member
166 sp->bitbang.master = master; in ath79_spi_probe()
167 sp->bitbang.chipselect = ath79_spi_chipselect; in ath79_spi_probe()
168 sp->bitbang.txrx_word[SPI_MODE_0] = ath79_spi_txrx_mode0; in ath79_spi_probe()
169 sp->bitbang.flags = SPI_CS_HIGH; in ath79_spi_probe()
198 ret = spi_bitbang_start(&sp->bitbang); in ath79_spi_probe()
209 spi_master_put(sp->bitbang.master); in ath79_spi_probe()
218 spi_bitbang_stop(&sp->bitbang); in ath79_spi_remove()
221 spi_master_put(sp->bitbang.master); in ath79_spi_remove()
Dspi-butterfly.c51 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()
Dspi-xtensa-xtfpga.c25 struct spi_bitbang bitbang; member
97 xspi->bitbang.master = master; in xtfpga_spi_probe()
98 xspi->bitbang.chipselect = xtfpga_spi_chipselect; in xtfpga_spi_probe()
99 xspi->bitbang.txrx_word[SPI_MODE_0] = xtfpga_spi_txrx_word; in xtfpga_spi_probe()
121 ret = spi_bitbang_start(&xspi->bitbang); in xtfpga_spi_probe()
139 spi_bitbang_stop(&xspi->bitbang); in xtfpga_spi_remove()
Dspi-oc-tiny.c39 struct spi_bitbang bitbang; member
224 hw->bitbang.master->dev.of_node = pdev->dev.of_node; in tiny_spi_of_probe()
260 hw->bitbang.master = master; in tiny_spi_probe()
261 hw->bitbang.setup_transfer = tiny_spi_setup_transfer; in tiny_spi_probe()
262 hw->bitbang.chipselect = tiny_spi_chipselect; in tiny_spi_probe()
263 hw->bitbang.txrx_bufs = tiny_spi_txrx_bufs; in tiny_spi_probe()
301 hw->bitbang.master->num_chipselect = max(1, hw->gpio_cs_count); in tiny_spi_probe()
304 err = spi_bitbang_start(&hw->bitbang); in tiny_spi_probe()
322 struct spi_master *master = hw->bitbang.master; in tiny_spi_remove()
325 spi_bitbang_stop(&hw->bitbang); in tiny_spi_remove()
Dspi-s3c24xx.c53 struct spi_bitbang bitbang; member
197 mutex_lock(&hw->bitbang.lock); in s3c24xx_spi_setup()
198 if (!hw->bitbang.busy) { in s3c24xx_spi_setup()
199 hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE); in s3c24xx_spi_setup()
202 mutex_unlock(&hw->bitbang.lock); in s3c24xx_spi_setup()
528 hw->bitbang.master = hw->master; in s3c24xx_spi_probe()
529 hw->bitbang.setup_transfer = s3c24xx_spi_setupxfer; in s3c24xx_spi_probe()
530 hw->bitbang.chipselect = s3c24xx_spi_chipsel; in s3c24xx_spi_probe()
531 hw->bitbang.txrx_bufs = s3c24xx_spi_txrx; in s3c24xx_spi_probe()
535 dev_dbg(hw->dev, "bitbang at %p\n", &hw->bitbang); in s3c24xx_spi_probe()
[all …]
Dspi-omap-uwire.c92 struct spi_bitbang bitbang; member
447 spi_master_put(uwire->bitbang.master); in uwire_off()
497 uwire->bitbang.master = master; in uwire_probe()
498 uwire->bitbang.chipselect = uwire_chipselect; in uwire_probe()
499 uwire->bitbang.setup_transfer = uwire_setup_transfer; in uwire_probe()
500 uwire->bitbang.txrx_bufs = uwire_txrx; in uwire_probe()
502 status = spi_bitbang_start(&uwire->bitbang); in uwire_probe()
515 spi_bitbang_stop(&uwire->bitbang); in uwire_remove()
Dspi-xilinx.c81 struct spi_bitbang bitbang; member
429 xspi->bitbang.master = master; in xilinx_spi_probe()
430 xspi->bitbang.chipselect = xilinx_spi_chipselect; in xilinx_spi_probe()
431 xspi->bitbang.setup_transfer = xilinx_spi_setup_transfer; in xilinx_spi_probe()
432 xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs; in xilinx_spi_probe()
483 ret = spi_bitbang_start(&xspi->bitbang); in xilinx_spi_probe()
512 spi_bitbang_stop(&xspi->bitbang); in xilinx_spi_remove()
519 spi_master_put(xspi->bitbang.master); in xilinx_spi_remove()
Dspi-efm32.c71 struct spi_bitbang bitbang; member
90 #define ddata_to_dev(ddata) (&(ddata->bitbang.master->dev))
349 ddata->bitbang.master = master; in efm32_spi_probe()
350 ddata->bitbang.chipselect = efm32_spi_chipselect; in efm32_spi_probe()
351 ddata->bitbang.setup_transfer = efm32_spi_setup_transfer; in efm32_spi_probe()
352 ddata->bitbang.txrx_bufs = efm32_spi_txrx_bufs; in efm32_spi_probe()
441 ret = spi_bitbang_start(&ddata->bitbang); in efm32_spi_probe()
462 spi_bitbang_stop(&ddata->bitbang); in efm32_spi_remove()
Dspi-ppc4xx.c114 struct spi_bitbang bitbang; member
210 mutex_lock(&hw->bitbang.lock); in spi_ppc4xx_setupxfer()
211 if (!hw->bitbang.busy) { in spi_ppc4xx_setupxfer()
212 hw->bitbang.chipselect(spi, BITBANG_CS_INACTIVE); in spi_ppc4xx_setupxfer()
215 mutex_unlock(&hw->bitbang.lock); in spi_ppc4xx_setupxfer()
447 bbp = &hw->bitbang; in spi_ppc4xx_of_probe()
555 spi_bitbang_stop(&hw->bitbang); in spi_ppc4xx_of_remove()
Dspi-imx.c82 struct spi_bitbang bitbang; member
1232 if (spi_imx_can_dma(spi_imx->bitbang.master, spi, t)) in spi_imx_setupxfer()
1250 struct spi_master *master = spi_imx->bitbang.master; in spi_imx_sdma_exit()
1296 spi_imx->bitbang.master->flags = SPI_MASTER_MUST_RX | in spi_imx_sdma_init()
1339 struct spi_master *master = spi_imx->bitbang.master; in spi_imx_dma_transfer()
1624 spi_imx->bitbang.master = master; in spi_imx_probe()
1651 spi_imx->bitbang.chipselect = spi_imx_chipselect; in spi_imx_probe()
1652 spi_imx->bitbang.setup_transfer = spi_imx_setupxfer; in spi_imx_probe()
1653 spi_imx->bitbang.txrx_bufs = spi_imx_transfer; in spi_imx_probe()
1654 spi_imx->bitbang.master->setup = spi_imx_setup; in spi_imx_probe()
[all …]
Dspi-davinci.c106 struct spi_bitbang bitbang; member
468 struct device *sdev = dspi->bitbang.master->dev.parent; in davinci_spi_check_error()
752 struct device *sdev = dspi->bitbang.master->dev.parent; in davinci_spi_request_dma()
937 dspi->bitbang.master = master; in davinci_spi_probe()
958 dspi->bitbang.chipselect = davinci_spi_chipselect; in davinci_spi_probe()
959 dspi->bitbang.setup_transfer = davinci_spi_setup_transfer; in davinci_spi_probe()
963 dspi->bitbang.flags = SPI_NO_CS | SPI_LSB_FIRST | SPI_LOOP | SPI_CS_WORD; in davinci_spi_probe()
965 dspi->bitbang.flags |= SPI_READY; in davinci_spi_probe()
967 dspi->bitbang.txrx_bufs = davinci_spi_bufs; in davinci_spi_probe()
1002 ret = spi_bitbang_start(&dspi->bitbang); in davinci_spi_probe()
[all …]
Dspi-gpio.c34 struct spi_bitbang bitbang; member
82 spi_gpio = container_of(bang, struct spi_gpio, bitbang); in spi_to_spi_gpio()
408 bb = &spi_gpio->bitbang; in spi_gpio_probe()
432 status = spi_bitbang_init(&spi_gpio->bitbang); in spi_gpio_probe()
Dspi-au1550.c41 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()
Dspi-sirf.c251 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()
/Linux-v5.4/Documentation/devicetree/bindings/soc/fsl/cpm_qe/
Dnetwork.txt27 fsl,cpm2-mdio-bitbang (reg is port C registers)
29 Properties for fsl,cpm2-mdio-bitbang:
35 compatible = "fsl,mpc8272ads-mdio-bitbang",
36 "fsl,mpc8272-mdio-bitbang",
37 "fsl,cpm2-mdio-bitbang";
/Linux-v5.4/arch/powerpc/boot/dts/
Dpq2fads.dts197 compatible = "fsl,pq2fads-mdio-bitbang",
198 "fsl,mpc8280-mdio-bitbang",
199 "fsl,cpm2-mdio-bitbang";
Dmpc8272ads.dts181 compatible = "fsl,mpc8272ads-mdio-bitbang",
182 "fsl,mpc8272-mdio-bitbang",
183 "fsl,cpm2-mdio-bitbang";
/Linux-v5.4/drivers/net/ethernet/renesas/
Dsh_eth.c1213 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_mdio_ctrl() local
1216 if (bitbang->set_gate) in sh_mdio_ctrl()
1217 bitbang->set_gate(bitbang->addr); in sh_mdio_ctrl()
1219 pir = ioread32(bitbang->addr); in sh_mdio_ctrl()
1224 iowrite32(pir, bitbang->addr); in sh_mdio_ctrl()
1242 struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); in sh_get_mdio() local
1244 if (bitbang->set_gate) in sh_get_mdio()
1245 bitbang->set_gate(bitbang->addr); in sh_get_mdio()
1247 return (ioread32(bitbang->addr) & PIR_MDI) != 0; in sh_get_mdio()
3086 struct bb_info *bitbang; in sh_mdio_init() local
[all …]

12