/linux/Documentation/devicetree/bindings/power/supply/ |
H A D | sbs,sbs-battery.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/power/supply/sbs,sbs-battery.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Sebastian Reichel <sre@kernel.org> 16 - $ref: power-supply.yaml# 21 - items: 22 - enum: 23 - ti,bq20z45 24 - ti,bq20z65 [all …]
|
/linux/drivers/mfd/ |
H A D | gateworks-gsc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * The Gateworks System Controller (GSC) is a multi-function 5 * The control interface is I2C, with an interrupt. The device supports 6 * system functions such as push-button monitoring, multiple ADC's for 13 #include <linux/i2c.h> 27 * ADC cycles the chip can NAK I2C transactions. To ensure we have reliable 35 int retry, ret; in gsc_write() local 37 for (retry = 0; retry < I2C_RETRIES; retry++) { in gsc_write() 40 * -EAGAIN returned when the i2c host controller is busy in gsc_write() 41 * -EIO returned when i2c device is busy in gsc_write() [all …]
|
/linux/Documentation/devicetree/bindings/i2c/ |
H A D | i2c-arb-gpio-challenge.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/i2c/i2c-arb-gpio-challenge.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO-based I2C Arbitration Using a Challenge & Response Mechanism 10 - Doug Anderson <dianders@chromium.org> 11 - Peter Rosin <peda@axentia.se> 15 the master of an I2C bus in a multimaster situation. 18 standard I2C multi-master rules. Using GPIOs is generally useful in the case 23 * It is nonstandard (not using standard I2C multimaster) [all …]
|
/linux/drivers/input/touchscreen/ |
H A D | atmel_mxt_ts.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (C) 2011-2014 Atmel Corporation 20 #include <linux/i2c.h> 30 #include <media/v4l2-device.h> 31 #include <media/v4l2-ioctl.h> 32 #include <media/videobuf2-v4l2.h> 33 #include <media/videobuf2-vmalloc.h> 34 #include <dt-bindings/input/atmel-maxtouch.h> 367 return obj->size_minus_one + 1; in mxt_obj_size() 372 return obj->instances_minus_one + 1; in mxt_obj_instances() [all …]
|
H A D | rohm_bu21023.c | 1 // SPDX-License-Identifier: GPL-2.0-only 8 #include <linux/i2c.h> 37 * BU21023GUL/BU21023MUV/BU21024FV-M registers map 270 * rohm_i2c_burst_read - execute combined I2C message for ROHM BU21023/24 285 struct i2c_adapter *adap = client->adapter; in rohm_i2c_burst_read() 289 msg[0].addr = client->addr; in rohm_i2c_burst_read() 294 msg[1].addr = client->addr; in rohm_i2c_burst_read() 303 ret = -EIO; in rohm_i2c_burst_read() 315 struct i2c_client *client = ts->client; in rohm_ts_manual_calibration() 316 struct device *dev = &client->dev; in rohm_ts_manual_calibration() [all …]
|
H A D | wdt87xx_i2c.c | 2 * Weida HiTech WDT87xx TouchScreen I2C driver 4 * Copyright (c) 2015 Weida Hi-Tech Co., Ltd. 12 #include <linux/i2c.h> 193 .addr = client->addr, in wdt87xx_i2c_xfer() 199 .addr = client->addr, in wdt87xx_i2c_xfer() 208 ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs)); in wdt87xx_i2c_xfer() 210 error = ret < 0 ? ret : -EIO; in wdt87xx_i2c_xfer() 211 dev_err(&client->dev, "%s: i2c transfer failed: %d\n", in wdt87xx_i2c_xfer() 230 dev_err(&client->dev, "get desc failed: %d\n", error); in wdt87xx_get_desc() 235 dev_err(&client->dev, "unexpected response to get desc: %d\n", in wdt87xx_get_desc() [all …]
|
H A D | imagis.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/i2c.h> 73 .addr = ts->client->addr, in imagis_i2c_read_reg() 78 .addr = ts->client->addr, in imagis_i2c_read_reg() 85 int retry = IST3038C_I2C_RETRY_COUNT; in imagis_i2c_read_reg() local 87 /* Retry in case the controller fails to respond */ in imagis_i2c_read_reg() 89 ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg)); in imagis_i2c_read_reg() 95 error = ret < 0 ? ret : -EIO; in imagis_i2c_read_reg() 96 dev_err(&ts->client->dev, in imagis_i2c_read_reg() 97 "%s - i2c_transfer failed: %d (%d)\n", in imagis_i2c_read_reg() [all …]
|
H A D | hynitron_cstxxx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 9 * are undocumented. This is essentially a cleaned-up version of the 11 * device-specific functions replated with generic functions wherever 18 #include <linux/i2c.h> 37 /* Data generic to all (supported and non-supported) controllers. */ 76 gpiod_set_value_cansleep(ts_data->reset_gpio, 1); in hyn_reset_proc() 78 gpiod_set_value_cansleep(ts_data->reset_gpio, 0); in hyn_reset_proc() 88 ts_data->chip->report_touch(client); in hyn_interrupt_handler() 94 * The vendor driver would retry twice before failing to read or write 95 * to the i2c device. [all …]
|
H A D | raydium_i2c_ts.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Raydium touchscreen I2C driver. 5 * Copyright (C) 2012-2014, Raydium Semiconductor Corporation. 11 * Contact Raydium Semiconductor Corporation at www.rad-ic.com 18 #include <linux/i2c.h> 29 /* Slave I2C mode */ 33 /* I2C bootoloader commands */ 43 /* I2C main commands */ 117 /* struct raydium_data - represents state of Raydium touchscreen device */ 158 xfer_count -= xfer_start_idx; in raydium_i2c_xfer() [all …]
|
/linux/arch/arm/boot/dts/ |
H A D | cros-ec-sbs.dtsi | 2 * Smart battery dts fragment for devices that use cros-ec-sbs 6 * This file is dual-licensed: you can use it either under the terms 46 battery: sbs-battery@b { 47 compatible = "sbs,sbs-battery"; 49 sbs,i2c-retry-count = <2>; 50 sbs,poll-retry-count = <1>;
|
/linux/drivers/char/tpm/ |
H A D | tpm_i2c_atmel.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ATMEL I2C TPM AT97SC3204T 9 * Device driver for ATMEL I2C TPMs. 11 * Teddy Reed determined the basic I2C command flow, unlike other I2C TPM 12 * devices the raw TCG formatted TPM command data is written via I2C and then 13 * raw TCG formatted TPM command data is returned via I2C. 22 #include <linux/i2c.h> 35 * fair number of read responses in the buffer so a 2nd retry can be 42 struct priv_data *priv = dev_get_drvdata(&chip->dev); in i2c_atmel_send() 43 struct i2c_client *client = to_i2c_client(chip->dev.parent); in i2c_atmel_send() [all …]
|
H A D | tpm_i2c_infineon.c | 1 // SPDX-License-Identifier: GPL-2.0-only 13 * Infineon I2C Protocol Stack Specification v0.20. 18 #include <linux/i2c.h> 25 /* max. number of iterations after I2C NAK */ 31 /* max. number of iterations after I2C NAK for 'long' commands 62 /* In addition to the data itself, the buffer must fit the 7-bit I2C 74 * iic_tpm_read() - read from TPM register 80 * buffer (little-endian format, i.e. first byte is put into buffer[0]). 82 * NOTE: TPM is big-endian for multi-byte values. Multi-byte 86 * provided by the i2c core as the TPM currently does not support the [all …]
|
/linux/drivers/misc/eeprom/ |
H A D | idt_89hpesx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2016 T-Platforms. All Rights Reserved. 5 * IDT PCIe-switch NTB Linux driver 8 * Serge Semin <fancer.lancer@gmail.com>, <Sergey.Semin@t-platforms.ru> 11 * NOTE of the IDT 89HPESx SMBus-slave interface driver 13 * IDT PCIe-switches. IDT provides a simple SMBus interface to perform IO- 550 int ret, retry; idt_eeprom_read_byte() local 851 eeprom_write(struct file * filp,struct kobject * kobj,struct bin_attribute * attr,char * buf,loff_t off,size_t count) eeprom_write() argument 875 eeprom_read(struct file * filp,struct kobject * kobj,struct bin_attribute * attr,char * buf,loff_t off,size_t count) eeprom_read() argument 904 idt_dbgfs_csr_write(struct file * filep,const char __user * ubuf,size_t count,loff_t * offp) idt_dbgfs_csr_write() argument 991 idt_dbgfs_csr_read(struct file * filep,char __user * ubuf,size_t count,loff_t * offp) idt_dbgfs_csr_read() argument [all...] |
/linux/drivers/gpu/drm/display/ |
H A D | drm_dp_helper.c | 27 #include <linux/i2c.h> 77 return link_status[r - DP_LANE0_1_STATUS]; in dp_link_status() 231 drm_dbg_kms(aux->drm_dev, "%s: invalid AUX interval 0x%02x (max 4)\n", in __8b10b_clock_recovery_delay_us() 232 aux->name, rd_interval); in __8b10b_clock_recovery_delay_us() 243 drm_dbg_kms(aux->drm_dev, "%s: invalid AUX interval 0x%02x (max 4)\n", in __8b10b_channel_eq_delay_us() 244 aux->name, rd_interval); in __8b10b_channel_eq_delay_us() 256 drm_dbg_kms(aux->drm_dev, "%s: invalid AUX interval 0x%02x\n", in __128b132b_channel_eq_delay_us() 257 aux->name, rd_interval); in __128b132b_channel_eq_delay_us() 279 * - Clock recovery vs. channel equalization 280 * - DPRX vs. LTTPR [all …]
|
/linux/arch/powerpc/platforms/powermac/ |
H A D | low_i2c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2003-2005 Ben. Herrenschmidt (benh@kernel.crashing.org) 7 * The linux i2c layer isn't completely suitable for our needs for various 11 * This file thus provides a simple low level unified i2c interface for 12 * powermac that covers the various types of i2c busses used in Apple machines. 19 * as the interrupt is currently used by i2c-keywest. In the long run, we 20 * might want to get rid of those high-level interfaces to linux i2c layer 41 #include <linux/i2c.h> 107 * i2c-keywest */ 182 name, __kw_state_names[host->state], isr); \ [all …]
|
/linux/drivers/misc/ |
H A D | apds9802als.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * apds9802als.c - apds9802 ALS Driver 14 #include <linux/i2c.h> 51 int retry = 10; in als_wait_for_data_ready() local 56 } while (!(ret & 0x80) && retry--); in als_wait_for_data_ready() 58 if (retry < 0) { in als_wait_for_data_ready() 60 return -ETIMEDOUT; in als_wait_for_data_ready() 76 mutex_lock(&data->mutex); in als_lux0_input_data_show() 97 mutex_unlock(&data->mutex); in als_lux0_input_data_show() 103 mutex_unlock(&data->mutex); in als_lux0_input_data_show() [all …]
|
H A D | ds1682.c | 1 // SPDX-License-Identifier: GPL-2.0-only 32 #include <linux/i2c.h> 35 #include <linux/nvmem-provider.h> 38 #include <linux/hwmon-sysfs.h> 64 dev_dbg(dev, "ds1682_show() called on %s\n", attr->attr.name); in ds1682_show() 67 rc = i2c_smbus_read_i2c_block_data(client, sattr->index, sattr->n in ds1682_show() 99 ds1682_store(struct device * dev,struct device_attribute * attr,const char * buf,size_t count) ds1682_store() argument 158 ds1682_eeprom_read(struct file * filp,struct kobject * kobj,struct bin_attribute * attr,char * buf,loff_t off,size_t count) ds1682_eeprom_read() argument 176 ds1682_eeprom_write(struct file * filp,struct kobject * kobj,struct bin_attribute * attr,char * buf,loff_t off,size_t count) ds1682_eeprom_write() argument [all...] |
/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/sound/soc/codecs/aw88395/ |
H A D | aw88395.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // aw88395.c -- ALSA SoC AW88395 codec support 5 // Copyright (c) 2022-2023 AWINIC Technology CO., LTD 12 #include <linux/i2c.h> 24 .max_register = AW88395_REG_MAX - 1, 34 ret = aw88395_dev_start(aw88395->aw_pa); in aw88395_start_pa() 36 dev_err(aw88395->aw_pa->dev, "aw88395 device start failed. retry = %d", i); in aw88395_start_pa() 37 ret = aw88395_dev_fw_update(aw88395->aw_pa, AW88395_DSP_FW_UPDATE_ON, true); in aw88395_start_pa() 39 dev_err(aw88395->aw_pa->dev, "fw update failed"); in aw88395_start_pa() 43 dev_info(aw88395->aw_pa->dev, "start success\n"); in aw88395_start_pa() [all …]
|
/linux/sound/pci/emu10k1/ |
H A D | io.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * Lee Revell <rlrevell@joe-job.com> 5 * James Courtier-Dutton <James@superbug.co.uk> 23 if (snd_BUG_ON(reg & (emu->audigy ? (0xffff0000 & ~A_PTR_ADDRESS_MASK) in check_ptr_reg() 41 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu10k1_ptr_read() 42 outl(regptr, emu->port + PTR); in snd_emu10k1_ptr_read() 43 val = inl(emu->port + DATA); in snd_emu10k1_ptr_read() 44 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu10k1_ptr_read() 51 mask = (1 << size) - 1; in snd_emu10k1_ptr_read() 76 mask = (1 << size) - 1; in snd_emu10k1_ptr_write() [all …]
|
/linux/drivers/usb/typec/tcpm/ |
H A D | tcpci_rt1711h.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Richtek RT1711H Type-C Chip Driver 13 #include <linux/i2c.h> 43 /* I2C timeout = (tout + 1) * 12.5ms */ 73 return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u16)); in rt1711h_read16() 78 return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u16)); in rt1711h_write16() 83 return regmap_raw_read(chip->data.regmap, reg, val, sizeof(u8)); in rt1711h_read8() 88 return regmap_raw_write(chip->data.regmap, reg, &val, sizeof(u8)); in rt1711h_write8() 106 struct regmap *regmap = chip->data.regmap; in rt1711h_init() 116 if (chip->info->enable_pd30_extended_message) { in rt1711h_init() [all …]
|
/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos5250-snow-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/clock/maxim,max77686.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/sound/samsung-i2s.h> 30 stdout-path = "serial3:115200n8"; 33 gpio-keys { 34 compatible = "gpio-keys"; 35 pinctrl-names = "default"; [all …]
|
/linux/arch/arm/mach-orion5x/ |
H A D | terastation_pro2-setup.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 16 #include <linux/i2c.h> 18 #include <asm/mach-types.h> 31 * - Marvell 88F5281-D0 32 * - Marvell 88SX6042 SATA controller (PCI) 33 * - Marvell 88E1118 Gigabit Ethernet PHY 34 * - 256KB NOR flash 35 * - 128MB of DDR RAM 36 * - PCIe port (not equipped) 57 .end = TSP2_NOR_BOOT_BASE + TSP2_NOR_BOOT_SIZE - 1, [all …]
|
/linux/arch/arm/mach-omap2/ |
H A D | vc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 19 #include "prm-regbits-34xx.h" 20 #include "prm-regbits-44xx.h" 52 * struct omap_vc_channel_cfg - describe the cfg_channel bitfield 96 /* Default I2C trace length on pcb, 6.3cm. Used for capacitance calculations. */ 101 * omap_vc_config_channel - configure VC channel to PMIC mappings 106 * - i2c slave address (SA) 107 * - voltage configuration address (RAV) 108 * - command configuration address (RAC) and enable bit (RACEN) 109 * - command values for ON, ONLP, RET and OFF (CMD) [all …]
|
/linux/drivers/hwmon/ |
H A D | ina2xx.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 * Zero Drift Bi-Directional Current/Power Monitor with I2C Interface 10 * Bi-Directional Current/Power Monitor with I2C Interface 14 * Bi-Directional Current/Power Monitor with I2C Interface 18 * Bi-directional Current/Power Monitor with I2C Interface 31 #include <linux/i2c.h> 59 /* settings - depend on use case */ 259 val = DIV_ROUND_CLOSEST((s16)regval, data->config->shunt_div); in ina2xx_get_value() 262 val = (regval >> data->config->bus_voltage_shift) * in ina2xx_get_value() 263 data->config->bus_voltage_lsb; in ina2xx_get_value() [all …]
|