1STRUCT REGULATOR_OPS(9) API reference STRUCT REGULATOR_OPS(9)
2
3
4
6 struct_regulator_ops - regulator operations.
7
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);
12 int (* get_voltage) (struct regulator_dev *);
13 int (* set_current_limit) (struct regulator_dev *,int min_uA, int max_uA);
14 int (* get_current_limit) (struct regulator_dev *);
15 int (* enable) (struct regulator_dev *);
16 int (* disable) (struct regulator_dev *);
17 int (* is_enabled) (struct regulator_dev *);
18 int (* set_mode) (struct regulator_dev *, unsigned int mode);
19 unsigned int (* get_mode) (struct regulator_dev *);
20 int (* enable_time) (struct regulator_dev *);
21 int (* get_status) (struct regulator_dev *);
22 unsigned int (* get_optimum_mode) (struct regulator_dev *, int input_uV,int output_uV, int load_uA);
23 int (* set_suspend_voltage) (struct regulator_dev *, int uV);
24 int (* set_suspend_enable) (struct regulator_dev *);
25 int (* set_suspend_disable) (struct regulator_dev *);
26 int (* set_suspend_mode) (struct regulator_dev *, unsigned int mode);
27 };
28
30 list_voltage
31 Return one of the supported voltages, in microvolts; zero if the
32 selector indicates a voltage that is unusable on this system; or
33 negative errno. Selectors range from zero to one less than
34 regulator_desc.n_voltages. Voltages may be reported in any order.
35
36 set_voltage
37 Set the voltage for the regulator within the range specified. The
38 driver should select the voltage closest to min_uV.
39
40 get_voltage
41 Return the currently configured voltage for the regulator.
42
43 set_current_limit
44 Configure a limit for a current-limited regulator.
45
46 get_current_limit
47 Get the configured limit for a current-limited regulator.
48
49 enable
50 Configure the regulator as enabled.
51
52 disable
53 Configure the regulator as disabled.
54
55 is_enabled
56 Return 1 if the regulator is enabled, 0 if not. May also return
57 negative errno.
58
59 set_mode
60 Set the configured operating mode for the regulator.
61
62 get_mode
63 Get the configured operating mode for the regulator.
64
65 enable_time
66 Time taken for the regulator voltage output voltage to stabalise
67 after being enabled, in microseconds.
68
69 get_status
70 Return actual (not as-configured) status of regulator, as a
71 REGULATOR_STATUS value (or negative errno)
72
73 get_optimum_mode
74 Get the most efficient operating mode for the regulator when
75 running with the specified parameters.
76
77 set_suspend_voltage
78 Set the voltage for the regulator when the system is suspended.
79
80 set_suspend_enable
81 Mark the regulator as enabled when the system is suspended.
82
83 set_suspend_disable
84 Mark the regulator as disabled when the system is suspended.
85
86 set_suspend_mode
87 Set the operating mode for the regulator when the system is
88 suspended.
89
91 This struct describes regulator operations which can be implemented by
92 regulator chip drivers.
93
95 Liam Girdwood <lrg@slimlogic.co.uk>
96 Author.
97
98 Mark Brown <broonie@opensource.wolfsonmicro.com>
99 Wolfson Microelectronics,
100
101
102 Author.
103
105Kernel Hackers Manual 2.6. November 2011 STRUCT REGULATOR_OPS(9)