diff options
| author | Balaji T K <balajitk@ti.com> | 2009-12-13 15:23:33 -0500 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2009-12-13 15:23:33 -0500 |
| commit | fc7b92fca4e546184557f1c53f84ad57c66b7695 (patch) | |
| tree | f15b37df7d34f525d877d33186b840947aa65b4d /include/linux/i2c | |
| parent | b07682b6056eb6701f8cb86aa5800e6f2ea7919b (diff) | |
mfd: Rename all twl4030_i2c*
This patch renames function names like twl4030_i2c_write_u8,
twl4030_i2c_read_u8 to twl_i2c_write_u8, twl_i2c_read_u8
and also common variable in twl-core.c
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/i2c')
| -rw-r--r-- | include/linux/i2c/twl.h | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index a50bcf8a4048..0f812f5aa723 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
| @@ -22,8 +22,8 @@ | |||
| 22 | * | 22 | * |
| 23 | */ | 23 | */ |
| 24 | 24 | ||
| 25 | #ifndef __TWL4030_H_ | 25 | #ifndef __TWL_H_ |
| 26 | #define __TWL4030_H_ | 26 | #define __TWL_H_ |
| 27 | 27 | ||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/input/matrix_keypad.h> | 29 | #include <linux/input/matrix_keypad.h> |
| @@ -72,20 +72,37 @@ | |||
| 72 | #define TWL4030_MODULE_RTC 0x16 | 72 | #define TWL4030_MODULE_RTC 0x16 |
| 73 | #define TWL4030_MODULE_SECURED_REG 0x17 | 73 | #define TWL4030_MODULE_SECURED_REG 0x17 |
| 74 | 74 | ||
| 75 | #define TWL_MODULE_USB TWL4030_MODULE_USB | ||
| 76 | #define TWL_MODULE_AUDIO_VOICE TWL4030_MODULE_AUDIO_VOICE | ||
| 77 | #define TWL_MODULE_PIH TWL4030_MODULE_PIH | ||
| 78 | #define TWL_MODULE_MADC TWL4030_MODULE_MADC | ||
| 79 | #define TWL_MODULE_MAIN_CHARGE TWL4030_MODULE_MAIN_CHARGE | ||
| 80 | #define TWL_MODULE_PM_MASTER TWL4030_MODULE_PM_MASTER | ||
| 81 | #define TWL_MODULE_PM_RECEIVER TWL4030_MODULE_PM_RECEIVER | ||
| 82 | #define TWL_MODULE_RTC TWL4030_MODULE_RTC | ||
| 83 | |||
| 84 | #define GPIO_INTR_OFFSET 0 | ||
| 85 | #define KEYPAD_INTR_OFFSET 1 | ||
| 86 | #define BCI_INTR_OFFSET 2 | ||
| 87 | #define MADC_INTR_OFFSET 3 | ||
| 88 | #define USB_INTR_OFFSET 4 | ||
| 89 | #define BCI_PRES_INTR_OFFSET 9 | ||
| 90 | #define USB_PRES_INTR_OFFSET 10 | ||
| 91 | #define RTC_INTR_OFFSET 11 | ||
| 75 | /* | 92 | /* |
| 76 | * Read and write single 8-bit registers | 93 | * Read and write single 8-bit registers |
| 77 | */ | 94 | */ |
| 78 | int twl4030_i2c_write_u8(u8 mod_no, u8 val, u8 reg); | 95 | int twl_i2c_write_u8(u8 mod_no, u8 val, u8 reg); |
| 79 | int twl4030_i2c_read_u8(u8 mod_no, u8 *val, u8 reg); | 96 | int twl_i2c_read_u8(u8 mod_no, u8 *val, u8 reg); |
| 80 | 97 | ||
| 81 | /* | 98 | /* |
| 82 | * Read and write several 8-bit registers at once. | 99 | * Read and write several 8-bit registers at once. |
| 83 | * | 100 | * |
| 84 | * IMPORTANT: For twl4030_i2c_write(), allocate num_bytes + 1 | 101 | * IMPORTANT: For twl_i2c_write(), allocate num_bytes + 1 |
| 85 | * for the value, and populate your data starting at offset 1. | 102 | * for the value, and populate your data starting at offset 1. |
| 86 | */ | 103 | */ |
| 87 | int twl4030_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); | 104 | int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
| 88 | int twl4030_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); | 105 | int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes); |
| 89 | 106 | ||
| 90 | /*----------------------------------------------------------------------*/ | 107 | /*----------------------------------------------------------------------*/ |
| 91 | 108 | ||
