Bengt Jonsson | 38e9683 | 2012-01-13 16:30:31 +0100 | [diff] [blame] | 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) |
Bengt Jonsson | 38e9683 | 2012-01-13 16:30:31 +0100 | [diff] [blame] | 24 | * |
| 25 | */ |
| 26 | struct dbx500_regulator_info { |
| 27 | struct device *dev; |
| 28 | struct regulator_desc desc; |
| 29 | struct regulator_dev *rdev; |
| 30 | bool is_enabled; |
| 31 | u16 epod_id; |
| 32 | bool is_ramret; |
| 33 | bool exclude_from_power_state; |
Bengt Jonsson | 38e9683 | 2012-01-13 16:30:31 +0100 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | void power_state_active_enable(void); |
| 37 | int power_state_active_disable(void); |
| 38 | |
| 39 | |
| 40 | #ifdef CONFIG_REGULATOR_DEBUG |
| 41 | int ux500_regulator_debug_init(struct platform_device *pdev, |
| 42 | struct dbx500_regulator_info *regulator_info, |
| 43 | int num_regulators); |
| 44 | |
| 45 | int ux500_regulator_debug_exit(void); |
| 46 | #else |
| 47 | |
| 48 | static inline int ux500_regulator_debug_init(struct platform_device *pdev, |
| 49 | struct dbx500_regulator_info *regulator_info, |
| 50 | int num_regulators) |
| 51 | { |
| 52 | return 0; |
| 53 | } |
| 54 | |
| 55 | static inline int ux500_regulator_debug_exit(void) |
| 56 | { |
| 57 | return 0; |
| 58 | } |
| 59 | |
| 60 | #endif |
| 61 | #endif |