PebbleOS v4.47.0
Loading...
Searching...
No Matches
Fixed regulators

Regulator driver for a rail switched by a GPIO, as a load switch. More...

Data Structures

struct  pbl_regulator_fixed
 Fixed regulator. More...
 

Macros

#define PBL_REGULATOR_FIXED_DEFINE(sym, _name, _enable, _active_high, _startup_delay_us, _always_on)
 Define a fixed regulator.
 

Detailed Description

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.

PBL_REGULATOR_FIXED_DEFINE(s_vlcd, "vlcd", PBL_GPIO(&dt_gpio1, 29, 0), false, 0, false);
#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

Data Structure Documentation

◆ pbl_regulator_fixed

struct pbl_regulator_fixed

Fixed regulator.

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.

Macro Definition Documentation

◆ PBL_REGULATOR_FIXED_DEFINE

#define PBL_REGULATOR_FIXED_DEFINE (   sym,
  _name,
  _enable,
  _active_high,
  _startup_delay_us,
  _always_on 
)
Value:
PBL_DEVICE_INSTANCE(sym, struct pbl_regulator_fixed, struct pbl_regulator, reg) { \
.reg = PBL_REGULATOR_INIT(sym, _name, nullptr, &pbl_regulator_fixed_ops, _always_on), \
.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
symSymbol of the regulator.
_nameName.
_enableEnable GPIO, from PBL_GPIO().
_active_highEnabled at a high level.
_startup_delay_usTime from enabling until the rail is up, in microseconds.
_always_onSwitched on at init and never off.