Regulator driver for a rail switched by a GPIO, as a load switch.
More...
Regulator driver for a rail switched by a GPIO, as a load switch.
The enable level is set by _active_high, whatever the GPIO flags say, as the Linux regulator-fixed binding does with enable-active-high.
#define PBL_GPIO(_port, _pin, _flags)
Initializer for a struct pbl_gpio.
Definition gpio.h:158
#define PBL_REGULATOR_FIXED_DEFINE(sym, _name, _enable, _active_high, _startup_delay_us, _always_on)
Define a fixed regulator.
Definition fixed.h:52
◆ pbl_regulator_fixed
| struct pbl_regulator_fixed |
| Data Fields |
|
bool |
active_high |
Enabled at a high level. |
|
struct pbl_gpio |
enable |
Enable GPIO. |
|
struct pbl_regulator |
reg |
Regulator. |
|
uint32_t |
startup_delay_us |
Time from enabling until the rail is up, in microseconds. |
◆ PBL_REGULATOR_FIXED_DEFINE
| #define PBL_REGULATOR_FIXED_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_enable, |
|
|
|
_active_high, |
|
|
|
_startup_delay_us, |
|
|
|
_always_on |
|
) |
| |
Value:
.enable = _enable, .active_high = (_active_high), .startup_delay_us = (_startup_delay_us), \
}
Fixed regulator.
Definition fixed.h:27
A power rail.
Definition regulator.h:48
#define PBL_REGULATOR_INIT(sym, _name, _parent, _ops, _always_on)
Initializer for the struct pbl_regulator of regulator sym.
Definition regulator.h:79
#define PBL_REGULATOR_STATE_DEFINE(sym)
Define the class state of regulator sym, for the PBL_*_REGULATOR_DEFINE() macro of a driver.
Definition regulator.h:65
Define a fixed regulator.
- Parameters
-
| sym | Symbol of the regulator. |
| _name | Name. |
| _enable | Enable GPIO, from PBL_GPIO(). |
| _active_high | Enabled at a high level. |
| _startup_delay_us | Time from enabling until the rail is up, in microseconds. |
| _always_on | Switched on at init and never off. |