/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 30 #define DBG(args...) do { } while(0) 39 * If you define the below constant to 0, then it will be 43 * I'm using 0 for now which is what therm_pm72 used to do and 44 * what Darwin -apparently- does based on observed behaviour. 46 #define RPM_PID_USE_ACTUAL_SPEED 0 52 #define FCU_FAN_RPM 0 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() [all …]
|
H A D | windfarm_smu_controls.c | 1 // SPDX-License-Identifier: GPL-2.0-only 33 #define DBG(args...) do { } while(0) 46 int fan_type; /* 0 = rpm, 1 = pwm */ 64 /* The SMU has an "old" and a "new" way of setting the fan speed in smu_set_fan() 72 buffer[0] = 0x30; in smu_set_fan() 78 return -EINVAL; in smu_set_fan() 80 memset(buffer, 0, 16); in smu_set_fan() 81 buffer[0] = pwm ? 0x10 : 0x00; in smu_set_fan() 82 buffer[1] = 0x01 << id; in smu_set_fan() 89 cmd.status = 0; in smu_set_fan() [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() 38 int ret = 0; 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() 43 if (target < 0) in nvkm_fan_update() 44 target = fan->percent; 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() 49 if (percent < 0) in nvkm_fantog_update() 50 percent = fan->percent; in nvkm_fantog_update() 51 fan->percent = percent; in nvkm_fantog_update() 53 duty = !nvkm_gpio_get(gpio, 0, DCB_GPIO_FAN, 0xff); 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() 48 if (ret == 0 && divs) { 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() [all …]
|
/linux/drivers/hwmon/ |
H A D | mlxreg-fan.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 17 #define MLXREG_FAN_PWM_NOT_CONNECTED 0xff 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 [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> 19 #define NPCM7XX_PWM_REG_BASE(base, n) ((base) + ((n) * 0x1000L)) 21 #define NPCM7XX_PWM_REG_PR(base, n) (NPCM7XX_PWM_REG_BASE(base, n) + 0x00) 22 #define NPCM7XX_PWM_REG_CSR(base, n) (NPCM7XX_PWM_REG_BASE(base, n) + 0x04) 23 #define NPCM7XX_PWM_REG_CR(base, n) (NPCM7XX_PWM_REG_BASE(base, n) + 0x08) 25 (NPCM7XX_PWM_REG_BASE(base, n) + 0x0C + (12 * (ch))) 27 (NPCM7XX_PWM_REG_BASE(base, n) + 0x10 + (12 * (ch))) 29 (NPCM7XX_PWM_REG_BASE(base, n) + 0x14 + (12 * (ch))) [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/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/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" 24 {"", 0}, 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() [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 …]
|
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 …]
|
/linux/Documentation/hwmon/ |
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 | 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 | 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 ----------------- 24 Use 'init=0' to bypass initializing the chip. 29 a certain chip. Example usage is `force_subclients=0,0x2f,0x4a,0x4b` 30 to force the subclients of chip 0x2f on bus 0 to i2c addresses 31 0x4a and 0x4b. 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 [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 | 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 …]
|
/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"; 13 reg = <0x80000000 0x20000000>; 16 reserved-memory { 17 #address-cells = <1>; 18 #size-cells = <1>; [all …]
|
H A D | aspeed-bmc-lenovo-hr855xg2.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (C) 2019-present Lenovo 8 /dts-v1/; 10 #include "aspeed-g5.dtsi" 11 #include <dt-bindings/gpio/aspeed-gpio.h> 15 compatible = "lenovo,hr855xg2-bmc", "aspeed,ast2500"; 29 stdout-path = &uart5; 35 reg = <0x80000000 0x20000000>; 38 reserved-memory { 39 #address-cells = <1>; [all …]
|
H A D | aspeed-bmc-lenovo-hr630.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (C) 2019-present Lenovo 8 /dts-v1/; 10 #include "aspeed-g5.dtsi" 11 #include <dt-bindings/gpio/aspeed-gpio.h> 15 compatible = "lenovo,hr630-bmc", "aspeed,ast2500"; 29 stdout-path = &uart5; 35 reg = <0x80000000 0x20000000>; 38 reserved-memory { 39 #address-cells = <1>; [all …]
|
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | therm.c | 32 u32 therm = 0; in therm_table() 40 nvkm_error(&bios->subdev, in therm_table() 47 return 0; in therm_table() 49 *ver = nvbios_rd08(bios, therm + 0); in therm_table() 63 return 0; in nvbios_therm_entry() 77 return -EINVAL; in nvbios_therm_sensor_parse() 80 thrs_section = 0; in nvbios_therm_sensor_parse() 81 sensor_section = -1; in nvbios_therm_sensor_parse() 82 i = 0; in nvbios_therm_sensor_parse() 86 switch (nvbios_rd08(bios, entry + 0)) { 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 35 if (bit_P.version == 2 && bit_P.length >= 0x5c) in nvbios_fan_table() 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() 41 case 0x10: 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() [all …]
|