|
PebbleOS v4.48.0-75-g7416f78a1
|
Clock controller driver operations, called with interrupts locked. More...
#include <driver.h>
Data Fields | |
| int(* | enable )(const struct pbl_clk_controller *ctrl, uint32_t id) |
| Ungate a clock, or NULL if the clocks always run. | |
| int(* | disable )(const struct pbl_clk_controller *ctrl, uint32_t id) |
| Gate a clock, or NULL if the clocks always run. | |
| int(* | get_rate )(const struct pbl_clk_controller *ctrl, uint32_t id, uint64_t parent_mhz, uint64_t *rate_mhz) |
| Get a clock's rate in mHz from its parent's, 0 for a clock without one, or NULL if each clock runs at its parent's rate. | |
| int(* | get_parent )(const struct pbl_clk_controller *ctrl, uint32_t id, struct pbl_clk *parent) |
| Get a clock's parent, or NULL if the clocks have none. | |
| int(* | set_parent )(const struct pbl_clk_controller *ctrl, uint32_t id, const struct pbl_clk *parent) |
| Switch a clock to another parent, or NULL if no clock can. | |
| int(* | set_rate )(const struct pbl_clk_controller *ctrl, uint32_t id, uint64_t rate_mhz, uint64_t parent_mhz) |
| Set a clock's rate in mHz from its parent's, 0 for a clock without one, or NULL if no clock can. | |
Clock controller driver operations, called with interrupts locked.
| int(* pbl_clk_controller_ops::disable) (const struct pbl_clk_controller *ctrl, uint32_t id) |
Gate a clock, or NULL if the clocks always run.
Returns 0 or a negative errno.
| int(* pbl_clk_controller_ops::enable) (const struct pbl_clk_controller *ctrl, uint32_t id) |
Ungate a clock, or NULL if the clocks always run.
Returns 0 or a negative errno.
| int(* pbl_clk_controller_ops::get_parent) (const struct pbl_clk_controller *ctrl, uint32_t id, struct pbl_clk *parent) |
Get a clock's parent, or NULL if the clocks have none.
Returns 0, -ENOENT if the clock has none, or another negative errno.
| int(* pbl_clk_controller_ops::get_rate) (const struct pbl_clk_controller *ctrl, uint32_t id, uint64_t parent_mhz, uint64_t *rate_mhz) |
Get a clock's rate in mHz from its parent's, 0 for a clock without one, or NULL if each clock runs at its parent's rate.
Returns 0 or a negative errno.
| int(* pbl_clk_controller_ops::set_parent) (const struct pbl_clk_controller *ctrl, uint32_t id, const struct pbl_clk *parent) |
Switch a clock to another parent, or NULL if no clock can.
Returns 0, -EINVAL if it cannot take that parent, or another negative errno.
| int(* pbl_clk_controller_ops::set_rate) (const struct pbl_clk_controller *ctrl, uint32_t id, uint64_t rate_mhz, uint64_t parent_mhz) |
Set a clock's rate in mHz from its parent's, 0 for a clock without one, or NULL if no clock can.
Returns 0, -EINVAL if the clock cannot run at that rate exactly, or another negative errno.