summaryrefslogtreecommitdiff
path: root/include/i2c.h
diff options
context:
space:
mode:
authorRajeshwari Shinde <rajeshwari.s@samsung.com>2012-12-26 20:03:12 +0000
committerMinkyu Kang <mk7.kang@samsung.com>2013-01-08 10:54:33 +0900
commita9d2ae7014d9e66dde6dd4a344308449508e4a22 (patch)
treee8f2248447d9831045a1de483444a39081bbce27 /include/i2c.h
parentd055911887583e36e550900506c80fbd73c89a58 (diff)
downloadu-boot-imx-a9d2ae7014d9e66dde6dd4a344308449508e4a22.zip
u-boot-imx-a9d2ae7014d9e66dde6dd4a344308449508e4a22.tar.gz
u-boot-imx-a9d2ae7014d9e66dde6dd4a344308449508e4a22.tar.bz2
I2C: Driver changes for FDT support
Functions added to get the I2C bus number and reset I2C bus using FDT node. Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'include/i2c.h')
-rw-r--r--include/i2c.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/i2c.h b/include/i2c.h
index 16f099d..c60d075 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_ */