X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fi2c.h;h=c60d07583bf68cbcc3b1dc6bf67f41a44585c920;hb=25b29921b2f5a9a133c6196afaf05fce1be9927b;hp=16f099d2eeb906588a0f9233a42fb8b9a9847ef4;hpb=b3873d3f4c424e6563750bb517fac03c2e833cdc;p=oweals%2Fu-boot.git diff --git a/include/i2c.h b/include/i2c.h index 16f099d2ee..c60d07583b 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -262,4 +262,30 @@ extern int get_multi_scl_pin(void); extern int get_multi_sda_pin(void); extern int multi_i2c_init(void); #endif + +/** + * Get FDT values for i2c bus. + * + * @param blob Device tree blbo + * @return the number of I2C bus + */ +void board_i2c_init(const void *blob); + +/** + * Find the I2C bus number by given a FDT I2C node. + * + * @param blob Device tree blbo + * @param node FDT I2C node to find + * @return the number of I2C bus (zero based), or -1 on error + */ +int i2c_get_bus_num_fdt(int node); + +/** + * Reset the I2C bus represented by the given a FDT I2C node. + * + * @param blob Device tree blbo + * @param node FDT I2C node to find + * @return 0 if port was reset, -1 if not found + */ +int i2c_reset_port_fdt(const void *blob, int node); #endif /* _I2C_H_ */