[U-Boot] [PATCH V2 7/9] twl6035: twl6035_i2c_[read|write]_u8 prototype consistent

Nishanth Menon nm at ti.com
Fri Mar 22 22:33:22 CET 2013


u-boot standard i2c register access prototype is
i2c_read(addr, reg, 1, &buf, 1)
i2c_reg_write(u8 addr, u8 reg, u8 val)

twl6035_i2c_read_u8(u8 addr, u8 *val, u8 reg)
twl6035_i2c_write_u8(u8 addr, u8 val, u8 reg)
does not provide consistency, so switch the prototype to be
consistent with rest of u-boot i2c operations:
twl6035_i2c_read_u8(u8 addr, u8 reg, u8 *val)
twl6035_i2c_write_u8(u8 addr, u8 reg, u8 val)

Signed-off-by: Nishanth Menon <nm at ti.com>
---
 include/twl6035.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/twl6035.h b/include/twl6035.h
index 89c2ab5..edc2db5 100644
--- a/include/twl6035.h
+++ b/include/twl6035.h
@@ -37,12 +37,12 @@
 #define LDO_MODE_ACTIVE		(1 << 0)
 
 /* Functions to read and write from TWL6030 */
-static inline int twl6035_i2c_write_u8(u8 chip_no, u8 val, u8 reg)
+static inline int twl6035_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
 {
 	return i2c_write(chip_no, reg, 1, &val, 1);
 }
 
-static inline int twl6035_i2c_read_u8(u8 chip_no, u8 *val, u8 reg)
+static inline int twl6035_i2c_read_u8(u8 chip_no, u8 reg, u8 *val)
 {
 	return i2c_read(chip_no, reg, 1, val, 1);
 }
-- 
1.7.9.5



More information about the U-Boot mailing list