diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2013-01-16 08:53:59 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-02-13 18:22:52 -0500 |
commit | fbc6ae363e5e589a28135c051a2ff835e6236d5f (patch) | |
tree | ed083a4ba2d43d03c040410f5198bd3786b91402 /include/linux/i2c | |
parent | ac7bc5a953c38c32513d1825decf336c4909ce3b (diff) |
mfd: twl-core: Move twl_i2c_read/write_u8 to header as inline function
twl_i2c_read/write_u8 become as a simple wrapper over the twl_i2c_read/write.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r-- | include/linux/i2c/twl.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index e441fd8e7c86..488debbef895 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -175,17 +175,22 @@ TWL_CLASS_IS(4030, TWL4030_CLASS_ID) | |||
175 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) | 175 | TWL_CLASS_IS(6030, TWL6030_CLASS_ID) |
176 | 176 | ||
177 | /* | 177 | /* |
178 | * Read and write single 8-bit registers | ||
179 | */ | ||
180 | int twl_i2c_write_u8(u8 mod_no, u8 val, u8 reg); | ||
181 | int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg); | ||
182 | |||
183 | /* | ||
184 | * Read and write several 8-bit registers at once. | 178 | * Read and write several 8-bit registers at once. |
185 | */ | 179 | */ |
186 | int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); | 180 | int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
187 | int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); | 181 | int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
188 | 182 | ||
183 | /* | ||
184 | * Read and write single 8-bit registers | ||
185 | */ | ||
186 | static inline int twl_i2c_write_u8(u8 mod_no, u8 val, u8 reg) { | ||
187 | return twl_i2c_write(mod_no, &val, reg, 1); | ||
188 | } | ||
189 | |||
190 | static inline int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg) { | ||
191 | return twl_i2c_read(mod_no, val, reg, 1); | ||
192 | } | ||
193 | |||
189 | int twl_get_type(void); | 194 | int twl_get_type(void); |
190 | int twl_get_version(void); | 195 | int twl_get_version(void); |
191 | int twl_get_hfclk_rate(void); | 196 | int twl_get_hfclk_rate(void); |