19.2 Driver Features
The Anatop regulator driver is based on regulator core driver. The following services are
provided for regulator control:
• Switching ON/OFF all voltage regulators.
• Setting the value for all voltage regulators.
• Getting the current value for all voltage regulators.
19.2.1 Software Operation
The Anatop regulator client driver performs operations by reconfiguring the Anatop
hardware control registers. This is done by calling regulator core APIs with the required
register settings.
19.2.2 Regulator APIs
The regulator power architecture is designed to provide a generic interface to voltage and
current regulators within the Linux 2.6 kernel. It is intended to provide voltage and
current control to client or consumer drivers and also provide status information to user
space applications through a sysfs interface. The intention is to allow systems to
dynamically control regulator output to save power and prolong battery life. This applies
to both voltage regulators (where voltage output is controllable) and current sinks (where
current output is controllable).
For more details, visit
http://opensource.wolfsonmicro.com/node/15
Under this framework, most power operations can be done by the following unified API
calls:
•
regulator_get
used to lookup and obtain a reference to a regulator:
•
struct regulator *regulator_get(struct device *dev, const char *id);
•
regulator_put
used to free the regulator source:
•
void regulator_put(struct regulator *regulator, struct device *dev);
•
regulator_enable
used to enable regulator output:
•
int regulator_enable(struct regulator *regulator);
•
regulator_disable
used to disable regulator output:
•
int regulator_disable(struct regulator *regulator);
•
regulator_is_enabled
is the regulator output enabled:
•
int regulator_is_enabled(struct regulator *regulator);
Driver Features
i.MX 6SoloLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
120
Freescale Semiconductor, Inc.