Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357590
b: refs/heads/master
c: fbc6ae3
h: refs/heads/master
v: v3
  • Loading branch information
Peter Ujfalusi authored and Samuel Ortiz committed Feb 13, 2013
1 parent 6cf0e39 commit ea98778
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac7bc5a953c38c32513d1825decf336c4909ce3b
refs/heads/master: fbc6ae363e5e589a28135c051a2ff835e6236d5f
28 changes: 0 additions & 28 deletions trunk/drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,34 +379,6 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
}
EXPORT_SYMBOL(twl_i2c_read);

/**
* twl_i2c_write_u8 - Writes a 8 bit register in TWL4030/TWL5030/TWL60X0
* @mod_no: module number
* @value: the value to be written 8 bit
* @reg: register address (just offset will do)
*
* Returns result of operation - 0 is success
*/
int twl_i2c_write_u8(u8 mod_no, u8 value, u8 reg)
{
return twl_i2c_write(mod_no, &value, reg, 1);
}
EXPORT_SYMBOL(twl_i2c_write_u8);

/**
* twl_i2c_read_u8 - Reads a 8 bit register from TWL4030/TWL5030/TWL60X0
* @mod_no: module number
* @value: the value read 8 bit
* @reg: register address (just offset will do)
*
* Returns result of operation - 0 is success
*/
int twl_i2c_read_u8(u8 mod_no, u8 *value, u8 reg)
{
return twl_i2c_read(mod_no, value, reg, 1);
}
EXPORT_SYMBOL(twl_i2c_read_u8);

/*----------------------------------------------------------------------*/

/**
Expand Down
17 changes: 11 additions & 6 deletions trunk/include/linux/i2c/twl.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,18 +174,23 @@ static inline int twl_class_is_ ##class(void) \
TWL_CLASS_IS(4030, TWL4030_CLASS_ID)
TWL_CLASS_IS(6030, TWL6030_CLASS_ID)

/*
* Read and write single 8-bit registers
*/
int twl_i2c_write_u8(u8 mod_no, u8 val, u8 reg);
int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg);

/*
* Read and write several 8-bit registers at once.
*/
int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);
int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes);

/*
* Read and write single 8-bit registers
*/
static inline int twl_i2c_write_u8(u8 mod_no, u8 val, u8 reg) {
return twl_i2c_write(mod_no, &val, reg, 1);
}

static inline int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg) {
return twl_i2c_read(mod_no, val, reg, 1);
}

int twl_get_type(void);
int twl_get_version(void);
int twl_get_hfclk_rate(void);
Expand Down

0 comments on commit ea98778

Please sign in to comment.