1STRUCT REGULATOR_OPS(9)          API reference         STRUCT REGULATOR_OPS(9)
2
3
4

NAME

6       struct_regulator_ops - regulator operations.
7

SYNOPSIS

9       struct regulator_ops {
10         int (* list_voltage) (struct regulator_dev *, unsigned selector);
11         int (* set_voltage) (struct regulator_dev *, int min_uV, int max_uV,unsigned *selector);
12         int (* map_voltage) (struct regulator_dev *, int min_uV, int max_uV);
13         int (* set_voltage_sel) (struct regulator_dev *, unsigned selector);
14         int (* get_voltage) (struct regulator_dev *);
15         int (* get_voltage_sel) (struct regulator_dev *);
16         int (* set_current_limit) (struct regulator_dev *,int min_uA, int max_uA);
17         int (* get_current_limit) (struct regulator_dev *);
18         int (* enable) (struct regulator_dev *);
19         int (* disable) (struct regulator_dev *);
20         int (* is_enabled) (struct regulator_dev *);
21         int (* set_mode) (struct regulator_dev *, unsigned int mode);
22         unsigned int (* get_mode) (struct regulator_dev *);
23         int (* enable_time) (struct regulator_dev *);
24         int (* set_ramp_delay) (struct regulator_dev *, int ramp_delay);
25         int (* set_voltage_time_sel) (struct regulator_dev *,unsigned int old_selector,unsigned int new_selector);
26         int (* get_status) (struct regulator_dev *);
27         unsigned int (* get_optimum_mode) (struct regulator_dev *, int input_uV,int output_uV, int load_uA);
28         int (* set_bypass) (struct regulator_dev *dev, bool enable);
29         int (* get_bypass) (struct regulator_dev *dev, bool *enable);
30         int (* set_suspend_voltage) (struct regulator_dev *, int uV);
31         int (* set_suspend_enable) (struct regulator_dev *);
32         int (* set_suspend_disable) (struct regulator_dev *);
33         int (* set_suspend_mode) (struct regulator_dev *, unsigned int mode);
34       };
35

MEMBERS

37       list_voltage
38           Return one of the supported voltages, in microvolts; zero if the
39           selector indicates a voltage that is unusable on this system; or
40           negative errno. Selectors range from zero to one less than
41           regulator_desc.n_voltages. Voltages may be reported in any order.
42
43       set_voltage
44           Set the voltage for the regulator within the range specified. The
45           driver should select the voltage closest to min_uV.
46
47       map_voltage
48           Convert a voltage into a selector
49
50       set_voltage_sel
51           Set the voltage for the regulator using the specified selector.
52
53       get_voltage
54           Return the currently configured voltage for the regulator.
55
56       get_voltage_sel
57           Return the currently configured voltage selector for the regulator.
58
59       set_current_limit
60           Configure a limit for a current-limited regulator. The driver
61           should select the current closest to max_uA.
62
63       get_current_limit
64           Get the configured limit for a current-limited regulator.
65
66       enable
67           Configure the regulator as enabled.
68
69       disable
70           Configure the regulator as disabled.
71
72       is_enabled
73           Return 1 if the regulator is enabled, 0 if not. May also return
74           negative errno.
75
76       set_mode
77           Set the configured operating mode for the regulator.
78
79       get_mode
80           Get the configured operating mode for the regulator.
81
82       enable_time
83           Time taken for the regulator voltage output voltage to stabilise
84           after being enabled, in microseconds.
85
86       set_ramp_delay
87           Set the ramp delay for the regulator. The driver should select ramp
88           delay equal to or less than(closest) ramp_delay.
89
90       set_voltage_time_sel
91           Time taken for the regulator voltage output voltage to stabilise
92           after being set to a new value, in microseconds. The function
93           provides the from and to voltage selector, the function should
94           return the worst case.
95
96       get_status
97           Return actual (not as-configured) status of regulator, as a
98           REGULATOR_STATUS value (or negative errno)
99
100       get_optimum_mode
101           Get the most efficient operating mode for the regulator when
102           running with the specified parameters.
103
104       set_bypass
105           Set the regulator in bypass mode.
106
107       get_bypass
108           Get the regulator bypass mode state.
109
110       set_suspend_voltage
111           Set the voltage for the regulator when the system is suspended.
112
113       set_suspend_enable
114           Mark the regulator as enabled when the system is suspended.
115
116       set_suspend_disable
117           Mark the regulator as disabled when the system is suspended.
118
119       set_suspend_mode
120           Set the operating mode for the regulator when the system is
121           suspended.
122

DESCRIPTION

124       This struct describes regulator operations which can be implemented by
125       regulator chip drivers.
126

AUTHORS

128       Liam Girdwood <lrg@slimlogic.co.uk>
129           Author.
130
131       Mark Brown <broonie@opensource.wolfsonmicro.com>
132       Wolfson Microelectronics,
133
134
135           Author.
136
138Kernel Hackers Manual 3.10         June 2019           STRUCT REGULATOR_OPS(9)
Impressum