summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2021-08-23 09:17:07 -0400
committerTom Rini <[email protected]>2021-08-23 09:17:07 -0400
commit926fe46a6d9d3def405440227b0f77ed98ee2f9d (patch)
tree760829c8df31cdebe7178a52e25935a2e2bd05ee /include
parent3ee343cd7cc1eaa4e0b905ab3d8d0c764985d264 (diff)
parentc50b21b70523939c561d0455a2c423f63a9162ca (diff)
Merge tag 'for-v2021.10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-i2c
i2c changes for for-v2021.10-rc3 new driver: - Introduce mcp230xx support from Sebastian Reichel new feature: - i2c-gpio: add support for "sda-gpios" + "scl-gpios" i2c-gpio bindings. from Samuel Holland - bootcount: add a new driver with syscon as backend from Nandor Han
Diffstat (limited to 'include')
-rw-r--r--include/i2c.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h
index 8db34a67fee..3d9ecaba0b6 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -243,6 +243,20 @@ int dm_i2c_reg_read(struct udevice *dev, uint offset);
int dm_i2c_reg_write(struct udevice *dev, uint offset, unsigned int val);
/**
+ * dm_i2c_reg_clrset() - Apply bitmask to an I2C register
+ *
+ * Read value, apply bitmask and write modified value back to the
+ * given address in an I2C chip
+ *
+ * @dev: Device to use for transfer
+ * @offset: Address for the R/W operation
+ * @clr: Bitmask of bits that should be cleared
+ * @set: Bitmask of bits that should be set
+ * @return 0 on success, -ve on error
+ */
+int dm_i2c_reg_clrset(struct udevice *dev, uint offset, u32 clr, u32 set);
+
+/**
* dm_i2c_xfer() - Transfer messages over I2C
*
* This transfers a raw message. It is best to use dm_i2c_reg_read/write()