Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) ST-Ericsson SA 2010
0004  *
0005  * Author: Bengt Jonsson <bengt.jonsson@stericsson.com> for ST-Ericsson,
0006  *     Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
0007  */
0008 
0009 #ifndef DBX500_REGULATOR_H
0010 #define DBX500_REGULATOR_H
0011 
0012 #include <linux/platform_device.h>
0013 
0014 /**
0015  * struct dbx500_regulator_info - dbx500 regulator information
0016  * @desc: regulator description
0017  * @is_enabled: status of the regulator
0018  * @epod_id: id for EPOD (power domain)
0019  * @is_ramret: RAM retention switch for EPOD (power domain)
0020  *
0021  */
0022 struct dbx500_regulator_info {
0023     struct regulator_desc desc;
0024     bool is_enabled;
0025     u16 epod_id;
0026     bool is_ramret;
0027     bool exclude_from_power_state;
0028 };
0029 
0030 void power_state_active_enable(void);
0031 int power_state_active_disable(void);
0032 
0033 
0034 #ifdef CONFIG_REGULATOR_DEBUG
0035 int ux500_regulator_debug_init(struct platform_device *pdev,
0036                    struct dbx500_regulator_info *regulator_info,
0037                    int num_regulators);
0038 
0039 int ux500_regulator_debug_exit(void);
0040 #else
0041 
0042 static inline int ux500_regulator_debug_init(struct platform_device *pdev,
0043                  struct dbx500_regulator_info *regulator_info,
0044                  int num_regulators)
0045 {
0046     return 0;
0047 }
0048 
0049 static inline int ux500_regulator_debug_exit(void)
0050 {
0051     return 0;
0052 }
0053 
0054 #endif
0055 #endif