Home
last modified time | relevance | path

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

12345678

/kernel/linux/linux-5.10/drivers/net/wireless/microchip/wilc1000/
Dspi.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2012 - 2018 Microchip Technology Inc., and its subsidiaries.
8 #include <linux/spi/spi.h>
22 * Spi protocol Function
55 u8 crc[]; member
60 u8 crc[]; member
65 u8 crc[]; member
70 u8 crc[]; member
75 u8 crc[]; member
85 u8 crc[]; member
[all …]
/kernel/linux/linux-6.6/drivers/net/wireless/microchip/wilc1000/
Dspi.c1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2012 - 2018 Microchip Technology Inc., and its subsidiaries.
8 #include <linux/spi/spi.h>
10 #include <linux/crc-itu-t.h>
18 static bool enable_crc7; /* protect SPI commands with CRC7 */
22 "\t\t\tagainst corruption during the SPI transfer.\n"
23 "\t\t\tCommand transfers are short and the CPU-cycle cost\n"
26 static bool enable_crc16; /* protect SPI data with CRC16 */
30 "\t\t\tagainst corruption during the SPI transfer.\n"
31 "\t\t\tData transfers can be large and the CPU-cycle cost\n"
[all …]
/kernel/linux/linux-6.6/drivers/net/can/spi/mcp251xfd/
Dmcp251xfd-regmap.c1 // SPDX-License-Identifier: GPL-2.0
3 // mcp251xfd - Microchip MCP251xFD Family CAN controller driver
6 // Marc Kleine-Budde <kernel@pengutronix.de>
18 struct spi_device *spi = context; in mcp251xfd_regmap_nocrc_write() local
20 return spi_write(spi, data, count); in mcp251xfd_regmap_nocrc_write()
28 struct spi_device *spi = context; in mcp251xfd_regmap_nocrc_gather_write() local
29 struct mcp251xfd_priv *priv = spi_get_drvdata(spi); in mcp251xfd_regmap_nocrc_gather_write()
30 struct mcp251xfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; in mcp251xfd_regmap_nocrc_gather_write()
34 .len = sizeof(buf_tx->cmd) + val_len, in mcp251xfd_regmap_nocrc_gather_write()
38 BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); in mcp251xfd_regmap_nocrc_gather_write()
[all …]
Dmcp251xfd-tx.c1 // SPDX-License-Identifier: GPL-2.0
3 // mcp251xfd - Microchip MCP251xFD Family CAN controller driver
6 // Marc Kleine-Budde <kernel@pengutronix.de>
10 // CAN bus driver for Microchip 25XXFD CAN Controller with SPI Interface
27 return &tx_ring->obj[tx_head]; in mcp251xfd_get_tx_obj_next()
36 const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; in mcp251xfd_tx_obj_from_skb()
43 if (cfd->can_id & CAN_EFF_FLAG) { in mcp251xfd_tx_obj_from_skb()
46 sid = FIELD_GET(MCP251XFD_REG_FRAME_EFF_SID_MASK, cfd->can_id); in mcp251xfd_tx_obj_from_skb()
47 eid = FIELD_GET(MCP251XFD_REG_FRAME_EFF_EID_MASK, cfd->can_id); in mcp251xfd_tx_obj_from_skb()
54 id = FIELD_PREP(MCP251XFD_OBJ_ID_SID_MASK, cfd->can_id); in mcp251xfd_tx_obj_from_skb()
[all …]
Dmcp251xfd-ring.c1 // SPDX-License-Identifier: GPL-2.0
3 // mcp251xfd - Microchip MCP251xFD Family CAN controller driver
6 // Marc Kleine-Budde <kernel@pengutronix.de>
10 // CAN bus driver for Microchip 25XXFD CAN Controller with SPI Interface
18 #include "mcp251xfd-ram.h"
31 len = last_byte - first_byte + 1; in mcp251xfd_cmd_prepare_write_reg()
37 if (!(priv->devtype_data.quirks & MCP251XFD_QUIRK_CRC_REG)) { in mcp251xfd_cmd_prepare_write_reg()
38 len += sizeof(write_reg_buf->nocrc.cmd); in mcp251xfd_cmd_prepare_write_reg()
40 u16 crc; in mcp251xfd_cmd_prepare_write_reg() local
42 /* CRC */ in mcp251xfd_cmd_prepare_write_reg()
[all …]
Dmcp251xfd-core.c1 // SPDX-License-Identifier: GPL-2.0
3 // mcp251xfd - Microchip MCP251xFD Family CAN controller driver
6 // Marc Kleine-Budde <kernel@pengutronix.de>
10 // CAN bus driver for Microchip 25XXFD CAN Controller with SPI Interface
47 /* Autodetect model, start with CRC enabled. */
97 return __mcp251xfd_get_model_str(priv->devtype_data.model); in mcp251xfd_get_model_str()
142 if (!priv->reg_vdd) in mcp251xfd_vdd_enable()
145 return regulator_enable(priv->reg_vdd); in mcp251xfd_vdd_enable()
150 if (!priv->reg_vdd) in mcp251xfd_vdd_disable()
153 return regulator_disable(priv->reg_vdd); in mcp251xfd_vdd_disable()
[all …]
/kernel/linux/linux-6.6/drivers/leds/
Dleds-cr0014114.c1 // SPDX-License-Identifier: GPL-2.0
9 #include <linux/spi/spi.h>
13 * CR0014114 SPI protocol descrtiption:
14 * +----+-----------------------------------+----+
15 * | CMD| BRIGHTNESS |CRC |
16 * +----+-----------------------------------+----+
18 * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
20 * | 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1 |
22 * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
24 * +----+-----------------------------------+----+
[all …]
/kernel/linux/linux-5.10/drivers/leds/
Dleds-cr0014114.c1 // SPDX-License-Identifier: GPL-2.0
9 #include <linux/spi/spi.h>
13 * CR0014114 SPI protocol descrtiption:
14 * +----+-----------------------------------+----+
15 * | CMD| BRIGHTNESS |CRC |
16 * +----+-----------------------------------+----+
18 * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
20 * | 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1 |
22 * | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
24 * +----+-----------------------------------+----+
[all …]
/kernel/linux/linux-5.10/drivers/net/can/spi/mcp251xfd/
Dmcp251xfd-regmap.c1 // SPDX-License-Identifier: GPL-2.0
3 // mcp251xfd - Microchip MCP251xFD Family CAN controller driver
6 // Marc Kleine-Budde <kernel@pengutronix.de>
18 struct spi_device *spi = context; in mcp251xfd_regmap_nocrc_write() local
20 return spi_write(spi, data, count); in mcp251xfd_regmap_nocrc_write()
28 struct spi_device *spi = context; in mcp251xfd_regmap_nocrc_gather_write() local
29 struct mcp251xfd_priv *priv = spi_get_drvdata(spi); in mcp251xfd_regmap_nocrc_gather_write()
30 struct mcp251xfd_map_buf_nocrc *buf_tx = priv->map_buf_nocrc_tx; in mcp251xfd_regmap_nocrc_gather_write()
34 .len = sizeof(buf_tx->cmd) + val_len, in mcp251xfd_regmap_nocrc_gather_write()
38 BUILD_BUG_ON(sizeof(buf_tx->cmd) != sizeof(__be16)); in mcp251xfd_regmap_nocrc_gather_write()
[all …]
Dmcp251xfd-core.c1 // SPDX-License-Identifier: GPL-2.0
3 // mcp251xfd - Microchip MCP251xFD Family CAN controller driver
6 // Marc Kleine-Budde <kernel@pengutronix.de>
10 // CAN bus driver for Microchip 25XXFD CAN Controller with SPI Interface
43 /* Autodetect model, start with CRC enabled. */
91 return __mcp251xfd_get_model_str(priv->devtype_data.model); in mcp251xfd_get_model_str()
120 if (!priv->reg_vdd) in mcp251xfd_vdd_enable()
123 return regulator_enable(priv->reg_vdd); in mcp251xfd_vdd_enable()
128 if (!priv->reg_vdd) in mcp251xfd_vdd_disable()
131 return regulator_disable(priv->reg_vdd); in mcp251xfd_vdd_disable()
[all …]
/kernel/linux/linux-5.10/net/nfc/nci/
Dspi.c1 // SPDX-License-Identifier: GPL-2.0-only
11 #include <linux/spi/spi.h>
12 #include <linux/crc-ccitt.h>
37 /* a NULL skb means we just want the SPI chip select line to raise */ in __nci_spi_send()
39 t.tx_buf = skb->data; in __nci_spi_send()
40 t.len = skb->len; in __nci_spi_send()
47 t.delay.value = nspi->xfer_udelay; in __nci_spi_send()
49 t.speed_hz = nspi->xfer_speed_hz; in __nci_spi_send()
54 return spi_sync(nspi->spi, &m); in __nci_spi_send()
61 unsigned int payload_len = skb->len; in nci_spi_send()
[all …]
/kernel/linux/linux-6.6/net/nfc/nci/
Dspi.c1 // SPDX-License-Identifier: GPL-2.0-only
11 #include <linux/spi/spi.h>
12 #include <linux/crc-ccitt.h>
37 /* a NULL skb means we just want the SPI chip select line to raise */ in __nci_spi_send()
39 t.tx_buf = skb->data; in __nci_spi_send()
40 t.len = skb->len; in __nci_spi_send()
47 t.delay.value = nspi->xfer_udelay; in __nci_spi_send()
49 t.speed_hz = nspi->xfer_speed_hz; in __nci_spi_send()
54 return spi_sync(nspi->spi, &m); in __nci_spi_send()
61 unsigned int payload_len = skb->len; in nci_spi_send()
[all …]
/kernel/linux/linux-6.6/drivers/input/keyboard/
Dapplespi.c1 // SPDX-License-Identifier: GPL-2.0
3 * MacBook (Pro) SPI keyboard and touchpad driver
5 * Copyright (c) 2015-2018 Federico Lorenzi
6 * Copyright (c) 2017-2018 Ronald Tschalär
11 * MacBook8 and newer can be driven either by USB or SPI. However the USB
15 * * UIEN ("USB Interface Enable"): If invoked with argument 1, disables SPI
18 * * SIEN ("SPI Interface Enable"): If invoked with argument 1, disables USB
19 * and enables SPI. If invoked with argument 0, disables SPI.
20 * * SIST ("SPI Interface Status"): Returns 1 if SPI is enabled, 0 otherwise.
21 * * ISOL: Resets the four GPIO pins used for SPI. Intended to be invoked with
[all …]
/kernel/linux/linux-5.10/drivers/input/keyboard/
Dapplespi.c1 // SPDX-License-Identifier: GPL-2.0
3 * MacBook (Pro) SPI keyboard and touchpad driver
5 * Copyright (c) 2015-2018 Federico Lorenzi
6 * Copyright (c) 2017-2018 Ronald Tschalär
11 * MacBook8 and newer can be driven either by USB or SPI. However the USB
15 * * UIEN ("USB Interface Enable"): If invoked with argument 1, disables SPI
18 * * SIEN ("SPI Interface Enable"): If invoked with argument 1, disables USB
19 * and enables SPI. If invoked with argument 0, disables SPI.
20 * * SIST ("SPI Interface Status"): Returns 1 if SPI is enabled, 0 otherwise.
21 * * ISOL: Resets the four GPIO pins used for SPI. Intended to be invoked with
[all …]
/kernel/linux/linux-5.10/arch/mips/cavium-octeon/executive/
Dcvmx-helper-spi.c7 * Copyright (C) 2003-2018 Cavium, Inc.
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 * Functions for SPI initialization, configuration,
34 #include <asm/octeon/cvmx-config.h>
35 #include <asm/octeon/cvmx-spi.h>
36 #include <asm/octeon/cvmx-helper.h>
38 #include <asm/octeon/cvmx-pip-defs.h>
39 #include <asm/octeon/cvmx-pko-defs.h>
40 #include <asm/octeon/cvmx-spxx-defs.h>
[all …]
/kernel/linux/linux-6.6/arch/mips/cavium-octeon/executive/
Dcvmx-helper-spi.c7 * Copyright (C) 2003-2018 Cavium, Inc.
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 * Functions for SPI initialization, configuration,
34 #include <asm/octeon/cvmx-config.h>
35 #include <asm/octeon/cvmx-spi.h>
36 #include <asm/octeon/cvmx-helper.h>
38 #include <asm/octeon/cvmx-pip-defs.h>
39 #include <asm/octeon/cvmx-pko-defs.h>
40 #include <asm/octeon/cvmx-spxx-defs.h>
[all …]
/kernel/linux/linux-5.10/drivers/net/ieee802154/
Dcc2520.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Driver for TI CC2520 802.15.4 Wireless-PAN Networking controller
12 #include <linux/spi/spi.h>
13 #include <linux/spi/cc2520.h>
19 #include <linux/crc-ccitt.h>
48 /* IEEE-802.15.4 defined constants (2.4 GHz logical channels) */
203 struct spi_device *spi; /* SPI device structure */ member
204 struct ieee802154_hw *hw; /* IEEE-802.15.4 device */
205 u8 *buf; /* SPI TX/Rx data buffer */
206 struct mutex buffer_mutex; /* SPI buffer mutex */
[all …]
/kernel/linux/linux-6.6/drivers/net/ieee802154/
Dcc2520.c1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Driver for TI CC2520 802.15.4 Wireless-PAN Networking controller
12 #include <linux/spi/spi.h>
18 #include <linux/crc-ccitt.h>
47 /* IEEE-802.15.4 defined constants (2.4 GHz logical channels) */
202 struct spi_device *spi; /* SPI device structure */ member
203 struct ieee802154_hw *hw; /* IEEE-802.15.4 device */
204 u8 *buf; /* SPI TX/Rx data buffer */
205 struct mutex buffer_mutex; /* SPI buffer mutex */
223 .tx_buf = priv->buf, in cc2520_cmd_strobe()
[all …]
/kernel/linux/linux-6.6/Documentation/devicetree/bindings/net/
Dadi,adin1110.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: ADI ADIN1110 MAC-PHY
10 - Alexandru Tachici <alexandru.tachici@analog.com>
13 The ADIN1110 is a low power single port 10BASE-T1L MAC-
18 The ADIN2111 is a low power, low complexity, two-Ethernet ports
19 switch with integrated 10BASE-T1L PHYs and one serial peripheral
20 interface (SPI) port. The device is designed for industrial Ethernet
22 with the IEEE 802.3cg-2019 Ethernet standard for long reach
[all …]
/kernel/linux/linux-6.6/drivers/mmc/host/
Dmmc_spi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Access SD/MMC cards through SPI master controllers
7 * (C) Copyright 2006-2007, David Brownell
9 * Hans-Peter Nilsson (hp@axis.com)
18 #include <linux/dma-direction.h>
20 #include <linux/crc-itu-t.h>
25 #include <linux/mmc/slot-gpio.h>
27 #include <linux/spi/spi.h>
28 #include <linux/spi/mmc_spi.h>
35 * - For now, we won't try to interoperate with a real mmc/sd/sdio
[all …]
/kernel/linux/linux-5.10/drivers/mmc/host/
Dmmc_spi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Access SD/MMC cards through SPI master controllers
7 * (C) Copyright 2006-2007, David Brownell
9 * Hans-Peter Nilsson (hp@axis.com)
18 #include <linux/dma-direction.h>
20 #include <linux/crc-itu-t.h>
25 #include <linux/mmc/slot-gpio.h>
27 #include <linux/spi/spi.h>
28 #include <linux/spi/mmc_spi.h>
35 * - For now, we won't try to interoperate with a real mmc/sd/sdio
[all …]
/kernel/linux/linux-6.6/drivers/iio/accel/
Dsca3300.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Murata SCA3300 3-axis industrial accelerometer
13 #include <linux/spi/spi.h>
192 * struct sca3300_data - device data
193 * @spi: SPI device structure
197 * -SCA3300: 4 channel 16-bit data + 64-bit timestamp
198 * -SCL3300: 7 channel 16-bit data + 64-bit timestamp
203 struct spi_device *spi; member
257 u8 crc; in sca3300_transfer() local
260 .tx_buf = sca_data->txbuf, in sca3300_transfer()
[all …]
/kernel/linux/linux-5.10/drivers/staging/iio/adc/
Dad7280a.c1 // SPDX-License-Identifier: GPL-2.0
13 #include <linux/spi/spi.h>
96 #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6 - \
102 (c) - AD7280A_CELLS_PER_DEV)
106 /* 5-bit device address is sent LSB first */
119 * So the TXVAL is AD7280A_DEVADDR_ALL + CRC
124 * AD7280 CRC
131 struct spi_device *spi; member
152 unsigned char crc; in ad7280_calc_crc8() local
154 crc = crc_tab[val >> 16 & 0xFF]; in ad7280_calc_crc8()
[all …]
/kernel/linux/linux-6.6/drivers/iio/adc/
Dad7280a.c1 // SPDX-License-Identifier: GPL-2.0
21 #include <linux/spi/spi.h>
128 #define AD7280A_NUM_CH (AD7280A_AUX_ADC_6_REG - \
134 (c) - AD7280A_CELLS_PER_DEV)
142 /* 5-bit device address is sent LSB first */
156 * So the TXVAL is AD7280A_DEVADDR_ALL + CRC
161 * AD7280 CRC
168 struct spi_device *spi; member
192 unsigned char crc; in ad7280_calc_crc8() local
194 crc = crc_tab[val >> 16 & 0xFF]; in ad7280_calc_crc8()
[all …]
/kernel/linux/linux-6.6/fs/jffs2/
Dsummary.c2 * JFFS2 -- Journalling Flash File System, Version 2.
4 * Copyright © 2004 Ferenc Havasi <havasi@inf.u-szeged.hu>,
5 * Zoltan Sogor <weth@inf.u-szeged.hu>,
6 * Patrik Kluba <pajko@halom.u-szeged.hu>,
28 uint32_t sum_size = min_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE); in jffs2_sum_init()
30 c->summary = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL); in jffs2_sum_init()
32 if (!c->summary) { in jffs2_sum_init()
34 return -ENOMEM; in jffs2_sum_init()
37 c->summary->sum_buf = kmalloc(sum_size, GFP_KERNEL); in jffs2_sum_init()
39 if (!c->summary->sum_buf) { in jffs2_sum_init()
[all …]

12345678