diff options
author | Mattias Wallin <mattias.wallin@stericsson.com> | 2010-09-10 11:47:56 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-10-28 18:29:19 -0400 |
commit | 47c1697508f2ec9f6b31ce6c825fe1017871dea6 (patch) | |
tree | e22afa146c3232802abf482caa167e0e2444093b /include/linux/mfd | |
parent | f4ebcab36088d45a5e8889e9b63d77e01c808076 (diff) |
mfd: Align ab8500 with the abx500 interface
This patch makes the ab8500 mixed signal chip expose the same
interface for register access as the ab3100, ab3550 and ab5500 chip.
The ab8500_read() and ab8500_write() is removed and replaced with
abx500_get_register_interruptible() and
abx500_set_register_interruptible().
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r-- | include/linux/mfd/ab8500.h | 28 | ||||
-rw-r--r-- | include/linux/mfd/abx500.h | 3 |
2 files changed, 25 insertions, 6 deletions
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h index f5cec4500f38..d63b6050b183 100644 --- a/include/linux/mfd/ab8500.h +++ b/include/linux/mfd/ab8500.h | |||
@@ -10,6 +10,29 @@ | |||
10 | #include <linux/device.h> | 10 | #include <linux/device.h> |
11 | 11 | ||
12 | /* | 12 | /* |
13 | * AB8500 bank addresses | ||
14 | */ | ||
15 | #define AB8500_SYS_CTRL1_BLOCK 0x1 | ||
16 | #define AB8500_SYS_CTRL2_BLOCK 0x2 | ||
17 | #define AB8500_REGU_CTRL1 0x3 | ||
18 | #define AB8500_REGU_CTRL2 0x4 | ||
19 | #define AB8500_USB 0x5 | ||
20 | #define AB8500_TVOUT 0x6 | ||
21 | #define AB8500_DBI 0x7 | ||
22 | #define AB8500_ECI_AV_ACC 0x8 | ||
23 | #define AB8500_RESERVED 0x9 | ||
24 | #define AB8500_GPADC 0xA | ||
25 | #define AB8500_CHARGER 0xB | ||
26 | #define AB8500_GAS_GAUGE 0xC | ||
27 | #define AB8500_AUDIO 0xD | ||
28 | #define AB8500_INTERRUPT 0xE | ||
29 | #define AB8500_RTC 0xF | ||
30 | #define AB8500_MISC 0x10 | ||
31 | #define AB8500_DEBUG 0x12 | ||
32 | #define AB8500_PROD_TEST 0x13 | ||
33 | #define AB8500_OTP_EMUL 0x15 | ||
34 | |||
35 | /* | ||
13 | * Interrupts | 36 | * Interrupts |
14 | */ | 37 | */ |
15 | 38 | ||
@@ -99,6 +122,7 @@ struct ab8500 { | |||
99 | int revision; | 122 | int revision; |
100 | int irq_base; | 123 | int irq_base; |
101 | int irq; | 124 | int irq; |
125 | u8 chip_id; | ||
102 | 126 | ||
103 | int (*write) (struct ab8500 *a8500, u16 addr, u8 data); | 127 | int (*write) (struct ab8500 *a8500, u16 addr, u8 data); |
104 | int (*read) (struct ab8500 *a8500, u16 addr); | 128 | int (*read) (struct ab8500 *a8500, u16 addr); |
@@ -124,10 +148,6 @@ struct ab8500_platform_data { | |||
124 | struct regulator_init_data *regulator[AB8500_NUM_REGULATORS]; | 148 | struct regulator_init_data *regulator[AB8500_NUM_REGULATORS]; |
125 | }; | 149 | }; |
126 | 150 | ||
127 | extern int ab8500_write(struct ab8500 *a8500, u16 addr, u8 data); | ||
128 | extern int ab8500_read(struct ab8500 *a8500, u16 addr); | ||
129 | extern int ab8500_set_bits(struct ab8500 *a8500, u16 addr, u8 mask, u8 data); | ||
130 | |||
131 | extern int __devinit ab8500_init(struct ab8500 *ab8500); | 151 | extern int __devinit ab8500_init(struct ab8500 *ab8500); |
132 | extern int __devexit ab8500_exit(struct ab8500 *ab8500); | 152 | extern int __devexit ab8500_exit(struct ab8500 *ab8500); |
133 | 153 | ||
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 390726fcbcb1..be7373c79bea 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
@@ -6,8 +6,7 @@ | |||
6 | * | 6 | * |
7 | * ABX500 core access functions. | 7 | * ABX500 core access functions. |
8 | * The abx500 interface is used for the Analog Baseband chip | 8 | * The abx500 interface is used for the Analog Baseband chip |
9 | * ab3100, ab3550, ab5500 and possibly comming. It is not used for | 9 | * ab3100, ab3550, ab5500, and ab8500. |
10 | * ab4500 and ab8500 since they are another family of chip. | ||
11 | * | 10 | * |
12 | * Author: Mattias Wallin <mattias.wallin@stericsson.com> | 11 | * Author: Mattias Wallin <mattias.wallin@stericsson.com> |
13 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> | 12 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> |