/openbmc/linux/drivers/thermal/ |
H A D | thermal_trip.c | 37 * __thermal_zone_set_trips - Computes the next trip points for the driver 41 * the trip points. The result is the closer low and high trip points 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() 86 /* No need to change trip points */ in __thermal_zone_set_trips() 114 struct thermal_trip *trip) in __thermal_zone_get_trip() argument [all …]
|
H A D | gov_step_wise.c | 20 * If the temperature is higher than a trip point, 22 * state for this trip point 24 * If the temperature is lower than a trip point, 27 * state for this trip point, if the cooling state already 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() 97 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", 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() [all …]
|
H A D | gov_fair_share.c | 19 * get_trip_level: - obtains the current trip level for a zone 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() 34 * count > 0 only if temperature is greater than first trip in get_trip_level() 38 trace_thermal_zone_trip(tz, count - 1, trip.type); in get_trip_level() 52 * @trip_index: trip point index 63 * We do not want to throttle too much when we trip a lower temperature, 64 * whereas the throttling is at full swing if we trip critical levels. 65 * (Heavily assumes the trip points are in ascending order) [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() 25 dev_dbg(&tz->device, "Trip%d[temp=%d]:temp=%d:hyst=%d\n", 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() 68 * @trip: the trip point 92 static int bang_bang_control(struct thermal_zone_device *tz, int trip) in bang_bang_control() argument [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 | gov_power_allocator.c | 58 * @trip_switch_on: first passive trip point of the thermal zone. The 59 * governor switches on when this trip point is crossed. 60 * If the thermal zone only has one passive trip point, 62 * @trip_max_desired_temperature: last passive trip point of the thermal 100 if (instance->trip != trip_max_desired_temperature) in estimate_sustainable_power() 119 * @trip_switch_on: trip point number for the switch on temperature 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() 142 * passive trip points at the same temperature, that person in estimate_pid_constants() [all …]
|
H A D | thermal_acpi.c | 6 * Library routines for populating a generic thermal trip point structure 48 * thermal_acpi_active_trip_temp - Retrieve active trip point temperature 54 * the temperature of the active cooling trip point corresponding to the active 71 * thermal_acpi_passive_trip_temp - Retrieve passive trip point temperature 76 * the temperature of the passive cooling trip point. 87 * thermal_acpi_hot_trip_temp - Retrieve hot trip point temperature 92 * the temperature of the trip point at which the system is expected to be put 104 * thermal_acpi_critical_trip_temp - Retrieve critical trip point temperature 109 * the temperature of the critical cooling trip point.
|
H A D | thermal_core.c | 286 * - Critical trip point will cause a system shutdown. 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 348 /* Ignore disabled trip points */ in handle_thermal_trip() 352 __thermal_zone_get_trip(tz, trip_id, &trip); in handle_thermal_trip() 354 if (trip.temperature == THERMAL_TEMP_INVALID) in handle_thermal_trip() [all …]
|
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 | 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 | 60 * 1.An invalid trip point becomes invalid or a valid trip point becomes invalid 69 "ACPI thermal trip point %s changed\n" \ 75 MODULE_PARM_DESC(act, "Disable or override all lowest active trip points."); 79 MODULE_PARM_DESC(crt, "Disable or lower all critical trip points."); 91 MODULE_PARM_DESC(psv, "Disable or override all passive trip points."); 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() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/thermal/ |
H A D | thermal-zones.yaml | 35 max dT/dt, such that a device does not cross several trip boundaries 60 this zone, one sub-node containing the various trip points for this 127 An integer expressing the trip temperature in millicelsius. 133 respect to the trip temperature property above, also in 136 (trip temperature - hysteresis). This potentially prevents a 137 situation where the trip gets constantly triggered soon after 148 There are four valid trip types: active, passive, hot, 151 The critical trip type is used to set the maximum 157 The hot trip type can be used to send a notification to 161 The passive trip type can be used to slow down HW e.g. run [all …]
|
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/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/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 | 82 /* Programmable Trip Point Register is configured via QRK_MBI_UNIT_RMU */ 94 /* Quark DTS has 2 trip points: hot & catastrophic */ 96 /* If DTS not locked, all trip points are configurable */ 98 /* If DTS locked, all trip points are not configurable */ 116 "Polling interval for checking trip points (in milliseconds)"); 177 static int get_trip_temp(int trip) in get_trip_temp() argument 191 * Thermal Sensor Programmable Trip Point Register has 8-bit in get_trip_temp() 192 * fields for critical (catastrophic) and hot set trip point in get_trip_temp() 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 [all …]
|
/openbmc/linux/drivers/thermal/broadcom/ |
H A D | brcmstb_thermal.c | 68 /* HW bit to enable the trip */ 72 /* HW field to read the trip temperature */ 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() 181 dev_dbg(priv->dev, "%sable trip, type %d\n", en ? "en" : "dis", type); 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() [all …]
|
/openbmc/linux/include/linux/ |
H A D | thermal.h | 47 THERMAL_TRIP_VIOLATED, /* TRIP Point violation */ 48 THERMAL_TRIP_CHANGED, /* TRIP Point temperature changed */ 60 * @type: trip point type 61 * @priv: pointer to driver data associated with this trip 119 * @trip_temp_attrs: attributes for trip points for sysfs: trip temperature 120 * @trip_type_attrs: attributes for trip points for sysfs: trip type 121 * @trip_hyst_attrs: attributes for trip points for sysfs: trip hysteresis 125 * @num_trips: number of trip points the thermal zone supports 130 * checking whether trip points have been crossed (0 for 137 * @passive: 1 if you've crossed a passive trip point, 0 otherwise. [all …]
|
/openbmc/linux/Documentation/driver-api/thermal/ |
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/drivers/thermal/samsung/ |
H A D | exynos_tmu.c | 165 * @ntrip: number of supported trip points. 167 * @tmu_set_trip_temp: SoC specific method to set trip (rising threshold) 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, 269 "No CRITICAL trip point defined in device tree!\n"); in exynos_tmu_initialize() 275 "More trip points than supported by this TMU.\n"); in exynos_tmu_initialize() 277 "%d trip points should be configured in polling mode.\n", in exynos_tmu_initialize() 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() [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/Documentation/ABI/testing/ |
H A D | sysfs-class-thermal | 31 trip points so that user application can take full 51 The temperature above which trip point will be fired. 59 Strings which indicate the type of the trip point. 68 The hysteresis value for a trip point, represented as an 84 The trip point in this thermal zone which `cdev[0-*]` is 86 associated with any trip point. 142 temperature" trip point. For more information see 152 temperature" trip point. For more information see 159 Temperature offset from the desired temperature trip point 164 temperature trip point. For more information see
|
/openbmc/linux/tools/thermal/tmon/ |
H A D | tmon.8 | 24 - show trip point binding within each thermal zone 25 - show trip point and cooling device instance bindings 28 - show temperature of all thermal zones w.r.t. its trip points and types 39 zones, and trip points. Can be used for data collection in remote 69 \fBP \fP passive cooling trip point type 70 \fBA \fP active cooling trip point type (fan) 71 \fBC \fP critical trip point type 72 \fBA \fP hot trip point type
|
/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 …]
|