diff options
author | Lee Jones <lee.jones@linaro.org> | 2014-03-19 08:57:53 +0000 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-03-19 08:57:53 +0000 |
commit | 0caeaede0bc0fdb5046e216b3897f316feaa5a65 (patch) | |
tree | e65dcf7d3fd54f53f1dda3375d117822e2c0571d /include | |
parent | 1a55361e21c252e751ed4b980c8e8c11f4ccd43e (diff) | |
parent | b2931b98cebfb30d940f248d2054b5268eae87a4 (diff) |
Merge branch 'ib-mfd-io-3.15' into HEAD
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/twl.h | 12 | ||||
-rw-r--r-- | include/linux/i2c/twl4030-madc.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index ade1c06d4ceb..d2b16704624c 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h @@ -195,6 +195,18 @@ static inline int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg) { return twl_i2c_read(mod_no, val, reg, 1); } +static inline int twl_i2c_write_u16(u8 mod_no, u16 val, u8 reg) { + val = cpu_to_le16(val); + return twl_i2c_write(mod_no, (u8*) &val, reg, 2); +} + +static inline int twl_i2c_read_u16(u8 mod_no, u16 *val, u8 reg) { + int ret; + ret = twl_i2c_read(mod_no, (u8*) val, reg, 2); + *val = le16_to_cpu(*val); + return ret; +} + int twl_get_type(void); int twl_get_version(void); int twl_get_hfclk_rate(void); diff --git a/include/linux/i2c/twl4030-madc.h b/include/linux/i2c/twl4030-madc.h index 01f595107048..1c0134dd3271 100644 --- a/include/linux/i2c/twl4030-madc.h +++ b/include/linux/i2c/twl4030-madc.h @@ -44,7 +44,7 @@ struct twl4030_madc_conversion_method { struct twl4030_madc_request { unsigned long channels; - u16 do_avg; + bool do_avg; u16 method; u16 type; bool active; |