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