Home
last modified time | relevance | path

Searched +full:thermal +full:- +full:zone (Results 1 – 25 of 97) sorted by relevance

1234

/linux/drivers/thermal/testing/
H A Dcommand.c1 // SPDX-License-Identifier: GPL-2.0
7 * Thermal subsystem testing facility.
9 * This facility allows the thermal core functionality to be exercised in a
12 * It resides in the "thermal-testing" directory under the debugfs root and
14 * representing a thermal testing facility command.
18 * The "addtz" command causes a new test thermal zone template to be created,
21 * # echo addtz > /sys/kernel/debug/thermal-testing/command
23 * That template will be represented as a subdirectory in the "thermal-testing"
26 * # ls /sys/kernel/debug/thermal-testing/
29 * The thermal zone template can be populated with trip points with the help of
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-class-thermal1 What: /sys/class/thermal/thermal_zoneX/type
3 Strings which represent the thermal zone type.
4 This is given by thermal zone driver as part of registration.
5 E.g: "acpitz" indicates it's an ACPI thermal device.
12 What: /sys/class/thermal/thermal_zoneX/temp
14 Current temperature as reported by thermal zone (sensor).
20 What: /sys/class/thermal/thermal_zoneX/mode
24 currently managing the thermal zone. It can be either default
28 enable Kernel Thermal management.
30 Preventing kernel thermal zone driver actions upon
[all …]
/linux/drivers/thermal/
H A Dda9062-thermal.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Thermal device driver for DA9062 and DA9061
7 /* When over-temperature is reached, an interrupt from the device will be
11 * implementation of the thermal driver will include a .notify() function
14 * These uevents are intended to indicate non-invasive temperature control
17 * the IRQ is re-enabled so the start of a new over-temperature event can
27 #include <linux/thermal.h>
53 struct thermal_zone_device *zone; member
63 struct da9062_thermal *thermal = container_of(work, in da9062_thermal_poll_on() local
71 ret = regmap_write(thermal->hw->regmap, in da9062_thermal_poll_on()
[all …]
H A Dthermal_of.c1 // SPDX-License-Identifier: GPL-2.0
3 * of-thermal.c - Generic Thermal Management device tree support.
15 #include <linux/thermal.h>
24 * It maps 'enum thermal_trip_type' found in include/linux/thermal.h
35 * thermal_of_get_trip_type - Get phy mode for given device_node
60 return -ENODEV; in thermal_of_get_trip_type()
74 trip->temperature = prop; in thermal_of_populate_trip()
81 trip->hysteresis = prop; in thermal_of_populate_trip()
83 ret = thermal_of_get_trip_type(np, &trip->type); in thermal_of_populate_trip()
89 trip->flags = THERMAL_TRIP_FLAG_RW_TEMP; in thermal_of_populate_trip()
[all …]
H A Dgov_power_allocator.c1 // SPDX-License-Identifier: GPL-2.0
12 #include <linux/thermal.h>
24 * mul_frac() - multiply two fixed-point numbers
28 * Return: the result of multiplying two fixed-point numbers. The
29 * result is also a fixed-point number.
37 * div_frac() - divide two fixed-point numbers
41 * Return: the result of dividing two fixed-point numbers. The
42 * result is also a fixed-point number.
50 * struct power_actor - internal power information for power actor
66 * struct power_allocator_params - parameters for the power allocator governor
[all …]
H A Dthermal_helpers.c1 // SPDX-License-Identifier: GPL-2.0
3 * thermal_helpers.c - helper functions to handle thermal devices
29 if (tz->emul_temperature || !tz->ops.get_trend || in get_tz_trend()
30 tz->ops.get_trend(tz, trip, &trend)) { in get_tz_trend()
31 if (tz->temperature > tz->last_temperature) in get_tz_trend()
33 else if (tz->temperature < tz->last_temperature) in get_tz_trend()
49 list_for_each_entry(ti, &td->thermal_instances, trip_node) { in thermal_instance_present()
50 if (ti->cdev == cdev) in thermal_instance_present()
69 * __thermal_zone_get_temp() - returns the temperature of a thermal zone
73 * When a valid thermal zone reference is passed, it will fetch its
[all …]
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
3 # Generic thermal drivers configuration
6 menuconfig THERMAL config
7 bool "Thermal drivers"
9 Thermal drivers offer a generic mechanism for
10 thermal management. Usually it's made up of one or more thermal
12 Each thermal zone contains its own temperature, trip points,
14 All platforms with ACPI or Open Firmware thermal support can use
18 if THERMAL
21 bool "Thermal netlink management"
[all …]
H A Dkirkwood_thermal.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Kirkwood thermal sensor driver
14 #include <linux/thermal.h>
21 /* Kirkwood Thermal Sensor Dev Structure */
26 static int kirkwood_get_temp(struct thermal_zone_device *thermal, in kirkwood_get_temp() argument
30 struct kirkwood_thermal_priv *priv = thermal_zone_device_priv(thermal); in kirkwood_get_temp()
32 reg = readl_relaxed(priv->sensor); in kirkwood_get_temp()
37 return -EIO; in kirkwood_get_temp()
42 * Celsius = (322-reg)/1.3625 in kirkwood_get_temp()
46 *temp = ((3220000000UL - (10000000UL * reg)) / 13625); in kirkwood_get_temp()
[all …]
H A Dspear_thermal.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * SPEAr thermal driver.
5 * Copyright (C) 2011-2012 ST Microelectronics
17 #include <linux/thermal.h>
21 /* SPEAr Thermal Sensor Dev Structure */
23 /* pointer to base address of the thermal sensor */
27 /* pointer to thermal flags */
31 static inline int thermal_get_temp(struct thermal_zone_device *thermal, in thermal_get_temp() argument
34 struct spear_thermal_dev *stdev = thermal_zone_device_priv(thermal); in thermal_get_temp()
40 *temp = (readl_relaxed(stdev->thermal_base) & 0x7F) * MD_FACTOR; in thermal_get_temp()
[all …]
H A Dimx_sc_thermal.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2018-2020 NXP.
6 #include <dt-bindings/firmware/imx/rsrc.h>
13 #include <linux/thermal.h>
51 msg.data.req.resource_id = sensor->resource_id; in imx_sc_thermal_get_temp()
54 hdr->ver = IMX_SC_RPC_VERSION; in imx_sc_thermal_get_temp()
55 hdr->svc = IMX_SC_RPC_SVC_MISC; in imx_sc_thermal_get_temp()
56 hdr->func = IMX_SC_MISC_FUNC_GET_TEMP; in imx_sc_thermal_get_temp()
57 hdr->size = 2; in imx_sc_thermal_get_temp()
82 resource_id = of_device_get_match_data(&pdev->dev); in imx_sc_thermal_probe()
[all …]
/linux/include/uapi/linux/
H A Dthermal.h1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
22 #define THERMAL_GENL_FAMILY_NAME "thermal"
59 #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1)
65 #define THERMAL_GENL_SAMPLING_MAX (__THERMAL_GENL_SAMPLING_MAX - 1)
70 THERMAL_GENL_EVENT_TZ_CREATE, /* Thermal zone creation */
71 THERMAL_GENL_EVENT_TZ_DELETE, /* Thermal zone deletion */
72 THERMAL_GENL_EVENT_TZ_DISABLE, /* Thermal zone disabled */
73 THERMAL_GENL_EVENT_TZ_ENABLE, /* Thermal zone enabled */
79 THERMAL_GENL_EVENT_CDEV_ADD, /* Cdev bound to the thermal zone */
91 #define THERMAL_GENL_EVENT_MAX (__THERMAL_GENL_EVENT_MAX - 1)
[all …]
/linux/tools/thermal/tmon/
H A Dtmon.82 # SPDX-License-Identifier: GPL-2.0
4 \fBtmon\fP - A monitoring and testing tool for Linux kernel thermal subsystem
12 \fBtmon \fP can be used to visualize thermal relationship and
13 real-time thermal data; tune
14 and test cooling devices and sensors; collect thermal data for offline
21 1. Thermal relationships:
22 - show thermal zone information
23 - show cooling device information
24 - show trip point binding within each thermal zone
25 - show trip point and cooling device instance bindings
[all …]
H A Dsysfs.c1 // SPDX-License-Identifier: GPL-2.0-or-later
36 int ret = -1; in sysfs_set_ulong()
52 /* history of thermal data, used for control algo */
60 int ret = -1; in sysfs_get_ulong()
79 int ret = -1; in sysfs_get_string()
98 sysfs_get_string(path, "type", cdi->type); in probe_cdev()
99 sysfs_get_ulong(path, "max_state", &cdi->max_state); in probe_cdev()
100 sysfs_get_ulong(path, "cur_state", &cdi->cur_state); in probe_cdev()
104 cdi->type, cdi->max_state, cdi->cur_state, cdi->instance); in probe_cdev()
118 return -ENOENT; in str_to_trip_type()
[all …]
H A Dtmon.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
20 * to a thermal zone trip.
73 /* thermal zone configuration information, binding with cooling devices could
79 int passive; /* active zone has passive node to force passive mode */
127 double ki; /* Time-constant for I action from Dialog Box */
128 double kd; /* Time-constant for D action from Dialog Box */
181 /* each thermal zone uses 12 chars, 8 for name, 2 for instance, 2 space
194 #define THERMAL_SYSFS "/sys/class/thermal"
H A Dtmon.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * tmon.c Thermal Monitor (TMON) main function and entry point
39 static int logging; /* for recording thermal data to a file */
44 int target_thermal_zone; /* user selected target zone instance */
52 printf(" -c, --control cooling device in control\n"); in usage()
53 printf(" -d, --daemon run as daemon, no TUI\n"); in usage()
54 printf(" -g, --debug debug message in syslog\n"); in usage()
55 printf(" -h, --help show this help message\n"); in usage()
56 printf(" -l, --log log data to /var/tmp/tmon.log\n"); in usage()
57 printf(" -t, --time-interval sampling time interval, > 1 sec.\n"); in usage()
[all …]
/linux/Documentation/devicetree/bindings/thermal/
H A Drcar-thermal.yaml1 # SPDX-License-Identifier: GPL-2.0-only
4 ---
5 $id: http://devicetree.org/schemas/thermal/rcar-thermal.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
8 title: Renesas R-Car Thermal
11 - Niklas Söderlund <niklas.soderlund@ragnatech.se>
16 - items:
17 - enum:
18 - renesas,thermal-r8a73a4 # R-Mobile APE6
19 - renesas,thermal-r8a7779 # R-Car H1
[all …]
/linux/tools/thermal/thermometer/
H A Dthermometer.82 # SPDX-License-Identifier: GPL-2.0
4 \fBthermometer\fP - A thermal profiling tool
13 \fBthermometer \fP captures the thermal zones temperature at a
21 If no configuration file is specified, then all the thermal zones will
23 the thermal zone names and the desired sampling period. A thermal zone
24 name can be a regular expression to specify a group of thermal zone.
26 The sampling of the different thermal zones will be written into
27 separate files with the thermal zone name. It is possible to specify a
31 Without any parameters, \fBthermometer \fP captures all the thermal
32 zone temperatures every 250ms and write to the current directory the
[all …]
/linux/drivers/acpi/
H A Dthermal_lib.c1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/thermal.h>
15 * Minimum temperature for full military grade is 218°K (-55°C) and
30 status = acpi_evaluate_integer(adev->handle, obj_name, NULL, &temp); in acpi_trip_temp()
32 acpi_handle_debug(adev->handle, "%s evaluation failed\n", obj_name); in acpi_trip_temp()
33 return -ENODATA; in acpi_trip_temp()
39 acpi_handle_debug(adev->handle, "%s result %llu out of range\n", in acpi_trip_temp()
52 return -EINVAL; in acpi_active_trip_temp()
90 * thermal_acpi_active_trip_temp - Retrieve active trip point temperature
91 * @adev: Target thermal zone ACPI device object.
[all …]
/linux/Documentation/driver-api/thermal/
H A Dpower_allocator.rst6 -----------
12 point of the thermal zone.
17 thermal zone.
20 --------------
23 Proportional-Integral-Derivative controller (PID controller) with
29 - e = desired_temperature - current_temperature
30 - err_integral is the sum of previous errors
31 - diff_err = e - previous_error
39 | +----------+ +---+
40 | +----->| diff_err |-->| X |------+
[all …]
H A Dx86_pkg_temperature_thermal.rst7 * x86: with package level thermal management
14 ---------
16 Intel® 64 and IA-32 Architectures Software Developer’s Manual (Jan, 2013):
17 Chapter 14.6: PACKAGE LEVEL THERMAL MANAGEMENT
20 -----------
22 This driver register CPU digital temperature package level sensor as a thermal
23 zone with maximum two user mode configurable trip points. Number of trip points
25 user mode can receive notification via thermal notification mechanism and can
30 --------------------
31 Each package will register as a thermal zone under /sys/class/thermal.
[all …]
/linux/drivers/thermal/renesas/
H A Drcar_thermal.c1 // SPDX-License-Identifier: GPL-2.0
3 * R-Car THS/TSC thermal sensor driver
20 #include <linux/thermal.h>
92 struct thermal_zone_device *zone; member
101 list_for_each_entry(pos, &common->head, list)
104 #define rcar_priv_to_dev(priv) ((priv)->common->dev)
105 #define rcar_has_irq_support(priv) ((priv)->common->base)
106 #define rcar_id_to_shift(priv) ((priv)->id * 8)
110 .compatible = "renesas,rcar-thermal",
114 .compatible = "renesas,rcar-gen2-thermal",
[all …]
/linux/Documentation/devicetree/bindings/display/
H A Drepaper.txt1 Pervasive Displays RePaper branded e-ink displays
4 - compatible: "pervasive,e1144cs021" for 1.44" display
9 - panel-on-gpios: Timing controller power control
10 - discharge-gpios: Discharge control
11 - reset-gpios: RESET pin
12 - busy-gpios: BUSY pin
15 - border-gpios: Border control
18 all mandatory properties described in ../spi/spi-bus.txt must be specified.
21 - pervasive,thermal-zone: name of thermometer's thermal zone
28 #thermal-sensor-cells = <0>;
[all …]
/linux/drivers/thermal/ti-soc-thermal/
H A Dti-thermal-common.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * OMAP thermal driver interface
5 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
16 #include <linux/thermal.h>
22 #include "ti-thermal.h"
23 #include "ti-bandgap.h"
46 thermal_zone_device_update(data->ti_thermal, THERMAL_EVENT_UNSPECIFIED); in ti_thermal_work()
48 dev_dbg(data->bgp->dev, "updated thermal zone %s\n", in ti_thermal_work()
49 thermal_zone_device_type(data->ti_thermal)); in ti_thermal_work()
53 * ti_thermal_hotspot_temperature - returns sensor extrapolated temperature
[all …]
/linux/drivers/hwmon/
H A Dscpi-hwmon.c1 // SPDX-License-Identifier: GPL-2.0
16 #include <linux/thermal.h>
59 if (scpi_scale[sensor->info.class] != sensor->scale) { in scpi_scale_reading()
60 *value *= scpi_scale[sensor->info.class]; in scpi_scale_reading()
61 do_div(*value, sensor->scale); in scpi_scale_reading()
67 struct scpi_thermal_zone *zone = thermal_zone_device_priv(tz); in scpi_read_temp() local
68 struct scpi_sensors *scpi_sensors = zone->scpi_sensors; in scpi_read_temp()
69 struct scpi_ops *scpi_ops = scpi_sensors->scpi_ops; in scpi_read_temp()
70 struct sensor_data *sensor = &scpi_sensors->data[zone->sensor_id]; in scpi_read_temp()
74 ret = scpi_ops->sensor_get_value(sensor->info.sensor_id, &value); in scpi_read_temp()
[all …]
H A Dscmi-hwmon.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2018-2021 ARM Ltd.
14 #include <linux/thermal.h>
32 while (x--) in __pow10()
40 int scale = sensor->scale; in scmi_hwmon_scale()
43 switch (sensor->type) { in scmi_hwmon_scale()
61 return -E2BIG; in scmi_hwmon_scale()
79 ret = sensor_ops->reading_get(ph, sensor->id, &value); in scmi_hwmon_read_scaled_value()
96 sensor = *(scmi_sensors->info[type] + channel); in scmi_hwmon_read()
98 return scmi_hwmon_read_scaled_value(scmi_sensors->ph, sensor, val); in scmi_hwmon_read()
[all …]

1234