|
PebbleOS
|
Reset controller class. More...
Modules | |
| SF32LB RCC resets | |
| Reset controller of the SF32LB52 HPSYS RCC. | |
Data Structures | |
| struct | pbl_reset_controller_ops |
| Reset controller driver operations, called with interrupts locked. More... | |
| struct | pbl_reset_controller |
| A reset controller. More... | |
| struct | pbl_reset |
| A reset line, as used by a consumer. More... | |
Macros | |
| #define | PBL_RESET_CONTROLLER_STATE_DEFINE(sym) PBL_DEVICE_STATE_DEFINE(sym) |
Define the class state of reset controller sym, for the driver's define macro. | |
| #define | PBL_RESET_CONTROLLER_INIT(sym, _name, _init, _parent, _ops, _num_resets) |
Initializer for the struct pbl_reset_controller of controller sym. | |
| #define | PBL_RESET(_ctrl, _id) {.ctrl = (_ctrl), .id = (_id)} |
| Initializer for a struct pbl_reset. | |
Functions | |
| int | pbl_reset_assert (const struct pbl_reset *rst) |
| Put a line in reset. | |
| int | pbl_reset_deassert (const struct pbl_reset *rst) |
| Take a line out of reset. | |
| int | pbl_reset_reset (const struct pbl_reset *rst) |
| Pulse a line: assert then deassert it. | |
Reset controller class.
A reset controller is a struct pbl_reset_controller device driving a set of reset lines, each identified by a provider-specific number defined in the controller header. A consumer holds a struct pbl_reset naming the controller and line, and lists the controller among its device dependencies:
| struct pbl_reset_controller |
A reset controller.
| Data Fields | ||
|---|---|---|
| struct pbl_device | dev | Device. |
| uint16_t | num_resets | Number of reset lines. |
| const struct pbl_reset_controller_ops * | ops | Driver operations. |
| struct pbl_reset |
A reset line, as used by a consumer.
| Data Fields | ||
|---|---|---|
| const struct pbl_reset_controller * | ctrl | Controller. |
| uint32_t | id | Line number on the controller. |
| #define PBL_RESET | ( | _ctrl, | |
| _id | |||
| ) | {.ctrl = (_ctrl), .id = (_id)} |
Initializer for a struct pbl_reset.
| _ctrl | Reset controller. |
| _id | Line number, from the controller's binding header. |
| #define PBL_RESET_CONTROLLER_INIT | ( | sym, | |
| _name, | |||
| _init, | |||
| _parent, | |||
| _ops, | |||
| _num_resets | |||
| ) |
Initializer for the struct pbl_reset_controller of controller sym.
| sym | Symbol of the controller instance, with its state defined by PBL_RESET_CONTROLLER_STATE_DEFINE(). |
| _name | Name. |
| _init | Device init function, or NULL. |
| _parent | Parent device, or NULL. |
| _ops | Driver operations. |
| _num_resets | Number of reset lines. |
| #define PBL_RESET_CONTROLLER_STATE_DEFINE | ( | sym | ) | PBL_DEVICE_STATE_DEFINE(sym) |
Define the class state of reset controller sym, for the driver's define macro.
| sym | Symbol of the controller instance. |
| int pbl_reset_assert | ( | const struct pbl_reset * | rst | ) |
Put a line in reset.
| rst | Reset line. |
| int pbl_reset_deassert | ( | const struct pbl_reset * | rst | ) |
Take a line out of reset.
| rst | Reset line. |
| int pbl_reset_reset | ( | const struct pbl_reset * | rst | ) |
Pulse a line: assert then deassert it.
| rst | Reset line. |