Lines Matching +full:regulator +full:- +full:coupled +full:- +full:with

2 Regulator Consumer Driver Interface
5 This text describes the regulator interface for consumer device drivers.
9 1. Consumer Regulator Access (static & dynamic drivers)
12 A consumer driver can get access to its supply regulator by calling ::
14 regulator = regulator_get(dev, "Vcc");
17 then finds the correct regulator by consulting a machine specific lookup table.
19 regulator that supplies this consumer.
21 To release the regulator the consumer driver should call ::
23 regulator_put(regulator);
25 Consumers can be supplied by more than one regulator e.g. codec consumer with
31 The regulator access functions regulator_get() and regulator_put() will
35 2. Regulator Output Enable & Disable (static & dynamic drivers)
41 int regulator_enable(regulator);
45 This may happen if the consumer shares the regulator or the regulator has been
48 A consumer can determine if a regulator is enabled by calling::
50 int regulator_is_enabled(regulator);
52 This will return > zero when the regulator is enabled.
57 int regulator_disable(regulator);
60 This may not disable the supply if it's shared with other consumers. The
61 regulator will only be disabled when the enabled reference count is zero.
63 Finally, a regulator can be forcefully disabled in the case of an emergency::
65 int regulator_force_disable(regulator);
68 this will immediately and forcefully shutdown the regulator output. All
72 3. Regulator Voltage Control & Status (dynamic drivers)
77 voltage along with frequency to save power, SD drivers may need to select the
82 int regulator_set_voltage(regulator, min_uV, max_uV);
87 NOTE: this can be called when the regulator is enabled or disabled. If called
89 configuration changes and the voltage is physically set when the regulator is
94 int regulator_get_voltage(regulator);
98 regulator is enabled or disabled and should NOT be used to determine regulator
99 output state. However this can be used in conjunction with is_enabled() to
100 determine the regulator physical output voltage.
103 4. Regulator Current Limit Control & Status (dynamic drivers)
113 int regulator_set_current_limit(regulator, min_uA, max_uA);
119 this can be called when the regulator is enabled or disabled. If called
122 regulator is next enabled.
126 int regulator_get_current_limit(regulator);
129 get_current_limit() will return the current limit whether the regulator
130 is enabled or disabled and should not be used to determine regulator current
134 5. Regulator Operating Mode Control & Status (dynamic drivers)
138 their supply regulator to be more efficient when the consumers operating state
141 Regulator operating mode can be changed indirectly or directly.
144 --------------------------------
145 Consumer drivers can request a change in their supply regulator operating mode
148 int regulator_set_load(struct regulator *regulator, int load_uA);
150 This will cause the core to recalculate the total load on the regulator (based
159 knowledge of the regulator or whether the regulator is shared with other
163 ------------------------------
165 Bespoke or tightly coupled drivers may want to directly control regulator
169 int regulator_set_mode(struct regulator *regulator, unsigned int mode);
170 unsigned int regulator_get_mode(struct regulator *regulator);
172 Direct mode will only be used by consumers that *know* about the regulator and
173 are not sharing the regulator with other consumers.
176 6. Regulator Events
180 consumers under regulator stress or failure conditions.
182 Consumers can register interest in regulator events by calling::
184 int regulator_register_notifier(struct regulator *regulator,
189 int regulator_unregister_notifier(struct regulator *regulator,
195 7. Regulator Direct Register Access
199 they need to do low-level hardware access to regulators, with no involvement
202 - clocksource with a voltage-controlled oscillator and control logic to change
204 - thermal management firmware that can issue an arbitrary I2C transaction to
208 regulator, addresses of various regulator registers etc. need to be configured
209 to it. The regulator framework provides the following helpers for querying
212 Bus-specific details, like I2C addresses or transfer rates are handled by the
213 regmap framework. To get the regulator's regmap (if supported), use::
215 struct regmap *regulator_get_regmap(struct regulator *regulator);
217 To obtain the hardware register offset and bitmask for the regulator's voltage
220 int regulator_get_hardware_vsel_register(struct regulator *regulator,
224 To convert a regulator framework voltage selector code (used by
225 regulator_list_voltage) to a hardware-specific voltage selector that can be
228 int regulator_list_hardware_vsel(struct regulator *regulator,