| /linux/drivers/nfc/pn544/ |
| H A D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * I2C Link Layer for PN544 HCI based Driver 10 #include <linux/crc-ccitt.h> 12 #include <linux/i2c.h> 51 MODULE_DEVICE_TABLE(i2c, pn544_hci_i2c_id_table); 132 #define PN544_FW_I2C_WRITE_DATA_MAX_LEN MIN((PN544_FW_I2C_MAX_PAYLOAD -\ 136 #define PN544_FW_SECURE_CHUNK_WRITE_DATA_MAX_LEN (PN544_FW_I2C_MAX_PAYLOAD -\ 174 * < 0 if hardware error occured (e.g. i2c err) 182 print_hex_dump(KERN_DEBUG, "i2c: ", DUMP_PREFIX_OFFSET, \ 183 16, 1, (skb)->data, (skb)->len, 0); \ [all …]
|
| /linux/drivers/mfd/ |
| H A D | tps6594-i2c.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * I2C access driver for the following TI PMICs: 4 * - LP8764 5 * - TPS65224 6 * - TPS652G1 7 * - TPS6593 8 * - TPS6594 10 * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/ 14 #include <linux/i2c.h> 24 MODULE_PARM_DESC(enable_crc, "Enable CRC feature for I2C interface"); [all …]
|
| /linux/drivers/nfc/microread/ |
| H A D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HCI based Driver for Inside Secure microread NFC Chip - i2c layer 11 #include <linux/i2c.h> 43 * < 0 if hardware error occured (e.g. i2c err) 51 print_hex_dump(KERN_DEBUG, "i2c: ", DUMP_PREFIX_OFFSET, \ 52 16, 1, (skb)->data, (skb)->len, 0); \ 58 u8 crc = 0; in microread_i2c_add_len_crc() local 61 len = skb->len; in microread_i2c_add_len_crc() 64 for (i = 0; i < skb->len; i++) in microread_i2c_add_len_crc() 65 crc = crc ^ skb->data[i]; in microread_i2c_add_len_crc() [all …]
|
| /linux/drivers/soc/samsung/ |
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 10 # There is no need to enable these drivers for ARMv8 12 bool "Exynos ASV ARMv7-specific driver extensions" if COMPILE_TEST 32 Enable support for USI block. USI (Universal Serial Interface) is an 33 IP-core found in modern Samsung Exynos SoCs, like Exynos850 and 35 following serial protocols: UART, SPI or High Speed I2C. 47 # There is no need to enable these drivers for ARMv8 49 bool "Exynos PMU ARMv7-specific driver extensions" if COMPILE_TEST 53 bool "S3C2410 PM Suspend Memory CRC" 57 Enable the PM code's memory area checksum over sleep. This option [all …]
|
| /linux/drivers/iio/common/ms_sensors/ |
| H A D | ms_sensors_i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Measurements Specialties driver common i2c functions 5 * Copyright (c) 2015 Measurement-Specialties 38 * ms_sensors_reset() - Reset function 43 * Generic I2C reset function for Measurement Specialties devices. 54 dev_err(&client->dev, "Failed to reset device\n"); in ms_sensors_reset() 64 * ms_sensors_read_prom_word() - PROM word read function 69 * Generic i2c prom word read function for Measurement Specialties devices. 80 dev_err(&client->dev, "Failed to read prom word\n"); in ms_sensors_read_prom_word() 90 * ms_sensors_convert_and_read() - ADC conversion & read function [all …]
|
| /linux/drivers/w1/slaves/ |
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # 1-wire slaves configuration 6 menu "1-wire Slaves" 11 Say Y here if you want to connect 1-wire thermal sensors to your 17 Say Y here if you want to connect 1-wire 23 Say Y or M here if you want to use a DS2405 1-wire 24 single-channel addressable switch. 25 This device can also work as a single-channel 29 tristate "8-Channel Addressable Switch (IO Expander) 0x29 family support (DS2408)" 31 Say Y here if you want to use a 1-wire [all …]
|
| /linux/drivers/input/keyboard/ |
| H A D | pinephone-keyboard.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // Copyright (C) 2021-2022 Samuel Holland <samuel@sholland.org> 8 #include <linux/i2c.h> 18 #define DRV_NAME "pinephone-keyboard" 42 /* Size of the scan buffer, including the CRC byte at the beginning. */ 160 struct i2c_client *client = adap->algo_data; in ppkb_adap_smbus_xfer() 165 buf[1] = data->byte; in ppkb_adap_smbus_xfer() 183 return -EIO; in ppkb_adap_smbus_xfer() 190 data->byte = ret; in ppkb_adap_smbus_xfer() 209 unsigned short *keymap = ppkb->input->keycode; in ppkb_update() [all …]
|
| /linux/drivers/input/touchscreen/ |
| H A D | chipone_icn8505.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Driver for ChipOne icn8505 i2c touchscreen controller 5 * Copyright (c) 2015-2018 Red Hat Inc. 17 #include <linux/i2c.h> 96 buf[i] = (reg_addr >> (reg_addr_width - (i + 1) * 8)) & 0xff; in icn8505_read_xfer() 98 ret = i2c_transfer(client->adapter, msg, 2); in icn8505_read_xfer() 101 ret = -EIO; in icn8505_read_xfer() 103 dev_err(&client->dev, in icn8505_read_xfer() 116 u8 buf[3 + 32]; /* 3 bytes for 24 bit reg-addr + 32 bytes max len */ in icn8505_write_xfer() 125 return -EINVAL; in icn8505_write_xfer() [all …]
|
| H A D | edt-ft5x06.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Lothar Waßmann <LW@KARO-electronics.de> (DT support) 20 #include <linux/i2c.h> 164 u8 crc = 0; in edt_ft5x06_ts_check_crc() local 166 for (i = 0; i < buflen - 1; i++) in edt_ft5x06_ts_check_crc() 167 crc ^= buf[i]; in edt_ft5x06_ts_check_crc() 169 if (crc != buf[buflen - 1]) { in edt_ft5x06_ts_check_crc() 170 tsdata->crc_errors++; in edt_ft5x06_ts_check_crc() 171 dev_err_ratelimited(&tsdata->client->dev, in edt_ft5x06_ts_check_crc() 172 "crc error: 0x%02x expected, got 0x%02x\n", in edt_ft5x06_ts_check_crc() [all …]
|
| H A D | cyttsp5.c | 1 // SPDX-License-Identifier: GPL-2.0 6 * Copyright (C) 2012-2015 Cypress Semiconductor 13 #include <linux/crc-itu-t.h> 20 #include <linux/i2c.h> 32 #define CY_NUM_BTN_EVENT_ID GENMASK(CY_BITS_PER_BTN - 1, 0) 217 * to send is the I2C address 226 error = regmap_bulk_read(ts->regmap, HID_INPUT_REG, temp, sizeof(temp)); in cyttsp5_read() 235 return -EINVAL; in cyttsp5_read() 238 return regmap_bulk_read(ts->regmap, HID_INPUT_REG, buf, size); in cyttsp5_read() 247 return -E2BIG; in cyttsp5_write() [all …]
|
| /linux/drivers/iio/pressure/ |
| H A D | sdp500.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 #include <linux/i2c.h> 28 struct i2c_client *client = to_i2c_client(data->dev); in sdp500_start_measurement() 49 struct i2c_client *client = to_i2c_client(data->dev); in sdp500_read_raw() 55 dev_err(data->dev, "Failed to receive data"); in sdp500_read_raw() 59 dev_err(data->dev, "Data is received wrongly"); in sdp500_read_raw() 60 return -EIO; in sdp500_read_raw() 65 sizeof(rxbuf) - 1, 0x00); in sdp500_read_raw() 67 dev_err(data->dev, in sdp500_read_raw() 68 "calculated crc = 0x%.2X, received 0x%.2X", in sdp500_read_raw() [all …]
|
| /linux/sound/soc/codecs/ |
| H A D | aw88166.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // aw88166.c -- ALSA SoC AW88166 codec support 13 #include <linux/i2c.h> 49 ret = regmap_write(aw_dev->regmap, AW88166_DSPMADD_REG, dsp_addr); in aw_dev_dsp_write_16bit() 51 dev_err(aw_dev->dev, "%s write addr error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 55 ret = regmap_write(aw_dev->regmap, AW88166_DSPMDAT_REG, (u16)dsp_data); in aw_dev_dsp_write_16bit() 57 dev_err(aw_dev->dev, "%s write data error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 70 ret = regmap_write(aw_dev->regmap, AW88166_DSPMADD_REG, dsp_addr); in aw_dev_dsp_read_16bit() 72 dev_err(aw_dev->dev, "%s write error, ret=%d", __func__, ret); in aw_dev_dsp_read_16bit() 76 ret = regmap_read(aw_dev->regmap, AW88166_DSPMDAT_REG, &temp_data); in aw_dev_dsp_read_16bit() [all …]
|
| H A D | aw88399.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // aw88399.c -- ALSA SoC AW88399 codec support 12 #include <linux/i2c.h> 34 ret = regmap_write(aw_dev->regmap, AW88399_DSPMADD_REG, dsp_addr); in aw_dev_dsp_write_16bit() 36 dev_err(aw_dev->dev, "%s write addr error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 40 ret = regmap_write(aw_dev->regmap, AW88399_DSPMDAT_REG, (u16)dsp_data); in aw_dev_dsp_write_16bit() 42 dev_err(aw_dev->dev, "%s write data error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 55 ret = regmap_write(aw_dev->regmap, AW88399_DSPMADD_REG, dsp_addr); in aw_dev_dsp_write_32bit() 57 dev_err(aw_dev->dev, "%s write addr error, ret=%d", __func__, ret); in aw_dev_dsp_write_32bit() 62 ret = regmap_write(aw_dev->regmap, AW88399_DSPMDAT_REG, temp_data); in aw_dev_dsp_write_32bit() [all …]
|
| /linux/arch/powerpc/include/asm/ |
| H A D | cpm1.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 11 * are needed. -- Dan 13 * On the MBX board, EPPC-Bug loads CPM microcode into the first 512 14 * bytes of the DP RAM and relocates the I2C parameter area to the 36 #define CPM_CR_CH_I2C ((ushort)0x0001) /* I2C and IDMA1 */ 114 #define SMCMR_PEN ((ushort)0x0200) /* Parity enable */ 312 uint sen_cpres; /* Preset CRC */ 313 uint sen_cmask; /* Constant mask for CRC */ 314 uint sen_crcec; /* CRC Error counter */ 331 uint sen_tbuf0data0; /* Save area 0 - current frame */ [all …]
|
| /linux/include/soc/tegra/ |
| H A D | bpmp-abi.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 * Copyright (c) 2014-2022, NVIDIA CORPORATION. All rights reserved. 66 * A well-defined subset of the MRQ messages that the CPU sends to the 97 * CRC present 123 * **options** directions to the receiver and indicates CRC presence. 130 * -BPMP_EBADMSG and ignore the request. 144 …* | -------------------- | ------------------------------------ | --------------------------------… 219 * and initialization value 0x4657. The CRC is calculated over all bytes of the message 221 * calculating the CRC. Only used when #BPMP_MAIL_CRC_PRESENT is set. If 222 * #BPMP_MAIL_CRC_PRESENT is set and this field does not match the CRC as [all …]
|
| /linux/sound/soc/codecs/aw88395/ |
| H A D | aw88395_device.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // aw88395_device.c -- AW88395 function for ALSA Audio Driver 5 // Copyright (c) 2022-2023 AWINIC Technology CO., LTD 12 #include <linux/i2c.h> 23 ret = regmap_write(aw_dev->regmap, AW88395_DSPMADD_REG, dsp_addr); in aw_dev_dsp_write_16bit() 25 dev_err(aw_dev->dev, "%s write addr error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 29 ret = regmap_write(aw_dev->regmap, AW88395_DSPMDAT_REG, (u16)dsp_data); in aw_dev_dsp_write_16bit() 31 dev_err(aw_dev->dev, "%s write data error, ret=%d", __func__, ret); in aw_dev_dsp_write_16bit() 44 ret = regmap_write(aw_dev->regmap, AW88395_DSPMADD_REG, dsp_addr); in aw_dev_dsp_write_32bit() 46 dev_err(aw_dev->dev, "%s write addr error, ret=%d", __func__, ret); in aw_dev_dsp_write_32bit() [all …]
|
| /linux/drivers/media/dvb-frontends/ |
| H A D | cx24110.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 cx24110 - Single Chip Satellite Channel Receiver driver module 5 Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@htp-tel.de> based on 23 struct i2c_adapter* i2c; member 58 CRC test bit. Finite counting selected */ 62 {0x16,0x00}, /* @ enable all RS output ports */ 73 {0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */ 74 /* leave front-end AGC parameters at default values */ 78 {0x37,0x00}, /* @ fully enable AutoAcqq state machine */ 79 {0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */ [all …]
|
| /linux/drivers/scsi/mvsas/ |
| H A D | mv_defs.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 7 * Copyright 2009-2011 Marvell. <yuxiangl@marvell.com> 28 /* driver compile-time configuration */ 30 MVS_TX_RING_SZ = 1024, /* TX ring size (12-bit) */ 31 MVS_RX_RING_SZ = 1024, /* RX ring size (12-bit) */ 32 /* software requires power-of-2 44 MVS_SOC_CAN_QUEUE = MVS_SOC_SLOTS - 2, 72 INT_EN = (1U << 1), /* Global int enable */ 79 /* MVS_GBL_PORT_TYPE */ /* shl for ports 1-3 */ 80 SATA_TARGET = (1U << 16), /* port0 SATA target enable */ [all …]
|
| /linux/drivers/usb/typec/ |
| H A D | anx7411.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Driver for Analogix ANX7411 USB Type-C and PD controller 11 #include <linux/i2c.h> 341 ret = anx7411_reg_read(ctx->spi_client, REQUEST_CURRENT); in anx7411_detect_power_mode() 345 ctx->typec.request_current = ret * CURRENT_UNIT; /* 50ma per unit */ in anx7411_detect_power_mode() 347 ret = anx7411_reg_read(ctx->spi_client, REQUEST_VOLTAGE); in anx7411_detect_power_mode() 351 ctx->typec.request_voltage = ret * VOLTAGE_UNIT; /* 100mv per unit */ in anx7411_detect_power_mode() 353 if (ctx->psy_online == ANX7411_PSY_OFFLINE) { in anx7411_detect_power_mode() 354 ctx->psy_online = ANX7411_PSY_FIXED_ONLINE; in anx7411_detect_power_mode() 355 ctx->usb_type = POWER_SUPPLY_USB_TYPE_PD; in anx7411_detect_power_mode() [all …]
|
| /linux/drivers/media/i2c/ |
| H A D | thp7312.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include <linux/i2c.h> 19 #include <linux/mtd/spi-nor.h> 26 #include <media/v4l2-async.h> 27 #include <media/v4l2-cci.h> 28 #include <media/v4l2-ctrls.h> 29 #include <media/v4l2-device.h> 30 #include <media/v4l2-fwnode.h> 31 #include <media/v4l2-subdev.h> 129 * enum thp7312_focus_state - State of the focus handler [all …]
|
| /linux/drivers/gpu/drm/bridge/ |
| H A D | sii902x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Boris Brezillon <boris.brezillon@free-electrons.com> 12 * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved. 16 #include <linux/i2c-mux.h> 17 #include <linux/i2c.h> 18 #include <linux/media-bus-format.h> 31 #include <sound/hdmi-codec.h> 160 (SII902X_TPI_MISC_INFOFRAME_END - SII902X_TPI_MISC_INFOFRAME_BASE) 175 struct i2c_client *i2c; member 187 * each other, by keeping their i2c command sequences atomic. [all …]
|
| /linux/drivers/regulator/ |
| H A D | slg51000-regulator.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // SLG51000 High PSRR, Multi-Output Regulators 10 #include <linux/i2c.h> 20 #include "slg51000-regulator.h" 182 .enable = regulator_enable_regmap, 192 .enable = regulator_enable_regmap, 203 ena_gpiod = fwnode_gpiod_get_index(of_fwnode_handle(np), "enable", 0, in slg51000_of_parse_cb() 206 "gpio-en-ldo"); in slg51000_of_parse_cb() 208 config->ena_gpiod = ena_gpiod; in slg51000_of_parse_cb() 258 chip->rdesc[id] = ®ls_desc[id]; in slg51000_regulator_init() [all …]
|
| /linux/drivers/net/ethernet/intel/igb/ |
| H A D | e1000_regs.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 7 #define E1000_CTRL 0x00000 /* Device Control - RW */ 8 #define E1000_STATUS 0x00008 /* Device Status - RO */ 9 #define E1000_EECD 0x00010 /* EEPROM/Flash Control - RW */ 10 #define E1000_EERD 0x00014 /* EEPROM Read - RW */ 11 #define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */ 12 #define E1000_MDIC 0x00020 /* MDI Control - RW */ 13 #define E1000_MDICNFG 0x00E04 /* MDI Config - RW */ 14 #define E1000_SCTL 0x00024 /* SerDes Control - RW */ [all …]
|
| /linux/arch/arm/mach-omap1/ |
| H A D | board-osk.c | 2 * linux/arch/arm/mach-omap1/board-osk.c 36 #include <linux/i2c.h> 44 #include <linux/platform_data/gpio-omap.h> 46 #include <linux/soc/ti/omap1-io.h> 48 #include <asm/mach-types.h> 60 #define OMAP_GPIO_LABEL "gpio-0-15" 66 * alternate pin configurations for hardware-controlled blinking. 76 /* bootloader (U-Boot, etc) in first sector */ 81 .mask_flags = MTD_WRITEABLE, /* force read-only */ 115 .name = "physmap-flash", [all …]
|
| /linux/drivers/gpio/ |
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 13 You only need to enable this if you also want to enable 50 this symbol, but new drivers should use the generic gpio-regmap 60 non-sleeping contexts. They can make bitbanged serial protocols 76 bool "Enable legacy functionalities of the sysfs interface" 80 Say Y here if you want to enable the legacy, global GPIO 81 numberspace-based functionalities of the sysfs interface. 127 # This symbol is selected by both I2C and SPI expanders 137 Enables support for the idio-16 library functions. The idio-16 library 139 ACCES IDIO-16 family such as the 104-IDIO-16 and the PCI-IDIO-16. [all …]
|