/linux-5.10/drivers/staging/pi433/ |
D | pi433_if.c | 1 // SPDX-License-Identifier: GPL-2.0+ 13 * HopeRf with a similar interace - e. g. RFM69HCW, RFM12, RFM95, ... 15 * Copyright (C) 2016 Wolf-Entwicklungen 16 * Marcus Wolf <linux@wolf-entwicklungen.de> 27 #include <linux/device.h> 40 #include <linux/spi/spi.h> 64 * rx config is device specific 65 * so we have just one rx config, ebedded in device struct 68 /* device handling related values */ 71 struct device *dev; [all …]
|
/linux-5.10/Documentation/devicetree/bindings/spi/ |
D | spi-controller.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/spi/spi-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: SPI Controller Generic Binding 10 - Mark Brown <broonie@kernel.org> 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])*$" [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 10 - compatible: Should contain: 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. 15 - reg: Should contain base register location and length 16 - interrupts: Interrupt number used by this controller 18 - clocks: Should contain the core clock and the AHB clock. [all …]
|
D | spi-orion.txt | 1 Marvell Orion SPI device 4 - compatible : should be on of the following: 5 - "marvell,orion-spi" for the Orion, mv78x00, Kirkwood and Dove SoCs 6 - "marvell,armada-370-spi", for the Armada 370 SoCs 7 - "marvell,armada-375-spi", for the Armada 375 SoCs 8 - "marvell,armada-380-spi", for the Armada 38x SoCs 9 - "marvell,armada-390-spi", for the Armada 39x SoCs 10 - "marvell,armada-xp-spi", for the Armada XP SoCs 11 - reg : offset and length of the register set for the device. 13 the SPI direct access mode that some of the Marvell SoCs support [all …]
|
D | spi-davinci.txt | 1 Davinci SPI controller device bindings 4 Keystone 2 - https://www.ti.com/lit/ug/sprugp2a/sprugp2a.pdf 5 dm644x - https://www.ti.com/lit/ug/sprue32a/sprue32a.pdf 6 OMAP-L138/da830 - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf 9 - #address-cells: number of cells required to define a chip select 10 address on the SPI bus. Should be set to 1. 11 - #size-cells: should be zero. 12 - compatible: 13 - "ti,dm6441-spi" for SPI used similar to that on DM644x SoC family 14 - "ti,da830-spi" for SPI used similar to that on DA8xx SoC family [all …]
|
/linux-5.10/drivers/spi/ |
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 …]
|
D | spi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 // SPI init/core code 8 #include <linux/device.h> 11 #include <linux/dma-mapping.h> 16 #include <linux/clk/clk-conf.h> 19 #include <linux/spi/spi.h> 20 #include <linux/spi/spi-mem.h> 38 #include <trace/events/spi.h> 46 static void spidev_release(struct device *dev) in spidev_release() 48 struct spi_device *spi = to_spi_device(dev); in spidev_release() local [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-mem.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 #include <linux/spi/spi.h> 11 #include <linux/spi/spi-mem.h> 18 * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a 20 * @ctlr: the SPI controller requesting this dma_map() 22 * @sgt: a pointer to a non-initialized sg_table that will be filled by this 26 * This helper prepares everything for you and provides a ready-to-use 27 * sg_table. This function is not intended to be called from spi drivers. 28 * Only SPI controller drivers should use it. 30 * op->data.buf.{in,out} is DMA-able before calling this function. [all …]
|
D | spidev.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Simple synchronous userspace interface to SPI devices 6 * Andrea Paterniani <a.paterniani@swapp-eng.it> 14 #include <linux/device.h> 25 #include <linux/spi/spi.h> 26 #include <linux/spi/spidev.h> 32 * This supports access to SPI devices using normal userspace I/O calls. 34 * and often mask message boundaries, full SPI support requires full duplex 38 * SPI has a character major number assigned. We allocate minor numbers 40 * (or mdev with busybox) to create and destroy the /dev/spidevB.C device [all …]
|
D | spi-orion.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Marvell Orion SPI controller driver 6 * Copyright (C) 2007-2008 Marvell Ltd. 14 #include <linux/spi/spi.h> 74 * have both is for managing the armada-370-spi case with old 75 * device tree 105 return orion_spi->base + reg; in spi_reg() 130 static int orion_spi_baudrate_set(struct spi_device *spi, unsigned int speed) in orion_spi_baudrate_set() argument 139 orion_spi = spi_master_get_devdata(spi->master); in orion_spi_baudrate_set() 140 devdata = orion_spi->devdata; in orion_spi_baudrate_set() [all …]
|
/linux-5.10/include/linux/spi/ |
D | spi.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later 9 #include <linux/device.h> 25 * INTERFACES between SPI master-side drivers and SPI slave protocol handlers, 26 * and SPI infrastructure. 31 * struct spi_statistics - statistics for spi transfers 34 * @messages: number of spi-messages handled 45 * @bytes: number of bytes transferred to/from device 46 * @bytes_tx: number of bytes sent to device 47 * @bytes_rx: number of bytes received from device 85 spin_lock_irqsave(&(stats)->lock, flags); \ [all …]
|
D | spi-mem.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 14 #include <linux/spi/spi.h> 59 * enum spi_mem_data_dir - describes the direction of a SPI memory data 62 * @SPI_MEM_DATA_IN: data coming from the SPI memory 63 * @SPI_MEM_DATA_OUT: data sent to the SPI memory 72 * struct spi_mem_op - describes a SPI memory operation 74 * sent MSB-first. 95 * @data.buf.in: input buffer (must be DMA-able) 96 * @data.buf.out: output buffer (must be DMA-able) 140 * struct spi_mem_dirmap_info - Direct mapping information [all …]
|
/linux-5.10/Documentation/spi/ |
D | spi-summary.rst | 2 Overview of Linux kernel SPI support 5 02-Feb-2012 7 What is SPI? 8 ------------ 9 The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial 12 standardization body. SPI uses a master/slave configuration. 17 clocking modes through which data is exchanged; mode-0 and mode-3 are most 22 SPI masters use a fourth "chip select" line to activate a given SPI slave 23 device, so those three signal wires may be connected to several chips 24 in parallel. All SPI slaves support chipselects; they are usually active [all …]
|
D | spidev.rst | 2 SPI userspace API 5 SPI devices have a limited userspace API, supporting basic half-duplex 6 read() and write() access to SPI slave devices. Using ioctl() requests, 7 full duplex transfers and device I/O configuration are also available. 15 #include <linux/spi/spidev.h> 19 * Prototyping in an environment that's not crash-prone; stray pointers 23 as SPI slaves, which you may need to change quite often. 30 DEVICE CREATION, DRIVER BINDING 33 spi_board_info for a device as the driver it should use: the "modalias" 35 Set up the other device characteristics (bits per word, SPI clocking, [all …]
|
/linux-5.10/drivers/mtd/devices/ |
D | mtd_dataflash.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Atmel AT45xxx DataFlash MTD driver for lightweight SPI framework 6 * Copyright (C) 2003-2005 SAN People (Pty) Ltd 11 #include <linux/device.h> 18 #include <linux/spi/spi.h> 19 #include <linux/spi/flash.h> 25 * DataFlash is a kind of SPI flash. Most AT45 chips have two buffers in 29 * Sometimes DataFlash is packaged in MMC-format cards, although the 58 #define OP_MWRITE_BUFFER1 0x88 /* sector must be pre-erased */ 59 #define OP_MWRITE_BUFFER2 0x89 /* sector must be pre-erased */ [all …]
|
/linux-5.10/drivers/iio/common/st_sensors/ |
D | st_sensors_spi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * STMicroelectronics sensors spi library driver 5 * Copyright 2012-2013 STMicroelectronics Inc. 34 * st_sensors_is_spi_3_wire() - check if SPI 3-wire mode has been selected 35 * @spi: spi device reference. 37 * Return: true if SPI 3-wire mode is selected, false otherwise. 39 static bool st_sensors_is_spi_3_wire(struct spi_device *spi) in st_sensors_is_spi_3_wire() argument 42 struct device *dev = &spi->dev; in st_sensors_is_spi_3_wire() 44 if (device_property_read_bool(dev, "spi-3wire")) in st_sensors_is_spi_3_wire() 48 if (pdata && pdata->spi_3wire) in st_sensors_is_spi_3_wire() [all …]
|
/linux-5.10/include/linux/mtd/ |
D | spinand.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (c) 2016-2017 Micron Technology, Inc. 13 #include <linux/device.h> 16 #include <linux/spi/spi.h> 17 #include <linux/spi/spi-mem.h> 20 * Standard SPI NAND flash operations 144 * Standard SPI NAND flash commands 175 * struct spinand_id - SPI NAND id structure 192 * struct spinand_devid - SPI NAND device id structure 193 * @id: device id of current chip [all …]
|
/linux-5.10/drivers/video/backlight/ |
D | ili922x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * This driver implements a lcd device for the ILITEK 922x display 7 * controller. The interface to the display is SPI and the display's 20 #include <linux/spi/spi.h> 73 * Device ID as found in the datasheet (supports 9221 and 9222) 89 * ---------------------------------- 91 * ---------------------------------- 94 * - START_RS_INDEX set the index register 95 * - START_RS_REG write/read registers/GRAM 97 * - START_RW_WRITE write [all …]
|
/linux-5.10/drivers/input/misc/ |
D | adxl34x-spi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ADLX345/346 Three-Axis Digital Accelerometers (SPI Interface) 12 #include <linux/spi/spi.h> 26 static int adxl34x_spi_read(struct device *dev, unsigned char reg) in adxl34x_spi_read() 28 struct spi_device *spi = to_spi_device(dev); in adxl34x_spi_read() local 33 return spi_w8r8(spi, cmd); in adxl34x_spi_read() 36 static int adxl34x_spi_write(struct device *dev, in adxl34x_spi_write() 39 struct spi_device *spi = to_spi_device(dev); in adxl34x_spi_write() local 45 return spi_write(spi, buf, sizeof(buf)); in adxl34x_spi_write() 48 static int adxl34x_spi_read_block(struct device *dev, in adxl34x_spi_read_block() [all …]
|
/linux-5.10/drivers/gpu/drm/panel/ |
D | panel-samsung-s6e63m0-spi.c | 1 // SPDX-License-Identifier: GPL-2.0 3 #include <linux/device.h> 5 #include <linux/spi/spi.h> 10 #include "panel-samsung-s6e63m0.h" 14 static int s6e63m0_spi_dcs_read(struct device *dev, const u8 cmd, u8 *data) in s6e63m0_spi_dcs_read() 17 * FIXME: implement reading DCS commands over SPI so we can in s6e63m0_spi_dcs_read() 25 static int s6e63m0_spi_write_word(struct device *dev, u16 data) in s6e63m0_spi_write_word() 27 struct spi_device *spi = to_spi_device(dev); in s6e63m0_spi_write_word() local 37 return spi_sync(spi, &msg); in s6e63m0_spi_write_word() 40 static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len) in s6e63m0_spi_dcs_write() [all …]
|
/linux-5.10/drivers/input/rmi4/ |
D | rmi_spi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2011-2016 Synaptics Incorporated 11 #include <linux/spi/spi.h> 38 struct spi_device *spi; member 55 struct spi_device *spi = rmi_spi->spi; in rmi_spi_manage_pools() local 56 int buf_size = rmi_spi->xfer_buf_size in rmi_spi_manage_pools() 57 ? rmi_spi->xfer_buf_size : RMI_SPI_DEFAULT_XFER_BUF_SIZE; in rmi_spi_manage_pools() 68 tmp = rmi_spi->rx_buf; in rmi_spi_manage_pools() 69 buf = devm_kcalloc(&spi->dev, buf_size, 2, in rmi_spi_manage_pools() 72 return -ENOMEM; in rmi_spi_manage_pools() [all …]
|
/linux-5.10/drivers/rtc/ |
D | rtc-max6916.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* rtc-max6916.c 4 * Driver for MAXIM max6916 Low Current, SPI Compatible 12 #include <linux/device.h> 15 #include <linux/spi/spi.h> 31 static int max6916_read_reg(struct device *dev, unsigned char address, in max6916_read_reg() 34 struct spi_device *spi = to_spi_device(dev); in max6916_read_reg() local 38 return spi_write_then_read(spi, data, 1, data, 1); in max6916_read_reg() 41 static int max6916_write_reg(struct device *dev, unsigned char address, in max6916_write_reg() 44 struct spi_device *spi = to_spi_device(dev); in max6916_write_reg() local [all …]
|
/linux-5.10/Documentation/devicetree/bindings/input/rmi4/ |
D | rmi_spi.txt | 1 Synaptics RMI4 SPI Device Binding 4 transports and different functions. This file describes the device tree 5 bindings for devices using the SPI transport driver. Complete documentation 10 - compatible: syna,rmi4-spi 11 - reg: Chip select address for the device 12 - #address-cells: Set to 1 to indicate that the function child nodes 14 - #size-cells: Set to 0 to indicate that the function child nodes do not 18 - interrupts: interrupt which the rmi device is connected to. 19 See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 21 - spi-rx-delay-us: microsecond delay after a read transfer. [all …]
|
/linux-5.10/drivers/mfd/ |
D | sprd-sc27xx-spi.c | 1 // SPDX-License-Identifier: GPL-2.0-only 10 #include <linux/mfd/sc27xx-pmic.h> 14 #include <linux/spi/spi.h> 36 struct device *dev; 53 * in the device data structure. 61 enum usb_charger_type sprd_pmic_detect_charger_type(struct device *dev) in sprd_pmic_detect_charger_type() 63 struct spi_device *spi = to_spi_device(dev); in sprd_pmic_detect_charger_type() local 64 struct sprd_pmic *ddata = spi_get_drvdata(spi); in sprd_pmic_detect_charger_type() 65 const struct sprd_pmic_data *pdata = ddata->pdata; in sprd_pmic_detect_charger_type() 70 ret = regmap_read_poll_timeout(ddata->regmap, pdata->charger_det, val, in sprd_pmic_detect_charger_type() [all …]
|