|
PebbleOS v4.48.0-75-g7416f78a1
|
Power rail class. More...
Modules | |
| Regulator drivers | |
| Interface for regulator drivers. | |
| Fixed regulators | |
| Regulator driver for a rail switched by a GPIO, as a load switch, or always on without one. | |
| nPM1300 regulators | |
| Regulator rails of the nPM1300, cells of nPM1300. | |
| SF32LB52 PMUC regulators | |
| Regulator driver for the regulators of the SF32LB52 PMUC. | |
| SF32LB57 PMUC regulators | |
| Regulator driver for the regulators of the SF32LB57 PMUC. | |
Functions | |
| int | pbl_regulator_enable (const struct pbl_regulator *reg) |
| Take a reference on a rail, switching it on for the first user. | |
| int | pbl_regulator_disable (const struct pbl_regulator *reg) |
| Drop a reference on a rail, switching it off after the last user. | |
| int | pbl_regulator_power_cycle (const struct pbl_regulator *reg, uint32_t off_ms) |
| Switch a rail off and back on, also if it is always-on. | |
| bool | pbl_regulator_is_enabled (const struct pbl_regulator *reg) |
| Check whether a rail is on. | |
Power rail class.
A power rail is a struct pbl_regulator device. Consumers enable and disable it with a use count; a rail marked always-on is switched on at init and stays on, and any other rail starts off. Switching a rail on waits its enable time, so the rail is up when the call returns; the time what it feeds needs after that is up to the consumer.
| int pbl_regulator_disable | ( | const struct pbl_regulator * | reg | ) |
Drop a reference on a rail, switching it off after the last user.
Must balance a successful pbl_regulator_enable().
| reg | Regulator. |
| int pbl_regulator_enable | ( | const struct pbl_regulator * | reg | ) |
Take a reference on a rail, switching it on for the first user.
Returns once the rail is up.
| reg | Regulator. |
| bool pbl_regulator_is_enabled | ( | const struct pbl_regulator * | reg | ) |
Check whether a rail is on.
| reg | Regulator. |
| int pbl_regulator_power_cycle | ( | const struct pbl_regulator * | reg, |
| uint32_t | off_ms | ||
| ) |
Switch a rail off and back on, also if it is always-on.
For a consumer to reset what the rail feeds. Nothing else on the rail may be in use.
| reg | Regulator. |
| off_ms | Time off, in milliseconds. Output capacitors keep the rail up for a while. |