]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
mfd: allow reading entire register banks on twl4030
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 8 Nov 2008 00:13:16 +0000 (01:13 +0100)
committerSamuel Ortiz <samuel@sortiz.org>
Sun, 4 Jan 2009 11:17:38 +0000 (12:17 +0100)
Minor change to the TWL4030 utility interface:  support reads
of all 256 bytes in each register bank (vs just 255).  This
can help when debugging, but is otherwise a NOP.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
drivers/mfd/twl4030-core.c
include/linux/i2c/twl4030.h

index dd843c4fbcc7cc76330199fc917185dbf16680f1..ef9a971e3ead2ac6a64e08d9bc4451faec945474 100644 (file)
@@ -225,7 +225,7 @@ static struct twl4030mapping twl4030_map[TWL4030_MODULE_LAST + 1] = {
  *
  * Returns the result of operation - 0 is success
  */
-int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, u8 num_bytes)
+int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
 {
        int ret;
        int sid;
@@ -274,7 +274,7 @@ EXPORT_SYMBOL(twl4030_i2c_write);
  *
  * Returns result of operation - num_bytes is success else failure.
  */
-int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, u8 num_bytes)
+int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
 {
        int ret;
        u8 val;
index fb604dcd38f19d89a817c8bc2397aa09d3ece62c..ae25c907b7cfda77c8eed315d6d5b08cd74c97b2 100644 (file)
@@ -78,8 +78,8 @@ int twl4030_i2c_read_u8(u8 mod_no, u8 *val, u8 reg);
  * IMPORTANT:  For twl4030_i2c_write(), allocate num_bytes + 1
  * for the value, and populate your data starting at offset 1.
  */
-int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, u8 num_bytes);
-int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, u8 num_bytes);
+int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
+int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
 
 /*----------------------------------------------------------------------*/