/Linux-v5.4/drivers/spi/ |
D | Makefile | 3 # Makefile for kernel SPI drivers. 10 obj-$(CONFIG_SPI_MASTER) += spi.o 11 obj-$(CONFIG_SPI_MEM) += spi-mem.o 13 obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o 15 # SPI master controller drivers (bus) 16 obj-$(CONFIG_SPI_ALTERA) += spi-altera.o 17 obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o 18 obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o 20 obj-$(CONFIG_SPI_AT91_USART) += spi-at91-usart.o 21 obj-$(CONFIG_SPI_ATH79) += spi-ath79.o [all …]
|
D | Kconfig | 3 # SPI driver configuration 5 menuconfig SPI config 6 bool "SPI support" 10 protocol. Chips that support SPI can have data transfer rates 12 controller and a chipselect. Most SPI slaves don't support 15 SPI is widely used by microcontrollers to talk with sensors, 18 MMC and SD cards can be accessed using SPI protocol; and for 19 DataFlash cards used in MMC sockets, SPI must always be used. 21 SPI is one of a family of similar protocols using a four wire 26 if SPI [all …]
|
D | spi-stm32.c | 3 // STMicroelectronics STM32 SPI Controller driver (master mode only) 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 */ 179 * stm32_spi_reg - stm32 SPI register & bitfield desc 192 * en: enable register and SPI enable bit [all …]
|
D | spi-lantiq-ssc.c | 20 #include <linux/spi/spi.h> 189 static u32 lantiq_ssc_readl(const struct lantiq_ssc_spi *spi, u32 reg) in lantiq_ssc_readl() argument 191 return __raw_readl(spi->regbase + reg); in lantiq_ssc_readl() 194 static void lantiq_ssc_writel(const struct lantiq_ssc_spi *spi, u32 val, in lantiq_ssc_writel() argument 197 __raw_writel(val, spi->regbase + reg); in lantiq_ssc_writel() 200 static void lantiq_ssc_maskl(const struct lantiq_ssc_spi *spi, u32 clr, in lantiq_ssc_maskl() argument 203 u32 val = __raw_readl(spi->regbase + reg); in lantiq_ssc_maskl() 207 __raw_writel(val, spi->regbase + reg); in lantiq_ssc_maskl() 210 static unsigned int tx_fifo_level(const struct lantiq_ssc_spi *spi) in tx_fifo_level() argument 212 u32 fstat = lantiq_ssc_readl(spi, LTQ_SPI_FSTAT); in tx_fifo_level() [all …]
|
D | spi-sifive.c | 5 // SiFive SPI controller driver (master mode only) 15 #include <linux/spi/spi.h> 38 #define SIFIVE_SPI_REG_FCTRL 0x60 /* SPI flash interface control */ 39 #define SIFIVE_SPI_REG_FFMT 0x64 /* SPI flash instruction format */ 99 static void sifive_spi_write(struct sifive_spi *spi, int offset, u32 value) in sifive_spi_write() argument 101 iowrite32(value, spi->regs + offset); in sifive_spi_write() 104 static u32 sifive_spi_read(struct sifive_spi *spi, int offset) in sifive_spi_read() argument 106 return ioread32(spi->regs + offset); in sifive_spi_read() 109 static void sifive_spi_init(struct sifive_spi *spi) in sifive_spi_init() argument 112 sifive_spi_write(spi, SIFIVE_SPI_REG_IE, 0); in sifive_spi_init() [all …]
|
D | spi-orion.c | 3 * Marvell Orion SPI controller driver 14 #include <linux/spi/spi.h> 76 * have both is for managing the armada-370-spi case with old 133 static int orion_spi_baudrate_set(struct spi_device *spi, unsigned int speed) in orion_spi_baudrate_set() argument 142 orion_spi = spi_master_get_devdata(spi->master); in orion_spi_baudrate_set() 219 /* Convert the rate to SPI clock divisor value. */ in orion_spi_baudrate_set() 231 orion_spi_mode_set(struct spi_device *spi) in orion_spi_mode_set() argument 236 orion_spi = spi_master_get_devdata(spi->master); in orion_spi_mode_set() 240 if (spi->mode & SPI_CPOL) in orion_spi_mode_set() 242 if (spi->mode & SPI_CPHA) in orion_spi_mode_set() [all …]
|
D | spi-omap2-mcspi.c | 29 #include <linux/spi/spi.h> 32 #include <linux/platform_data/spi-omap2-mcspi.h> 160 static inline void mcspi_write_cs_reg(const struct spi_device *spi, in mcspi_write_cs_reg() argument 163 struct omap2_mcspi_cs *cs = spi->controller_state; in mcspi_write_cs_reg() 168 static inline u32 mcspi_read_cs_reg(const struct spi_device *spi, int idx) in mcspi_read_cs_reg() argument 170 struct omap2_mcspi_cs *cs = spi->controller_state; in mcspi_read_cs_reg() 175 static inline u32 mcspi_cached_chconf0(const struct spi_device *spi) in mcspi_cached_chconf0() argument 177 struct omap2_mcspi_cs *cs = spi->controller_state; in mcspi_cached_chconf0() 182 static inline void mcspi_write_chconf0(const struct spi_device *spi, u32 val) in mcspi_write_chconf0() argument 184 struct omap2_mcspi_cs *cs = spi->controller_state; in mcspi_write_chconf0() [all …]
|
/Linux-v5.4/drivers/staging/pi433/ |
D | rf69.c | 3 * abstraction of the spi interface of HopeRf rf69 radio module 17 #include <linux/spi/spi.h> 27 static u8 rf69_read_reg(struct spi_device *spi, u8 addr) in rf69_read_reg() argument 31 retval = spi_w8r8(spi, addr); in rf69_read_reg() 40 dev_dbg(&spi->dev, "read 0x%x FAILED\n", addr); in rf69_read_reg() 42 dev_dbg(&spi->dev, "read 0x%x from reg 0x%x\n", retval, addr); in rf69_read_reg() 48 static int rf69_write_reg(struct spi_device *spi, u8 addr, u8 value) in rf69_write_reg() argument 56 retval = spi_write(spi, &buffer, 2); in rf69_write_reg() 65 dev_dbg(&spi->dev, "write 0x%x to 0x%x FAILED\n", value, addr); in rf69_write_reg() 67 dev_dbg(&spi->dev, "wrote 0x%x to reg 0x%x\n", value, addr); in rf69_write_reg() [all …]
|
D | rf69.h | 20 int rf69_set_mode(struct spi_device *spi, enum mode mode); 21 int rf69_set_data_mode(struct spi_device *spi, u8 data_mode); 22 int rf69_set_modulation(struct spi_device *spi, enum modulation modulation); 23 int rf69_set_modulation_shaping(struct spi_device *spi, 25 int rf69_set_bit_rate(struct spi_device *spi, u16 bit_rate); 26 int rf69_set_deviation(struct spi_device *spi, u32 deviation); 27 int rf69_set_frequency(struct spi_device *spi, u32 frequency); 28 int rf69_enable_amplifier(struct spi_device *spi, u8 amplifier_mask); 29 int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask); 30 int rf69_set_output_power_level(struct spi_device *spi, u8 power_level); [all …]
|
/Linux-v5.4/drivers/staging/greybus/ |
D | spilib.c | 3 * Greybus SPI library 14 #include <linux/spi/spi.h> 45 static struct spi_master *get_master_from_spi(struct gb_spilib *spi) in get_master_from_spi() argument 47 return gb_connection_get_data(spi->connection); in get_master_from_spi() 95 static void clean_xfer_state(struct gb_spilib *spi) in clean_xfer_state() argument 97 spi->first_xfer = NULL; in clean_xfer_state() 98 spi->last_xfer = NULL; in clean_xfer_state() 99 spi->rx_xfer_offset = 0; in clean_xfer_state() 100 spi->tx_xfer_offset = 0; in clean_xfer_state() 101 spi->last_xfer_size = 0; in clean_xfer_state() [all …]
|
/Linux-v5.4/drivers/video/backlight/ |
D | ili922x.c | 7 * controller. The interface to the display is SPI and the display's 20 #include <linux/spi/spi.h> 105 * for the SPI transfer. According to the datasheet, the controller 137 struct spi_device *spi; member 144 * @spi: spi device 147 static int ili922x_read_status(struct spi_device *spi, u16 *rs) in ili922x_read_status() argument 160 CHECK_FREQ_REG(spi, &xfer); in ili922x_read_status() 174 ret = spi_sync(spi, &msg); in ili922x_read_status() 176 dev_dbg(&spi->dev, "Error sending SPI message 0x%x", ret); in ili922x_read_status() 186 * @spi: spi device [all …]
|
D | l4f00242t03.c | 22 #include <linux/spi/spi.h> 23 #include <linux/spi/l4f00242t03.h> 26 struct spi_device *spi; member 46 static void l4f00242t03_lcd_init(struct spi_device *spi) in l4f00242t03_lcd_init() argument 48 struct l4f00242t03_pdata *pdata = dev_get_platdata(&spi->dev); in l4f00242t03_lcd_init() 49 struct l4f00242t03_priv *priv = spi_get_drvdata(spi); in l4f00242t03_lcd_init() 53 dev_dbg(&spi->dev, "initializing LCD\n"); in l4f00242t03_lcd_init() 57 dev_err(&spi->dev, "failed to set the IO regulator voltage.\n"); in l4f00242t03_lcd_init() 62 dev_err(&spi->dev, "failed to enable the IO regulator.\n"); in l4f00242t03_lcd_init() 68 dev_err(&spi->dev, "failed to set the core regulator voltage.\n"); in l4f00242t03_lcd_init() [all …]
|
/Linux-v5.4/drivers/net/wan/ |
D | slic_ds26522.c | 16 #include <linux/spi/spi.h> 39 static void slic_write(struct spi_device *spi, u16 addr, in slic_write() argument 50 /* write spi addr and value */ in slic_write() 51 spi_write(spi, &temp[0], SLIC_THREE_LEN); in slic_write() 54 static u8 slic_read(struct spi_device *spi, u16 addr) in slic_read() argument 63 spi_write_then_read(spi, &temp[0], SLIC_TWO_LEN, &data, in slic_read() 70 static bool get_slic_product_code(struct spi_device *spi) in get_slic_product_code() argument 74 device_id = slic_read(spi, DS26522_IDR_ADDR); in get_slic_product_code() 81 static void ds26522_e1_spec_config(struct spi_device *spi) in ds26522_e1_spec_config() argument 84 slic_write(spi, DS26522_RMMR_ADDR, DS26522_RMMR_E1); in ds26522_e1_spec_config() [all …]
|
/Linux-v5.4/drivers/media/pci/netup_unidvb/ |
D | netup_unidvb_spi.c | 5 * Internal SPI driver for NetUP Universal Dual DVB-CI 13 #include <linux/spi/spi.h> 14 #include <linux/spi/flash.h> 69 irqreturn_t netup_spi_interrupt(struct netup_spi *spi) in netup_spi_interrupt() argument 74 if (!spi) in netup_spi_interrupt() 77 spin_lock_irqsave(&spi->lock, flags); in netup_spi_interrupt() 78 reg = readw(&spi->regs->control_stat); in netup_spi_interrupt() 80 spin_unlock_irqrestore(&spi->lock, flags); in netup_spi_interrupt() 81 dev_dbg(&spi->master->dev, in netup_spi_interrupt() 85 writew(reg | NETUP_SPI_CTRL_IRQ, &spi->regs->control_stat); in netup_spi_interrupt() [all …]
|
/Linux-v5.4/drivers/media/dvb-frontends/cxd2880/ |
D | cxd2880_spi_device.c | 5 * SPI access functions 10 #include <linux/spi/spi.h> 14 static int cxd2880_spi_device_write(struct cxd2880_spi *spi, in cxd2880_spi_device_write() argument 22 if (!spi || !spi->user || !data || size == 0) in cxd2880_spi_device_write() 25 spi_device = spi->user; in cxd2880_spi_device_write() 33 result = spi_sync(spi_device->spi, &msg); in cxd2880_spi_device_write() 41 static int cxd2880_spi_device_write_read(struct cxd2880_spi *spi, in cxd2880_spi_device_write_read() argument 50 if (!spi || !spi->user || !tx_data || in cxd2880_spi_device_write_read() 54 spi_device = spi->user; in cxd2880_spi_device_write_read() 56 result = spi_write_then_read(spi_device->spi, tx_data, in cxd2880_spi_device_write_read() [all …]
|
/Linux-v5.4/drivers/net/can/spi/ |
D | hi311x.c | 2 /* CAN bus driver for Holt HI3110 CAN Controller with SPI Interface 35 #include <linux/spi/spi.h> 147 struct spi_device *spi; member 150 struct mutex hi3110_lock; /* SPI device lock */ 188 * registers via SPI is not really different conceptually than using 199 static int hi3110_spi_trans(struct spi_device *spi, int len) in hi3110_spi_trans() argument 201 struct hi3110_priv *priv = spi_get_drvdata(spi); in hi3110_spi_trans() 214 ret = spi_sync(spi, &m); in hi3110_spi_trans() 217 dev_err(&spi->dev, "spi transfer failed: ret = %d\n", ret); in hi3110_spi_trans() 221 static u8 hi3110_cmd(struct spi_device *spi, u8 command) in hi3110_cmd() argument [all …]
|
D | mcp251x.c | 2 /* CAN bus driver for Microchip 251x/25625 CAN Controller with SPI Interface 39 #include <linux/spi/spi.h> 43 /* SPI interface instruction set */ 170 /* Buffer size required for the largest SPI transfer (i.e., reading a 204 struct spi_device *spi; member 207 struct mutex mcp_lock; /* SPI device lock */ 232 static inline int mcp251x_is_##_model(struct spi_device *spi) \ 234 struct mcp251x_priv *priv = spi_get_drvdata(spi); \ 254 * registers via SPI is not really different conceptually than using 265 static int mcp251x_spi_trans(struct spi_device *spi, int len) in mcp251x_spi_trans() argument [all …]
|
/Linux-v5.4/Documentation/devicetree/bindings/spi/ |
D | brcm,spi-bcm-qspi.txt | 1 Broadcom SPI controller 3 The Broadcom SPI controller is a SPI master found on various SOCs, including 4 BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consits 6 MSPI : SPI master controller can read and write to a SPI slave device 7 BSPI : Broadcom SPI in combination with the MSPI hw IP provides acceleration 14 use SPI protocol. 19 Must be <1>, as required by generic SPI binding. 22 Must be <0>, also as required by generic SPI binding. 26 "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-qspi" : MSPI+BSPI on BRCMSTB SoCs 27 "brcm,spi-bcm-qspi", "brcm,spi-brcmstb-mspi" : Second Instance of MSPI [all …]
|
D | qcom,spi-qup.txt | 1 Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI) 4 and an input FIFO) for serial peripheral interface (SPI) mini-core. 6 SPI in master mode supports up to 50MHz, up to four chip selects, programmable 11 "qcom,spi-qup-v1.1.1" for 8660, 8960 and 8064. 12 "qcom,spi-qup-v2.1.1" for 8974 and later 13 "qcom,spi-qup-v2.2.1" for 8974 v2 and later. 23 address on the SPI bus. Should be set to 1. 27 - spi-max-frequency: Specifies maximum SPI clock frequency, 29 Documentation/devicetree/bindings/spi/spi-bus.txt 32 The gpios will be referred to as reg = <index> in the SPI child [all …]
|
D | spi-controller.yaml | 4 $id: http://devicetree.org/schemas/spi/spi-controller.yaml# 7 title: SPI Controller Generic Binding 13 SPI busses can be described with a node for the SPI controller device 14 and a set of child nodes for each SPI slave on the bus. The system SPI 15 controller may be described for use in SPI master mode or in SPI slave mode, 20 pattern: "^spi(@.*|-[0-9a-f])*$" 50 spi-slave: 53 The SPI controller acts as a slave, instead of a master. 62 Compatible of the SPI device. 73 Compatible of the SPI device. [all …]
|
D | spi-mt65xx.txt | 1 Binding for MTK SPI controller 5 - mediatek,mt2701-spi: for mt2701 platforms 6 - mediatek,mt2712-spi: for mt2712 platforms 7 - mediatek,mt6589-spi: for mt6589 platforms 8 - mediatek,mt6765-spi: for mt6765 platforms 9 - mediatek,mt7622-spi: for mt7622 platforms 10 - "mediatek,mt7629-spi", "mediatek,mt7622-spi": for mt7629 platforms 11 - mediatek,mt8135-spi: for mt8135 platforms 12 - mediatek,mt8173-spi: for mt8173 platforms 13 - mediatek,mt8183-spi: for mt8183 platforms [all …]
|
/Linux-v5.4/drivers/mtd/spi-nor/ |
D | Kconfig | 3 tristate "SPI-NOR device support" 8 This is the framework for the SPI NOR which can be used by the SPI 9 device drivers and the SPI-NOR device driver. 28 tristate "Aspeed flash controllers in SPI mode" 33 in the Aspeed AST2500/AST2400 SoCs when attached to SPI NOR chips, 34 and support for the SPI flash memory controller (SPI) for 35 the host firmware. The implementation only supports SPI NOR. 38 tristate "Cadence Quad SPI controller" 41 Enable support for the Cadence Quad SPI Flash controller. 43 Cadence QSPI is a specialized controller for connecting an SPI [all …]
|
/Linux-v5.4/drivers/iio/common/st_sensors/ |
D | st_sensors_spi.c | 3 * STMicroelectronics sensors spi library driver 33 * st_sensors_is_spi_3_wire() - check if SPI 3-wire mode has been selected 34 * @spi: spi device reference. 36 * Return: true if SPI 3-wire mode is selected, false otherwise. 38 static bool st_sensors_is_spi_3_wire(struct spi_device *spi) in st_sensors_is_spi_3_wire() argument 40 struct device_node *np = spi->dev.of_node; in st_sensors_is_spi_3_wire() 43 pdata = (struct st_sensors_platform_data *)spi->dev.platform_data; in st_sensors_is_spi_3_wire() 44 if ((np && of_property_read_bool(np, "spi-3wire")) || in st_sensors_is_spi_3_wire() 53 * st_sensors_configure_spi_3_wire() - configure SPI 3-wire if needed 54 * @spi: spi device reference. [all …]
|
/Linux-v5.4/drivers/video/fbdev/omap2/omapfb/displays/ |
D | panel-lgphilips-lb035q02.c | 12 #include <linux/spi/spi.h> 43 struct spi_device *spi; member 57 static int lb035q02_write_reg(struct spi_device *spi, u8 reg, u16 val) in lb035q02_write_reg() argument 85 return spi_sync(spi, &msg); in lb035q02_write_reg() 88 static void init_lb035q02_panel(struct spi_device *spi) in init_lb035q02_panel() argument 91 lb035q02_write_reg(spi, 0x01, 0x6300); in init_lb035q02_panel() 92 lb035q02_write_reg(spi, 0x02, 0x0200); in init_lb035q02_panel() 93 lb035q02_write_reg(spi, 0x03, 0x0177); in init_lb035q02_panel() 94 lb035q02_write_reg(spi, 0x04, 0x04c7); in init_lb035q02_panel() 95 lb035q02_write_reg(spi, 0x05, 0xffc0); in init_lb035q02_panel() [all …]
|
/Linux-v5.4/drivers/media/v4l2-core/ |
D | v4l2-spi.c | 3 * v4l2-spi - SPI helpers for Video4Linux2 7 #include <linux/spi/spi.h> 13 struct spi_device *spi = v4l2_get_subdevdata(sd); in v4l2_spi_subdev_unregister() local 15 if (spi && !spi->dev.of_node && !spi->dev.fwnode) in v4l2_spi_subdev_unregister() 16 spi_unregister_device(spi); in v4l2_spi_subdev_unregister() 19 void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi, in v4l2_spi_subdev_init() argument 25 sd->owner = spi->dev.driver->owner; in v4l2_spi_subdev_init() 26 sd->dev = &spi->dev; in v4l2_spi_subdev_init() 28 v4l2_set_subdevdata(sd, spi); in v4l2_spi_subdev_init() 29 spi_set_drvdata(spi, sd); in v4l2_spi_subdev_init() [all …]
|