[U-Boot] [PATCH V2 05/13] i2c: Create common default i2c_set_bus_num() function

Stefano Babic sbabic at denx.de
Mon Oct 10 11:35:51 CEST 2011


New default, weak i2c_set_bus_num() function.

Signed-off-by: Stefano Babic <sbabic at denx.de>
Cc: Heiko Schocher <hs at denx.de>
---
Changes since V1:

- add a weak function i2c_set_bus_num() to cmd_i2c.c instead of adding a
dummy function to mxc_i2c.c. (Heiko Schocher)

 common/cmd_i2c.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 3ea75f7..0f925d1 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -158,6 +158,14 @@ int __def_i2c_set_bus_speed(unsigned int speed)
 int i2c_set_bus_speed(unsigned int)
 	__attribute__((weak, alias("__def_i2c_set_bus_speed")));
 
+int __def_i2c_set_bus_num(unsigned int bus)
+{
+	return 0;
+}
+int i2c_set_bus_num(unsigned int)
+	__attribute__((weak, alias("__def_i2c_set_bus_num")));
+
+
 /*
  * get_alen: small parser helper function to get address length
  * returns the address length
-- 
1.7.1



More information about the U-Boot mailing list