X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fi2c.h;h=9300d97e146b03f406b1b5ea505be2d5886d9325;hb=c385ac283023a4fdd304674a8163ac271a1fb758;hp=1e259861b7869efd7a327d1725f333af6fcb30a1;hpb=02ffb580e6ab7aaa7f6703ed35f489e97439cb65;p=oweals%2Fu-boot.git diff --git a/include/i2c.h b/include/i2c.h index 1e259861b7..9300d97e14 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -193,8 +193,15 @@ int i2c_get_chip_flags(struct udevice *dev, uint *flagsp); * * @offset_len: New offset length value (typically 1 or 2) */ - int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len); + +/** + * i2c_get_offset_len() - get the offset length for a chip + * + * @return: Current offset length value (typically 1 or 2) + */ +int i2c_get_chip_offset_len(struct udevice *dev); + /** * i2c_deblock() - recover a bus that is in an unknown state * @@ -277,6 +284,12 @@ void i2c_init(int speed, int slaveaddr); */ void board_i2c_init(const void *blob); +/* + * Compatibility functions for driver model. + */ +uint8_t i2c_reg_read(uint8_t addr, uint8_t reg); +void i2c_reg_write(uint8_t addr, uint8_t reg, uint8_t val); + #endif /*