Home
last modified time | relevance | path

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

12345678

/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/power/supply/
H A 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 …]
/OK3568_Linux_fs/kernel/drivers/mfd/
H A 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 …]
/OK3568_Linux_fs/u-boot/board/CZ.NIC/turris_omnia/
H A Dturris_omnia.c6 * Marvell/db-88f6820-gp by Stefan Roese <sr@denx.de>
8 * SPDX-License-Identifier: GPL-2.0+
12 #include <i2c.h>
23 # include <atsha204a-i2c.h>
35 #define OMNIA_I2C_EEPROM_DM_NAME "i2c@0"
41 #define OMNIA_I2C_MCU_DM_NAME "i2c@0"
56 * Those values and defines are taken from the Marvell U-Boot version
57 * "u-boot-2013.01-2014_T3.0"
93 int ret, retry = 3; in omnia_detect_sata() local
109 for (; retry > 0; --retry) { in omnia_detect_sata()
[all …]
/OK3568_Linux_fs/kernel/drivers/gpu/drm/
H A 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 …]
/OK3568_Linux_fs/kernel/drivers/input/touchscreen/gt1x/
H A Dgt1x_generic.c3 * 2010 - 2014 Goodix Technology.
93 return -1; in gt1x_init_debug_node()
128 GTP_INFO("I2C TRANSFER: %d", i); in gt1x_debug_read_proc()
146 *ppos += ptr - page; in gt1x_debug_read_proc()
147 return (ptr - page); in gt1x_debug_read_proc()
150 static ssize_t gt1x_debug_write_proc(struct file *file, const char *buffer, size_t count, loff_t *p… in gt1x_debug_write_proc() argument
160 GTP_DEBUG("write count %ld\n", (unsigned long)count); in gt1x_debug_write_proc()
162 if (count > GTP_CONFIG_MAX_LENGTH) { in gt1x_debug_write_proc()
163 …GTP_ERROR("Too much data, buffer size: %d, data:%ld", GTP_CONFIG_MAX_LENGTH, (unsigned long)count); in gt1x_debug_write_proc()
164 return -EFAULT; in gt1x_debug_write_proc()
[all …]
/OK3568_Linux_fs/u-boot/arch/arm/dts/
H A Dcros-ec-sbs.dtsi2 * Smart battery dts fragment for devices that use cros-ec-sbs
6 * SPDX-License-Identifier: GPL-2.0
10 battery: sbs-battery@b {
11 compatible = "sbs,sbs-battery";
13 sbs,i2c-retry-count = <2>;
14 sbs,poll-retry-count = <1>;
H A Dexynos5800-peach-pi.dts2 * SAMSUNG/GOOGLE Peach-Pit board device tree source
7 * SPDX-License-Identifier: GPL-2.0+
10 /dts-v1/;
15 cpu-model = "Exynos5800";
17 compatible = "google,pit-rev#", "google,pit",
21 google,bad-wake-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>;
22 hwid = "PIT TEST A-A 7848";
23 lazy-init = <1>;
29 pmic = "/i2c@12CA0000";
34 compatible = "pwm-backlight";
[all …]
H A Dexynos5420-peach-pit.dts2 * SAMSUNG/GOOGLE Peach-Pit board device tree source
7 * SPDX-License-Identifier: GPL-2.0+
10 /dts-v1/;
12 #include <dt-bindings/clock/maxim,max77802.h>
13 #include <dt-bindings/regulator/maxim,max77802.h>
18 compatible = "google,pit-rev#", "google,pit",
22 google,bad-wake-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>;
23 hwid = "PIT TEST A-A 7848";
24 lazy-init = <1>;
30 pmic = "/i2c@12CA0000";
[all …]
/OK3568_Linux_fs/u-boot/drivers/tpm/
H A Dtpm_tis_infineon.c13 * Infineon I2C Protocol Stack Specification v0.20.
20 * SPDX-License-Identifier: GPL-2.0
26 #include <i2c.h>
60 * tpm_tis_i2c_read() - read from TPM register
66 * buffer (little-endian format, i.e. first byte is put into buffer[0]).
68 * NOTE: TPM is big-endian for multi-byte values. Multi-byte
71 * Return -EIO on error, 0 on success.
78 int count; in tpm_tis_i2c_read() local
81 if ((chip->chip_type == SLB9635) || (chip->chip_type == UNKNOWN)) { in tpm_tis_i2c_read()
83 for (count = 0; count < MAX_COUNT; count++) { in tpm_tis_i2c_read()
[all …]
/OK3568_Linux_fs/kernel/drivers/input/touchscreen/gt9xx/
H A Dgt9xx_update.c3 * 2010 - 2012 Goodix Technology.
33 * 1. multi-system supported
139 Read data from the i2c slave device.
141 client: i2c device.
143 buf[2~len-1]: read data buffer.
144 len: GTP_ADDR_LENGTH + read bytes count
152 s32 ret=-1; in gup_i2c_read()
158 msgs[0].addr = client->addr; in gup_i2c_read()
166 msgs[1].addr = client->addr; in gup_i2c_read()
167 msgs[1].len = len - GTP_ADDR_LENGTH; in gup_i2c_read()
[all …]
H A Dgt9xx.c3 * 2010 - 2013 Goodix Technology.
45 * 3. pen separate input device, active-pen button support
69 static const char *goodix_ts_name = "goodix-ts";
150 Read data from the i2c slave device.
152 client: i2c device.
154 buf[2~len-1]: read data buffer.
155 len: GTP_ADDR_LENGTH + read bytes count
163 s32 ret=-1; in gtp_i2c_read()
169 msgs[0].addr = client->addr; in gtp_i2c_read()
177 msgs[1].addr = client->addr; in gtp_i2c_read()
[all …]
H A Dgoodix_tool.c3 * 2010 - 2012 Goodix Technology.
27 #define CMD_HEAD_LENGTH (sizeof(st_cmd_head) - sizeof(u8*))
50 u8 retry; //I2C retry times member
74 //static s32 goodix_tool_read( char *page, char **start, off_t off, int count, int *eof, void *data…
115 s32 ret = -1; in tool_i2c_read_no_extra()
120 msgs[0].addr = gt_client->addr; in tool_i2c_read_no_extra()
125 msgs[1].addr = gt_client->addr; in tool_i2c_read_no_extra()
129 for (i = 0; i < cmd_head.retry; i++) in tool_i2c_read_no_extra()
131 ret=i2c_transfer(gt_client->adapter, msgs, 2); in tool_i2c_read_no_extra()
142 s32 ret = -1; in tool_i2c_write_no_extra()
[all …]
/OK3568_Linux_fs/kernel/drivers/input/touchscreen/elan/
H A Delan_ts.c2 * ELAN HID-I2C TouchScreen driver.
53 gpio_set_value(hw_info->rst_gpio, 1); in elan_ts_hw_reset()
55 gpio_set_value(hw_info->rst_gpio, 0); in elan_ts_hw_reset()
57 gpio_set_value(hw_info->rst_gpio, 1); in elan_ts_hw_reset()
65 dev_err(&ts->client->dev, in elan_switch_irq()
67 __func__, ts->hw_info.irq_num, on, ts->irq_lock_flag); in elan_switch_irq()
68 mutex_lock(&ts->irq_mutex); in elan_switch_irq()
70 if(ts->irq_lock_flag == 1) { in elan_switch_irq()
71 enable_irq(ts->hw_info.irq_num); in elan_switch_irq()
72 ts->irq_lock_flag = 0; in elan_switch_irq()
[all …]
/OK3568_Linux_fs/kernel/drivers/hwmon/
H A 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 …]
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/i2c/
H A 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 …]
/OK3568_Linux_fs/kernel/drivers/char/tpm/
H A 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 …]
/OK3568_Linux_fs/kernel/arch/arm/boot/dts/
H A 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>;
/OK3568_Linux_fs/kernel/drivers/input/touchscreen/
H A 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 …]
H A 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 …]
H A 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 …]
/OK3568_Linux_fs/kernel/drivers/misc/eeprom/
H A 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 …]
/OK3568_Linux_fs/kernel/arch/powerpc/platforms/powermac/
H A 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 …]
/OK3568_Linux_fs/kernel/sound/pci/emu10k1/
H A 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 …]
/OK3568_Linux_fs/kernel/drivers/misc/
H A 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 …]
/OK3568_Linux_fs/kernel/drivers/nfc/pn544/
H A 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 …]

12345678