1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef __REGULATOR_FIXED_H
14#define __REGULATOR_FIXED_H
15
16struct regulator_init_data;
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34struct fixed_voltage_config {
35 const char *supply_name;
36 const char *input_supply;
37 int microvolts;
38 unsigned startup_delay;
39 unsigned int off_on_delay;
40 unsigned enabled_at_boot:1;
41 struct regulator_init_data *init_data;
42};
43
44struct regulator_consumer_supply;
45
46#if IS_ENABLED(CONFIG_REGULATOR)
47struct platform_device *regulator_register_always_on(int id, const char *name,
48 struct regulator_consumer_supply *supplies, int num_supplies, int uv);
49#else
50static inline struct platform_device *regulator_register_always_on(int id, const char *name,
51 struct regulator_consumer_supply *supplies, int num_supplies, int uv)
52{
53 return NULL;
54}
55#endif
56
57#define regulator_register_fixed(id, s, ns) regulator_register_always_on(id, \
58 "fixed-dummy", s, ns, 0)
59
60#endif
61