6#ifndef _INCLUDE_ZEPHYR_DRIVERS_CLOCK_CONTROL_SF32LB_H_
7#define _INCLUDE_ZEPHYR_DRIVERS_CLOCK_CONTROL_SF32LB_H_
36#define SF32LB_CLOCK_DT_SPEC_GET(node_id) \
38 .dev = DEVICE_DT_GET(DT_CLOCKS_CTLR(node_id)), \
39 .id = DT_CLOCKS_CELL(node_id, id), \
48#define SF32LB_CLOCK_DT_SPEC_GET_OR(node_id, default_spec) \
49 COND_CODE_1(DT_CLOCKS_HAS_IDX(node_id, 0), \
50 (SF32LB_CLOCK_DT_SPEC_GET(node_id)), (default_spec))
57#define SF32LB_CLOCK_DT_INST_SPEC_GET(index) SF32LB_CLOCK_DT_SPEC_GET(DT_DRV_INST(index))
65#define SF32LB_CLOCK_DT_INST_SPEC_GET_OR(index, default_spec) \
66 SF32LB_CLOCK_DT_SPEC_GET_OR(DT_DRV_INST(index), default_spec)
Main header file for clock control driver API.
Clocks Devicetree macro public API header file.
void * clock_control_subsys_t
clock_control_subsys_t is a type to identify a clock controller sub-system.
Definition clock_control.h:59
static int clock_control_off(const struct device *dev, clock_control_subsys_t sys)
Disable a clock controlled by the device.
Definition clock_control.h:149
static int clock_control_on(const struct device *dev, clock_control_subsys_t sys)
Enable a clock controlled by the device.
Definition clock_control.h:126
static int sf32lb_clock_control_off_dt(const struct sf32lb_clock_dt_spec *spec)
Turn off a clock using a sf32lb_clock_dt_spec structure.
Definition sf32lb.h:97
static bool sf3232lb_clock_is_ready_dt(const struct sf32lb_clock_dt_spec *spec)
Check if the clock device is ready.
Definition sf32lb.h:75
static int sf32lb_clock_control_on_dt(const struct sf32lb_clock_dt_spec *spec)
Turn on a clock using a sf32lb_clock_dt_spec structure.
Definition sf32lb.h:86
bool device_is_ready(const struct device *dev)
Verify that a device is ready for use.
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
SF32LB Clock DT spec.
Definition sf32lb.h:24
uint16_t id
Clock ID.
Definition sf32lb.h:28
const struct device * dev
Clock controller (RCC)
Definition sf32lb.h:26