/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/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 …]
|
H A D | windfarm_lm75_sensor.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Windfarm PowerMac thermal control. LM75 sensor 48 if (lm->i2c == NULL) in wf_lm75_get() 49 return -ENODEV; in wf_lm75_get() 52 if (!lm->inited) { in wf_lm75_get() 53 u8 cfg_new, cfg = (u8)i2c_smbus_read_byte_data(lm->i2c, 1); in wf_lm75_get() 56 sr->name, cfg); in wf_lm75_get() 62 i2c_smbus_write_byte_data(lm->i2c, 1, cfg_new); in wf_lm75_get() 63 lm->inited = 1; in wf_lm75_get() 70 data = (s32)le16_to_cpu(i2c_smbus_read_word_data(lm->i2c, 0)); in wf_lm75_get() [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/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/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/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 …]
|
/linux/drivers/hwmon/ |
H A D | k8temp.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * k8temp.c - Linux kernel module for hardware monitoring 19 #define TEMP_FROM_REG(val) (((((val) >> 16) & 0xff) - 49) * 1000) 28 u8 sensorsp; /* sensor presence bits - SEL_CORE, SEL_PLACE */ 76 if ((channel & 1) && !(data->sensorsp & SEL_PLACE)) in k8temp_is_visible() 79 if ((channel & 2) && !(data->sensorsp & SEL_CORE)) in k8temp_is_visible() 90 struct pci_dev *pdev = to_pci_dev(dev->parent); in k8temp_read() 92 u32 temp; in k8temp_read() local 98 core ^= data->swap_core_select; in k8temp_read() 100 mutex_lock(&data->update_lock); in k8temp_read() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlxsw/ |
H A D | core_hwmon.c | 1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 2 /* Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved */ 71 struct mlxsw_hwmon_dev *mlxsw_hwmon_dev = mlxsw_hwmon_attr->mlxsw_hwmon_dev; in mlxsw_hwmon_temp_show() 72 struct mlxsw_hwmon *mlxsw_hwmon = mlxsw_hwmon_dev->hwmon; in mlxsw_hwmon_temp_show() 74 int temp, index; in mlxsw_hwmon_temp_show() local 77 index = mlxsw_hwmon_get_attr_index(mlxsw_hwmon_attr->type_index, in mlxsw_hwmon_temp_show() 78 mlxsw_hwmon_dev->module_sensor_max); in mlxsw_hwmon_temp_show() 79 mlxsw_reg_mtmp_pack(mtmp_pl, mlxsw_hwmon_dev->slot_index, index, false, in mlxsw_hwmon_temp_show() 81 err = mlxsw_reg_query(mlxsw_hwmon->core, MLXSW_REG(mtmp), mtmp_pl); in mlxsw_hwmon_temp_show() 83 dev_err(mlxsw_hwmon->bus_info->dev, "Failed to query temp sensor\n"); in mlxsw_hwmon_temp_show() [all …]
|
/linux/drivers/thermal/ |
H A D | qoriq_thermal.c | 1 // SPDX-License-Identifier: GPL-2.0 47 #define REGS_TSCFGR 0x084 /* Sensor Configuration Register */ 80 struct qoriq_sensor sensor[SITES_MAX]; member 85 return container_of(s, struct qoriq_tmu_data, sensor[s->id]); in qoriq_sensor_to_data() 88 static int tmu_get_temp(struct thermal_zone_device *tz, int *temp) in tmu_get_temp() argument 98 * V TEMP in tmu_get_temp() 101 * within sensor range. TEMP is an 8 bit value representing in tmu_get_temp() 106 * V TEMP in tmu_get_temp() 109 * within sensor range. TEMP is an 9 bit value representing in tmu_get_temp() 113 regmap_read(qdata->regmap, REGS_TMR, &val); in tmu_get_temp() [all …]
|