Home
last modified time | relevance | path

Searched +full:spi +full:- +full:device (Results 1 – 25 of 1028) sorted by relevance

12345678910>>...42

/linux/Documentation/spi/
H A Dspidev.rst2 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 The spidev driver contains lists of SPI devices that are supported for
36 The following are the SPI device tables supported by the spidev driver:
[all …]
H A Dspi-summary.rst2 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 host/target configuration.
17 clocking modes through which data is exchanged; mode-0 and mode-3 are most
22 SPI hosts use a fourth "chip select" line to activate a given SPI target
23 device, so those three signal wires may be connected to several chips
24 in parallel. All SPI targets support chipselects; they are usually active
[all …]
/linux/include/linux/spi/
H A Dspi.h1 /* SPDX-License-Identifier: GPL-2.0-or-later
12 #include <linux/device.h>
21 #include <uapi/linux/spi/spi.h>
23 /* Max no. of CS supported per spi device */
38 * INTERFACES between SPI controller-side drivers and SPI target protocol handlers,
39 * and SPI infrastructure.
44 * struct spi_statistics - statistics for spi transfers
45 * @syncp: seqcount to protect members in this struct for per-cpu update
46 * on 32-bit systems
48 * @messages: number of spi-messages handled
[all …]
/linux/drivers/spi/
H A Dspi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 // SPI init/core code
9 #include <linux/clk/clk-conf.h>
11 #include <linux/device.h>
13 #include <linux/dma-mapping.h>
34 #include <linux/spi/offload/types.h>
35 #include <linux/spi/spi.h>
36 #include <linux/spi/spi-mem.h>
40 #include <trace/events/spi.h>
48 static void spidev_release(struct device *dev) in spidev_release()
[all …]
H A DKconfig1 # 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 Dspi-mem.c1 // SPDX-License-Identifier: GPL-2.0+
11 #include <linux/spi/spi.h>
12 #include <linux/spi/spi-mem.h>
20 * spi_controller_dma_map_mem_op_data() - DMA-map the buffer attached to a
22 * @ctlr: the SPI controller requesting this dma_map()
24 * @sgt: a pointer to a non-initialized sg_table that will be filled by this
28 * This helper prepares everything for you and provides a ready-to-use
29 * sg_table. This function is not intended to be called from spi drivers.
30 * Only SPI controller drivers should use it.
32 * op->data.buf.{in,out} is DMA-able before calling this function.
[all …]
H A Dspi-apple.c1 // SPDX-License-Identifier: GPL-2.0
3 // Apple SoC SPI device driver
7 // Based on spi-sifive.c, Copyright 2018 SiFive, Inc.
18 #include <linux/spi/spi.h>
114 * intra-word delay is 0xffff refclocks. So the maximum time a transfer
126 struct completion done; /* wake-up from interrupt */
129 static inline void reg_write(struct apple_spi *spi, int offset, u32 value) in reg_write() argument
131 writel_relaxed(value, spi->regs + offset); in reg_write()
134 static inline u32 reg_read(struct apple_spi *spi, int offset) in reg_read() argument
136 return readl_relaxed(spi->regs + offset); in reg_read()
[all …]
/linux/drivers/mtd/devices/
H A Dmtd_dataflash.c1 // 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>
17 #include <linux/spi/spi.h>
18 #include <linux/spi/flash.h>
24 * DataFlash is a kind of SPI flash. Most AT45 chips have two buffers in
28 * Sometimes DataFlash is packaged in MMC-format cards, although the
57 #define OP_MWRITE_BUFFER1 0x88 /* sector must be pre-erased */
58 #define OP_MWRITE_BUFFER2 0x89 /* sector must be pre-erased */
[all …]
/linux/drivers/video/backlight/
H A Dili922x.c1 // 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
19 #include <linux/spi/spi.h>
72 * Device ID as found in the datasheet (supports 9221 and 9222)
88 * ----------------------------------
90 * ----------------------------------
93 * - START_RS_INDEX set the index register
94 * - START_RS_REG write/read registers/GRAM
96 * - START_RW_WRITE write
[all …]
/linux/drivers/iio/common/st_sensors/
H A Dst_sensors_spi.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * STMicroelectronics sensors spi library driver
5 * Copyright 2012-2013 STMicroelectronics Inc.
15 #include <linux/spi/spi.h>
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
41 struct device *dev = &spi->dev; in st_sensors_is_spi_3_wire()
43 if (device_property_read_bool(dev, "spi-3wire")) in st_sensors_is_spi_3_wire()
[all …]
/linux/Documentation/devicetree/bindings/spi/
H A Dspi-peripheral-props.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/spi/spi-peripheral-props.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Peripheral-specific properties for a SPI bus.
10 Many SPI controllers need to add properties to peripheral devices. They could
11 be common properties like spi-max-frequency, spi-cs-high, etc. or they could
14 per-peripheral and there can be multiple peripherals attached to a
20 - Mark Brown <broonie@kernel.org>
28 - minimum: 0
[all …]
H A Dspi-orion.txt1 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 …]
H A Dspi-davinci.txt1 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/include/linux/mtd/
H A Dspinand.h1 /* 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
227 * Standard SPI NAND flash commands
263 * For reset, 5us/10us/500us if the device is respectively
265 * issue a RESET when the device is IDLE, 5us is selected for both initial
280 * struct spinand_id - SPI NAND id structure
[all …]
/linux/drivers/misc/mei/
H A Dvsc-tp.c1 // SPDX-License-Identifier: GPL-2.0-only
11 #include <linux/device.h>
19 #include <linux/spi/spi.h>
22 #include "vsc-tp.h"
35 /* SPI xfer timeout size */
39 (sizeof(struct vsc_tp_packet_hdr) + le16_to_cpu((pkt)->hdr.len) + VSC_TP_CRC_SIZE)
45 (len + sizeof(struct vsc_tp_packet_hdr) + VSC_TP_CRC_SIZE - offset + VSC_TP_PACKET_PADDING_SIZE)
56 __u8 buf[VSC_TP_MAX_XFER_SIZE - sizeof(struct vsc_tp_packet_hdr)];
61 struct spi_device *spi; member
94 { "wakeuphost-gpios", &wakeuphost_gpio, 1 },
[all …]
/linux/drivers/input/rmi4/
H A Drmi_spi.c1 // 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/drivers/rtc/
H A Drtc-max6916.c1 // 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 …]
H A Drtc-ds1390.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rtc-ds1390.c -- driver for the Dallas/Maxim DS1390/93/94 SPI RTC
17 #include <linux/spi/spi.h>
53 static void ds1390_set_reg(struct device *dev, unsigned char address, in ds1390_set_reg()
56 struct spi_device *spi = to_spi_device(dev); in ds1390_set_reg() local
63 spi_write(spi, buf, 2); in ds1390_set_reg()
66 static int ds1390_get_reg(struct device *dev, unsigned char address, in ds1390_get_reg()
69 struct spi_device *spi = to_spi_device(dev); in ds1390_get_reg() local
74 return -EINVAL; in ds1390_get_reg()
77 chip->txrx_buf[0] = address & 0x7f; in ds1390_get_reg()
[all …]
H A Drtc-ds1343.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* rtc-ds1343.c
4 * Driver for Dallas Semiconductor DS1343 Low Current, SPI Compatible
14 #include <linux/device.h>
15 #include <linux/spi/spi.h>
75 MODULE_DEVICE_TABLE(spi, ds1343_id);
83 static ssize_t ds1343_show_glitchfilter(struct device *dev, in ds1343_show_glitchfilter()
86 struct ds1343_priv *priv = dev_get_drvdata(dev->parent); in ds1343_show_glitchfilter()
90 res = regmap_read(priv->map, DS1343_CONTROL_REG, &data); in ds1343_show_glitchfilter()
102 static ssize_t ds1343_store_glitchfilter(struct device *dev, in ds1343_store_glitchfilter()
[all …]
/linux/drivers/misc/
H A Dgehc-achc.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * datasheet: https://www.nxp.com/docs/en/data-sheet/K20P144M120SF3.pdf
5 * Copyright (C) 2018-2021 Collabora
6 * Copyright (C) 2018-2021 GE Healthcare
15 #include <linux/spi/spi.h>
25 struct mutex device_lock; /* avoid concurrent device access */
42 #define EZPORT_SECTOR_MASK (EZPORT_SECTOR_SIZE - 1)
59 static int ezport_start_programming(struct spi_device *spi, struct gpio_desc *reset) in ezport_start_programming() argument
68 spi_bus_lock(spi->controller); in ezport_start_programming()
73 ret = spi_sync_locked(spi, &msg); in ezport_start_programming()
[all …]
/linux/drivers/hwmon/
H A Dadcxx.c1 // SPDX-License-Identifier: GPL-2.0-or-later
9 * The adcxx4s communicates with a host processor via an SPI/Microwire Bus
28 #include <linux/device.h>
32 #include <linux/hwmon-sysfs.h>
35 #include <linux/spi/spi.h>
40 struct device *hwmon_dev;
47 static ssize_t adcxx_show(struct device *dev, in adcxx_show()
50 struct spi_device *spi = to_spi_device(dev); in adcxx_show() local
52 struct adcxx *adc = spi_get_drvdata(spi); in adcxx_show()
58 if (mutex_lock_interruptible(&adc->lock)) in adcxx_show()
[all …]
/linux/drivers/net/wireless/ti/wlcore/
H A Dspi.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2008-2009 Nokia Corporation
16 #include <linux/spi/spi.h>
51 ((WL1271_BUSY_WORD_LEN - 4) / sizeof(u32))
63 /* Maximum number of SPI write chunks */
69 .nvs_name = "ti-connectivity/wl127x-nvs.bin",
74 .nvs_name = "ti-connectivity/wl128x-nvs.bin",
79 .cfg_name = "ti-connectivity/wl18xx-conf.bin",
80 .nvs_name = "ti-connectivity/wl1271-nvs.bin",
84 struct device *dev;
[all …]
/linux/Documentation/devicetree/bindings/iio/adc/
H A Dmicrochip,mcp3564.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Marius Cristea <marius.cristea@microchip.com>
13 Bindings for the Microchip family of 153.6 ksps, Low-Noise 16/24-Bit
14 Delta-Sigma ADCs with an SPI interface. Datasheet can be found here:
16 …s/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP3561-2-4-Family-Data-Sheet-DS20006181…
18 …ds/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3561_2_4R-Data-Sheet-DS200006391C.pdf
20 …ProductDocuments/DataSheets/MCP3461-2-4-Two-Four-Eight-Channel-153.6-ksps-Low-Noise-16-Bit-Delta-S…
22 …/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3461-2-4R-Family-Data-Sheet-DS20006404…
[all …]
/linux/drivers/mfd/
H A Docelot-spi.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
3 * SPI core driver for the Ocelot chip family.
6 * SPI to the VSC7511, VSC7512, VSC7513 and VSC7514 chips. The main functions
7 * are to prepare the chip's SPI interface for a specific bus speed, and a host
11 * Copyright 2021-2022 Innovative Advantage Inc.
13 * Author: Colin Foster <colin.foster@in-advantage.com>
16 #include <linux/device.h>
24 #include <linux/spi/spi.h>
54 static int ocelot_spi_initialize(struct device *dev) in ocelot_spi_initialize()
63 * The SPI address must be big-endian, but we want the payload to match in ocelot_spi_initialize()
[all …]
/linux/Documentation/devicetree/bindings/mtd/
H A Dst-fsm.txt1 * ST-Microelectronics SPI FSM Serial (NOR) Flash Controller
4 - compatible : Should be "st,spi-fsm"
5 - reg : Contains register's location and length.
6 - reg-names : Should contain the reg names "spi-fsm"
7 - interrupts : The interrupt number
8 - pinctrl-0 : Standard Pinctrl phandle (see: pinctrl/pinctrl-bindings.txt)
11 - st,syscfg : Phandle to boot-device system configuration registers
12 - st,boot-device-reg : Address of the aforementioned boot-device register(s)
13 - st,boot-device-spi : Expected boot-device value if booted via this device
17 compatible = "st,spi-fsm";
[all …]

12345678910>>...42