diff options
Diffstat (limited to 'include/i2c.h')
-rw-r--r-- | include/i2c.h | 14 |
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() |