/openbmc/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 …]
|
/openbmc/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 …]
|
/openbmc/u-boot/board/CZ.NIC/turris_omnia/ |
H A D | turris_omnia.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Marvell/db-88f6820-gp by Stefan Roese <sr@denx.de> 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 …]
|
/openbmc/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 …]
|
H A D | google,cros-ec-i2c-tunnel.yaml | 1 # 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> 18 those devices we need to tunnel our i2c commands through the EC. 20 The node for this device should be under a cros-ec node like 21 google,cros-ec-spi or google,cros-ec-i2c. [all …]
|
/openbmc/u-boot/arch/arm/dts/ |
H A D | cros-ec-sbs.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 3 * Smart battery dts fragment for devices that use cros-ec-sbs 9 battery: sbs-battery@b { 10 compatible = "sbs,sbs-battery"; 12 sbs,i2c-retry-count = <2>; 13 sbs,poll-retry-count = <1>;
|
H A D | exynos5800-peach-pi.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * SAMSUNG/GOOGLE Peach-Pit board device tree source 9 /dts-v1/; 14 cpu-model = "Exynos5800"; 16 compatible = "google,pit-rev#", "google,pit", 20 google,bad-wake-gpios = <&gpx0 6 GPIO_ACTIVE_HIGH>; 21 hwid = "PIT TEST A-A 7848"; 22 lazy-init = <1>; 28 pmic = "/i2c@12CA0000"; 33 compatible = "pwm-backlight"; [all …]
|
H A D | exynos5420-peach-pit.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * SAMSUNG/GOOGLE Peach-Pit board device tree source 9 /dts-v1/; 11 #include <dt-bindings/clock/maxim,max77802.h> 12 #include <dt-bindings/regulator/maxim,max77802.h> 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"; [all …]
|
/openbmc/u-boot/drivers/i2c/ |
H A D | i2c-cdns.c | 1 // SPDX-License-Identifier: GPL-2.0+ 4 * IP from Cadence (ID T-CS-PE-0007-100, Version R1p10f2) 6 * This file is based on: drivers/i2c/zynq_i2c.c, 7 * with added driver-model support and code cleanup. 16 #include <i2c.h> 22 /* i2c register set */ 79 #define CDNS_I2C_TRANSFER_SIZE (CDNS_I2C_TRANSFER_SIZE_MAX - 3) 90 int_status = readl(&cdns_i2c->interrupt_status); in cdns_i2c_debug_status() 92 status = readl(&cdns_i2c->status); in cdns_i2c_debug_status() 121 debug("TS%d ", readl(&cdns_i2c->transfer_size)); in cdns_i2c_debug_status() [all …]
|
/openbmc/openbmc/meta-facebook/meta-catalina/recipes-catalina/plat-svc/files/ |
H A D | standby-power-enable | 2 # shellcheck source=meta-facebook/recipes-fb/obmc_functions/files/fb-common-functions 3 source /usr/libexec/fb-common-functions 18 until [[ $gpio_val -gt 0 || $trycnt -gt $max_retries ]] 22 if [[ $rc -ne 0 ]]; then 27 if [[ $gpio_val -eq $expd_val ]]; then 41 # Module 0 I2C Mux 42 # i2c24 - i2c27 43 bind_i2c_device pca954x 0-0071 44 # i2c28 - i2c31 45 bind_i2c_device pca954x 0-0072 [all …]
|
/openbmc/phosphor-power/tools/power-utils/ |
H A D | aei_updater.cpp | 8 * http://www.apache.org/licenses/LICENSE-2.0 27 #include <phosphor-logging/lg2.hpp> 35 constexpr uint8_t MAX_RETRIES = 0x02; // Constants for retry limits 45 constexpr uint8_t BLOCK_WRITE_SIZE = 0x25; // I2C block write size 62 constexpr uint8_t CMD_BOOT_ISP = 0x02; // Boot the In-System Programming System. 82 {"I2C_INTERFACE", "I2C interface is null pointer."}}; in doUpdate() 83 // Callout PSU & I2C in doUpdate() 86 throw std::runtime_error("I2C interface error"); in doUpdate() 106 if (retryProcessTwo == (MAX_RETRIES - 1)) in doUpdate() 138 // One of the block write commands failed, retry download in doUpdate() [all …]
|
/openbmc/u-boot/drivers/tpm/ |
H A D | tpm_tis_infineon.c | 1 // SPDX-License-Identifier: GPL-2.0 14 * Infineon I2C Protocol Stack Specification v0.20. 25 #include <i2c.h> 26 #include <tpm-v1.h> 57 * tpm_tis_i2c_read() - read from TPM register 63 * buffer (little-endian format, i.e. first byte is put into buffer[0]). 65 * NOTE: TPM is big-endian for multi-byte values. Multi-byte 68 * Return -EIO on error, 0 on success. 75 int count; in tpm_tis_i2c_read() local 78 if ((chip->chip_type == SLB9635) || (chip->chip_type == UNKNOWN)) { in tpm_tis_i2c_read() [all …]
|
/openbmc/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>;
|
/openbmc/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 …]
|
/openbmc/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 30 #include <linux/i2c.h> 32 #include <linux/hwmon-sysfs.h> 54 /* register count */ 60 /* settings - depend on use case */ 189 return regmap_write(data->regmap, INA2XX_CALIBRATION, in ina2xx_calibrate() [all …]
|
/openbmc/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 | imagis.c | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <linux/i2c.h> 46 .addr = ts->client->addr, in imagis_i2c_read_reg() 51 .addr = ts->client->addr, in imagis_i2c_read_reg() 58 int retry = IST3038C_I2C_RETRY_COUNT; in imagis_i2c_read_reg() local 60 /* Retry in case the controller fails to respond */ in imagis_i2c_read_reg() 62 ret = i2c_transfer(ts->client->adapter, msg, ARRAY_SIZE(msg)); in imagis_i2c_read_reg() 68 error = ret < 0 ? ret : -EIO; in imagis_i2c_read_reg() 69 dev_err(&ts->client->dev, in imagis_i2c_read_reg() 70 "%s - i2c_transfer failed: %d (%d)\n", in imagis_i2c_read_reg() [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 …]
|
/openbmc/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- 16 * binary sysfs-file in the device directory: 17 * /sys/bus/i2c/devices/<bus>-<devaddr>/eeprom 18 * In case if read-only flag is specified in the dts-node of device desription, 19 * User-space applications won't be able to write to the EEPROM sysfs-node. [all …]
|
/openbmc/phosphor-hwmon/ |
H A D | hwmonio.cpp | 6 * http://www.apache.org/licenses/LICENSE-2.0 64 * Retry on bus or device errors or timeouts in case 71 * Retry CRC errors. 77 * instead of blocking. Retry. 81 * We'll see this when for example i2c devices are 82 * unplugged but the driver is still bound. Retry 93 * a retry still gives this app a shot at getting data 123 val = _intf->read(fullPath); in read() 147 if (0 == std::count(retryableErrors.begin(), retryableErrors.end(), in read() 153 return -rc; in read() [all …]
|
/openbmc/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 …]
|
/openbmc/linux/drivers/gpu/drm/display/ |
H A D | drm_dp_helper.c | 26 #include <linux/i2c.h> 75 return link_status[r - DP_LANE0_1_STATUS]; in dp_link_status() 229 drm_dbg_kms(aux->drm_dev, "%s: invalid AUX interval 0x%02x (max 4)\n", in __8b10b_clock_recovery_delay_us() 230 aux->name, rd_interval); in __8b10b_clock_recovery_delay_us() 241 drm_dbg_kms(aux->drm_dev, "%s: invalid AUX interval 0x%02x (max 4)\n", in __8b10b_channel_eq_delay_us() 242 aux->name, rd_interval); in __8b10b_channel_eq_delay_us() 254 drm_dbg_kms(aux->drm_dev, "%s: invalid AUX interval 0x%02x\n", in __128b132b_channel_eq_delay_us() 255 aux->name, rd_interval); in __128b132b_channel_eq_delay_us() 277 * - Clock recovery vs. channel equalization 278 * - DPRX vs. LTTPR [all …]
|
/openbmc/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> 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 …]
|