diff options
author | Bengt Jonsson <bengt.g.jonsson@stericsson.com> | 2012-01-13 10:30:31 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-20 07:01:29 -0500 |
commit | 38e968380b27d6c0f4b68bdd6e3161f8a7effe38 (patch) | |
tree | f7b53215a90e4e115d429592cfa0bee6bc2e876a /drivers/regulator/dbx500-prcmu.h | |
parent | c835e1c00eda6f8f6c6bce49b2d89208f3a184dc (diff) |
regulators/db8500: split off shared dbx500 code
As we progress with DB5500 and future voltage domain regulators
based on very similar hardware as found in the DB8500 PRCMU,
it makes sense to split off the generic parts and introduce
some generic debug code for the DBx500 regulators. This patch
accoplish a basic abstraction of the DBx500 voltage domain
regulators.
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/dbx500-prcmu.h')
-rw-r--r-- | drivers/regulator/dbx500-prcmu.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/drivers/regulator/dbx500-prcmu.h b/drivers/regulator/dbx500-prcmu.h new file mode 100644 index 000000000000..e763883a44f4 --- /dev/null +++ b/drivers/regulator/dbx500-prcmu.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Bengt Jonsson <bengt.jonsson@stericsson.com> for ST-Ericsson, | ||
5 | * Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson | ||
6 | * | ||
7 | * License Terms: GNU General Public License v2 | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #ifndef DBX500_REGULATOR_H | ||
12 | #define DBX500_REGULATOR_H | ||
13 | |||
14 | #include <linux/platform_device.h> | ||
15 | |||
16 | /** | ||
17 | * struct dbx500_regulator_info - dbx500 regulator information | ||
18 | * @dev: device pointer | ||
19 | * @desc: regulator description | ||
20 | * @rdev: regulator device pointer | ||
21 | * @is_enabled: status of the regulator | ||
22 | * @epod_id: id for EPOD (power domain) | ||
23 | * @is_ramret: RAM retention switch for EPOD (power domain) | ||
24 | * @operating_point: operating point (only for vape, to be removed) | ||
25 | * | ||
26 | */ | ||
27 | struct dbx500_regulator_info { | ||
28 | struct device *dev; | ||
29 | struct regulator_desc desc; | ||
30 | struct regulator_dev *rdev; | ||
31 | bool is_enabled; | ||
32 | u16 epod_id; | ||
33 | bool is_ramret; | ||
34 | bool exclude_from_power_state; | ||
35 | unsigned int operating_point; | ||
36 | }; | ||
37 | |||
38 | void power_state_active_enable(void); | ||
39 | int power_state_active_disable(void); | ||
40 | |||
41 | |||
42 | #ifdef CONFIG_REGULATOR_DEBUG | ||
43 | int ux500_regulator_debug_init(struct platform_device *pdev, | ||
44 | struct dbx500_regulator_info *regulator_info, | ||
45 | int num_regulators); | ||
46 | |||
47 | int ux500_regulator_debug_exit(void); | ||
48 | #else | ||
49 | |||
50 | static inline int ux500_regulator_debug_init(struct platform_device *pdev, | ||
51 | struct dbx500_regulator_info *regulator_info, | ||
52 | int num_regulators) | ||
53 | { | ||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | static inline int ux500_regulator_debug_exit(void) | ||
58 | { | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | #endif | ||
63 | #endif | ||