| /OK3568_Linux_fs/kernel/drivers/staging/pi433/ |
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/include/ |
| H A D | spi.h | 2 * Common SPI Interface: Controller-specific definitions 7 * SPDX-License-Identifier: GPL-2.0+ 15 /* SPI mode flags */ 23 #define SPI_LSB_FIRST BIT(3) /* per-word bits-on-wire */ 44 * struct dm_spi_bus - SPI bus info 46 * This contains information about a SPI bus. To obtain this structure, use 47 * dev_get_uclass_priv(bus) where bus is the SPI bus udevice. 62 * struct dm_spi_platdata - platform data for all SPI slaves 64 * This describes a SPI slave, a child device of the SPI bus. To obtain this 66 * dev_get_parent_platdata(slave->dev). [all …]
|
| H A D | spi-mem.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 17 #include <spi.h> 61 * enum spi_mem_data_dir - describes the direction of a SPI memory data 63 * @SPI_MEM_DATA_IN: data coming from the SPI memory 64 * @SPI_MEM_DATA_OUT: data sent the SPI memory 72 * struct spi_mem_op - describes a SPI memory operation 111 /* buf.{in,out} must be DMA-able. */ 129 * struct spi_mem - describes a SPI memory device 130 * @spi: the underlying SPI device 133 * Extra information that describe the SPI memory device and may be needed by [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/spi/ |
| H A D | spi.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later 9 #include <linux/device.h> 26 * INTERFACES between SPI master-side drivers and SPI slave protocol handlers, 27 * and SPI infrastructure. 32 * struct spi_statistics - statistics for spi transfers 35 * @messages: number of spi-messages handled 46 * @bytes: number of bytes transferred to/from device 47 * @bytes_tx: number of bytes sent to device 48 * @bytes_rx: number of bytes received from device 86 spin_lock_irqsave(&(stats)->lock, flags); \ [all …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/doc/device-tree-bindings/spi/ |
| H A D | spi-bus.txt | 1 SPI (Serial Peripheral Interface) busses 3 SPI busses can be described with a node for the SPI master device 4 and a set of child nodes for each SPI slave on the bus. For this 5 discussion, it is assumed that the system's SPI controller is in 6 SPI master mode. This binding does not describe SPI controllers 9 The SPI master node requires the following properties: 10 - #address-cells - number of cells required to define a chip select 11 address on the SPI bus. 12 - #size-cells - should be zero. 13 - compatible - name of SPI bus controller following generic names [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/spi/ |
| H A 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 …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/spi/ |
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/spi/ |
| H A 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 …]
|
| H A 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 …]
|
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/mtd/devices/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/include/linux/mtd/ |
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/include/linux/mtd/ |
| H A D | spinand.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * Copyright (c) 2016-2017 Micron Technology, Inc. 14 #include <linux/device.h> 17 #include <linux/spi/spi.h> 18 #include <linux/spi/spi-mem.h> 21 #include <spi.h> 22 #include <spi-mem.h> 27 * Standard SPI NAND flash operations 151 * Standard SPI NAND flash commands 182 * struct spinand_id - SPI NAND id structure [all …]
|
| /OK3568_Linux_fs/u-boot/drivers/spi/ |
| H A D | Kconfig | 1 menuconfig SPI config 2 bool "SPI Support" 4 if SPI 7 bool "Enable Driver Model for SPI drivers" 10 Enable driver model for SPI. The SPI slave interface 12 the SPI uclass. Drivers provide methods to access the SPI 14 include/spi.h. The existing spi_slave structure is attached 16 typically use driver-private data instead of extending the 20 bool "SPI memory extension" 22 Enable this option if you want to enable the SPI memory extension. [all …]
|
| /OK3568_Linux_fs/kernel/drivers/video/backlight/ |
| H A 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 …]
|
| /OK3568_Linux_fs/u-boot/arch/x86/include/asm/ |
| H A D | mrccache.h | 5 * SPDX-License-Identifier: GPL-2.0+ 34 * mrccache_find_current() - find the latest MRC cache record 39 * @entry: Position and size of MRC cache in SPI flash 45 * mrccache_update() - update the MRC cache with a new record 50 * @sf: SPI flash to write to 51 * @entry: Position and size of MRC cache in SPI flash 53 * @return 0 if updated, -EEXIST if the record is the same as the latest 54 * record, -EINVAL if the record is not valid, other error if SPI write failed 60 * mrccache_reserve() - reserve MRC data on the stack 62 * This copies MRC data pointed by gd->arch.mrc_output to a new place on the [all …]
|
| /OK3568_Linux_fs/kernel/drivers/iio/common/st_sensors/ |
| H A 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 …]
|
| /OK3568_Linux_fs/kernel/drivers/tty/serial/ |
| H A D | ifx6x60.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Driver for the IFX 6x60 spi modem. 17 * o The driver currently assumes a single device only. If you need to 18 * change this then look for saved_ifx_dev and add a device lookup 19 * o The driver is intended to be big-endian safe but has never been 26 #include <linux/dma-mapping.h> 30 #include <linux/device.h> 31 #include <linux/spi/spi.h> 48 #include <linux/spi/ifx_modem.h> 60 #define IFX_SPI_HEADER_0 (-1) [all …]
|
| /OK3568_Linux_fs/kernel/drivers/input/misc/ |
| H A 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 …]
|