| /kernel/linux/linux-5.10/drivers/spi/ |
| D | spi-stm32.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // STMicroelectronics STM32 SPI Controller driver (master mode only) 5 // Copyright (C) 2017, STMicroelectronics - All Rights Reserved 19 #include <linux/spi/spi.h> 23 /* STM32F4 SPI registers */ 72 /* STM32F4 SPI Baud Rate min/max divisor */ 76 /* STM32H7 SPI registers */ 153 /* STM32H7 SPI Master Baud Rate min/max divisor */ 157 /* STM32H7 SPI Communication mode */ 163 /* SPI Communication type */ [all …]
|
| D | spi-sirf.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * SPI bus driver for CSR SiRFprimaII 20 #include <linux/spi/spi.h> 21 #include <linux/spi/spi_bitbang.h> 23 #include <linux/dma-direction.h> 24 #include <linux/dma-mapping.h> 28 /* SPI CTRL register defines */ 136 #define SIRFSOC_SPI_FIFO_FULL_MASK(s) (1 << ((s)->fifo_full_offset)) 137 #define SIRFSOC_SPI_FIFO_EMPTY_MASK(s) (1 << ((s)->fifo_full_offset + 1)) 138 #define SIRFSOC_SPI_FIFO_THD_MASK(s) ((s)->fifo_size - 1) [all …]
|
| D | spi-davinci.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 #include <linux/dma-mapping.h> 19 #include <linux/spi/spi.h> 20 #include <linux/spi/spi_bitbang.h> 23 #include <linux/platform_data/spi-davinci.h> 89 /* SPI Controller registers */ 104 /* SPI Controller driver's private data. */ 111 void __iomem *base; member 137 if (dspi->rx) { in davinci_spi_rx_buf_u8() 138 u8 *rx = dspi->rx; in davinci_spi_rx_buf_u8() [all …]
|
| D | spi-mxs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // Freescale MXS SPI master driver 15 // Based on code from U-Boot bootloader by: 18 // Based on spi-stmp.c, which is: 28 #include <linux/dma-mapping.h> 39 #include <linux/spi/spi.h> 40 #include <linux/spi/mxs-spi.h> 41 #include <trace/events/spi.h> 43 #define DRIVER_NAME "mxs-spi" 55 #define TXRX_DEASSERT_CS (1<<1) /* De-assert CS at end of txrx */ [all …]
|
| D | spi-omap-100k.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * OMAP7xx SPI 100k controller driver 24 #include <linux/spi/spi.h> 52 #define SPI_CTRL_WORD_SIZE(x) (((x) - 1) << 2) 71 /* Virtual base address of the controller */ 72 void __iomem *base; member 76 void __iomem *base; member 85 /* enable SPI */ in spi100k_enable_clock() 86 val = readw(spi100k->base + SPI_SETUP1); in spi100k_enable_clock() 88 writew(val, spi100k->base + SPI_SETUP1); in spi100k_enable_clock() [all …]
|
| D | spi-st-ssc4.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2008-2014 STMicroelectronics Limited 9 * SPI master mode controller driver, used in STMicroelectronics devices. 23 #include <linux/spi/spi.h> 24 #include <linux/spi/spi_bitbang.h> 55 /* SSC SPI Controller */ 56 void __iomem *base; member 60 /* SSC SPI current transaction */ 75 if (spi_st->words_remaining > FIFO_SIZE) in ssc_write_tx_fifo() 78 count = spi_st->words_remaining; in ssc_write_tx_fifo() [all …]
|
| D | spi-ar934x.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // SPI controller driver for Qualcomm Atheros AR934x/QCA95xx SoCs 7 // Based on spi-mt7621.c: 9 // Copyright (C) 2011-2013 Gabor Juhos <juhosg@openwrt.org> 10 // Copyright (C) 2014-2015 Felix Fietkau <nbd@nbd.name> 18 #include <linux/spi/spi.h> 20 #define DRIVER_NAME "spi-ar934x" 45 void __iomem *base; member 52 int div = DIV_ROUND_UP(sp->clk_freq, freq * 2) - 1; in ar934x_spi_clk_div() 57 return -EINVAL; in ar934x_spi_clk_div() [all …]
|
| D | spi-oc-tiny.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * OpenCores tiny SPI master driver 19 #include <linux/spi/spi.h> 20 #include <linux/spi/spi_bitbang.h> 21 #include <linux/spi/spi_oc_tiny.h> 41 void __iomem *base; member 56 return spi_master_get_devdata(sdev->master); in tiny_spi_to_hw() 59 static unsigned int tiny_spi_baud(struct spi_device *spi, unsigned int hz) in tiny_spi_baud() argument 61 struct tiny_spi *hw = tiny_spi_to_hw(spi); in tiny_spi_baud() 63 return min(DIV_ROUND_UP(hw->freq, hz * 2), (1U << hw->baudwidth)) - 1; in tiny_spi_baud() [all …]
|
| D | spi-geni-qcom.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2017-2018, The Linux foundation. All rights reserved. 12 #include <linux/qcom-geni-se.h> 13 #include <linux/spi/spi.h> 16 /* SPI SE specific registers and respective register fields */ 52 /* M_CMD OP codes for SPI */ 59 /* M_CMD params for SPI */ 98 ret = geni_se_clk_freq_match(&mas->se, in get_spi_clk_cfg() 99 speed_hz * mas->oversampling, in get_spi_clk_cfg() 102 dev_err(mas->dev, "Failed(%d) to find src clk for %dHz\n", in get_spi_clk_cfg() [all …]
|
| D | spi-uniphier.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // spi-uniphier.c - Socionext UniPhier SPI controller driver 4 // Copyright 2016-2018 Socionext Inc. 16 #include <linux/spi/spi.h> 26 void __iomem *base; member 113 val = readl(priv->base + SSI_IE); in uniphier_spi_irq_enable() 115 writel(val, priv->base + SSI_IE); in uniphier_spi_irq_enable() 123 val = readl(priv->base + SSI_IE); in uniphier_spi_irq_disable() 125 writel(val, priv->base + SSI_IE); in uniphier_spi_irq_disable() 128 static void uniphier_spi_set_mode(struct spi_device *spi) in uniphier_spi_set_mode() argument [all …]
|
| D | spi-mt65xx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <linux/platform_data/spi-mt65xx.h> 19 #include <linux/spi/spi.h> 20 #include <linux/dma-mapping.h> 96 void __iomem *base; member 147 { .compatible = "mediatek,mt2701-spi", 150 { .compatible = "mediatek,mt2712-spi", 153 { .compatible = "mediatek,mt6589-spi", 156 { .compatible = "mediatek,mt6765-spi", 159 { .compatible = "mediatek,mt7622-spi", [all …]
|
| D | spi-slave-mt27xx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 #include <linux/dma-mapping.h> 12 #include <linux/spi/spi.h> 68 void __iomem *base; member 76 { .compatible = "mediatek,mt2712-spi-slave", }, 85 reg_val = readl(mdata->base + SPIS_DMA_CFG_REG); in mtk_spi_slave_disable_dma() 88 writel(reg_val, mdata->base + SPIS_DMA_CFG_REG); in mtk_spi_slave_disable_dma() 95 reg_val = readl(mdata->base + SPIS_CFG_REG); in mtk_spi_slave_disable_xfer() 98 writel(reg_val, mdata->base + SPIS_CFG_REG); in mtk_spi_slave_disable_xfer() 103 if (wait_for_completion_interruptible(&mdata->xfer_done) || in mtk_spi_slave_wait_for_completion() [all …]
|
| D | spi-qup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2008-2014, The Linux foundation. All rights reserved. 17 #include <linux/spi/spi.h> 19 #include <linux/dma-mapping.h> 116 #define SPI_MAX_XFER (SZ_64K - 64) 126 void __iomem *base; member 141 int w_size; /* bytes per SPI word */ 154 static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer); 158 u32 opflag = readl_relaxed(controller->base + QUP_OPERATIONAL); in spi_qup_is_flag_set() 174 return controller->n_words * controller->w_size; in spi_qup_len() [all …]
|
| /kernel/linux/linux-6.6/drivers/spi/ |
| D | spi-stm32.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // STMicroelectronics STM32 SPI Controller driver 5 // Copyright (C) 2017, STMicroelectronics - All Rights Reserved 20 #include <linux/spi/spi.h> 24 /* STM32F4 SPI registers */ 73 /* STM32F4 SPI Baud Rate min/max divisor */ 77 /* STM32H7 SPI registers */ 149 /* STM32H7 SPI Master Baud Rate min/max divisor */ 153 /* STM32H7 SPI Communication mode */ 159 /* SPI Communication type */ [all …]
|
| D | spi-davinci.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 #include <linux/dma-mapping.h> 18 #include <linux/spi/spi.h> 19 #include <linux/spi/spi_bitbang.h> 22 #include <linux/platform_data/spi-davinci.h> 88 /* SPI Controller registers */ 103 /* SPI Controller driver's private data. */ 110 void __iomem *base; member 136 if (dspi->rx) { in davinci_spi_rx_buf_u8() 137 u8 *rx = dspi->rx; in davinci_spi_rx_buf_u8() [all …]
|
| D | spi-mxs.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // Freescale MXS SPI master driver 15 // Based on code from U-Boot bootloader by: 18 // Based on spi-stmp.c, which is: 28 #include <linux/dma-mapping.h> 39 #include <linux/spi/spi.h> 40 #include <linux/spi/mxs-spi.h> 41 #include <trace/events/spi.h> 42 #include <linux/dma/mxs-dma.h> 44 #define DRIVER_NAME "mxs-spi" [all …]
|
| D | spi-oc-tiny.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * OpenCores tiny SPI master driver 19 #include <linux/spi/spi.h> 20 #include <linux/spi/spi_bitbang.h> 21 #include <linux/spi/spi_oc_tiny.h> 41 void __iomem *base; member 56 return spi_master_get_devdata(sdev->master); in tiny_spi_to_hw() 59 static unsigned int tiny_spi_baud(struct spi_device *spi, unsigned int hz) in tiny_spi_baud() argument 61 struct tiny_spi *hw = tiny_spi_to_hw(spi); in tiny_spi_baud() 63 return min(DIV_ROUND_UP(hw->freq, hz * 2), (1U << hw->baudwidth)) - 1; in tiny_spi_baud() [all …]
|
| D | spi-ar934x.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // SPI controller driver for Qualcomm Atheros AR934x/QCA95xx SoCs 7 // Based on spi-mt7621.c: 9 // Copyright (C) 2011-2013 Gabor Juhos <juhosg@openwrt.org> 10 // Copyright (C) 2014-2015 Felix Fietkau <nbd@nbd.name> 19 #include <linux/spi/spi.h> 21 #define DRIVER_NAME "spi-ar934x" 46 void __iomem *base; member 53 int div = DIV_ROUND_UP(sp->clk_freq, freq * 2) - 1; in ar934x_spi_clk_div() 58 return -EINVAL; in ar934x_spi_clk_div() [all …]
|
| D | spi-mt65xx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 17 #include <linux/platform_data/spi-mt65xx.h> 19 #include <linux/spi/spi.h> 20 #include <linux/spi/spi-mem.h> 21 #include <linux/dma-mapping.h> 114 * struct mtk_spi_compatible - device data structure 115 * @need_pad_sel: Enable pad (pins) selection in SPI controller 119 * @no_need_unprepare: Don't unprepare the SPI clk during runtime 132 * struct mtk_spi - SPI driver instance 133 * @base: Start address of the SPI controller registers [all …]
|
| D | spi-st-ssc4.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2008-2014 STMicroelectronics Limited 9 * SPI master mode controller driver, used in STMicroelectronics devices. 22 #include <linux/spi/spi.h> 23 #include <linux/spi/spi_bitbang.h> 54 /* SSC SPI Controller */ 55 void __iomem *base; member 59 /* SSC SPI current transaction */ 74 if (spi_st->words_remaining > FIFO_SIZE) in ssc_write_tx_fifo() 77 count = spi_st->words_remaining; in ssc_write_tx_fifo() [all …]
|
| D | spi-geni-qcom.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2017-2018, The Linux foundation. All rights reserved. 6 #include <linux/dma-mapping.h> 7 #include <linux/dma/qcom-gpi-dma.h> 16 #include <linux/soc/qcom/geni-se.h> 17 #include <linux/spi/spi.h> 20 /* SPI SE specific registers and respective register fields */ 59 /* M_CMD OP codes for SPI */ 66 /* M_CMD params for SPI */ 108 struct geni_se *se = &mas->se; in spi_slv_setup() [all …]
|
| D | spi-uniphier.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // spi-uniphier.c - Socionext UniPhier SPI controller driver 4 // Copyright 2016-2018 Socionext Inc. 16 #include <linux/spi/spi.h> 26 void __iomem *base; member 113 val = readl(priv->base + SSI_IE); in uniphier_spi_irq_enable() 115 writel(val, priv->base + SSI_IE); in uniphier_spi_irq_enable() 123 val = readl(priv->base + SSI_IE); in uniphier_spi_irq_disable() 125 writel(val, priv->base + SSI_IE); in uniphier_spi_irq_disable() 128 static void uniphier_spi_set_mode(struct spi_device *spi) in uniphier_spi_set_mode() argument [all …]
|
| D | spi-slave-mt27xx.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 #include <linux/dma-mapping.h> 12 #include <linux/spi/spi.h> 68 void __iomem *base; member 90 { .compatible = "mediatek,mt2712-spi-slave", 92 { .compatible = "mediatek,mt8195-spi-slave", 102 reg_val = readl(mdata->base + SPIS_DMA_CFG_REG); in mtk_spi_slave_disable_dma() 105 writel(reg_val, mdata->base + SPIS_DMA_CFG_REG); in mtk_spi_slave_disable_dma() 112 reg_val = readl(mdata->base + SPIS_CFG_REG); in mtk_spi_slave_disable_xfer() 115 writel(reg_val, mdata->base + SPIS_CFG_REG); in mtk_spi_slave_disable_xfer() [all …]
|
| D | spi-qup.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2008-2014, The Linux foundation. All rights reserved. 16 #include <linux/spi/spi.h> 18 #include <linux/dma-mapping.h> 115 #define SPI_MAX_XFER (SZ_64K - 64) 125 void __iomem *base; member 140 int w_size; /* bytes per SPI word */ 153 static int spi_qup_io_config(struct spi_device *spi, struct spi_transfer *xfer); 157 u32 opflag = readl_relaxed(controller->base + QUP_OPERATIONAL); in spi_qup_is_flag_set() 173 return controller->n_words * controller->w_size; in spi_qup_len() [all …]
|
| /kernel/linux/linux-6.6/sound/pci/hda/ |
| D | cs35l56_hda_spi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // CS35L56 HDA audio driver SPI binding 10 #include <linux/spi/spi.h> 14 static int cs35l56_hda_spi_probe(struct spi_device *spi) in cs35l56_hda_spi_probe() argument 19 cs35l56 = devm_kzalloc(&spi->dev, sizeof(*cs35l56), GFP_KERNEL); in cs35l56_hda_spi_probe() 21 return -ENOMEM; in cs35l56_hda_spi_probe() 23 cs35l56->base.dev = &spi->dev; in cs35l56_hda_spi_probe() 24 cs35l56->base.regmap = devm_regmap_init_spi(spi, &cs35l56_regmap_spi); in cs35l56_hda_spi_probe() 25 if (IS_ERR(cs35l56->base.regmap)) { in cs35l56_hda_spi_probe() 26 ret = PTR_ERR(cs35l56->base.regmap); in cs35l56_hda_spi_probe() [all …]
|