/kernel/linux/linux-6.6/drivers/acpi/ |
H A D | thermal.c | 127 struct acpi_thermal_trips trips; member 202 tz->trips.critical.temperature = tmp; in __acpi_thermal_trips_update() 210 tz->trips.critical.valid = false; in __acpi_thermal_trips_update() 215 tz->trips.critical.valid = false; in __acpi_thermal_trips_update() 217 tz->trips.critical.valid = true; in __acpi_thermal_trips_update() 220 tz->trips.critical.temperature); in __acpi_thermal_trips_update() 222 if (tz->trips.critical.valid) { in __acpi_thermal_trips_update() 224 tz->trips.critical.valid = false; in __acpi_thermal_trips_update() 231 if (crt_k > tz->trips.critical.temperature) in __acpi_thermal_trips_update() 234 tz->trips in __acpi_thermal_trips_update() [all...] |
/kernel/linux/linux-5.10/drivers/acpi/ |
H A D | thermal.c | 67 MODULE_PARM_DESC(nocrt, "Set to take no action upon ACPI thermal zone critical trips points."); 172 struct acpi_thermal_trips trips; member 277 tz->trips.critical.temperature = tmp; in acpi_thermal_trips_update() 285 tz->trips.critical.flags.valid = 0; in acpi_thermal_trips_update() 291 tz->trips.critical.flags.valid = 0; in acpi_thermal_trips_update() 293 tz->trips.critical.flags.valid = 1; in acpi_thermal_trips_update() 296 tz->trips.critical.temperature)); in acpi_thermal_trips_update() 298 if (tz->trips.critical.flags.valid == 1) { in acpi_thermal_trips_update() 300 tz->trips.critical.flags.valid = 0; in acpi_thermal_trips_update() 307 if (crt_k > tz->trips in acpi_thermal_trips_update() 814 int trips = 0; acpi_thermal_register_thermal_zone() local [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | core_thermal.c | 84 /* Make sure all trips are writable */ 92 struct mlxsw_thermal_trip trips[MLXSW_THERMAL_NUM_TRIPS]; member 103 struct mlxsw_thermal_trip trips[MLXSW_THERMAL_NUM_TRIPS]; member 146 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = 0; in mlxsw_thermal_module_trips_reset() 147 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HIGH].temp = 0; in mlxsw_thermal_module_trips_reset() 148 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HOT].temp = 0; in mlxsw_thermal_module_trips_reset() 149 tz->trips[MLXSW_THERMAL_TEMP_TRIP_CRIT].temp = 0; in mlxsw_thermal_module_trips_reset() 185 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = crit_temp - in mlxsw_thermal_module_trips_update() 188 tz->trips[MLXSW_THERMAL_TEMP_TRIP_NORM].temp = crit_temp; in mlxsw_thermal_module_trips_update() 189 tz->trips[MLXSW_THERMAL_TEMP_TRIP_HIG in mlxsw_thermal_module_trips_update() 197 mlxsw_thermal_tz_score_update(struct mlxsw_thermal *thermal, struct thermal_zone_device *tzdev, struct mlxsw_thermal_trip *trips, int temp) mlxsw_thermal_tz_score_update() argument [all...] |
/kernel/linux/linux-6.6/drivers/thermal/ |
H A D | thermal_of.c | 25 struct device_node *trips; in of_find_trip_id() local 29 trips = of_get_child_by_name(np, "trips"); in of_find_trip_id() 30 if (!trips) { in of_find_trip_id() 31 pr_err("Failed to find 'trips' node\n"); in of_find_trip_id() 38 for_each_child_of_node(trips, t) { in of_find_trip_id() 49 of_node_put(trips); in of_find_trip_id() 126 struct device_node *trips, *trip; in thermal_of_trips_init() local 129 trips = of_get_child_by_name(np, "trips"); in thermal_of_trips_init() 441 struct thermal_trip *trips = tz->trips; thermal_of_zone_unregister() local 474 struct thermal_trip *trips; thermal_of_zone_register() local [all...] |
H A D | thermal_trip.c | 8 * Thermal trips handling 21 ret = cb(&tz->trips[i], data); in for_each_thermal_trip() 110 dev_err(&tz->device, "Failed to set trips: %d\n", ret); in __thermal_zone_set_trips() 116 if (!tz || !tz->trips || trip_id < 0 || trip_id >= tz->num_trips || !trip) in __thermal_zone_get_trip() 119 *trip = tz->trips[trip_id]; in __thermal_zone_get_trip() 143 if (!tz->ops->set_trip_temp && !tz->ops->set_trip_hyst && !tz->trips) in thermal_zone_set_trip() 165 if (tz->trips && (t.temperature != trip->temperature || t.hysteresis != trip->hysteresis)) in thermal_zone_set_trip() 166 tz->trips[trip_id] = *trip; in thermal_zone_set_trip() 182 if (&tz->trips[i] == trip) in thermal_zone_trip_id()
|
H A D | imx_thermal.c | 117 static struct thermal_trip trips[] = { variable 282 if (data->alarm_temp == trips[IMX_TRIP_PASSIVE].temperature && in imx_get_temp() 283 *temp >= trips[IMX_TRIP_PASSIVE].temperature) in imx_get_temp() 284 imx_set_alarm_temp(data, trips[IMX_TRIP_CRITICAL].temperature); in imx_get_temp() 285 if (data->alarm_temp == trips[IMX_TRIP_CRITICAL].temperature && in imx_get_temp() 286 *temp < trips[IMX_TRIP_PASSIVE].temperature) { in imx_get_temp() 287 imx_set_alarm_temp(data, trips[IMX_TRIP_PASSIVE].temperature); in imx_get_temp() 353 if (temp < 0 || temp > trips[IMX_TRIP_CRITICAL].temperature) in imx_set_trip_temp() 464 trips[IMX_TRIP_PASSIVE].temperature = data->temp_max - (1000 * 10); in imx_init_temp_grade() 465 trips[IMX_TRIP_CRITICA in imx_init_temp_grade() [all...] |
H A D | thermal_helpers.c | 27 struct thermal_trip *trip = tz->trips ? &tz->trips[trip_index] : NULL; in get_tz_trend() 54 trip = &tz->trips[trip_index]; in get_thermal_instance()
|
H A D | da9062-thermal.c | 144 static struct thermal_trip trips[] = { variable 200 trips, ARRAY_SIZE(trips), 0, thermal, in da9062_thermal_probe()
|
H A D | thermal_core.c | 284 * - Non-critical trips will invoke the governor responsible for that zone; 285 * - Hot trips will produce a notification to userspace; 643 trip = &tz->trips[trip_index]; in thermal_zone_bind_cooling_device() 768 trip = &tz->trips[trip_index]; in thermal_zone_unbind_cooling_device() 1186 if (!tz->trips) in thermal_zone_get_crit_temp() 1192 if (tz->trips[i].type == THERMAL_TRIP_CRITICAL) { in thermal_zone_get_crit_temp() 1193 *temp = tz->trips[i].temperature; in thermal_zone_get_crit_temp() 1208 * @trips: a pointer to an array of thermal trips 1231 thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *trips, in argument [all...] |
/kernel/linux/linux-5.10/drivers/thermal/ |
H A D | thermal_of.c | 59 * @trips: an array of trip points (0..ntrips - 1) 74 struct thermal_trip *trips; member 169 return data->trips; in of_thermal_get_trip_points() 281 *type = data->trips[trip].type; in of_thermal_get_trip_type() 294 *temp = data->trips[trip].temperature; in of_thermal_get_trip_temp() 316 data->trips[trip].temperature = temp; in of_thermal_set_trip_temp() 329 *hyst = data->trips[trip].hysteresis; in of_thermal_get_trip_hyst() 343 data->trips[trip].hysteresis = hyst; in of_thermal_set_trip_hyst() 355 if (data->trips[i].type == THERMAL_TRIP_CRITICAL) { in of_thermal_get_crit_temp() 356 *temp = data->trips[ in of_thermal_get_crit_temp() 676 thermal_of_populate_bind_params(struct device_node *np, struct __thermal_bind_params *__tbp, struct thermal_trip *trips, int ntrips) thermal_of_populate_bind_params() argument [all...] |
H A D | gov_fair_share.c | 28 if (tz->trips == 0 || !tz->ops->get_trip_temp) in get_trip_level() 31 for (count = 0; count < tz->trips; count++) { in get_trip_level() 56 return (long)(percentage * level * max_state) / (100 * tz->trips); in get_target_state()
|
H A D | uniphier_thermal.c | 251 const struct thermal_trip *trips; in uniphier_tm_probe() local 300 trips = of_thermal_get_trip_points(tdev->tz_dev); in uniphier_tm_probe() 303 dev_err(dev, "thermal zone has too many trips\n"); in uniphier_tm_probe() 309 if (trips[i].type == THERMAL_TRIP_CRITICAL && in uniphier_tm_probe() 310 trips[i].temperature < crit_temp) in uniphier_tm_probe() 311 crit_temp = trips[i].temperature; in uniphier_tm_probe() 312 uniphier_tm_set_alert(tdev, i, trips[i].temperature); in uniphier_tm_probe()
|
H A D | thermal_sysfs.c | 441 /* We expose passive only if passive trips are present */ 458 for (count = 0; count < tz->trips && !passive; count++) { in thermal_zone_passive_is_visible() 499 if (tz->trips <= 0) in create_trip_attrs() 502 tz->trip_type_attrs = kcalloc(tz->trips, sizeof(*tz->trip_type_attrs), in create_trip_attrs() 507 tz->trip_temp_attrs = kcalloc(tz->trips, sizeof(*tz->trip_temp_attrs), in create_trip_attrs() 515 tz->trip_hyst_attrs = kcalloc(tz->trips, in create_trip_attrs() 525 attrs = kcalloc(tz->trips * 3 + 1, sizeof(*attrs), GFP_KERNEL); in create_trip_attrs() 534 for (indx = 0; indx < tz->trips; indx++) { in create_trip_attrs() 561 attrs[indx + tz->trips] = &tz->trip_temp_attrs[indx].attr.attr; in create_trip_attrs() 579 attrs[indx + tz->trips * in create_trip_attrs() [all...] |
H A D | thermal_core.c | 286 * - Non-critical trips will invoke the governor responsible for that zone; 287 * - Hot trips will produce a notification to userspace; 566 for (count = 0; count < tz->trips; count++) in thermal_zone_device_update() 834 if (trip >= tz->trips || (trip < 0 && trip != THERMAL_TRIPS_NONE)) in thermal_zone_bind_cooling_device() 1017 for (i = 0; i < tz->trips; i++) { in __bind() 1260 for (i = 0; i < tz->trips; i++) in __unbind() 1365 * @trips: the number of trip points the thermal zone support 1387 thermal_zone_device_register(const char *type, int trips, int mask, in thermal_zone_device_register() argument 1411 if (trips > THERMAL_MAX_TRIPS || trips < in thermal_zone_device_register() [all...] |
/kernel/linux/linux-6.6/drivers/thermal/intel/ |
H A D | x86_pkg_temp_thermal.c | 56 struct thermal_trip *trips; member 273 struct thermal_trip *trips; in pkg_temp_thermal_trips_init() local 278 trips = kzalloc(sizeof(*trips) * num_trips, GFP_KERNEL); in pkg_temp_thermal_trips_init() 279 if (!trips) in pkg_temp_thermal_trips_init() 295 kfree(trips); in pkg_temp_thermal_trips_init() 301 trips[i].temperature = thres_reg_value ? in pkg_temp_thermal_trips_init() 304 trips[i].type = THERMAL_TRIP_PASSIVE; in pkg_temp_thermal_trips_init() 307 __func__, cpu, i, trips[i].temperature); in pkg_temp_thermal_trips_init() 310 return trips; in pkg_temp_thermal_trips_init() [all...] |
H A D | intel_pch_thermal.c | 87 struct thermal_trip trips[PCH_MAX_TRIPS]; member 109 ptd->trips[trip].type = THERMAL_TRIP_PASSIVE; in pch_wpt_add_acpi_psv_trip() 110 ptd->trips[trip].temperature = temp; in pch_wpt_add_acpi_psv_trip() 223 ptd->trips[nr_trips].temperature = GET_WPT_TEMP(trip_temp); in intel_pch_thermal_probe() 224 ptd->trips[nr_trips++].type = THERMAL_TRIP_CRITICAL; in intel_pch_thermal_probe() 230 ptd->trips[nr_trips].temperature = GET_WPT_TEMP(trip_temp); in intel_pch_thermal_probe() 231 ptd->trips[nr_trips++].type = THERMAL_TRIP_HOT; in intel_pch_thermal_probe() 237 ptd->trips, nr_trips, in intel_pch_thermal_probe()
|
H A D | intel_quark_dts_thermal.c | 108 struct thermal_trip trips[QRK_MAX_DTS_TRIPS]; member 365 aux_entry->trips[QRK_DTS_ID_TP_CRITICAL].temperature = get_trip_temp(QRK_DTS_ID_TP_CRITICAL); in alloc_soc_dts() 366 aux_entry->trips[QRK_DTS_ID_TP_CRITICAL].type = THERMAL_TRIP_CRITICAL; in alloc_soc_dts() 368 aux_entry->trips[QRK_DTS_ID_TP_HOT].temperature = get_trip_temp(QRK_DTS_ID_TP_HOT); in alloc_soc_dts() 369 aux_entry->trips[QRK_DTS_ID_TP_HOT].type = THERMAL_TRIP_HOT; in alloc_soc_dts() 372 aux_entry->trips, in alloc_soc_dts()
|
H A D | intel_soc_dts_iosf.c | 40 /* Mask for two trips in status bits */ 142 dts->trips[thres_index].temperature = temp; in configure_trip() 143 dts->trips[thres_index].type = trip_type; in configure_trip() 257 dts->tzone = thermal_zone_device_register_with_trips(name, dts->trips, in add_dts_thermal_zone()
|
/kernel/linux/linux-6.6/drivers/thermal/intel/int340x_thermal/ |
H A D | int340x_thermal_zone.c | 171 int34x_zone->trips = zone_trips; in int340x_thermal_zone_add() 195 kfree(int34x_zone->trips); in int340x_thermal_zone_add() 209 kfree(int34x_zone->trips); in int340x_thermal_zone_remove() 218 struct thermal_trip *zone_trips = int34x_zone->trips; in int340x_thermal_update_trips()
|
H A D | int340x_thermal_zone.h | 23 struct thermal_trip *trips; member
|
/kernel/linux/linux-5.10/drivers/thermal/qcom/ |
H A D | qcom-spmi-temp-alarm.c | 279 const struct thermal_trip *trips; in qpnp_tm_get_critical_trip_temp() local 286 trips = of_thermal_get_trip_points(chip->tz_dev); in qpnp_tm_get_critical_trip_temp() 287 if (!trips) in qpnp_tm_get_critical_trip_temp() 292 trips[i].type == THERMAL_TRIP_CRITICAL) in qpnp_tm_get_critical_trip_temp() 293 return trips[i].temperature; in qpnp_tm_get_critical_trip_temp()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | core_thermal.c | 94 /* Make sure all trips are writable */ 102 struct thermal_trip trips[MLXSW_THERMAL_NUM_TRIPS]; member 123 struct thermal_trip trips[MLXSW_THERMAL_NUM_TRIPS]; member 420 module_tz->trips, in mlxsw_thermal_module_tz_init() 461 memcpy(module_tz->trips, default_thermal_module_trips, in mlxsw_thermal_module_init() 462 sizeof(thermal->trips)); in mlxsw_thermal_module_init() 548 gearbox_tz->trips, in mlxsw_thermal_gearbox_tz_init() 603 memcpy(gearbox_tz->trips, default_thermal_trips, in mlxsw_thermal_gearboxes_init() 604 sizeof(thermal->trips)); in mlxsw_thermal_gearboxes_init() 721 memcpy(thermal->trips, default_thermal_trip in mlxsw_thermal_init() [all...] |
/kernel/linux/linux-6.6/drivers/net/wireless/intel/iwlwifi/mvm/ |
H A D | tt.c | 572 /* The driver holds array of temperature trips that are unsorted in iwl_mvm_send_temp_report_ths_cmd() 576 /* compress trips to cmd array, remove uninitialized values*/ in iwl_mvm_send_temp_report_ths_cmd() 578 if (mvm->tz_device.trips[i].temperature != INT_MIN) { in iwl_mvm_send_temp_report_ths_cmd() 580 cpu_to_le16((s16)(mvm->tz_device.trips[i].temperature / 1000)); in iwl_mvm_send_temp_report_ths_cmd() 591 /* we should save the indexes of trips because we sort in iwl_mvm_send_temp_report_ths_cmd() 597 mvm->tz_device.trips[j].temperature) in iwl_mvm_send_temp_report_ths_cmd() 678 /* make all trips writable */ 697 mvm->tz_device.trips, in iwl_mvm_thermal_zone_register() 721 mvm->tz_device.trips[i].temperature = INT_MIN; in iwl_mvm_thermal_zone_register() 722 mvm->tz_device.trips[ in iwl_mvm_thermal_zone_register() [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | thermal.h | 123 * @trips: an array of struct thermal_trip 125 * @trips_disabled; bitmap for disabled trips 165 struct thermal_trip *trips; member 167 unsigned long trips_disabled; /* bitmap for disabled trips */ 307 struct thermal_trip *trips, 363 struct thermal_trip *trips, in thermal_zone_device_register_with_trips() 361 thermal_zone_device_register_with_trips( const char *type, struct thermal_trip *trips, int num_trips, int mask, void *devdata, struct thermal_zone_device_ops *ops, const struct thermal_zone_params *tzp, int passive_delay, int polling_delay) thermal_zone_device_register_with_trips() argument
|
/kernel/linux/linux-6.6/drivers/platform/x86/ |
H A D | acerhdf.c | 141 static struct thermal_trip trips[] = { variable 345 trips[0].temperature = fanon; in acerhdf_check_param() 346 trips[0].hysteresis = fanon - fanoff; in acerhdf_check_param() 680 thz_dev = thermal_zone_device_register_with_trips("acerhdf", trips, ARRAY_SIZE(trips), in acerhdf_register_thermal()
|