1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) ST-Ericsson SA 2010
4  *
5  * Author: Bengt Jonsson <bengt.jonsson@stericsson.com> for ST-Ericsson,
6  *	   Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
7  */
8 
9 #ifndef DBX500_REGULATOR_H
10 #define DBX500_REGULATOR_H
11 
12 #include <linux/platform_device.h>
13 
14 /**
15  * struct dbx500_regulator_info - dbx500 regulator information
16  * @desc: regulator description
17  * @is_enabled: status of the regulator
18  * @epod_id: id for EPOD (power domain)
19  * @is_ramret: RAM retention switch for EPOD (power domain)
20  *
21  */
22 struct dbx500_regulator_info {
23 	struct regulator_desc desc;
24 	bool is_enabled;
25 	u16 epod_id;
26 	bool is_ramret;
27 	bool exclude_from_power_state;
28 };
29 
30 void power_state_active_enable(void);
31 int power_state_active_disable(void);
32 
33 
34 #ifdef CONFIG_REGULATOR_DEBUG
35 int ux500_regulator_debug_init(struct platform_device *pdev,
36 			       struct dbx500_regulator_info *regulator_info,
37 			       int num_regulators);
38 
39 int ux500_regulator_debug_exit(void);
40 #else
41 
ux500_regulator_debug_init(struct platform_device * pdev,struct dbx500_regulator_info * regulator_info,int num_regulators)42 static inline int ux500_regulator_debug_init(struct platform_device *pdev,
43 			     struct dbx500_regulator_info *regulator_info,
44 			     int num_regulators)
45 {
46 	return 0;
47 }
48 
ux500_regulator_debug_exit(void)49 static inline int ux500_regulator_debug_exit(void)
50 {
51 	return 0;
52 }
53 
54 #endif
55 #endif
56