Home
last modified time | relevance | path

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

12345678910>>...47

/linux-6.12.1/drivers/spi/
DMakefile1 # 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 …]
Dspi-stm32.c1 // SPDX-License-Identifier: GPL-2.0
3 // STMicroelectronics STM32 SPI Controller driver
5 // Copyright (C) 2017, STMicroelectronics - All Rights Reserved
21 #include <linux/spi/spi.h>
25 /* STM32F4/7 SPI registers */
81 /* STM32F4 SPI Baud Rate min/max divisor */
85 /* STM32H7 SPI registers */
157 /* STM32MP25 SPI registers bit fields */
171 /* STM32H7 SPI Master Baud Rate min/max divisor */
175 /* STM32H7 SPI Communication mode */
[all …]
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 …]
Dspi-lantiq-ssc.c1 // 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 …]
Dspi-microchip-core.c1 // 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>
108 u32 clk_gen; /* divider for spi output clock generated by the controller */
117 static inline u32 mchp_corespi_read(struct mchp_corespi *spi, unsigned int reg) in mchp_corespi_read() argument
119 return readl(spi->regs + reg); in mchp_corespi_read()
122 static inline void mchp_corespi_write(struct mchp_corespi *spi, unsigned int reg, u32 val) in mchp_corespi_write() argument
124 writel(val, spi->regs + reg); in mchp_corespi_write()
127 static inline void mchp_corespi_disable(struct mchp_corespi *spi) in mchp_corespi_disable() argument
[all …]
Dspi-mux.c1 // 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 …]
Dspi-sifive.c1 // 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 …]
Dspi-gpio.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * SPI host driver using generic bitbanged GPIO
15 #include <linux/spi/spi.h>
16 #include <linux/spi/spi_bitbang.h>
17 #include <linux/spi/spi_gpio.h>
20 * This bitbanging SPI host driver should help make systems usable
21 * when a native hardware SPI engine is not available, perhaps because
25 * platform_device->driver_data ... points to spi_gpio
27 * spi->controller_state ... reserved for bitbang framework code
29 * spi->controller->dev.driver_data ... points to spi_gpio->bitbang
[all …]
Dspi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 // SPI init/core code
9 #include <linux/clk/clk-conf.h>
13 #include <linux/dma-mapping.h>
34 #include <linux/spi/spi.h>
35 #include <linux/spi/spi-mem.h>
39 #include <trace/events/spi.h>
49 struct spi_device *spi = to_spi_device(dev); in spidev_release() local
51 spi_controller_put(spi->controller); in spidev_release()
52 kfree(spi->driver_override); in spidev_release()
[all …]
Dspi-orion.c1 // 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>
73 * have both is for managing the armada-370-spi case with old
110 return orion_spi->base + reg; in spi_reg()
135 static int orion_spi_baudrate_set(struct spi_device *spi, unsigned int speed) in orion_spi_baudrate_set() argument
144 orion_spi = spi_controller_get_devdata(spi->controller); in orion_spi_baudrate_set()
145 devdata = orion_spi->devdata; in orion_spi_baudrate_set()
147 tclk_hz = clk_get_rate(orion_spi->clk); in orion_spi_baudrate_set()
[all …]
Dspi-omap2-mcspi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
15 #include <linux/dma-mapping.h>
28 #include <linux/spi/spi.h>
32 #include <linux/platform_data/spi-omap2-mcspi.h>
49 /* per-channel banks, 0x14 bytes each, first is: */
56 /* per-register bitmasks: */
154 writel_relaxed(val, mcspi->base + idx); in mcspi_write_reg()
161 return readl_relaxed(mcspi->base + idx); in mcspi_read_reg()
164 static inline void mcspi_write_cs_reg(const struct spi_device *spi, in mcspi_write_cs_reg() argument
167 struct omap2_mcspi_cs *cs = spi->controller_state; in mcspi_write_cs_reg()
[all …]
/linux-6.12.1/drivers/staging/greybus/
Dspilib.c1 // 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_controller *get_controller_from_spi(struct gb_spilib *spi) in get_controller_from_spi() argument
47 return gb_connection_get_data(spi->connection); in get_controller_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 …]
/linux-6.12.1/drivers/video/backlight/
Dili922x.c1 // 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 …]
Dl4f00242t03.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * l4f00242t03.c -- support for Epson L4F00242T03 LCD
5 * Copyright 2007-2009 Freescale Semiconductor, Inc. All Rights Reserved.
21 #include <linux/spi/spi.h>
24 struct spi_device *spi; member
46 static void l4f00242t03_lcd_init(struct spi_device *spi) in l4f00242t03_lcd_init() argument
48 struct l4f00242t03_priv *priv = spi_get_drvdata(spi); in l4f00242t03_lcd_init()
52 dev_dbg(&spi->dev, "initializing LCD\n"); in l4f00242t03_lcd_init()
54 ret = regulator_set_voltage(priv->io_reg, 1800000, 1800000); in l4f00242t03_lcd_init()
56 dev_err(&spi->dev, "failed to set the IO regulator voltage.\n"); in l4f00242t03_lcd_init()
[all …]
/linux-6.12.1/drivers/media/pci/netup_unidvb/
Dnetup_unidvb_spi.c1 // 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 …]
/linux-6.12.1/drivers/net/wan/
Dslic_ds26522.c1 // SPDX-License-Identifier: GPL-2.0-or-later
16 #include <linux/spi/spi.h>
38 static void slic_write(struct spi_device *spi, u16 addr, in slic_write() argument
49 /* write spi addr and value */ in slic_write()
50 spi_write(spi, &temp[0], SLIC_THREE_LEN); in slic_write()
53 static u8 slic_read(struct spi_device *spi, u16 addr) in slic_read() argument
62 spi_write_then_read(spi, &temp[0], SLIC_TWO_LEN, &data, in slic_read()
69 static bool get_slic_product_code(struct spi_device *spi) in get_slic_product_code() argument
73 device_id = slic_read(spi, DS26522_IDR_ADDR); in get_slic_product_code()
80 static void ds26522_e1_spec_config(struct spi_device *spi) in ds26522_e1_spec_config() argument
[all …]
/linux-6.12.1/drivers/net/can/spi/
Dmcp251x.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* CAN bus driver for Microchip 251x/25625 CAN Controller with SPI Interface
17 * - Sascha Hauer, Marc Kleine-Budde, Pengutronix
18 * - Simon Kallweit, intefo AG
42 #include <linux/spi/spi.h>
45 /* SPI interface instruction set */
196 /* Buffer size required for the largest SPI transfer (i.e., reading a
230 struct spi_device *spi; member
233 struct mutex mcp_lock; /* SPI device lock */
263 static inline int mcp251x_is_##_model(struct spi_device *spi) \
[all …]
Dhi311x.c1 // SPDX-License-Identifier: GPL-2.0-only
2 /* CAN bus driver for Holt HI3110 CAN Controller with SPI Interface
12 * - Sascha Hauer, Marc Kleine-Budde, Pengutronix
13 * - Simon Kallweit, intefo AG
35 #include <linux/spi/spi.h>
147 struct spi_device *spi; member
150 struct mutex hi3110_lock; /* SPI device lock */
179 if (priv->tx_skb || priv->tx_busy) in hi3110_clean()
180 net->stats.tx_errors++; in hi3110_clean()
181 dev_kfree_skb(priv->tx_skb); in hi3110_clean()
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/spi/
Dmediatek,spi-mt65xx.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/spi/mediatek,spi-mt65xx.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: SPI Bus controller for MediaTek ARM SoCs
10 - Leilk Liu <leilk.liu@mediatek.com>
13 - $ref: /schemas/spi/spi-controller.yaml#
18 - items:
19 - enum:
20 - mediatek,mt7629-spi
[all …]
Dbrcm,spi-bcm-qspi.yaml1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
3 ---
4 $id: http://devicetree.org/schemas/spi/brcm,spi-bcm-qspi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Broadcom SPI controller
10 - Kamal Dasu <kdasu.kdev@gmail.com>
11 - Rafał Miłecki <rafal@milecki.pl>
14 The Broadcom SPI controller is a SPI master found on various SOCs, including
15 BRCMSTB (BCM7XXX), Cygnus, NSP and NS2. The Broadcom Master SPI hw IP consists
17 MSPI : SPI master controller can read and write to a SPI slave device
[all …]
Dsnps,dw-apb-ssi.yaml1 # SPDX-License-Identifier: GPL-2.0-only
3 ---
4 $id: http://devicetree.org/schemas/spi/snps,dw-apb-ssi.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Mark Brown <broonie@kernel.org>
13 - $ref: spi-controller.yaml#
14 - if:
19 - mscc,ocelot-spi
20 - mscc,jaguar2-spi
25 - if:
[all …]
/linux-6.12.1/drivers/misc/
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>
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()
85 ret = spi_sync_locked(spi, &msg); in ezport_start_programming()
[all …]
/linux-6.12.1/drivers/media/dvb-frontends/cxd2880/
Dcxd2880_spi_device.c1 // SPDX-License-Identifier: GPL-2.0
4 * Sony CXD2880 DVB-T2/T tuner + demodulator driver
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()
23 return -EINVAL; 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()
36 return -EIO; in cxd2880_spi_device_write()
[all …]
/linux-6.12.1/drivers/video/fbdev/omap2/omapfb/displays/
Dpanel-lgphilips-lb035q02.c1 // SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/spi/spi.h>
43 struct spi_device *spi; member
54 static int lb035q02_write_reg(struct spi_device *spi, u8 reg, u16 val) in lb035q02_write_reg() argument
82 return spi_sync(spi, &msg); in lb035q02_write_reg()
85 static void init_lb035q02_panel(struct spi_device *spi) in init_lb035q02_panel() argument
88 lb035q02_write_reg(spi, 0x01, 0x6300); in init_lb035q02_panel()
89 lb035q02_write_reg(spi, 0x02, 0x0200); in init_lb035q02_panel()
90 lb035q02_write_reg(spi, 0x03, 0x0177); in init_lb035q02_panel()
91 lb035q02_write_reg(spi, 0x04, 0x04c7); in init_lb035q02_panel()
[all …]
/linux-6.12.1/drivers/iio/common/st_sensors/
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 …]

12345678910>>...47