1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * Copyright 2008 Wolfson Microelectronics PLC.
9 * Copyright (c) 2009 Nokia Corporation
13 #ifndef __REGULATOR_FIXED_H
14 #define __REGULATOR_FIXED_H
16 struct regulator_init_data;
19 * struct fixed_voltage_config - fixed_voltage_config structure
20 * @supply_name: Name of the regulator supply
21 * @input_supply: Name of the input regulator supply
22 * @microvolts: Output voltage of regulator
23 * @startup_delay: Start-up time in microseconds
24 * @enabled_at_boot: Whether regulator has been enabled at
25 * boot or not. 1 = Yes, 0 = No
26 * This is used to keep the regulator at
28 * @init_data: regulator_init_data
30 * This structure contains fixed voltage regulator configuration
31 * information that must be passed by platform code to the fixed
32 * voltage regulator driver.
34 struct fixed_voltage_config {
35 const char *supply_name;
36 const char *input_supply;
38 unsigned startup_delay;
39 unsigned int off_on_delay;
40 unsigned enabled_at_boot:1;
41 struct regulator_init_data *init_data;
44 struct regulator_consumer_supply;
46 #if IS_ENABLED(CONFIG_REGULATOR)
47 struct platform_device *regulator_register_always_on(int id, const char *name,
48 struct regulator_consumer_supply *supplies, int num_supplies, int uv);
50 static inline struct platform_device *regulator_register_always_on(int id, const char *name,
51 struct regulator_consumer_supply *supplies, int num_supplies, int uv)
57 #define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
58 "fixed-dummy", s, ns, 0)