| /kernel/linux/linux-6.6/drivers/spi/ |
| D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 3 # Makefile for kernel SPI drivers. 6 ccflags-$(CONFIG_SPI_DEBUG) := -DDEBUG 8 # small core, mostly translating board-specific 10 obj-$(CONFIG_SPI_MASTER) += spi.o 11 obj-$(CONFIG_SPI_MEM) += spi-mem.o 12 obj-$(CONFIG_SPI_MUX) += spi-mux.o 13 obj-$(CONFIG_SPI_SPIDEV) += spidev.o 14 obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o 16 # SPI master controller drivers (bus) [all …]
|
| 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 | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 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 13 dynamic device discovery; some are even write-only or read-only. 15 SPI is widely used by microcontrollers to talk with sensors, 17 chips, analog to digital (and d-to-a) converters, and more. 18 MMC and SD cards can be accessed using SPI protocol; and for [all …]
|
| D | spi-lantiq-ssc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2011-2015 Daniel Schwierzeck <daniel.schwierzeck@gmail.com> 4 * Copyright (C) 2016 Hauke Mehrtens <hauke@hauke-m.de> 20 #include <linux/spi/spi.h> 142 #define LTQ_SPI_RXCNT_TODO_M 0xFFFF /* Recevie to-do value */ 156 int (*cfg_irq)(struct platform_device *pdev, struct lantiq_ssc_spi *spi); 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() [all …]
|
| D | spi-microchip-core.c | 1 // SPDX-License-Identifier: (GPL-2.0) 3 * Microchip CoreSPI SPI controller driver 5 * Copyright (c) 2018-2022 Microchip Technology Inc. and its subsidiaries 21 #include <linux/spi/spi.h> 104 u32 clk_gen; /* divider for spi output clock generated by the controller */ 112 static inline u32 mchp_corespi_read(struct mchp_corespi *spi, unsigned int reg) in mchp_corespi_read() argument 114 return readl(spi->regs + reg); in mchp_corespi_read() 117 static inline void mchp_corespi_write(struct mchp_corespi *spi, unsigned int reg, u32 val) in mchp_corespi_write() argument 119 writel(val, spi->regs + reg); in mchp_corespi_write() 122 static inline void mchp_corespi_disable(struct mchp_corespi *spi) in mchp_corespi_disable() argument [all …]
|
| D | spi-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // General Purpose SPI multiplexer 10 #include <linux/spi/spi.h> 12 #define SPI_MUX_NO_CS ((unsigned int)-1) 17 * This driver supports a MUX on an SPI bus. This can be useful when you need 21 * The driver will create an additional SPI controller. Devices added under the 26 * struct spi_mux_priv - the basic spi_mux structure 27 * @spi: pointer to the device struct attached to the parent 28 * spi controller 36 * downstream spi devices [all …]
|
| D | spi-sifive.c | 1 // SPDX-License-Identifier: GPL-2.0 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 */ 96 struct completion done; /* wake-up from interrupt */ 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() [all …]
|
| /kernel/linux/linux-5.10/drivers/spi/ |
| D | Makefile | 1 # SPDX-License-Identifier: GPL-2.0 3 # Makefile for kernel SPI drivers. 6 ccflags-$(CONFIG_SPI_DEBUG) := -DDEBUG 8 # small core, mostly translating board-specific 10 obj-$(CONFIG_SPI_MASTER) += spi.o 11 obj-$(CONFIG_SPI_MEM) += spi-mem.o 12 obj-$(CONFIG_SPI_MUX) += spi-mux.o 13 obj-$(CONFIG_SPI_SPIDEV) += spidev.o 14 obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o 16 # SPI master controller drivers (bus) [all …]
|
| 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 | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 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 13 dynamic device discovery; some are even write-only or read-only. 15 SPI is widely used by microcontrollers to talk with sensors, 17 chips, analog to digital (and d-to-a) converters, and more. 18 MMC and SD cards can be accessed using SPI protocol; and for [all …]
|
| D | spi-lantiq-ssc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2011-2015 Daniel Schwierzeck <daniel.schwierzeck@gmail.com> 4 * Copyright (C) 2016 Hauke Mehrtens <hauke@hauke-m.de> 19 #include <linux/spi/spi.h> 141 #define LTQ_SPI_RXCNT_TODO_M 0xFFFF /* Recevie to-do value */ 155 int (*cfg_irq)(struct platform_device *pdev, struct lantiq_ssc_spi *spi); 188 static u32 lantiq_ssc_readl(const struct lantiq_ssc_spi *spi, u32 reg) in lantiq_ssc_readl() argument 190 return __raw_readl(spi->regbase + reg); in lantiq_ssc_readl() 193 static void lantiq_ssc_writel(const struct lantiq_ssc_spi *spi, u32 val, in lantiq_ssc_writel() argument 196 __raw_writel(val, spi->regbase + reg); in lantiq_ssc_writel() [all …]
|
| D | spi-mux.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // General Purpose SPI multiplexer 10 #include <linux/spi/spi.h> 12 #define SPI_MUX_NO_CS ((unsigned int)-1) 17 * This driver supports a MUX on an SPI bus. This can be useful when you need 21 * The driver will create an additional SPI controller. Devices added under the 26 * struct spi_mux_priv - the basic spi_mux structure 27 * @spi: pointer to the device struct attached to the parent 28 * spi controller 36 * downstream spi devices [all …]
|
| D | spi-sifive.c | 1 // SPDX-License-Identifier: GPL-2.0 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 */ 96 struct completion done; /* wake-up from interrupt */ 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() [all …]
|
| /kernel/linux/linux-6.6/drivers/staging/pi433/ |
| D | rf69.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * abstraction of the spi interface of HopeRf rf69 radio module 5 * Copyright (C) 2016 Wolf-Entwicklungen 6 * Marcus Wolf <linux@wolf-entwicklungen.de> 10 #include <linux/spi/spi.h> 18 /*-------------------------------------------------------------------------*/ 20 u8 rf69_read_reg(struct spi_device *spi, u8 addr) in rf69_read_reg() argument 22 return spi_w8r8(spi, addr); in rf69_read_reg() 25 static int rf69_write_reg(struct spi_device *spi, u8 addr, u8 value) in rf69_write_reg() argument 32 return spi_write(spi, &buffer, ARRAY_SIZE(buffer)); in rf69_write_reg() [all …]
|
| D | rf69.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 * Copyright (C) 2016 Wolf-Entwicklungen 6 * Marcus Wolf <linux@wolf-entwicklungen.de> 20 u8 rf69_read_reg(struct spi_device *spi, u8 addr); 21 int rf69_get_version(struct spi_device *spi); 22 int rf69_set_mode(struct spi_device *spi, enum mode mode); 23 int rf69_set_data_mode(struct spi_device *spi, u8 data_mode); 24 int rf69_set_modulation(struct spi_device *spi, enum modulation modulation); 25 int rf69_set_modulation_shaping(struct spi_device *spi, 27 int rf69_set_bit_rate(struct spi_device *spi, u16 bit_rate); [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/pi433/ |
| D | rf69.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * abstraction of the spi interface of HopeRf rf69 radio module 5 * Copyright (C) 2016 Wolf-Entwicklungen 6 * Marcus Wolf <linux@wolf-entwicklungen.de> 17 #include <linux/spi/spi.h> 25 /*-------------------------------------------------------------------------*/ 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() [all …]
|
| D | rf69.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 5 * Copyright (C) 2016 Wolf-Entwicklungen 6 * Marcus Wolf <linux@wolf-entwicklungen.de> 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); [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/greybus/ |
| D | spilib.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Greybus SPI library 5 * Copyright 2014-2016 Google Inc. 6 * Copyright 2014-2016 Linaro Ltd. 14 #include <linux/spi/spi.h> 41 #define GB_SPI_STATE_MSG_ERROR ((void *)-1) 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() 54 data_max -= sizeof(struct gb_spi_transfer_request); in tx_header_fit_operation() 65 data_max -= sizeof(struct gb_spi_transfer_response); in calc_rx_xfer_size() [all …]
|
| /kernel/linux/linux-6.6/drivers/staging/greybus/ |
| D | spilib.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Greybus SPI library 5 * Copyright 2014-2016 Google Inc. 6 * Copyright 2014-2016 Linaro Ltd. 14 #include <linux/spi/spi.h> 41 #define GB_SPI_STATE_MSG_ERROR ((void *)-1) 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() 54 data_max -= sizeof(struct gb_spi_transfer_request); in tx_header_fit_operation() 65 data_max -= sizeof(struct gb_spi_transfer_response); in calc_rx_xfer_size() [all …]
|
| /kernel/linux/linux-6.6/drivers/video/backlight/ |
| D | ili922x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * controller. The interface to the display is SPI and the display's 20 #include <linux/spi/spi.h> 89 * ---------------------------------- 91 * ---------------------------------- 94 * - START_RS_INDEX set the index register 95 * - START_RS_REG write/read registers/GRAM 97 * - START_RW_WRITE write 98 * - START_RW_READ read 104 * CHECK_FREQ_REG(spi_device s, spi_transfer x) - Check the frequency [all …]
|
| /kernel/linux/linux-5.10/drivers/video/backlight/ |
| D | ili922x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * controller. The interface to the display is SPI and the display's 20 #include <linux/spi/spi.h> 89 * ---------------------------------- 91 * ---------------------------------- 94 * - START_RS_INDEX set the index register 95 * - START_RS_REG write/read registers/GRAM 97 * - START_RW_WRITE write 98 * - START_RW_READ read 104 * CHECK_FREQ_REG(spi_device s, spi_transfer x) - Check the frequency [all …]
|
| /kernel/linux/linux-5.10/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 9 io with 3-byte and 4-byte addressing support. 14 use SPI protocol. 18 - #address-cells: 19 Must be <1>, as required by generic SPI binding. 21 - #size-cells: [all …]
|
| /kernel/linux/linux-6.6/drivers/media/pci/netup_unidvb/ |
| D | netup_unidvb_spi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Internal SPI driver for NetUP Universal Dual DVB-CI 13 #include <linux/spi/spi.h> 14 #include <linux/spi/flash.h> 16 #include <mtd/mtd-abi.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() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/pci/netup_unidvb/ |
| D | netup_unidvb_spi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Internal SPI driver for NetUP Universal Dual DVB-CI 13 #include <linux/spi/spi.h> 14 #include <linux/spi/flash.h> 16 #include <mtd/mtd-abi.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() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/wan/ |
| D | slic_ds26522.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 #include <linux/spi/spi.h> 37 static void slic_write(struct spi_device *spi, u16 addr, in slic_write() argument 48 /* write spi addr and value */ in slic_write() 49 spi_write(spi, &temp[0], SLIC_THREE_LEN); in slic_write() 52 static u8 slic_read(struct spi_device *spi, u16 addr) in slic_read() argument 61 spi_write_then_read(spi, &temp[0], SLIC_TWO_LEN, &data, in slic_read() 68 static bool get_slic_product_code(struct spi_device *spi) in get_slic_product_code() argument 72 device_id = slic_read(spi, DS26522_IDR_ADDR); in get_slic_product_code() 79 static void ds26522_e1_spec_config(struct spi_device *spi) in ds26522_e1_spec_config() argument [all …]
|