/Zephyr-latest/lib/utils/ |
D | onoff.c | 115 static void set_state(struct onoff_manager *mgr, in set_state() argument 118 mgr->flags = (state & ONOFF_STATE_MASK) in set_state() 119 | (mgr->flags & ~ONOFF_STATE_MASK); in set_state() 122 static int validate_args(const struct onoff_manager *mgr, in validate_args() argument 125 if ((mgr == NULL) || (cli == NULL)) { in validate_args() 140 int onoff_manager_init(struct onoff_manager *mgr, in onoff_manager_init() argument 143 if ((mgr == NULL) in onoff_manager_init() 150 *mgr = (struct onoff_manager)ONOFF_MANAGER_INITIALIZER(transitions); in onoff_manager_init() 155 static void notify_monitors(struct onoff_manager *mgr, in notify_monitors() argument 159 sys_slist_t *mlist = &mgr->monitors; in notify_monitors() [all …]
|
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/nordic/lll/ |
D | lll_clock.c | 29 static void clock_ready(struct onoff_manager *mgr, struct onoff_client *cli, in clock_ready() argument 38 static int blocking_on(struct onoff_manager *mgr, uint32_t timeout) in blocking_on() argument 46 err = onoff_request(mgr, &state.cli); in blocking_on() 56 struct onoff_manager *mgr = in lll_clock_init() local 61 return onoff_request(mgr, &lf_cli); in lll_clock_init() 66 struct onoff_manager *mgr = in lll_clock_deinit() local 70 (void)onoff_cancel(mgr, &lf_cli); in lll_clock_deinit() 72 return onoff_release(mgr); in lll_clock_deinit() 77 struct onoff_manager *mgr; in lll_clock_wait() local 86 mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_LF); in lll_clock_wait() [all …]
|
/Zephyr-latest/include/zephyr/sys/ |
D | onoff.h | 101 typedef void (*onoff_notify_fn)(struct onoff_manager *mgr, 129 typedef void (*onoff_transition_fn)(struct onoff_manager *mgr, 221 int onoff_manager_init(struct onoff_manager *mgr, 252 typedef void (*onoff_client_callback)(struct onoff_manager *mgr, 315 static inline bool onoff_has_error(const struct onoff_manager *mgr) in onoff_has_error() argument 317 return (mgr->flags & ONOFF_FLAG_ERROR) != 0; in onoff_has_error() 347 int onoff_request(struct onoff_manager *mgr, 368 int onoff_release(struct onoff_manager *mgr); 401 int onoff_cancel(struct onoff_manager *mgr, 435 static inline int onoff_cancel_or_release(struct onoff_manager *mgr, in onoff_cancel_or_release() argument [all …]
|
/Zephyr-latest/tests/drivers/clock_control/onoff/src/ |
D | test_clock_control_onoff.c | 30 struct onoff_manager *mgr = get_mgr(); in clock_off() local 33 (void)onoff_release(mgr); in clock_off() 41 struct onoff_manager *mgr = get_mgr(); in ZTEST() local 47 err = onoff_request(mgr, &cli); in ZTEST() 57 err = onoff_release(mgr); in ZTEST() 64 struct onoff_manager *mgr = get_mgr(); in ZTEST() local 71 err = onoff_request(mgr, &cli); in ZTEST() 75 err = onoff_cancel_or_release(mgr, &cli); in ZTEST() 83 static void request_cb(struct onoff_manager *mgr, struct onoff_client *cli, in request_cb() argument 88 err = onoff_cancel_or_release(mgr, cli); in request_cb() [all …]
|
/Zephyr-latest/soc/nordic/nrf54h/gpd/ |
D | gpd.c | 30 struct onoff_manager mgr; member 38 static void start(struct onoff_manager *mgr, onoff_notify_fn notify); 39 static void stop(struct onoff_manager *mgr, onoff_notify_fn notify); 102 struct gpd_onoff_manager *gpd_mgr = CONTAINER_OF(mgr_, struct gpd_onoff_manager, mgr); in request_cb() 115 key = k_spin_lock(&gpd_mgr->mgr.lock); in nrf_gpd_sync() 117 if (gpd_mgr->mgr.refs == 0) { in nrf_gpd_sync() 123 k_spin_unlock(&gpd_mgr->mgr.lock, key); in nrf_gpd_sync() 156 gpd_mgr->notify(&gpd_mgr->mgr, 0); in evt_handler() 160 gpd_mgr->notify(&gpd_mgr->mgr, -EIO); in evt_handler() 176 static void start(struct onoff_manager *mgr, onoff_notify_fn notify) in start() argument [all …]
|
/Zephyr-latest/modules/hal_nordic/nrf_802154/sl_opensource/platform/ |
D | nrf_802154_clock_zephyr.c | 42 static void hfclk_on_callback(struct onoff_manager *mgr, in hfclk_on_callback() argument 54 struct onoff_manager *mgr = in nrf_802154_clock_hfclk_start() local 57 __ASSERT_NO_MSG(mgr != NULL); in nrf_802154_clock_hfclk_start() 61 ret = onoff_request(mgr, &hfclk_cli); in nrf_802154_clock_hfclk_start() 68 struct onoff_manager *mgr = in nrf_802154_clock_hfclk_stop() local 71 __ASSERT_NO_MSG(mgr != NULL); in nrf_802154_clock_hfclk_stop() 73 ret = onoff_cancel_or_release(mgr, &hfclk_cli); in nrf_802154_clock_hfclk_stop()
|
/Zephyr-latest/drivers/clock_control/ |
D | clock_control_nrf2_fll16m.c | 85 static void hfxo_cb(struct onoff_manager *mgr, in hfxo_cb() argument 90 ARG_UNUSED(mgr); in hfxo_cb() 144 return &dev_data->clk_cfg.onoff[0].mgr; in fll16m_find_mgr() 167 return &dev_data->clk_cfg.onoff[i].mgr; in fll16m_find_mgr() 178 struct onoff_manager *mgr = fll16m_find_mgr(dev, spec); in api_request_fll16m() local 180 if (mgr) { in api_request_fll16m() 181 return onoff_request(mgr, cli); in api_request_fll16m() 190 struct onoff_manager *mgr = fll16m_find_mgr(dev, spec); in api_release_fll16m() local 192 if (mgr) { in api_release_fll16m() 193 return onoff_release(mgr); in api_release_fll16m() [all …]
|
D | clock_control_nrf2_hfxo.c | 21 struct onoff_manager mgr; member 70 dev_data->notify(&dev_data->mgr, 0); in hfxo_start_up_timer_handler() 108 static void onoff_start_hfxo(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_start_hfxo() argument 111 CONTAINER_OF(mgr, struct dev_data_hfxo, mgr); in onoff_start_hfxo() 164 static void onoff_stop_hfxo(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_stop_hfxo() argument 167 CONTAINER_OF(mgr, struct dev_data_hfxo, mgr); in onoff_stop_hfxo() 170 notify(mgr, 0); in onoff_stop_hfxo() 206 return onoff_request(&dev_data->mgr, cli); in api_request_hfxo() 218 return onoff_release(&dev_data->mgr); in api_release_hfxo() 231 return onoff_cancel_or_release(&dev_data->mgr, cli); in api_cancel_or_release_hfxo() [all …]
|
D | clock_control_nrf2_hsfll.c | 110 return &dev_data->clk_cfg.onoff[0].mgr; in hsfll_find_mgr() 127 return &dev_data->clk_cfg.onoff[i].mgr; in hsfll_find_mgr() 140 struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); in api_request_hsfll() local 142 if (mgr) { in api_request_hsfll() 143 return onoff_request(mgr, cli); in api_request_hsfll() 156 struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); in api_release_hsfll() local 158 if (mgr) { in api_release_hsfll() 159 return onoff_release(mgr); in api_release_hsfll() 173 struct onoff_manager *mgr = hsfll_find_mgr(dev, spec); in api_cancel_or_release_hsfll() local 175 if (mgr) { in api_cancel_or_release_hsfll() [all …]
|
D | nrf_clock_calibration.c | 40 static void cal_hf_callback(struct onoff_manager *mgr, 43 static void cal_lf_callback(struct onoff_manager *mgr, 70 static void clk_request(struct onoff_manager *mgr, struct onoff_client *cli, in clk_request() argument 76 err = onoff_request(mgr, cli); in clk_request() 80 static void clk_release(struct onoff_manager *mgr) in clk_release() argument 84 err = onoff_release(mgr); in clk_release() 108 static void cal_lf_callback(struct onoff_manager *mgr, in cal_lf_callback() argument 164 static void cal_hf_callback(struct onoff_manager *mgr, in cal_hf_callback() argument
|
D | clock_control_nrf2_common.c | 54 static void onoff_start_option(struct onoff_manager *mgr, in onoff_start_option() argument 58 CONTAINER_OF(mgr, struct clock_onoff, mgr); in onoff_start_option() 69 static void onoff_stop_option(struct onoff_manager *mgr, in onoff_stop_option() argument 73 CONTAINER_OF(mgr, struct clock_onoff, mgr); in onoff_stop_option() 81 notify(mgr, 0); in onoff_stop_option() 136 rc = onoff_manager_init(&cfg->onoff[i].mgr, &transitions); in clock_config_init() 190 notify(&cfg->onoff[i].mgr, status); in clock_config_update_end() 208 static void sync_cb(struct onoff_manager *mgr, struct onoff_client *cli, uint32_t state, int res) in sync_cb() argument
|
D | clock_control_nrf2_global_hsfll.c | 73 return &dev_data->clk_cfg.onoff[0].mgr; in global_hsfll_find_mgr() 90 return &dev_data->clk_cfg.onoff[i].mgr; in global_hsfll_find_mgr() 101 struct onoff_manager *mgr = global_hsfll_find_mgr(dev, spec); in api_request_global_hsfll() local 103 if (mgr) { in api_request_global_hsfll() 104 return onoff_request(mgr, cli); in api_request_global_hsfll() 113 struct onoff_manager *mgr = global_hsfll_find_mgr(dev, spec); in api_release_global_hsfll() local 115 if (mgr) { in api_release_global_hsfll() 116 return onoff_release(mgr); in api_release_global_hsfll() 126 struct onoff_manager *mgr = global_hsfll_find_mgr(dev, spec); in api_cancel_or_release_global_hsfll() local 128 if (mgr) { in api_cancel_or_release_global_hsfll() [all …]
|
D | clock_control_nrf2_lfclk.c | 116 return &dev_data->clk_cfg.onoff[0].mgr; in lfclk_find_mgr() 135 return &dev_data->clk_cfg.onoff[i].mgr; in lfclk_find_mgr() 146 struct onoff_manager *mgr = lfclk_find_mgr(dev, spec); in api_request_lfclk() local 148 if (mgr) { in api_request_lfclk() 149 return onoff_request(mgr, cli); in api_request_lfclk() 158 struct onoff_manager *mgr = lfclk_find_mgr(dev, spec); in api_release_lfclk() local 160 if (mgr) { in api_release_lfclk() 161 return onoff_release(mgr); in api_release_lfclk() 171 struct onoff_manager *mgr = lfclk_find_mgr(dev, spec); in api_cancel_or_release_lfclk() local 173 if (mgr) { in api_cancel_or_release_lfclk() [all …]
|
D | clock_control_nrf.c | 70 struct onoff_manager mgr[CLOCK_CONTROL_NRF_TYPE_COUNT]; member 105 return &data->mgr[type]; in get_onoff_manager() 419 static clock_control_subsys_t get_subsys(struct onoff_manager *mgr) in get_subsys() argument 422 size_t offset = (size_t)(mgr - data->mgr); in get_subsys() 427 static void onoff_stop(struct onoff_manager *mgr, in onoff_stop() argument 432 res = stop(CLOCK_DEVICE, get_subsys(mgr), CTX_ONOFF); in onoff_stop() 433 notify(mgr, res); in onoff_stop() 441 struct onoff_manager *mgr = get_onoff_manager(dev, type); in onoff_started_callback() local 444 notify(mgr, 0); in onoff_started_callback() 447 static void onoff_start(struct onoff_manager *mgr, in onoff_start() argument [all …]
|
D | clock_control_nrf2_common.h | 18 struct onoff_manager mgr; member
|
/Zephyr-latest/soc/nordic/nrf53/ |
D | nrf53_cpunet_mgmt.c | 24 static void onoff_start(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_start() argument 28 notify(mgr, 0); in onoff_start() 31 static void onoff_stop(struct onoff_manager *mgr, onoff_notify_fn notify) in onoff_stop() argument 35 notify(mgr, 0); in onoff_stop()
|
/Zephyr-latest/tests/drivers/clock_control/nrf_clock_calibration/src/ |
D | test_nrf_clock_calibration.c | 28 struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(subsys); in turn_on_clock() local 31 err = onoff_request(mgr, &cli); in turn_on_clock() 43 struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(subsys); in turn_off_clock() local 46 err = onoff_release(mgr); in turn_off_clock()
|
/Zephyr-latest/soc/nordic/common/ |
D | mram_latency.c | 66 static void no_latency_start(struct onoff_manager *mgr, onoff_notify_fn notify) in no_latency_start() argument 72 static void no_latency_stop(struct onoff_manager *mgr, onoff_notify_fn notify) in no_latency_stop() argument 100 static void sync_req_cb(struct onoff_manager *mgr, struct onoff_client *cli, uint32_t state, in sync_req_cb() argument
|
/Zephyr-latest/samples/boards/nordic/clock_control/src/ |
D | main.c | 28 static void sample_notify_cb(struct onoff_manager *mgr, in sample_notify_cb() argument 33 ARG_UNUSED(mgr); in sample_notify_cb()
|
/Zephyr-latest/drivers/led_strip/ |
D | ws2812_gpio.c | 81 struct onoff_manager *mgr = in send_buf() local 88 rc = onoff_request(mgr, &cli); in send_buf() 125 rc = onoff_release(mgr); in send_buf()
|
/Zephyr-latest/tests/drivers/clock_control/clock_control_api/src/ |
D | test_clock_control.c | 36 struct onoff_manager *mgr = in setup_instance() local 39 err = onoff_release(mgr); in setup_instance() 58 struct onoff_manager *mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_LF); in tear_down_instance() local 69 err = onoff_request(mgr, &cli); in tear_down_instance()
|
/Zephyr-latest/tests/boards/nrf/mram_latency/src/ |
D | main.c | 32 static void basic_cb(struct onoff_manager *mgr, struct onoff_client *cli, uint32_t state, int res) in basic_cb() argument 41 static void monitor_cb(struct onoff_manager *mgr, struct onoff_monitor *mon, uint32_t state, in monitor_cb() argument
|
/Zephyr-latest/drivers/sensor/nordic/temp/ |
D | temp_nrf5.c | 33 static void hfclk_on_callback(struct onoff_manager *mgr, in hfclk_on_callback() argument
|
/Zephyr-latest/dts/arm/intel_socfpga_std/ |
D | socfpga.dtsi | 65 compatible = "altr,clk-mgr"; 91 compatible = "altr,sys-mgr", "syscon";
|
/Zephyr-latest/dts/arm/st/l4/ |
D | stm32l4p5.dtsi | 370 clock-names = "ospix", "ospi-ker", "ospi-mgr"; 384 clock-names = "ospix", "ospi-ker", "ospi-mgr";
|