/linux-5.10/drivers/thermal/ |
D | Kconfig | 1 # 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 …]
|
D | dove_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Dove thermal sensor driver 14 #include <linux/thermal.h> 19 /* Dove Thermal Manager Control and Status Register */ 32 /* Dove Thermal Diode Control 1 Register */ 36 /* Dove Thermal Sensor Dev Structure */ 38 void __iomem *sensor; member 48 reg = readl_relaxed(priv->control); in dove_init_sensor() 61 writel(reg, priv->control); in dove_init_sensor() 63 /* Reset the sensor */ in dove_init_sensor() [all …]
|
D | rockchip_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2014-2016, Fuzhou Rockchip Electronics Co., Ltd 4 * Caesar Wang <wxt@rock-chips.com> 18 #include <linux/thermal.h> 65 * Two sensors: CPU and GPU sensor. 70 * struct chip_tsadc_table - hold information about chip-specific differences 84 * struct rockchip_tsadc_chip - hold the private data of tsadc chip 85 * @chn_id: array of sensor ids of chip corresponding to the channel 87 * @tshut_temp: the hardware-controlled shutdown temperature value 88 * @tshut_mode: the hardware-controlled shutdown mode (0:CRU 1:GPIO) [all …]
|
D | kirkwood_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Kirkwood thermal sensor driver 14 #include <linux/thermal.h> 21 /* Kirkwood Thermal Sensor Dev Structure */ 23 void __iomem *sensor; member 26 static int kirkwood_get_temp(struct thermal_zone_device *thermal, in kirkwood_get_temp() argument 30 struct kirkwood_thermal_priv *priv = thermal->devdata; in kirkwood_get_temp() 32 reg = readl_relaxed(priv->sensor); in kirkwood_get_temp() 37 dev_err(&thermal->device, in kirkwood_get_temp() 38 "Temperature sensor reading not valid\n"); in kirkwood_get_temp() [all …]
|
D | thermal_of.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * of-thermal.c - Generic Thermal Management device tree support. 16 #include <linux/thermal.h> 22 /*** Private data structures to represent thermal device tree data ***/ 25 * struct __thermal_cooling_bind_param - a cooling device for a trip point 38 * struct __thermal_bind_param - a match between trip and cooling device 53 * struct __thermal_zone - internal representation of a thermal zone 59 * @trips: an array of trip points (0..ntrips - 1) 60 * @num_tbps: number of thermal bind params 61 * @tbps: an array of thermal bind params (0..num_tbps - 1) [all …]
|
D | thermal_mmio.c | 1 // SPDX-License-Identifier: GPL-2.0 9 #include <linux/thermal.h> 26 struct thermal_mmio *sensor = in thermal_mmio_get_temperature() local 29 t = sensor->read_mmio(sensor->mmio_base) & sensor->mask; in thermal_mmio_get_temperature() 30 t *= sensor->factor; in thermal_mmio_get_temperature() 44 struct thermal_mmio *sensor; in thermal_mmio_probe() local 46 struct thermal_mmio *sensor); in thermal_mmio_probe() 51 sensor = devm_kzalloc(&pdev->dev, sizeof(*sensor), GFP_KERNEL); in thermal_mmio_probe() 52 if (!sensor) in thermal_mmio_probe() 53 return -ENOMEM; in thermal_mmio_probe() [all …]
|
D | spear_thermal.c | 1 // 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->devdata; in thermal_get_temp() 40 *temp = (readl_relaxed(stdev->thermal_base) & 0x7F) * MD_FACTOR; in thermal_get_temp() [all …]
|
/linux-5.10/Documentation/devicetree/bindings/thermal/ |
D | thermal-sensor.yaml | 1 # SPDX-License-Identifier: (GPL-2.0) 4 --- 5 $id: http://devicetree.org/schemas/thermal/thermal-sensor.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Thermal sensor binding 11 - Amit Kucheria <amitk@kernel.org> 14 Thermal management is achieved in devicetree by describing the sensor hardware 15 and the software abstraction of thermal zones required to take appropriate 16 action to mitigate thermal overloads. 18 The following node types are used to completely describe a thermal management [all …]
|
D | nvidia,tegra186-bpmp-thermal.txt | 1 NVIDIA Tegra186 BPMP thermal sensor 5 and GPU temperatures. This binding describes the thermal sensor that is 8 The BPMP thermal node must be located directly inside the main BPMP node. See 9 ../firmware/nvidia,tegra186-bpmp.txt for details of the BPMP binding. 11 This node represents a thermal sensor. See Documentation/devicetree/bindings/thermal/thermal-sensor… 12 core thermal binding. 15 - compatible: 18 - "nvidia,tegra186-bpmp-thermal" 19 - "nvidia,tegra194-bpmp-thermal" 20 - #thermal-sensor-cells: Cell for sensor index. [all …]
|
D | allwinner,sun8i-a83t-ths.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/thermal/allwinner,sun8i-a83t-ths.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Allwinner SUN8I Thermal Controller Device Tree Bindings 10 - Vasily Khoruzhick <anarsoul@gmail.com> 11 - Yangtao Li <tiny.windzz@gmail.com> 16 - allwinner,sun8i-a83t-ths 17 - allwinner,sun8i-h3-ths 18 - allwinner,sun8i-r40-ths [all …]
|
D | thermal-generic-adc.txt | 1 General Purpose Analog To Digital Converter (ADC) based thermal sensor. 3 On some of platforms, thermal sensor like thermistors are connected to 4 one of ADC channel and sensor resistance is read via voltage across the 5 sensor resistor. The voltage read across the sensor is mapped to 6 temperature using voltage-temperature lookup table. 10 - compatible: Must be "generic-adc-thermal". 11 - #thermal-sensor-cells: Should be 1. See Documentation/devicetree/bindings/thermal/thermal-sen… 15 - temperature-lookup-table: Two dimensional array of Integer; lookup table 29 #include <dt-bindings/thermal/thermal.h> 35 sampling-frequency = <3300>; [all …]
|
D | amazon,al-thermal.txt | 1 Amazon's Annapurna Labs Thermal Sensor 3 Simple thermal device that allows temperature reading by a single MMIO 7 - compatible: "amazon,al-thermal". 8 - reg: The physical base address and length of the sensor's registers. 9 - #thermal-sensor-cells: Must be 1. See Documentation/devicetree/bindings/thermal/thermal-sensor.ya… 12 thermal: thermal { 13 compatible = "amazon,al-thermal"; 15 #thermal-sensor-cells = <0x1>; 18 thermal-zones { 19 thermal-z0 { [all …]
|
D | brcm,bcm2835-thermal.txt | 1 Binding for Thermal Sensor driver for BCM2835 SoCs. 4 ------------------- 6 compatible: should be one of: "brcm,bcm2835-thermal", 7 "brcm,bcm2836-thermal" or "brcm,bcm2837-thermal" 8 reg: Address range of the thermal registers. 9 clocks: Phandle of the clock used by the thermal sensor. 10 #thermal-sensor-cells: should be 0 (see Documentation/devicetree/bindings/thermal/thermal-sensor.ya… 14 thermal-zones { 15 cpu_thermal: cpu-thermal { 16 polling-delay-passive = <0>; [all …]
|
D | sprd-thermal.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/thermal/sprd-thermal.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Spreadtrum thermal sensor controller bindings 10 - Orson Zhai <orsonzhai@gmail.com> 11 - Baolin Wang <baolin.wang7@gmail.com> 12 - Chunyan Zhang <zhang.lyra@gmail.com> 16 const: sprd,ums512-thermal 24 clock-names: [all …]
|
D | rcar-gen3-thermal.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 4 --- 5 $id: http://devicetree.org/schemas/thermal/rcar-gen3-thermal.yaml# 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 8 title: Renesas R-Car Gen3 Thermal Sensor 11 On R-Car Gen3 SoCs, the thermal sensor controllers (TSC) control the thermal 16 - Niklas Söderlund <niklas.soderlund@ragnatech.se> 21 - renesas,r8a774a1-thermal # RZ/G2M 22 - renesas,r8a774b1-thermal # RZ/G2N 23 - renesas,r8a774e1-thermal # RZ/G2H [all …]
|
D | thermal-zones.yaml | 1 # SPDX-License-Identifier: (GPL-2.0) 4 --- 5 $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml# 6 $schema: http://devicetree.org/meta-schemas/base.yaml# 8 title: Thermal zone binding 11 - Amit Kucheria <amitk@kernel.org> 14 Thermal management is achieved in devicetree by describing the sensor hardware 15 and the software abstraction of cooling devices and thermal zones required to 16 take appropriate action to mitigate thermal overloads. 18 The following node types are used to completely describe a thermal management [all …]
|
D | tango-thermal.txt | 1 * Tango Thermal 3 The SMP8758 SoC includes 3 instances of this temperature sensor 7 - #thermal-sensor-cells: Should be 0 (see Documentation/devicetree/bindings/thermal/thermal-sensor.… 8 - compatible: "sigma,smp8758-thermal" 9 - reg: Address range of the thermal registers 13 cpu_temp: thermal@920100 { 14 #thermal-sensor-cells = <0>; 15 compatible = "sigma,smp8758-thermal";
|
D | imx8mm-thermal.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/thermal/imx8mm-thermal.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: NXP i.MX8M Mini Thermal Binding 10 - Anson Huang <Anson.Huang@nxp.com> 16 for i.MX8MM which has ONLY 1 sensor, v2 is for i.MX8MP which has 22 - enum: 23 - fsl,imx8mm-tmu 24 - fsl,imx8mp-tmu [all …]
|
D | brcm,avs-ro-thermal.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/thermal/brcm,avs-ro-thermal.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Broadcom AVS ring oscillator thermal 10 - Stefan Wahren <wahrenst@gmx.net> 13 The thermal node should be the child of a syscon node with the 16 - compatible: Should be one of the following: 17 "brcm,bcm2711-avs-monitor", "syscon", "simple-mfd" 24 const: brcm,bcm2711-thermal [all …]
|
D | hisilicon-thermal.txt | 1 * Temperature Sensor on hisilicon SoCs 5 - compatible: "hisilicon,tsensor". 6 - reg: physical base address of thermal sensor and length of memory mapped 8 - interrupt: The interrupt number to the cpu. Defines the interrupt used 10 - clock-names: Input clock name, should be 'thermal_clk'. 11 - clocks: phandles for clock specified in "clock-names" property. 12 - #thermal-sensor-cells: Should be 1. See Documentation/devicetree/bindings/thermal/thermal-sensor.… 22 clock-names = "thermal_clk"; 23 #thermal-sensor-cells = <1>; 28 compatible = "hisilicon,hi3660-tsensor"; [all …]
|
/linux-5.10/drivers/thermal/st/ |
D | st_thermal_syscfg.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ST Thermal Sensor Driver for syscfg based sensors. 6 * Copyright (C) 2003-2014 STMicroelectronics (R&D) Limited 16 #define STIH415_SYSCFG_FRONT(num) ((num - 100) * 4) 19 #define STIH415_SYSCFG_MPE(num) ((num - 600) * 4) 24 #define STIH416_SYSCFG_FRONT(num) ((num - 1000) * 4) 30 #define STID127_SYSCFG_CPU(num) ((num - 700) * 4) 62 /* Private OPs for System Configuration Register based thermal sensors */ 63 static int st_syscfg_power_ctrl(struct st_thermal_sensor *sensor, in st_syscfg_power_ctrl() argument 66 return regmap_field_write(sensor->pwr, power_state); in st_syscfg_power_ctrl() [all …]
|
D | st_thermal_memmap.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ST Thermal Sensor Driver for memory mapped sensors. 6 * Copyright (C) 2003-2014 STMicroelectronics (R&D) Limited 19 /* Power control bits for the memory mapped thermal sensor */ 25 * According to the STIH416 MPE temp sensor data sheet - 28 * sensor. regmap_update_bits() will be used to update the register. 39 struct st_thermal_sensor *sensor = sdata; in st_mmap_thermal_trip_handler() local 41 thermal_zone_device_update(sensor->thermal_dev, in st_mmap_thermal_trip_handler() 47 /* Private ops for the Memory Mapped based thermal sensors */ 48 static int st_mmap_power_ctrl(struct st_thermal_sensor *sensor, in st_mmap_power_ctrl() argument [all …]
|
D | st_thermal.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * ST Thermal Sensor Driver for STi series of SoCs 6 * Copyright (C) 2003-2014 STMicroelectronics (R&D) Limited 15 #include <linux/thermal.h> 28 /* Thermal sensor power states */ 37 * Description of private thermal sensor ops. 39 * @power_ctrl: Function for powering on/off a sensor. Clock to the 40 * sensor is also controlled from this function. 41 * @alloc_regfields: Allocate regmap register fields, specific to a sensor. 42 * @do_memmap_regmap: Memory map the thermal register space and init regmap [all …]
|
/linux-5.10/Documentation/driver-api/thermal/ |
D | sysfs-api.rst | 2 Generic Thermal Sysfs driver How To 15 The generic thermal sysfs provides a set of interfaces for thermal zone 16 devices (sensors) and thermal cooling devices (fan, processor...) to register 17 with the thermal management solution and to be a part of it. 19 This how-to focuses on enabling new thermal zone and cooling devices to 20 participate in thermal management. 21 This solution is platform independent and any type of thermal zone devices 24 The main task of the thermal sysfs driver is to expose thermal zone attributes 26 An intelligent thermal management application can make decisions based on 27 inputs from thermal zone attributes (the current temperature and trip point [all …]
|
/linux-5.10/drivers/soc/tegra/fuse/ |
D | fuse-tegra30.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. 11 #include <linux/nvmem-consumer.h> 43 if (WARN_ON(!fuse->base)) in tegra30_fuse_read_early() 46 return readl_relaxed(fuse->base + FUSE_BEGIN + offset); in tegra30_fuse_read_early() 54 err = clk_prepare_enable(fuse->clk); in tegra30_fuse_read() 56 dev_err(fuse->dev, "failed to enable FUSE clock: %d\n", err); in tegra30_fuse_read() 60 value = readl_relaxed(fuse->base + FUSE_BEGIN + offset); in tegra30_fuse_read() 62 clk_disable_unprepare(fuse->clk); in tegra30_fuse_read() 91 fuse->read_early = tegra30_fuse_read_early; in tegra30_fuse_init() [all …]
|