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

login
register
mail settings
Submitter Nishanth Menon
Date March 22, 2013, 9:33 p.m.
Message ID <1363988004-25819-8-git-send-email-nm@ti.com>
Download mbox | patch
Permalink /patch/230262/
State Superseded
Delegated to: Tom Rini
Headers show

Comments

Nishanth Menon - March 22, 2013, 9:33 p.m.
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@ti.com>
---
 include/twl6035.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

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);
 }