Lines Matching refs:config
46 dev_ctx->config->pi_controller.switch_on_temperature) { in pi_control()
49 dev_ctx->thermal_allocatable_power = (uint32_t)dev_ctx->config->tdp; in pi_control()
54 k_i = dev_ctx->config->pi_controller.k_integral; in pi_control()
56 err = (int32_t)dev_ctx->config->pi_controller.control_temperature - in pi_control()
59 k_p = (err < 0) ? dev_ctx->config->pi_controller.k_p_overshoot : in pi_control()
60 dev_ctx->config->pi_controller.k_p_undershoot; in pi_control()
67 if ((err < dev_ctx->config->pi_controller.integral_cutoff) && in pi_control()
68 (terr < dev_ctx->config->pi_controller.integral_max)) { in pi_control()
80 if (pi_power + (int32_t)dev_ctx->config->tdp > 0) { in pi_control()
82 pi_power + (uint32_t)dev_ctx->config->tdp; in pi_control()
91 dev_ctx->config->temp_protection->crit_temp_threshold) { in thermal_protection()
99 dev_ctx->config->temp_protection->driver_id, dev_ctx->id); in thermal_protection()
103 dev_ctx->config->temp_protection->warn_temp_threshold) { in thermal_protection()
111 dev_ctx->config->temp_protection->driver_id, dev_ctx->id); in thermal_protection()
134 dev_ctx->config->sensor_id, &dev_ctx->sensor_data); in read_temperature()
153 if (dev_ctx->tick_counter > dev_ctx->config->slow_loop_mult) { in control_update()
178 if (dev_ctx->config->thermal_actors_count > 0) { in control_update()
184 if (dev_ctx->config->temp_protection != NULL) { in control_update()
212 if (dev_ctx->config->thermal_actors_count > 0) { in thermal_update()
245 struct mod_thermal_mgmt_dev_config *config; in thermal_mgmt_dev_init() local
256 config = (struct mod_thermal_mgmt_dev_config *)data; in thermal_mgmt_dev_init()
258 dev_ctx->config = config; in thermal_mgmt_dev_init()
261 if (dev_ctx->config->thermal_actors_count > 0) { in thermal_mgmt_dev_init()
263 dev_ctx->thermal_allocatable_power = (uint32_t)dev_ctx->config->tdp; in thermal_mgmt_dev_init()
266 dev_ctx->config->thermal_actors_count, in thermal_mgmt_dev_init()
268 } else if (dev_ctx->config->temp_protection == NULL) { in thermal_mgmt_dev_init()
273 for (actor = 0; actor < dev_ctx->config->thermal_actors_count; actor++) { in thermal_mgmt_dev_init()
276 actor_ctx->config = &config->thermal_actors_table[actor]; in thermal_mgmt_dev_init()
279 actor_ctx->config->dvfs_domain_id)) { in thermal_mgmt_dev_init()
283 if (!fwk_id_type_is_valid(actor_ctx->config->driver_id) || in thermal_mgmt_dev_init()
284 fwk_id_is_equal(actor_ctx->config->driver_id, FWK_ID_NONE)) { in thermal_mgmt_dev_init()
288 sum_weights = actor_ctx->config->weight * config->tdp * config->tdp; in thermal_mgmt_dev_init()
319 dev_ctx->config->sensor_id, in thermal_mgmt_bind()
326 if (dev_ctx->config->temp_protection != NULL) { in thermal_mgmt_bind()
329 dev_ctx->config->temp_protection->driver_id, in thermal_mgmt_bind()
330 dev_ctx->config->temp_protection->driver_api_id, in thermal_mgmt_bind()
339 FWK_ID_MODULE(fwk_id_get_module_idx(dev_ctx->config->driver_api_id)), in thermal_mgmt_bind()
340 dev_ctx->config->driver_api_id, in thermal_mgmt_bind()
346 for (actor = 0; actor < dev_ctx->config->thermal_actors_count; actor++) { in thermal_mgmt_bind()
350 if (actor_ctx->config->activity_factor != NULL) { in thermal_mgmt_bind()
353 actor_ctx->config->activity_factor->driver_id, in thermal_mgmt_bind()
354 actor_ctx->config->activity_factor->driver_api_id, in thermal_mgmt_bind()
389 dev_ctx->config->sensor_id, &dev_ctx->sensor_data); in thermal_mgmt_process_event()