/openbmc/linux/drivers/thermal/ |
H A D | thermal_trip.c | 53 struct thermal_trip trip; in __thermal_zone_set_trips() local 67 ret = __thermal_zone_get_trip(tz, i , &trip); in __thermal_zone_set_trips() 71 trip_low = trip.temperature - trip.hysteresis; in __thermal_zone_set_trips() 79 if (trip.temperature > tz->temperature && in __thermal_zone_set_trips() 80 trip.temperature < high) { in __thermal_zone_set_trips() 81 high = trip.temperature; in __thermal_zone_set_trips() 114 struct thermal_trip *trip) in __thermal_zone_get_trip() argument 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() 125 struct thermal_trip *trip) in thermal_zone_get_trip() argument [all …]
|
H A D | gov_bang_bang.c | 18 const struct thermal_trip *trip = &tz->trips[trip_index]; in thermal_zone_trip_update() local 21 if (!trip->hysteresis) in thermal_zone_trip_update() 26 trip_index, trip->temperature, tz->temperature, in thermal_zone_trip_update() 27 trip->hysteresis); in thermal_zone_trip_update() 30 if (instance->trip != trip) in thermal_zone_trip_update() 48 if (instance->target == 0 && tz->temperature >= trip->temperature) in thermal_zone_trip_update() 51 tz->temperature <= trip->temperature - trip->hysteresis) in thermal_zone_trip_update() 92 static int bang_bang_control(struct thermal_zone_device *tz, int trip) in bang_bang_control() argument 99 ret = thermal_zone_trip_update(tz, trip); in bang_bang_control()
|
H A D | gov_step_wise.c | 84 const struct thermal_trip *trip = &tz->trips[trip_id]; in thermal_zone_trip_update() local 92 if (tz->temperature >= trip->temperature) { in thermal_zone_trip_update() 94 trace_thermal_zone_trip(tz, trip_id, trip->type); in thermal_zone_trip_update() 98 trip_id, trip->type, trip->temperature, trend, throttle); in thermal_zone_trip_update() 101 if (instance->trip != trip) in thermal_zone_trip_update() 115 update_passive_instance(tz, trip->type, 1); in thermal_zone_trip_update() 119 update_passive_instance(tz, trip->type, -1); in thermal_zone_trip_update() 139 static int step_wise_throttle(struct thermal_zone_device *tz, int trip) in step_wise_throttle() argument 145 thermal_zone_trip_update(tz, trip); in step_wise_throttle()
|
H A D | gov_fair_share.c | 24 struct thermal_trip trip; in get_trip_level() local 28 __thermal_zone_get_trip(tz, count, &trip); in get_trip_level() 29 if (tz->temperature < trip.temperature) in get_trip_level() 38 trace_thermal_zone_trip(tz, count - 1, trip.type); in get_trip_level() 70 const struct thermal_trip *trip = &tz->trips[trip_index]; in fair_share_throttle() local 79 if (instance->trip != trip) in fair_share_throttle() 90 if (instance->trip != trip) in fair_share_throttle()
|
H A D | thermal_helpers.c | 27 struct thermal_trip *trip = tz->trips ? &tz->trips[trip_index] : NULL; in get_tz_trend() local 31 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend() 49 const struct thermal_trip *trip; in get_thermal_instance() local 54 trip = &tz->trips[trip_index]; in get_thermal_instance() 57 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { in get_thermal_instance() 89 struct thermal_trip trip; in __thermal_zone_get_temp() local 97 ret = __thermal_zone_get_trip(tz, count, &trip); in __thermal_zone_get_temp() 98 if (!ret && trip.type == THERMAL_TRIP_CRITICAL) { in __thermal_zone_get_temp() 99 crit_temp = trip.temperature; in __thermal_zone_get_temp()
|
H A D | gov_power_allocator.c | 100 if (instance->trip != trip_max_desired_temperature) in estimate_sustainable_power() 129 struct thermal_trip trip; in estimate_pid_constants() local 134 ret = __thermal_zone_get_trip(tz, trip_switch_on, &trip); in estimate_pid_constants() 136 temperature_threshold -= trip.temperature; in estimate_pid_constants() 399 if ((instance->trip == trip_max_desired_temperature) && in allocate_power() 438 if (instance->trip != trip_max_desired_temperature) in allocate_power() 474 if (instance->trip != trip_max_desired_temperature) in allocate_power() 524 struct thermal_trip trip; in get_governor_trips() local 527 ret = __thermal_zone_get_trip(tz, i, &trip); in get_governor_trips() 535 if (trip.type == THERMAL_TRIP_PASSIVE) { in get_governor_trips() [all …]
|
H A D | thermal_core.c | 308 static void handle_non_critical_trips(struct thermal_zone_device *tz, int trip) in handle_non_critical_trips() argument 310 tz->governor ? tz->governor->throttle(tz, trip) : in handle_non_critical_trips() 311 def_governor->throttle(tz, trip); in handle_non_critical_trips() 330 int trip, int trip_temp, enum thermal_trip_type trip_type) in handle_critical_trips() argument 336 trace_thermal_zone_trip(tz, trip, trip_type); in handle_critical_trips() 346 struct thermal_trip trip; in handle_thermal_trip() local 352 __thermal_zone_get_trip(tz, trip_id, &trip); in handle_thermal_trip() 354 if (trip.temperature == THERMAL_TEMP_INVALID) in handle_thermal_trip() 358 if (tz->last_temperature < trip.temperature && in handle_thermal_trip() 359 tz->temperature >= trip.temperature) in handle_thermal_trip() [all …]
|
H A D | Kconfig | 12 Each thermal zone contains its own temperature, trip points, 26 trip point crossed, cooling device update or governor 45 poweroff kicks in. Similarly to the critical trip point, 84 bool "Enable writable trip points" 87 trip temperatures can be changed from userspace. The 92 change trip temperatures. 120 The Userspace governor allows to get trip point crossed 138 devices one step at the time, taking into account the trip 227 user can manually input temperature and test the different trip 254 CPUs when the passive trip is crossed. [all …]
|
H A D | thermal_trace.h | 70 TP_PROTO(struct thermal_zone_device *tz, int trip, 73 TP_ARGS(tz, trip, trip_type), 78 __field(int, trip) 85 __entry->trip = trip; 90 __get_str(thermal_zone), __entry->id, __entry->trip,
|
H A D | thermal_sysfs.c | 86 struct thermal_trip trip; in trip_point_type_show() local 95 result = __thermal_zone_get_trip(tz, trip_id, &trip); in trip_point_type_show() 104 switch (trip.type) { in trip_point_type_show() 123 struct thermal_trip trip; in trip_point_temp_store() local 136 ret = __thermal_zone_get_trip(tz, trip_id, &trip); in trip_point_temp_store() 140 ret = kstrtoint(buf, 10, &trip.temperature); in trip_point_temp_store() 144 ret = thermal_zone_set_trip(tz, trip_id, &trip); in trip_point_temp_store() 156 struct thermal_trip trip; in trip_point_temp_show() local 165 ret = __thermal_zone_get_trip(tz, trip_id, &trip); in trip_point_temp_show() 174 return sprintf(buf, "%d\n", trip.temperature); in trip_point_temp_show() [all …]
|
/openbmc/linux/drivers/acpi/ |
H A D | thermal.c | 101 struct acpi_thermal_trip trip; member 109 struct acpi_thermal_trip trip; member 256 if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.trip.valid) || in __acpi_thermal_trips_update() 258 valid = tz->trips.passive.trip.valid; in __acpi_thermal_trips_update() 270 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update() 272 tz->trips.passive.trip.temperature = tmp; in __acpi_thermal_trips_update() 273 tz->trips.passive.trip.valid = true; in __acpi_thermal_trips_update() 278 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update() 285 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update() 292 tz->trips.passive.trip.valid = false; in __acpi_thermal_trips_update() [all …]
|
/openbmc/linux/arch/arm/boot/dts/samsung/ |
H A D | exynos5422-odroidxu3-common.dtsi | 82 * Exynos542x supports only 4 trip-points 85 * interrupt-driven trip: cpu0_alert2 100 trip = <&cpu0_alert0>; 104 trip = <&cpu0_alert1>; 108 trip = <&cpu0_alert2>; 117 trip = <&cpu0_alert3>; 133 trip = <&cpu0_alert4>; 183 trip = <&cpu1_alert0>; 187 trip = <&cpu1_alert1>; 191 trip = <&cpu1_alert2>; [all …]
|
H A D | exynos5422-odroidhc1.dts | 60 trip = <&cpu0_alert0>; 76 trip = <&cpu0_alert1>; 109 trip = <&cpu1_alert0>; 120 trip = <&cpu1_alert1>; 153 trip = <&cpu2_alert0>; 164 trip = <&cpu2_alert1>; 197 trip = <&cpu3_alert0>; 208 trip = <&cpu3_alert1>; 241 trip = <&gpu_alert0>; 245 trip = <&gpu_alert1>;
|
/openbmc/linux/drivers/thermal/broadcom/ |
H A D | brcmstb_thermal.c | 178 struct avs_tmon_trip *trip = &avs_tmon_trips[type]; in avs_tmon_trip_enable() local 179 u32 val = __raw_readl(priv->tmon_base + trip->enable_offs); in avs_tmon_trip_enable() 184 val |= trip->enable_mask; in avs_tmon_trip_enable() 186 val &= ~trip->enable_mask; in avs_tmon_trip_enable() 188 __raw_writel(val, priv->tmon_base + trip->enable_offs); in avs_tmon_trip_enable() 194 struct avs_tmon_trip *trip = &avs_tmon_trips[type]; in avs_tmon_get_trip_temp() local 195 u32 val = __raw_readl(priv->tmon_base + trip->reg_offs); in avs_tmon_get_trip_temp() 197 val &= trip->reg_msk; in avs_tmon_get_trip_temp() 198 val >>= trip->reg_shift; in avs_tmon_get_trip_temp() 207 struct avs_tmon_trip *trip = &avs_tmon_trips[type]; in avs_tmon_set_trip_temp() local [all …]
|
/openbmc/linux/drivers/thermal/samsung/ |
H A D | exynos_tmu.c | 196 void (*tmu_set_trip_temp)(struct exynos_tmu_data *data, int trip, 198 void (*tmu_set_trip_hyst)(struct exynos_tmu_data *data, int trip, 298 struct thermal_trip trip; in exynos_tmu_initialize() local 300 ret = thermal_zone_get_trip(tzd, i, &trip); in exynos_tmu_initialize() 304 data->tmu_set_trip_temp(data, i, trip.temperature / MCELSIUS); in exynos_tmu_initialize() 305 data->tmu_set_trip_hyst(data, i, trip.temperature / MCELSIUS, in exynos_tmu_initialize() 306 trip.hysteresis / MCELSIUS); in exynos_tmu_initialize() 353 struct thermal_trip trip; in exynos4210_tmu_set_trip_temp() local 356 if (thermal_zone_get_trip(data->tzd, 0, &trip)) in exynos4210_tmu_set_trip_temp() 359 ref = trip.temperature / MCELSIUS; in exynos4210_tmu_set_trip_temp() [all …]
|
/openbmc/linux/arch/arm64/boot/dts/marvell/ |
H A D | armada-8040-clearfog-gt-8k.dts | 118 ap_active: trip-active { 126 trip = <&ap_active>; 130 trip = <&ap_crit>; 139 cp0_active0: trip-active0 { 144 cp0_active1: trip-active1 { 149 cp0_active2: trip-active2 { 154 cp0_active3: trip-active3 { 162 trip = <&cp0_active0>; 166 trip = <&cp0_active1>; 170 trip = <&cp0_active2>; [all …]
|
/openbmc/linux/arch/arm64/boot/dts/exynos/ |
H A D | exynos5433-tmu.dtsi | 57 trip = <&atlas0_alert_0>; 63 trip = <&atlas0_alert_1>; 69 trip = <&atlas0_alert_2>; 75 trip = <&atlas0_alert_3>; 81 trip = <&atlas0_alert_4>; 87 trip = <&atlas0_alert_5>; 93 trip = <&atlas0_alert_6>; 231 trip = <&apollo_alert_2>; 237 trip = <&apollo_alert_3>; 243 trip = <&apollo_alert_4>; [all …]
|
/openbmc/linux/drivers/crypto/nx/ |
H A D | nx.c | 361 struct msc_triplet *trip; in nx_of_update_msc() local 377 trip = msc->trip; in nx_of_update_msc() 390 if (!trip->sglen || trip->databytelen < NX_PAGE_SIZE) { in nx_of_update_msc() 392 "%u/%u (ignored)\n", trip->sglen, in nx_of_update_msc() 393 trip->databytelen); in nx_of_update_msc() 397 switch (trip->keybitlen) { in nx_of_update_msc() 401 trip->databytelen; in nx_of_update_msc() 403 trip->sglen; in nx_of_update_msc() 407 trip->databytelen; in nx_of_update_msc() 409 trip->sglen; in nx_of_update_msc() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/thermal/ |
H A D | db8500-thermal.txt | 9 - num-trips : number of total trip points, this is required, set it 0 if none, 11 - tripN-temp : temperature of trip point N, should be in ascending order; 12 - tripN-type : type of trip point N, should be one of "active" "passive" "hot" 14 - tripN-cdev-num : number of the cooling devices which can be bound to trip 15 point N, this is required if trip point N is defined, set it 0 if none, 17 - tripN-cdev-nameM : name of the No. M cooling device of trip point N;
|
/openbmc/linux/drivers/thermal/intel/ |
H A D | Kconfig | 32 two trip points which can be set by user to get notifications via thermal 55 thermal zone. There are two trip points. One of the trip point can 57 notification methods.The other trip is a critical trip point, which 66 The DTS will be registered as a thermal zone. There are two trip points: 67 hot & critical. The critical trip point default value is set by 82 the alert trip point interrupts and notifies the thermal framework with 83 the trip point and temperature details of the zone. 92 programmable trip points and other information.
|
H A D | intel_quark_dts_thermal.c | 177 static int get_trip_temp(int trip) in get_trip_temp() argument 196 temp = (out >> (trip * QRK_DTS_SHIFT_TP)) & QRK_DTS_MASK_TP_THRES; in get_trip_temp() 203 int trip, int temp) in update_trip_temp() argument 238 (trip * QRK_DTS_SHIFT_TP))); in update_trip_temp() 240 (trip * QRK_DTS_SHIFT_TP); in update_trip_temp() 250 static inline int sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, in sys_set_trip_temp() argument 253 return update_trip_temp(thermal_zone_device_priv(tzd), trip, temp); in sys_set_trip_temp()
|
/openbmc/linux/Documentation/driver-api/thermal/ |
H A D | x86_pkg_temperature_thermal.rst | 23 zone with maximum two user mode configurable trip points. Number of trip points 24 depends on the capability of the package. Once the trip point is violated, 37 This contains two trip points: 46 Any value other than 0 in these trip points, can trigger thermal notifications.
|
H A D | sysfs-api.rst | 27 inputs from thermal zone attributes (the current temperature and trip point 55 the total number of trip points this thermal zone supports. 57 Bit string: If 'n'th bit is set, then trip point 'n' is writable. 70 set the trip points window. Whenever the current temperature 71 is updated, the trip points immediately below and above the 79 upon trip points so that user applications can take 84 get the type of certain trip point. 86 get the temperature above which the certain trip point 98 whether trip points have been crossed (0 for interrupt driven systems). 260 int trip, struct thermal_cooling_device *cdev, [all …]
|
/openbmc/linux/arch/arm/boot/dts/rockchip/ |
H A D | rk3288-veyron-mickey.dts | 89 trip = <&cpu_alert_warm>; 96 trip = <&cpu_alert_warm>; 117 trip = <&cpu_alert_almost_hot>; 122 trip = <&cpu_alert_hot>; 127 trip = <&cpu_alert_hotter>; 132 trip = <&cpu_alert_very_hot>; 141 trip = <&cpu_alert_very_hot>; 182 trip = <&gpu_alert_warmish>; 193 trip = <&gpu_alert_warm>; 202 trip = <&gpu_alert_hotter>; [all …]
|
/openbmc/linux/arch/arm64/boot/dts/qcom/ |
H A D | sm6375.dtsi | 1801 mapss0_alert0: trip-point0 { 1807 mapss0_alert1: trip-point1 { 1828 cpu0_alert0: trip-point0 { 1834 cpu0_alert1: trip-point1 { 1855 cpu1_alert0: trip-point0 { 1861 cpu1_alert1: trip-point1 { 1882 cpu2_alert0: trip-point0 { 1888 cpu2_alert1: trip-point1 { 1909 cpu3_alert0: trip-point0 { 1915 cpu3_alert1: trip-point1 { [all …]
|