/Linux-v6.1/drivers/net/wireless/microchip/wilc1000/ |
D | spi.c | 1 // 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 …]
|
/Linux-v6.1/drivers/net/can/spi/mcp251xfd/ |
D | mcp251xfd-regmap.c | 1 // 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 …]
|
D | mcp251xfd-tx.c | 1 // 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 …]
|
D | mcp251xfd-ring.c | 1 // 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 u16 crc; in mcp251xfd_cmd_prepare_write_reg() local 40 mcp251xfd_spi_cmd_crc_set_len_in_reg(&write_reg_buf->crc.cmd, in mcp251xfd_cmd_prepare_write_reg() 42 /* CRC */ in mcp251xfd_cmd_prepare_write_reg() [all …]
|
D | mcp251xfd-core.c | 1 // 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 …]
|
D | mcp251xfd.h | 1 /* SPDX-License-Identifier: GPL-2.0 3 * mcp251xfd - Microchip MCP251xFD Family CAN controller driver 6 * Marc Kleine-Budde <kernel@pengutronix.de> 16 #include <linux/can/rx-offload.h> 22 #include <linux/spi/spi.h> 370 /* SPI commands */ 424 /* Use CRC to access registers */ 426 /* Use CRC to access RX/TEF-RAM */ 428 /* Use CRC to access TX-RAM */ 432 /* Use Half Duplex SPI transfers */ [all …]
|
D | mcp251xfd-crc16.c | 1 // 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 58 static inline u16 mcp251xfd_crc16_byte(u16 crc, const u8 data) in mcp251xfd_crc16_byte() argument 60 u8 index = (crc >> 8) ^ data; in mcp251xfd_crc16_byte() 62 return (crc << 8) ^ mcp251xfd_crc16_table[index]; in mcp251xfd_crc16_byte() 65 static u16 mcp251xfd_crc16(u16 crc, u8 const *buffer, size_t len) in mcp251xfd_crc16() argument 67 while (len--) in mcp251xfd_crc16() 68 crc = mcp251xfd_crc16_byte(crc, *buffer++); in mcp251xfd_crc16() [all …]
|
/Linux-v6.1/drivers/leds/ |
D | leds-cr0014114.c | 1 // 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 …]
|
/Linux-v6.1/net/nfc/nci/ |
D | spi.c | 1 // 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 …]
|
/Linux-v6.1/drivers/input/keyboard/ |
D | applespi.c | 1 // 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 …]
|
/Linux-v6.1/drivers/net/ieee802154/ |
D | cc2520.c | 1 // 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 …]
|
/Linux-v6.1/arch/mips/cavium-octeon/executive/ |
D | cvmx-helper-spi.c | 7 * 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 …]
|
/Linux-v6.1/Documentation/devicetree/bindings/net/ |
D | adi,adin1110.yaml | 1 # 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 …]
|
/Linux-v6.1/drivers/iio/accel/ |
D | sca3300.c | 1 // 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 …]
|
/Linux-v6.1/drivers/mmc/host/ |
D | mmc_spi.c | 1 // 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-mapping.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 …]
|
/Linux-v6.1/drivers/iio/adc/ |
D | ad7280a.c | 1 // 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 …]
|
/Linux-v6.1/fs/jffs2/ |
D | summary.c | 2 * 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 …]
|
/Linux-v6.1/drivers/soc/samsung/ |
D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 12 bool "Exynos ASV ARMv7-specific driver extensions" if COMPILE_TEST 33 IP-core found in modern Samsung Exynos SoCs, like Exynos850 and 35 following serial protocols: UART, SPI or High Speed I2C. 48 bool "Exynos PMU ARMv7-specific driver extensions" if COMPILE_TEST 63 Resume code. See <file:Documentation/arm/samsung-s3c24xx/suspend.rst> 76 bool "S3C2410 PM Suspend Memory CRC" 88 See <file:Documentation/arm/samsung-s3c24xx/suspend.rst> 91 int "S3C2410 PM Suspend CRC Chunksize (KiB)" 95 Set the chunksize in Kilobytes of the CRC for checking memory [all …]
|
/Linux-v6.1/drivers/gpio/ |
D | gpio-max3191x.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio-max3191x.c - GPIO driver for Maxim MAX3191x industrial serializer 7 * The MAX3191x makes 8 digital 24V inputs available via SPI. 8 * Multiple chips can be daisy-chained, the spec does not impose 11 * Either of two modes is selectable: In 8-bit mode, only the state 13 * In 16-bit mode, an additional status byte is clocked out with 14 * a CRC and indicator bits for undervoltage and overtemperature. 17 * readout of non-faulting chips in the same daisy-chain. 21 * daisy-chain. 23 * If the chips are hardwired to 8-bit mode ("modesel" pulled high), [all …]
|
/Linux-v6.1/arch/mips/include/asm/octeon/ |
D | cvmx-pip.h | 7 * Copyright (c) 2003-2008 Cavium Networks 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 36 #include <asm/octeon/cvmx-wqe.h> 37 #include <asm/octeon/cvmx-fpa.h> 38 #include <asm/octeon/cvmx-pip-defs.h> 103 /* RGM+SPI 1 = partially received packet (buffering/bandwidth 106 /* RGM+SPI 2 = receive packet too large and truncated */ 113 /* RGM+SPI 4 = max frame error (pkt len > max frame len) */ 116 * RGM 5 = nibble error (data not byte multiple - 100M and 10M [all …]
|
/Linux-v6.1/drivers/iio/imu/ |
D | adis16475.c | 1 // SPDX-License-Identifier: GPL-2.0 24 #include <linux/spi/spi.h> 64 /* spi max speed in brust mode */ 132 struct adis16475 *st = file->private_data; in adis16475_show_firmware_revision() 138 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_REV, &rev); in adis16475_show_firmware_revision() 158 struct adis16475 *st = file->private_data; in adis16475_show_firmware_date() 164 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_Y, &year); in adis16475_show_firmware_date() 168 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_DM, &md); in adis16475_show_firmware_date() 172 len = snprintf(buf, sizeof(buf), "%.2x-%.2x-%.4x\n", md >> 8, md & 0xff, in adis16475_show_firmware_date() 191 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_SERIAL_NUM, &serial); in adis16475_show_serial_number() [all …]
|
/Linux-v6.1/drivers/nfc/st95hf/ |
D | core.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * -------------------------------------------------------------------- 5 * -------------------------------------------------------------------- 25 #include "spi.h" 101 * List of top-level cmds to be used internally by the driver. 196 * for spi communication between st95hf and host. 251 struct device *dev = &st95context->spicontext.spidev->dev; in st95hf_send_recv_cmd() 254 return -EINVAL; in st95hf_send_recv_cmd() 256 return -EINVAL; in st95hf_send_recv_cmd() 258 return -EINVAL; in st95hf_send_recv_cmd() [all …]
|
/Linux-v6.1/drivers/net/dsa/sja1105/ |
D | sja1105_dynamic_config.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2018-2019, Vladimir Oltean <olteanv@gmail.com> 6 /* In the dynamic configuration interface, the switch exposes a register-like 13 * This file creates a per-switch-family abstraction called 15 * - sja1105_dynamic_config_write 16 * - sja1105_dynamic_config_read 25 * +-----------------------------------------+------------------+ 27 * +-----------------------------------------+------------------+ 29 * <----------------------- packed_size ------------------------> 33 * function is reused (bar exceptional cases - see [all …]
|
/Linux-v6.1/arch/arm/boot/dts/ |
D | stm32f429.dtsi | 2 * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com> 4 * This file is dual-licensed: you can use it either under the terms 22 * MA 02110-1301 USA 48 #include "armv7-m.dtsi" 49 #include <dt-bindings/clock/stm32fx-clock.h> 50 #include <dt-bindings/mfd/stm32f4-rcc.h> 53 #address-cells = <1>; 54 #size-cells = <1>; 57 clk_hse: clk-hse { 58 #clock-cells = <0>; [all …]
|
/Linux-v6.1/drivers/iio/dac/ |
D | ad5758.c | 1 // SPDX-License-Identifier: GPL-2.0 7 * TODO: Currently CRC is not supported in this driver 15 #include <linux/spi/spi.h> 101 * struct ad5758_state - driver instance specific data 102 * @spi: spi_device 107 * @dc_dc_ilim: variable which stores the dc-to-dc converter current limit 110 * @d32: spi transfer buffers 113 struct spi_device *spi; member 135 * 1101: -1 mA to +22 mA current range 160 { AD5758_RANGE_PLUSMINUS_5V, -5000000, 5000000 }, [all …]
|