/linux/drivers/net/ethernet/sfc/siena/ |
H A D | mcdi_mon.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright 2011-2013 Solarflare Communications Inc. 40 #define SENSOR(name, label, hwmon_type, port) \ macro 42 SENSOR(CONTROLLER_TEMP, "Controller board temp.", TEMP, -1), 43 SENSOR(PHY_COMMON_TEMP, "PHY temp.", TEMP, -1), 44 SENSOR(CONTROLLER_COOLING, "Controller heat sink", COOL, -1), 45 SENSOR(PHY0_TEMP, "PHY temp.", TEMP, 0), 46 SENSOR(PHY0_COOLING, "PHY heat sink", COOL, 0), 47 SENSOR(PHY1_TEMP, "PHY temp.", TEMP, 1), 48 SENSOR(PHY1_COOLING, "PHY heat sink", COOL, 1), [all …]
|
/linux/drivers/net/ethernet/sfc/ |
H A D | mcdi_mon.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright 2011-2013 Solarflare Communications Inc. 40 #define SENSOR(name, label, hwmon_type, port) \ macro 42 SENSOR(CONTROLLER_TEMP, "Controller board temp.", TEMP, -1), 43 SENSOR(PHY_COMMON_TEMP, "PHY temp.", TEMP, -1), 44 SENSOR(CONTROLLER_COOLING, "Controller heat sink", COOL, -1), 45 SENSOR(PHY0_TEMP, "PHY temp.", TEMP, 0), 46 SENSOR(PHY0_COOLING, "PHY heat sink", COOL, 0), 47 SENSOR(PHY1_TEMP, "PHY temp.", TEMP, 1), 48 SENSOR(PHY1_COOLING, "PHY heat sink", COOL, 1), [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ |
H A D | g84.c | 32 struct nvkm_device *device = therm->subdev.device; in g84_temp_get() 34 if (nvkm_fuse_read(device->fuse, 0x1a8) == 1) in g84_temp_get() 37 return -ENODEV; in g84_temp_get() 43 struct nvkm_device *device = therm->subdev.device; in g84_sensor_setup() 46 if (nvkm_fuse_read(device->fuse, 0x1a8) == 1) { in g84_sensor_setup() 56 struct nvbios_therm_sensor *sensor = &therm->bios_sensor; in g84_therm_program_alarms() local 57 struct nvkm_subdev *subdev = &therm->subdev; in g84_therm_program_alarms() 58 struct nvkm_device *device = subdev->device; in g84_therm_program_alarms() 61 spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags); in g84_therm_program_alarms() 67 nvkm_wr32(device, 0x20484, sensor->thrs_shutdown.hysteresis); in g84_therm_program_alarms() [all …]
|
H A D | temp.c | 29 therm->bios_sensor.offset_constant = 0; in nvkm_therm_temp_set_defaults() 31 therm->bios_sensor.thrs_fan_boost.temp = 90; in nvkm_therm_temp_set_defaults() 32 therm->bios_sensor.thrs_fan_boost.hysteresis = 3; in nvkm_therm_temp_set_defaults() 34 therm->bios_sensor.thrs_down_clock.temp = 95; in nvkm_therm_temp_set_defaults() 35 therm->bios_sensor.thrs_down_clock.hysteresis = 3; in nvkm_therm_temp_set_defaults() 37 therm->bios_sensor.thrs_critical.temp = 105; in nvkm_therm_temp_set_defaults() 38 therm->bios_sensor.thrs_critical.hysteresis = 5; in nvkm_therm_temp_set_defaults() 40 therm->bios_sensor.thrs_shutdown.temp = 135; in nvkm_therm_temp_set_defaults() 41 therm->bios_sensor.thrs_shutdown.hysteresis = 5; /*not that it matters */ in nvkm_therm_temp_set_defaults() 47 struct nvbios_therm_sensor *s = &therm->bios_sensor; in nvkm_therm_temp_safety_checks() [all …]
|
/linux/drivers/thermal/ |
H A D | hisi_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HiSilicon thermal sensor driver 5 * Copyright (c) 2014-2015 HiSilicon Limited. 6 * Copyright (c) 2014-2015 Linaro Limited. 40 #define HI6220_TEMP_BASE (-60000) 45 #define HI3660_TEMP_BASE (-63780) 68 int (*get_temp)(struct hisi_thermal_sensor *sensor); 69 int (*enable_sensor)(struct hisi_thermal_sensor *sensor); 70 int (*disable_sensor)(struct hisi_thermal_sensor *sensor); 71 int (*irq_handler)(struct hisi_thermal_sensor *sensor); [all …]
|
H A D | imx8mm_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include <linux/nvmem-consumer.h> 23 #define TRITSR 0x20 /* TMU immediate temp */ 72 #define VER2_TEMP_LOW_LIMIT -40000 81 int (*get_temp)(void *data, int *temp); 97 static int imx8mm_tmu_get_temp(void *data, int *temp) in imx8mm_tmu_get_temp() argument 99 struct tmu_sensor *sensor = data; in imx8mm_tmu_get_temp() local 100 struct imx8mm_tmu *tmu = sensor->priv; in imx8mm_tmu_get_temp() 103 val = readl_relaxed(tmu->base + TRITSR) & TRITSR_TEMP0_VAL_MASK; in imx8mm_tmu_get_temp() 110 *temp = val * 1000; in imx8mm_tmu_get_temp() [all …]
|
H A 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> 55 * struct chip_tsadc_table - hold information about chip-specific differences 69 * struct rockchip_tsadc_chip - hold the private data of tsadc chip 72 * @tshut_temp: the hardware-controlled shutdown temperature value 73 * @tshut_mode: the hardware-controlled shutdown mode (0:CRU 1:GPIO) 74 * @tshut_polarity: the hardware-controlled active polarity (0:LOW 1:HIGH) 80 * @set_tshut_temp: set the hardware-controlled shutdown temperature 81 * @set_tshut_mode: set the hardware-controlled shutdown mode [all …]
|
/linux/Documentation/hwmon/ |
H A D | abituguru-datasheet.rst | 14 Olle Sandberg <ollebull@gmail.com>, 2005-05-25 27 Hans de Goede <j.w.r.degoede@hhs.nl>, 28-01-2006 33 As far as known the uGuru is always placed at and using the (ISA) I/O-ports 34 0xE0 and 0xE4, so we don't have to scan any port-range, just check what the two 35 ports are holding for detection. We will refer to 0xE0 as CMD (command-port) 39 present. We have to check for two different values at data-port, because 41 later on attached again data-port will hold 0x08, more about this later. 57 ---------- 61 in a bank for a sensor is one or more bytes large. 68 number of bytes data per sensor and contents/meaning of those bytes. [all …]
|
H A D | occ.rst | 1 Kernel driver occ-hwmon 12 ----------- 14 This driver supports hardware monitoring for the On-Chip Controller (OCC) 16 sensor data from the processor and the system. The OCC can provide the raw 17 sensor data as well as perform thermal and power management on the system. 20 manually if an "ibm,p8-occ-hwmon" compatible device is found under the 21 appropriate I2C bus node in the device-tree. 23 The P9 version of this driver is a client driver of the FSI-based OCC driver. 24 It will be probed automatically by the FSI-based OCC driver. 27 ------------- [all …]
|
H A D | aquacomputer_d5next.rst | 1 .. SPDX-License-Identifier: GPL-2.0-or-later 3 Kernel driver aquacomputer-d5next 14 * Aquacomputer High Flow Next sensor 25 ----------- 36 and current, as well as coolant temperature and eight virtual temp sensors. Also 37 available through debugfs are the serial number, firmware version and power-on 39 temperature curves directly from the pump. If it's not connected, the fan-related 48 The Octo exposes four physical and sixteen virtual temperature sensors, a flow sensor 50 and current. Flow sensor pulses are also available. 53 sensor and four PWM controllable fans, along with their speed (in RPM), power, [all …]
|
H A D | hp-wmi-sensors.rst | 1 .. SPDX-License-Identifier: GPL-2.0-or-later 14 Hewlett-Packard (and some HP Compaq) business-class computers report hardware 17 userspace utilities like ``sensors`` to gather numeric sensor readings. 32 ``curr[X]_label`` RO Current sensor label. 34 ``fan[X]_label`` RO Fan sensor label. 35 ``fan[X]_fault`` RO Fan sensor fault indicator. 36 ``fan[X]_alarm`` RO Fan sensor alarm indicator. 38 ``in[X]_label`` RO Voltage sensor label. 39 ``temp[X]_input`` RO Temperature in millidegrees Celsius 41 ``temp[X]_label`` RO Temperature sensor label. [all …]
|
/linux/drivers/thermal/st/ |
H A D | st_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * ST Thermal Sensor Driver core routines 6 * Copyright (C) 2003-2014 STMicroelectronics (R&D) Limited 18 #define mcelsius(temp) ((temp) * 1000) argument 24 static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor) in st_thermal_alloc_regfields() argument 26 struct device *dev = sensor->dev; in st_thermal_alloc_regfields() 27 struct regmap *regmap = sensor->regmap; in st_thermal_alloc_regfields() 28 const struct reg_field *reg_fields = sensor->cdata->reg_fields; in st_thermal_alloc_regfields() 30 sensor->dcorrect = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() 33 sensor->overflow = devm_regmap_field_alloc(dev, regmap, in st_thermal_alloc_regfields() [all …]
|
/linux/drivers/iio/temperature/ |
H A D | ltc2983.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Analog Devices LTC2983 Multi-Sensor Digital Temperature Measurement System 60 (((chan - 1) * 4) + LTC2983_CHAN_ASSIGN_START_REG) 62 (((chan - 1) * 4) + LTC2983_TEMP_RES_START_REG) 192 container_of(_sensor, struct ltc2983_thermocouple, sensor) 195 container_of(_sensor, struct ltc2983_rtd, sensor) 198 container_of(_sensor, struct ltc2983_thermistor, sensor) 201 container_of(_sensor, struct ltc2983_diode, sensor) 204 container_of(_sensor, struct ltc2983_rsense, sensor) 207 container_of(_sensor, struct ltc2983_adc, sensor) [all …]
|
/linux/drivers/hwmon/occ/ |
H A D | common.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 #include <linux/hwmon-sysfs.h> 32 /* OCC sensor type and version definitions */ 144 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll() 149 rc = occ->send_cmd(occ, cmd, sizeof(cmd), &occ->resp, sizeof(occ->resp)); in occ_poll() 151 occ->last_error = rc; in occ_poll() 152 if (occ->error_count++ > OCC_ERROR_COUNT_THRESHOLD) in occ_poll() 153 occ->error = rc; in occ_poll() 159 occ->error_count = 0; in occ_poll() 160 occ->last_error = 0; in occ_poll() [all …]
|
/linux/drivers/nvme/host/ |
H A D | hwmon.c | 1 // SPDX-License-Identifier: GPL-2.0 19 static int nvme_get_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under, in nvme_get_temp_thresh() argument 20 long *temp) in nvme_get_temp_thresh() argument 22 unsigned int threshold = sensor << NVME_TEMP_THRESH_SELECT_SHIFT; in nvme_get_temp_thresh() 32 return -EIO; in nvme_get_temp_thresh() 35 *temp = kelvin_to_millicelsius(status & NVME_TEMP_THRESH_MASK); in nvme_get_temp_thresh() 40 static int nvme_set_temp_thresh(struct nvme_ctrl *ctrl, int sensor, bool under, in nvme_set_temp_thresh() argument 41 long temp) in nvme_set_temp_thresh() argument 43 unsigned int threshold = sensor << NVME_TEMP_THRESH_SELECT_SHIFT; in nvme_set_temp_thresh() 46 temp = millicelsius_to_kelvin(temp); in nvme_set_temp_thresh() [all …]
|
/linux/drivers/macintosh/ |
H A D | windfarm_pm121.c | 1 // SPDX-License-Identifier: GPL-2.0-only 16 * that none of the code has been re-used, it's a complete 17 * re-implementation 21 * controls with a tiny difference. The control-ids of hard-drive-fan 22 * and cpu-fan is swapped. 34 * offset : -19563152 38 * offset : -15650652 44 * offset : -15650652 48 * offset : -19563152 54 * offset : -25431900 [all …]
|
H A D | windfarm_lm87_sensor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Windfarm PowerMac thermal control. LM87 sensor 60 return -EIO; in wf_lm87_read_reg() 68 struct wf_lm87_sensor *lm = sr->priv; in wf_lm87_get() 69 s32 temp; in wf_lm87_get() local 71 if (lm->i2c == NULL) in wf_lm87_get() 72 return -ENODEV; in wf_lm87_get() 77 temp = wf_lm87_read_reg(lm->i2c, LM87_INT_TEMP); in wf_lm87_get() 78 if (temp < 0) in wf_lm87_get() 79 return temp; in wf_lm87_get() [all …]
|
/linux/drivers/hwmon/ |
H A D | abituguru.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * abituguru.c Copyright (c) 2005-2006 Hans de Goede <hdegoede@redhat.com> 6 * This driver supports the sensor part of the first and second revision of 23 #include <linux/hwmon-sysfs.h> 29 #define ABIT_UGURU_SENSOR_BANK1 0x21 /* 16x volt and temp */ 32 /* max nr of sensors in bank1, a bank1 sensor can be in, temp or nc */ 42 /* uGuru sensor bank 1 flags */ /* Alarm if: */ 43 #define ABIT_UGURU_TEMP_HIGH_ALARM_ENABLE 0x01 /* temp over warn */ 46 #define ABIT_UGURU_TEMP_HIGH_ALARM_FLAG 0x10 /* temp is over warn */ 49 /* uGuru sensor bank 2 flags */ /* Alarm if: */ [all …]
|
/linux/drivers/thermal/tegra/ |
H A D | soctherm-fuse.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. 25 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 27 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 37 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 38 * |-----------| SHFT_FT | BASE_FT | BASE_CP | 39 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 44 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 45 * |---------------------------------------------------| SHIFT_CP | 46 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ [all …]
|
/linux/Documentation/devicetree/bindings/hwmon/ |
H A D | starfive,jh71x0-temp.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/hwmon/starfive,jh71x0-temp.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: StarFive JH71x0 Temperature Sensor 10 - Emil Renner Berthing <kernel@esmil.dk> 13 StarFive Technology Co. JH71x0 embedded temperature sensor 18 - starfive,jh7100-temp 19 - starfive,jh7110-temp 28 clock-names: [all …]
|
/linux/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 24 ixgbe_attr->sensor->location); in ixgbe_hwmon_show_location() 35 /* reset the temp field */ in ixgbe_hwmon_show_temp() 36 ixgbe_attr->hw->mac.ops.get_thermal_sensor_data(ixgbe_attr->hw); in ixgbe_hwmon_show_temp() 38 value = ixgbe_attr->sensor->temp; in ixgbe_hwmon_show_temp() 52 unsigned int value = ixgbe_attr->sensor->caution_thresh; in ixgbe_hwmon_show_cautionthresh() 66 unsigned int value = ixgbe_attr->sensor->max_op_thresh; in ixgbe_hwmon_show_maxopthresh() 75 * ixgbe_add_hwmon_attr - Create hwmon attr table for a hwmon sysfs file. 77 * @offset: offset in the eeprom sensor data table [all …]
|
/linux/drivers/thermal/intel/ |
H A D | intel_pch_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 /* intel_pch_thermal.c - Intel PCH Thermal driver 28 #define PCH_THERMAL_DID_CNL_H 0xA379 /* CNL-H PCH */ 29 #define PCH_THERMAL_DID_CNL_LP 0x02F9 /* CNL-LP PCH */ 30 #define PCH_THERMAL_DID_CML_H 0X06F9 /* CML-H PCH */ 34 /* Wildcat Point-LP PCH Thermal registers */ 36 #define WPT_TSC 0x04 /* Thermal Sensor Control */ 37 #define WPT_TSS 0x06 /* Thermal Sensor Status */ 38 #define WPT_TSEL 0x08 /* Thermal Sensor Enable and Lock */ 39 #define WPT_TSREL 0x0A /* Thermal Sensor Report Enable and Lock */ [all …]
|
/linux/arch/arm64/boot/dts/qcom/ |
H A D | x1e80100-pmics.dtsi | 1 // SPDX-License-Identifier: BSD-3-Clause 6 #include <dt-bindings/input/input.h> 7 #include <dt-bindings/input/linux-event-codes.h> 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/spmi/spmi.h> 12 thermal-zones { 13 pm8550-thermal { 14 polling-delay-passive = <100>; 16 thermal-sensors = <&pm8550_temp_alarm>; 33 pm8550ve-2-thermal { [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | therm.c | 40 nvkm_error(&bios->subdev, in therm_table() 69 struct nvbios_therm_sensor *sensor) in nvbios_therm_sensor_parse() argument 77 return -EINVAL; in nvbios_therm_sensor_parse() 81 sensor_section = -1; in nvbios_therm_sensor_parse() 96 sensor->offset_constant = offset; in nvbios_therm_sensor_parse() 102 sensor->thrs_critical.temp = (value & 0xff0) >> 4; in nvbios_therm_sensor_parse() 103 sensor->thrs_critical.hysteresis = value & 0xf; in nvbios_therm_sensor_parse() 109 sensor->thrs_down_clock.temp = (value & 0xff0) >> 4; in nvbios_therm_sensor_parse() 110 sensor->thrs_down_clock.hysteresis = value & 0xf; in nvbios_therm_sensor_parse() 116 sensor->thrs_fan_boost.temp = (value & 0xff0) >> 4; in nvbios_therm_sensor_parse() [all …]
|
/linux/drivers/net/ethernet/intel/igb/ |
H A D | igb_hwmon.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2007 - 2018 Intel Corporation. */ 30 igb_attr->sensor->location); in igb_hwmon_show_location() 41 /* reset the temp field */ in igb_hwmon_show_temp() 42 igb_attr->hw->mac.ops.get_thermal_sensor_data(igb_attr->hw); in igb_hwmon_show_temp() 44 value = igb_attr->sensor->temp; in igb_hwmon_show_temp() 58 unsigned int value = igb_attr->sensor->caution_thresh; in igb_hwmon_show_cautionthresh() 72 unsigned int value = igb_attr->sensor->max_op_thresh; in igb_hwmon_show_maxopthresh() 80 /* igb_add_hwmon_attr - Create hwmon attr table for a hwmon sysfs file. 82 * @ offset: offset in the eeprom sensor data table [all …]
|