4 * Copyright 2008 Wolfson Microelectronics PLC.
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
8 * Copyright (c) 2009 Nokia Corporation
9 * Roger Quadros <ext-roger.quadros@nokia.com>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
17 #ifndef __REGULATOR_FIXED_H
18 #define __REGULATOR_FIXED_H
20 struct regulator_init_data
;
23 * struct fixed_voltage_config - fixed_voltage_config structure
24 * @supply_name: Name of the regulator supply
25 * @input_supply: Name of the input regulator supply
26 * @microvolts: Output voltage of regulator
27 * @startup_delay: Start-up time in microseconds
28 * @enabled_at_boot: Whether regulator has been enabled at
29 * boot or not. 1 = Yes, 0 = No
30 * This is used to keep the regulator at
32 * @init_data: regulator_init_data
34 * This structure contains fixed voltage regulator configuration
35 * information that must be passed by platform code to the fixed
36 * voltage regulator driver.
38 struct fixed_voltage_config
{
39 const char *supply_name
;
40 const char *input_supply
;
42 unsigned startup_delay
;
43 unsigned enabled_at_boot
:1;
44 struct regulator_init_data
*init_data
;
47 struct regulator_consumer_supply
;
49 #if IS_ENABLED(CONFIG_REGULATOR)
50 struct platform_device
*regulator_register_always_on(int id
, const char *name
,
51 struct regulator_consumer_supply
*supplies
, int num_supplies
, int uv
);
53 static inline struct platform_device
*regulator_register_always_on(int id
, const char *name
,
54 struct regulator_consumer_supply
*supplies
, int num_supplies
, int uv
)
60 #define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
61 "fixed-dummy", s, ns, 0)