/linux/drivers/macintosh/ |
H A D | windfarm_fcu_controls.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Windfarm PowerMac thermal control. FCU fan control 44 * what Darwin -apparently- does based on observed behaviour. 80 struct wf_fcu_fan *fan = ct->priv; in wf_fcu_fan_release() local 82 kref_put(&fan->fcu_priv->ref, wf_fcu_release); in wf_fcu_fan_release() 83 kfree(fan); in wf_fcu_fan_release() 91 mutex_lock(&pv->lock); in wf_fcu_read_reg() 96 nw = i2c_master_send(pv->i2c, buf, 1); in wf_fcu_read_reg() 97 if (nw > 0 || (nw < 0 && nw != -EIO) || tries >= 100) in wf_fcu_read_reg() 109 nr = i2c_master_recv(pv->i2c, buf, nb); in wf_fcu_read_reg() [all …]
|
H A D | windfarm_smu_controls.c | 1 // SPDX-License-Identifier: GPL-2.0-only 64 /* The SMU has an "old" and a "new" way of setting the fan speed in smu_set_fan() 78 return -EINVAL; in smu_set_fan() 100 printk(KERN_WARNING "windfarm: SMU failed new fan command " in smu_set_fan() 120 if (value < fct->min) in smu_fan_set() 121 value = fct->min; in smu_fan_set() 122 if (value > fct->max) in smu_fan_set() 123 value = fct->max; in smu_fan_set() 124 fct->value = value; in smu_fan_set() 126 return smu_set_fan(fct->fan_type, fct->reg, value); in smu_fan_set() [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ |
H A D | fan.c | 27 #include <subdev/bios/fan.h> 32 nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target) in nvkm_fan_update() argument 34 struct nvkm_therm *therm = fan->parent; in nvkm_fan_update() 35 struct nvkm_subdev *subdev = &therm->subdev; in nvkm_fan_update() 36 struct nvkm_timer *tmr = subdev->device->timer; in nvkm_fan_update() 41 /* update target fan speed, restricting to allowed range */ in nvkm_fan_update() 42 spin_lock_irqsave(&fan->lock, flags); in nvkm_fan_update() 44 target = fan->percent; in nvkm_fan_update() 45 target = max_t(u8, target, fan->bios.min_duty); in nvkm_fan_update() 46 target = min_t(u8, target, fan->bios.max_duty); in nvkm_fan_update() [all …]
|
H A D | fantog.c | 39 nvkm_fantog_update(struct nvkm_fantog *fan, int percent) in nvkm_fantog_update() argument 41 struct nvkm_therm *therm = fan->base.parent; in nvkm_fantog_update() 42 struct nvkm_device *device = therm->subdev.device; in nvkm_fantog_update() 43 struct nvkm_timer *tmr = device->timer; in nvkm_fantog_update() 44 struct nvkm_gpio *gpio = device->gpio; in nvkm_fantog_update() 48 spin_lock_irqsave(&fan->lock, flags); in nvkm_fantog_update() 50 percent = fan->percent; in nvkm_fantog_update() 51 fan->percent = percent; in nvkm_fantog_update() 57 u64 next_change = (percent * fan->period_us) / 100; in nvkm_fantog_update() 59 next_change = fan->period_us - next_change; in nvkm_fantog_update() [all …]
|
H A D | fanpwm.c | 29 #include <subdev/bios/fan.h> 40 struct nvkm_fanpwm *fan = (void *)therm->fan; in nvkm_fanpwm_get() local 41 struct nvkm_device *device = therm->subdev.device; in nvkm_fanpwm_get() 42 struct nvkm_gpio *gpio = device->gpio; in nvkm_fanpwm_get() 43 int card_type = device->card_type; in nvkm_fanpwm_get() 47 ret = therm->func->pwm_get(therm, fan->func.line, &divs, &duty); in nvkm_fanpwm_get() 50 if (card_type <= NV_40 || (fan->func.log[0] & 1)) in nvkm_fanpwm_get() 51 duty = divs - duty; in nvkm_fanpwm_get() 55 return nvkm_gpio_get(gpio, 0, fan->func.func, fan->func.line) * 100; in nvkm_fanpwm_get() 61 struct nvkm_fanpwm *fan = (void *)therm->fan; in nvkm_fanpwm_set() local [all …]
|
/linux/drivers/platform/x86/ |
H A D | gpd-pocket-fan.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * GPD Pocket fan controller driver 9 #include <linux/devm-helpers.h> 33 "Millicelsius values above which the fan speed increases"); 38 "Hysteresis in millicelsius before lowering the fan speed"); 43 "minimum fan speed to allow when system is powered by AC"); 55 static void gpd_pocket_fan_set_speed(struct gpd_pocket_fan_data *fan, int speed) in gpd_pocket_fan_set_speed() argument 57 if (speed == fan->last_speed) in gpd_pocket_fan_set_speed() 60 gpiod_direction_output(fan->gpio0, !!(speed & 1)); in gpd_pocket_fan_set_speed() 61 gpiod_direction_output(fan->gpio1, !!(speed & 2)); in gpd_pocket_fan_set_speed() [all …]
|
/linux/drivers/hwmon/ |
H A D | mlxreg-fan.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 27 * FAN datasheet defines the formula for RPM calculations as RPM = 15/t-high. 28 * The logic in a programmable device measures the time t-high by sampling the 29 * tachometer every t-sample (with the default value 11.32 uS) and increment 31 * RPM = 15 / (t-sample * (K + Regval)), where: 33 * - 0xff - represents tachometer fault; 34 * - 0xfe - represents tachometer minimum value , which is 4444 RPM; 35 * - 0x00 - represents tachometer maximum value , which is 300000 RPM; 39 * used: RPM = 15 / ((Regval + K) * 11.32) * 10^(-6)), which in the 42 * - for Regval 0x00, RPM will be 15000000 * 100 / (44 * 1132) = 30115; [all …]
|
H A D | npcm750-pwm-fan.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // Copyright (c) 2014-2018 Nuvoton Technology corporation. 7 #include <linux/hwmon-sysfs.h> 79 /* NPCM7XX FAN Tacho registers */ 140 /* FAN General Definition */ 141 /* Define the maximum FAN channel number */ 147 * Get Fan Tach Timeout (base on clock 214843.75Hz, 1 cnt = 4.654us) 149 * (The minimum FAN speed could to support ~640RPM/pulse 1, 150 * 320RPM/pulse 2, ...-- 10.6Hz) 154 #define NPCM7XX_FAN_TCPA (NPCM7XX_FAN_TCNT - NPCM7XX_FAN_TIMEOUT) [all …]
|
/linux/drivers/acpi/ |
H A D | fan_core.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * fan_core.c - ACPI Fan core Driver 20 #include "fan.h" 32 struct acpi_device *device = cdev->devdata; in fan_get_max_state() 33 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_max_state() local 35 if (fan->acpi4) { in fan_get_max_state() 36 if (fan->fif.fine_grain_ctrl) in fan_get_max_state() 37 *state = 100 / fan->fif.step_size; in fan_get_max_state() 39 *state = fan->fps_count - 1; in fan_get_max_state() 54 status = acpi_evaluate_object(device->handle, "_FST", NULL, &buffer); in acpi_fan_get_fst() [all …]
|
H A D | fan_attr.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * fan_attr.c - Create extra attributes for ACPI Fan driver 15 #include "fan.h" 24 if (fps->control == 0xFFFFFFFF || fps->control > 100) in show_state() 25 count = scnprintf(buf, PAGE_SIZE, "not-defined:"); in show_state() 27 count = scnprintf(buf, PAGE_SIZE, "%lld:", fps->control); in show_state() 29 if (fps->trip_point == 0xFFFFFFFF || fps->trip_point > 9) in show_state() 30 count += sysfs_emit_at(buf, count, "not-defined:"); in show_state() 32 count += sysfs_emit_at(buf, count, "%lld:", fps->trip_point); in show_state() 34 if (fps->speed == 0xFFFFFFFF) in show_state() [all …]
|
H A D | fan_hwmon.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * hwmon interface for the ACPI Fan driver. 16 #include "fan.h" 18 /* Returned when the ACPI fan does not support speed reporting */ 22 static struct acpi_fan_fps *acpi_fan_get_current_fps(struct acpi_fan *fan, u64 control) in acpi_fan_get_current_fps() argument 26 for (i = 0; i < fan->fps_count; i++) { in acpi_fan_get_current_fps() 27 if (fan->fps[i].control == control) in acpi_fan_get_current_fps() 28 return &fan->fps[i]; in acpi_fan_get_current_fps() 37 const struct acpi_fan *fan = drvdata; in acpi_fan_hwmon_is_visible() local 47 * When in fine grain control mode, not every fan control value in acpi_fan_hwmon_is_visible() [all …]
|
/linux/Documentation/devicetree/bindings/hwmon/ |
H A D | npcm750-pwm-fan.txt | 1 Nuvoton NPCM PWM and Fan Tacho controller device 3 The Nuvoton BMC NPCM7XX supports 8 Pulse-width modulation (PWM) 4 controller outputs and 16 Fan tachometer controller inputs. 6 The Nuvoton BMC NPCM8XX supports 12 Pulse-width modulation (PWM) 7 controller outputs and 16 Fan tachometer controller inputs. 9 Required properties for pwm-fan node 10 - #address-cells : should be 1. 11 - #size-cells : should be 0. 12 - compatible : "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX. 13 : "nuvoton,npcm845-pwm-fan" for Arbel NPCM8XX. [all …]
|
H A D | aspeed-pwm-tacho.txt | 1 ASPEED AST2400/AST2500 PWM and Fan Tacho controller device driver 3 The ASPEED PWM controller can support upto 8 PWM outputs. The ASPEED Fan Tacho 4 controller can support upto 16 Fan tachometer inputs. 6 There can be upto 8 fans supported. Each fan can have one PWM output and 7 one/two Fan tach inputs. 9 Required properties for pwm-tacho node: 10 - #address-cells : should be 1. 12 - #size-cells : should be 1. 14 - #cooling-cells: should be 2. 16 - reg : address and length of the register set for the device. [all …]
|
/linux/Documentation/hwmon/ |
H A D | g762.rst | 4 The GMT G762 Fan Speed PWM Controller is connected directly to a fan 5 and performs closed-loop or open-loop control of the fan speed. Two 6 modes - PWM or DC - are supported by the device. 9 http://natisbad.org/NAS/ref/GMT_EDS-762_763-080710-0.2.pdf. sysfs 10 bindings are described in Documentation/hwmon/sysfs-interface.rst. 19 fan revolution, ...); Those can be modified via devicetree bindings 25 set desired fan speed. This only makes sense in closed-loop 26 fan speed control (i.e. when pwm1_enable is set to 2). 29 provide current fan rotation value in RPM as reported by 30 the fan to the device. [all …]
|
H A D | dell-smm-hwmon.rst | 1 .. SPDX-License-Identifier: GPL-2.0-or-later 5 Kernel driver dell-smm-hwmon 8 :Copyright: |copy| 2002-2005 Massimo Dal Zotto <dz@debian.org> 12 ----------- 18 automatically adjust fan speed (please notice that it currently uses 24 ------------------- 35 fan[1-3]_input RO Fan speed in RPM. 36 fan[1-3]_label RO Fan label. 37 fan[1-3]_min RO Minimal Fan speed in RPM 38 fan[1-3]_max RO Maximal Fan speed in RPM [all …]
|
H A D | nct6775.rst | 19 * Nuvoton NCT5572D/NCT6771F/NCT6772F/NCT6775F/W83677HG-I 83 * Nuvoton NCT6796D-S/NCT6799D-R 93 Guenter Roeck <linux@roeck-us.net> 96 ----------- 106 There are 4 to 5 fan rotation speed sensors, 8 to 15 analog voltage sensors, 108 fan regulation strategies (plus manual fan control mode). 119 Fan rotation speeds are reported in RPM (rotations per minute). An alarm is 121 NCT6775F, fan readings can be divided by a programmable divider (1, 2, 4, 8, 123 do not have a fan speed divider. The driver sets the most suitable fan divisor 124 itself; specifically, it increases the divider value each time a fan speed [all …]
|
H A D | w83792d.rst | 10 Addresses scanned: I2C 0x2c - 0x2f 19 ----------------- 35 ----------- 42 parameter; this will put it into a more well-behaved state first. 44 The driver implements three temperature sensors, seven fan rotation speed 45 sensors, nine voltage sensors, and two automatic fan regulation 46 strategies called: Smart Fan I (Thermal Cruise mode) and Smart Fan II. 48 The driver also implements up to seven fan control outputs: pwm1-7. Pwm1-7 53 Automatic fan control mode is possible only for fan1-fan3. 55 For all pwmX outputs, a value of 0 means minimum fan speed and a value of [all …]
|
H A D | f71882fg.rst | 103 This is the 64-pin variant of the F71889FG, they have the 119 ----------- 125 These chips also have fan controlling features, using either DC or PWM, in 133 ---------- 135 The Voltage, Fan and Temperature Monitoring uses the standard sysfs 136 interface as documented in sysfs-interface, without any exceptions. 139 Fan Control 140 ----------- 142 Both PWM (pulse-width modulation) and DC fan speed control methods are 149 vica versa. So the temperature zone trip points 1-4 (or 1-2) go from high temp [all …]
|
H A D | adm9240.rst | 10 Addresses scanned: I2C 0x2c - 0x2f 20 Addresses scanned: I2C 0x2c - 0x2f 24 http://pdfserv.maxim-ic.com/en/ds/DS1780.pdf 30 Addresses scanned: I2C 0x2c - 0x2f 37 - Frodo Looijaard <frodol@dds.nl>, 38 - Philip Edelbrock <phil@netroedge.com>, 39 - Michiel Rook <michiel@grendelproject.nl>, 40 - Grant Coady <gcoady.lk@gmail.com> with guidance 44 --------- 46 chip MSB 5-bit address. Each chip reports a unique manufacturer [all …]
|
H A D | max31785.rst | 10 Addresses scanned: - 17 ----------- 19 The Maxim MAX31785 is a PMBus device providing closed-loop, multi-channel fan 20 management with temperature and remote voltage sensing. Various fan control 22 dual tachometer measurements, and fan health monitoring. 24 For dual-rotor configurations the MAX31785A exposes the second rotor tachometer 25 readings in attributes fan[5-8]_input. By contrast the MAX31785 only exposes 26 the slowest rotor measurement, and does so in the fan[1-4]_input attributes. 29 ----------- 35 ---------------- [all …]
|
H A D | w83627ehf.rst | 22 * Winbond W83627DHG-P 46 * Winbond W83667HG-B 54 * Nuvoton NCT6775F/W83667HG-I 73 - Jean Delvare <jdelvare@suse.de> 74 - Yuan Mu (Winbond) 75 - Rudolf Marek <r.marek@assembler.cz> 76 - David Hubbard <david.c.hubbard@gmail.com> 77 - Gong Jun <JGong@nuvoton.com> 80 ----------- 83 W83627DHG, W83627DHG-P, W83627UHG, W83667HG, W83667HG-B, W83667HG-I [all …]
|
H A D | aquacomputer_d5next.rst | 1 .. SPDX-License-Identifier: GPL-2.0-or-later 3 Kernel driver aquacomputer-d5next 8 * Aquacomputer Aquaero 5/6 fan controllers 12 * Aquacomputer Octo fan controller 13 * Aquacomputer Quadro fan controller 18 * Aquacomputer Poweradjust 3 fan controller 25 ----------- 32 speed (in RPM), power, voltage and current. Temperature offsets and fan speeds 35 For the D5 Next pump, available sensors are pump and fan speed, power, voltage 37 available through debugfs are the serial number, firmware version and power-on [all …]
|
/linux/arch/arm/boot/dts/aspeed/ |
H A D | aspeed-bmc-amd-daytonax.dts | 1 // SPDX-License-Identifier: GPL-2.0 2 /dts-v1/; 4 #include "aspeed-g5.dtsi" 5 #include <dt-bindings/gpio/aspeed-gpio.h> 6 #include <dt-bindings/interrupt-controller/irq.h> 10 compatible = "amd,daytonax-bmc", "aspeed,ast2500"; 16 reserved-memory { 17 #address-cells = <1>; 18 #size-cells = <1>; 24 compatible = "shared-dma-pool"; [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | therm.c | 40 nvkm_error(&bios->subdev, in therm_table() 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() 117 sensor->thrs_fan_boost.hysteresis = value & 0xf; in nvbios_therm_sensor_parse() [all …]
|
H A D | fan.c | 26 #include <subdev/bios/fan.h> 32 u32 fan = 0; in nvbios_fan_table() local 36 fan = nvbios_rd32(bios, bit_P.offset + 0x58); in nvbios_fan_table() 38 if (fan) { in nvbios_fan_table() 39 *ver = nvbios_rd08(bios, fan + 0); in nvbios_fan_table() 42 *hdr = nvbios_rd08(bios, fan + 1); in nvbios_fan_table() 43 *len = nvbios_rd08(bios, fan + 2); in nvbios_fan_table() 44 *cnt = nvbios_rd08(bios, fan + 3); in nvbios_fan_table() 45 return fan; in nvbios_fan_table() 66 nvbios_fan_parse(struct nvkm_bios *bios, struct nvbios_therm_fan *fan) in nvbios_fan_parse() argument [all …]
|