Home
last modified time | relevance | path

Searched +full:i2c +full:- +full:retry +full:- +full:count (Results 1 – 25 of 104) sorted by relevance

12345

/Linux-v5.10/Documentation/devicetree/bindings/power/supply/
Dsbs,sbs-battery.yaml1 # 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>
19 - items:
20 - enum:
21 - ti,bq20z65
22 - ti,bq20z75
23 - enum:
[all …]
/Linux-v5.10/drivers/mfd/
Dgateworks-gsc.c1 // 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-v5.10/drivers/gpu/drm/
Ddrm_dp_helper.c25 #include <linux/i2c.h>
51 return link_status[r - DP_LANE0_1_STATUS]; in dp_link_status()
191 const char *arrow = request == DP_AUX_NATIVE_READ ? "->" : "<-"; in drm_dp_dump_access()
195 aux->name, offset, arrow, ret, min(ret, 20), buffer); in drm_dp_dump_access()
198 aux->name, offset, arrow, ret); in drm_dp_dump_access()
204 * The DisplayPort AUX channel is an abstraction to allow generic, driver-
208 * Transactions are described using a hardware-independent drm_dp_aux_msg
210 * Both native and I2C-over-AUX transactions are supported.
217 unsigned int retry, native_reply; in drm_dp_dpcd_access() local
226 mutex_lock(&aux->hw_mutex); in drm_dp_dpcd_access()
[all …]
/Linux-v5.10/Documentation/devicetree/bindings/i2c/
Dgoogle,cros-ec-i2c-tunnel.yaml1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
3 ---
5 $id: http://devicetree.org/schemas/i2c/google,cros-ec-i2c-tunnel.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 title: I2C bus that tunnels through the ChromeOS EC (cros-ec)
11 - Doug Anderson <dianders@chromium.org>
12 - Benson Leung <bleung@chromium.org>
13 - Enric Balletbo i Serra <enric.balletbo@collabora.com>
19 those devices we need to tunnel our i2c commands through the EC.
21 The node for this device should be under a cros-ec node like
[all …]
/Linux-v5.10/arch/arm/boot/dts/
Dcros-ec-sbs.dtsi2 * 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>;
Dexynos5250-snow-common.dtsi1 // 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>
27 stdout-path = "serial3:115200n8";
30 gpio-keys {
31 compatible = "gpio-keys";
32 pinctrl-names = "default";
[all …]
/Linux-v5.10/drivers/char/tpm/
Dtpm_i2c_atmel.c1 // 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 …]
Dtpm_i2c_infineon.c1 // 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-v5.10/drivers/hwmon/
Dina2xx.c1 // 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
30 #include <linux/i2c.h>
32 #include <linux/hwmon-sysfs.h>
55 /* register count */
61 /* settings - depend on use case */
190 return regmap_write(data->regmap, INA2XX_CALIBRATION, in ina2xx_calibrate()
[all …]
/Linux-v5.10/drivers/input/touchscreen/
Drohm_bu21023.c1 // 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 …]
Datmel_mxt_ts.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (C) 2011-2014 Atmel Corporation
20 #include <linux/i2c.h>
29 #include <media/v4l2-device.h>
30 #include <media/v4l2-ioctl.h>
31 #include <media/videobuf2-v4l2.h>
32 #include <media/videobuf2-vmalloc.h>
352 return obj->size_minus_one + 1; in mxt_obj_size()
357 return obj->instances_minus_one + 1; in mxt_obj_instances()
397 dev_dbg(&data->client->dev, "message: %*ph\n", in mxt_dump_message()
[all …]
Dwdt87xx_i2c.c2 * 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 …]
Draydium_i2c_ts.c1 // 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>
28 /* Slave I2C mode */
32 /* I2C bootoloader commands */
41 /* I2C main commands */
115 /* struct raydium_data - represents state of Raydium touchscreen device */
158 xfer_count -= xfer_start_idx; in raydium_i2c_xfer()
[all …]
/Linux-v5.10/drivers/misc/eeprom/
Didt_89hpesx.c7 * Copyright (C) 2016 T-Platforms. All Rights Reserved.
36 * IDT PCIe-switch NTB Linux driver
39 * Serge Semin <fancer.lancer@gmail.com>, <Sergey.Semin@t-platforms.ru>
42 * NOTE of the IDT 89HPESx SMBus-slave interface driver
44 * IDT PCIe-switches. IDT provides a simple SMBus interface to perform IO-
47 * binary sysfs-file in the device directory:
48 * /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom
49 * In case if read-only flag is specified in the dts-node of device desription,
50 * User-space applications won't be able to write to the EEPROM sysfs-node.
52 * data of device CSRs. This driver exposes debugf-file to perform simple IO
[all …]
/Linux-v5.10/arch/powerpc/platforms/powermac/
Dlow_i2c.c1 // 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-v5.10/drivers/misc/
Dapds9802als.c1 // 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 …]
Dds1682.c1 // SPDX-License-Identifier: GPL-2.0-only
32 #include <linux/i2c.h>
37 #include <linux/hwmon-sysfs.h>
63 dev_dbg(dev, "ds1682_show() called on %s\n", attr->attr.name); in ds1682_show()
66 rc = i2c_smbus_read_i2c_block_data(client, sattr->index, sattr->nr, in ds1682_show()
69 return -EIO; in ds1682_show()
73 if (sattr->index == DS1682_REG_ELAPSED) { in ds1682_show()
76 /* Detect and retry when a tick occurs mid-read */ in ds1682_show()
78 rc = i2c_smbus_read_i2c_block_data(client, sattr->index, in ds1682_show()
79 sattr->nr, in ds1682_show()
[all …]
/Linux-v5.10/sound/pci/emu10k1/
Dio.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 * --
11 * --
27 mask = emu->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK; in snd_emu10k1_ptr_read()
35 mask = ((1 << size) - 1) << offset; in snd_emu10k1_ptr_read()
37 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu10k1_ptr_read()
38 outl(regptr, emu->port + PTR); in snd_emu10k1_ptr_read()
39 val = inl(emu->port + DATA); in snd_emu10k1_ptr_read()
40 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu10k1_ptr_read()
44 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu10k1_ptr_read()
[all …]
/Linux-v5.10/drivers/nfc/pn544/
Di2c.c1 // 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);
134 #define PN544_FW_I2C_WRITE_DATA_MAX_LEN MIN((PN544_FW_I2C_MAX_PAYLOAD -\
138 #define PN544_FW_SECURE_CHUNK_WRITE_DATA_MAX_LEN (PN544_FW_I2C_MAX_PAYLOAD -\
176 * < 0 if hardware error occured (e.g. i2c err)
184 print_hex_dump(KERN_DEBUG, "i2c: ", DUMP_PREFIX_OFFSET, \
185 16, 1, (skb)->data, (skb)->len, 0); \
[all …]
/Linux-v5.10/drivers/rtc/
Drtc-dm355evm.c1 // SPDX-License-Identifier: GPL-2.0+
3 * rtc-dm355evm.c - access battery-backed counter in MSP430 firmware
19 * reasonable RTC for applications where alarms and non-NTP drift
23 * counter bytes atomically: the count may increment in the middle
42 * rolling over by re-reading until the value is stable, in dm355evm_rtc_read_time()
93 * REVISIT handle non-atomic writes ... maybe just retry until in dm355evm_rtc_set_time()
120 /*----------------------------------------------------------------------*/
126 rtc = devm_rtc_allocate_device(&pdev->dev); in dm355evm_rtc_probe()
132 rtc->ops = &dm355evm_rtc_ops; in dm355evm_rtc_probe()
133 rtc->range_max = U32_MAX; in dm355evm_rtc_probe()
[all …]
/Linux-v5.10/drivers/i2c/busses/
Di2c-sh7760.c2 * I2C bus driver for the SH7760 I2C Interfaces.
4 * (c) 2005-2008 MSC Vertriebsges.m.b.H, Manuel Lauss <mlau@msc-ge.com>
13 #include <linux/i2c.h>
22 #include <asm/i2c-sh7760.h>
38 #define I2CRFDR 0x34 /* rx fifo count */
39 #define I2CTFDR 0x38 /* tx fifo count */
43 #define MCR_MDBS 0x80 /* non-fifo mode switch */
104 __raw_writel(val, (unsigned long)cam->iobase + reg); in OUT32()
109 return __raw_readl((unsigned long)cam->iobase + reg); in IN32()
115 struct i2c_msg *msg = id->msg; in sh7760_i2c_irq()
[all …]
/Linux-v5.10/arch/arm/mach-orion5x/
Dterastation_pro2-setup.c1 // 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 …]
Dkurobox_pro-setup.c2 * arch/arm/mach-orion5x/kurobox_pro-setup.c
20 #include <linux/i2c.h>
23 #include <asm/mach-types.h>
26 #include <linux/platform_data/mtd-orion_nand.h>
32 * KUROBOX-PRO Info
65 .size = SZ_256M - (SZ_4M + SZ_64M),
72 .end = KUROBOX_PRO_NAND_BASE + KUROBOX_PRO_NAND_SIZE - 1,
85 .id = -1,
104 .end = KUROBOX_PRO_NOR_BOOT_BASE + KUROBOX_PRO_NOR_BOOT_SIZE - 1,
108 .name = "physmap-flash",
[all …]
/Linux-v5.10/arch/arm/mach-omap2/
Dvc.c22 #include "prm-regbits-34xx.h"
23 #include "prm-regbits-44xx.h"
55 * struct omap_vc_channel_cfg - describe the cfg_channel bitfield
99 /* Default I2C trace length on pcb, 6.3cm. Used for capacitance calculations. */
104 * omap_vc_config_channel - configure VC channel to PMIC mappings
109 * - i2c slave address (SA)
110 * - voltage configuration address (RAV)
111 * - command configuration address (RAC) and enable bit (RACEN)
112 * - command values for ON, ONLP, RET and OFF (CMD)
115 * non-default channel. Starting with OMAP4, there are more than 2
[all …]
/Linux-v5.10/drivers/power/supply/
Dsbs-battery.c1 // SPDX-License-Identifier: GPL-2.0-or-later
12 #include <linux/i2c.h>
19 #include <linux/power/sbs-battery.h>
100 SBS_DATA(-1, 0x03, 0, 65535),
106 SBS_DATA(POWER_SUPPLY_PROP_CURRENT_NOW, 0x0A, -32768, 32767),
108 SBS_DATA(POWER_SUPPLY_PROP_CURRENT_AVG, 0x0B, -32768, 32767),
216 int val = sbs_read_word_data(chip->client, BATTERY_MODE_OFFSET); in sbs_disable_charger_broadcasts()
222 val = sbs_write_word_data(chip->client, BATTERY_MODE_OFFSET, val); in sbs_disable_charger_broadcasts()
226 dev_err(&chip->client->dev, in sbs_disable_charger_broadcasts()
229 dev_dbg(&chip->client->dev, "%s\n", __func__); in sbs_disable_charger_broadcasts()
[all …]

12345