10376148fSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 238e96838SBengt Jonsson /* 338e96838SBengt Jonsson * Copyright (C) ST-Ericsson SA 2010 438e96838SBengt Jonsson * 538e96838SBengt Jonsson * Author: Bengt Jonsson <bengt.jonsson@stericsson.com> for ST-Ericsson, 638e96838SBengt Jonsson * Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson 738e96838SBengt Jonsson */ 838e96838SBengt Jonsson 938e96838SBengt Jonsson #ifndef DBX500_REGULATOR_H 1038e96838SBengt Jonsson #define DBX500_REGULATOR_H 1138e96838SBengt Jonsson 1238e96838SBengt Jonsson #include <linux/platform_device.h> 1338e96838SBengt Jonsson 1438e96838SBengt Jonsson /** 1538e96838SBengt Jonsson * struct dbx500_regulator_info - dbx500 regulator information 1638e96838SBengt Jonsson * @desc: regulator description 1738e96838SBengt Jonsson * @is_enabled: status of the regulator 1838e96838SBengt Jonsson * @epod_id: id for EPOD (power domain) 1938e96838SBengt Jonsson * @is_ramret: RAM retention switch for EPOD (power domain) 2038e96838SBengt Jonsson * 2138e96838SBengt Jonsson */ 2238e96838SBengt Jonsson struct dbx500_regulator_info { 2338e96838SBengt Jonsson struct regulator_desc desc; 2438e96838SBengt Jonsson bool is_enabled; 2538e96838SBengt Jonsson u16 epod_id; 2638e96838SBengt Jonsson bool is_ramret; 2738e96838SBengt Jonsson bool exclude_from_power_state; 2838e96838SBengt Jonsson }; 2938e96838SBengt Jonsson 3038e96838SBengt Jonsson void power_state_active_enable(void); 3138e96838SBengt Jonsson int power_state_active_disable(void); 3238e96838SBengt Jonsson 3338e96838SBengt Jonsson 3438e96838SBengt Jonsson #ifdef CONFIG_REGULATOR_DEBUG 3538e96838SBengt Jonsson int ux500_regulator_debug_init(struct platform_device *pdev, 3638e96838SBengt Jonsson struct dbx500_regulator_info *regulator_info, 3738e96838SBengt Jonsson int num_regulators); 3838e96838SBengt Jonsson 3938e96838SBengt Jonsson int ux500_regulator_debug_exit(void); 4038e96838SBengt Jonsson #else 4138e96838SBengt Jonsson ux500_regulator_debug_init(struct platform_device * pdev,struct dbx500_regulator_info * regulator_info,int num_regulators)4238e96838SBengt Jonssonstatic inline int ux500_regulator_debug_init(struct platform_device *pdev, 4338e96838SBengt Jonsson struct dbx500_regulator_info *regulator_info, 4438e96838SBengt Jonsson int num_regulators) 4538e96838SBengt Jonsson { 4638e96838SBengt Jonsson return 0; 4738e96838SBengt Jonsson } 4838e96838SBengt Jonsson ux500_regulator_debug_exit(void)4938e96838SBengt Jonssonstatic inline int ux500_regulator_debug_exit(void) 5038e96838SBengt Jonsson { 5138e96838SBengt Jonsson return 0; 5238e96838SBengt Jonsson } 5338e96838SBengt Jonsson 5438e96838SBengt Jonsson #endif 5538e96838SBengt Jonsson #endif 56