| /kernel/linux/linux-4.19/drivers/macintosh/ |
| D | windfarm_fcu_controls.c | 2 * Windfarm PowerMac thermal control. FCU fan control 81 struct wf_fcu_fan *fan = ct->priv; in wf_fcu_fan_release() local 83 kref_put(&fan->fcu_priv->ref, wf_fcu_release); in wf_fcu_fan_release() 84 kfree(fan); in wf_fcu_fan_release() 147 struct wf_fcu_fan *fan = ct->priv; in wf_fcu_fan_set_rpm() local 148 struct wf_fcu_priv *pv = fan->fcu_priv; in wf_fcu_fan_set_rpm() 152 if (value < fan->min) in wf_fcu_fan_set_rpm() 153 value = fan->min; in wf_fcu_fan_set_rpm() 154 if (value > fan->max) in wf_fcu_fan_set_rpm() 155 value = fan->max; in wf_fcu_fan_set_rpm() [all …]
|
| D | windfarm_smu_controls.c | 64 /* The SMU has an "old" and a "new" way of setting the fan speed in smu_set_fan() 100 printk(KERN_WARNING "windfarm: SMU failed new fan command " in smu_set_fan() 188 if (!strcmp(l, "Rear Fan 0") || !strcmp(l, "Rear Fan") || in smu_fan_create() 189 !strcmp(l, "Rear fan 0") || !strcmp(l, "Rear fan") || in smu_fan_create() 191 fct->ctrl.name = "cpu-rear-fan-0"; in smu_fan_create() 192 else if (!strcmp(l, "Rear Fan 1") || !strcmp(l, "Rear fan 1") || in smu_fan_create() 194 fct->ctrl.name = "cpu-rear-fan-1"; in smu_fan_create() 195 else if (!strcmp(l, "Front Fan 0") || !strcmp(l, "Front Fan") || in smu_fan_create() 196 !strcmp(l, "Front fan 0") || !strcmp(l, "Front fan") || in smu_fan_create() 198 fct->ctrl.name = "cpu-front-fan-0"; in smu_fan_create() [all …]
|
| /kernel/linux/linux-5.10/drivers/macintosh/ |
| D | windfarm_fcu_controls.c | 3 * Windfarm PowerMac thermal control. FCU fan control 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() 146 struct wf_fcu_fan *fan = ct->priv; in wf_fcu_fan_set_rpm() local 147 struct wf_fcu_priv *pv = fan->fcu_priv; in wf_fcu_fan_set_rpm() 151 if (value < fan->min) in wf_fcu_fan_set_rpm() 152 value = fan->min; in wf_fcu_fan_set_rpm() 153 if (value > fan->max) in wf_fcu_fan_set_rpm() 154 value = fan->max; in wf_fcu_fan_set_rpm() [all …]
|
| D | windfarm_smu_controls.c | 63 /* The SMU has an "old" and a "new" way of setting the fan speed in smu_set_fan() 99 printk(KERN_WARNING "windfarm: SMU failed new fan command " in smu_set_fan() 187 if (!strcmp(l, "Rear Fan 0") || !strcmp(l, "Rear Fan") || in smu_fan_create() 188 !strcmp(l, "Rear fan 0") || !strcmp(l, "Rear fan") || in smu_fan_create() 190 fct->ctrl.name = "cpu-rear-fan-0"; in smu_fan_create() 191 else if (!strcmp(l, "Rear Fan 1") || !strcmp(l, "Rear fan 1") || in smu_fan_create() 193 fct->ctrl.name = "cpu-rear-fan-1"; in smu_fan_create() 194 else if (!strcmp(l, "Front Fan 0") || !strcmp(l, "Front Fan") || in smu_fan_create() 195 !strcmp(l, "Front fan 0") || !strcmp(l, "Front fan") || in smu_fan_create() 197 fct->ctrl.name = "cpu-front-fan-0"; in smu_fan_create() [all …]
|
| /kernel/linux/linux-4.19/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ |
| 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() 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() 47 if (fan->percent != target) { in nvkm_fan_update() 48 nvkm_debug(subdev, "FAN target: %d\n", target); in nvkm_fan_update() [all …]
|
| 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() 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() 60 nvkm_timer_alarm(tmr, next_change * 1000, &fan->alarm); in nvkm_fantog_update() 62 spin_unlock_irqrestore(&fan->lock, flags); in nvkm_fantog_update() 68 struct nvkm_fantog *fan = in nvkm_fantog_alarm() local [all …]
|
| D | fanpwm.c | 29 #include <subdev/bios/fan.h> 40 struct nvkm_fanpwm *fan = (void *)therm->fan; in nvkm_fanpwm_get() local 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() 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 66 divs = fan->base.perf.pwm_divisor; in nvkm_fanpwm_set() 67 if (fan->base.bios.pwm_freq) { in nvkm_fanpwm_set() 70 divs = therm->func->pwm_clock(therm, fan->func.line); in nvkm_fanpwm_set() 71 divs /= fan->base.bios.pwm_freq; in nvkm_fanpwm_set() [all …]
|
| /kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ |
| 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() 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() 47 if (fan->percent != target) { in nvkm_fan_update() 48 nvkm_debug(subdev, "FAN target: %d\n", target); in nvkm_fan_update() [all …]
|
| 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() 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() 60 nvkm_timer_alarm(tmr, next_change * 1000, &fan->alarm); in nvkm_fantog_update() 62 spin_unlock_irqrestore(&fan->lock, flags); in nvkm_fantog_update() 68 struct nvkm_fantog *fan = in nvkm_fantog_alarm() local [all …]
|
| D | fanpwm.c | 29 #include <subdev/bios/fan.h> 40 struct nvkm_fanpwm *fan = (void *)therm->fan; in nvkm_fanpwm_get() local 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() 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 66 divs = fan->base.perf.pwm_divisor; in nvkm_fanpwm_set() 67 if (fan->base.bios.pwm_freq) { in nvkm_fanpwm_set() 70 divs = therm->func->pwm_clock(therm, fan->func.line); in nvkm_fanpwm_set() 71 divs /= fan->base.bios.pwm_freq; in nvkm_fanpwm_set() [all …]
|
| /kernel/linux/linux-5.10/drivers/platform/x86/ |
| D | gpd-pocket-fan.c | 3 * GPD Pocket fan controller driver 32 "Millicelsius values above which the fan speed increases"); 37 "Hysteresis in millicelsius before lowering the fan speed"); 42 "minimum fan speed to allow when system is powered by AC"); 54 static void gpd_pocket_fan_set_speed(struct gpd_pocket_fan_data *fan, int speed) in gpd_pocket_fan_set_speed() argument 56 if (speed == fan->last_speed) in gpd_pocket_fan_set_speed() 59 gpiod_direction_output(fan->gpio0, !!(speed & 1)); in gpd_pocket_fan_set_speed() 60 gpiod_direction_output(fan->gpio1, !!(speed & 2)); in gpd_pocket_fan_set_speed() 62 fan->last_speed = speed; in gpd_pocket_fan_set_speed() 75 struct gpd_pocket_fan_data *fan = in gpd_pocket_fan_worker() local [all …]
|
| /kernel/linux/linux-4.19/drivers/platform/x86/ |
| D | gpd-pocket-fan.c | 3 * GPD Pocket fan controller driver 32 "Millicelsius values above which the fan speed increases"); 37 "Hysteresis in millicelsius before lowering the fan speed"); 42 "minimum fan speed to allow when system is powered by AC"); 54 static void gpd_pocket_fan_set_speed(struct gpd_pocket_fan_data *fan, int speed) in gpd_pocket_fan_set_speed() argument 56 if (speed == fan->last_speed) in gpd_pocket_fan_set_speed() 59 gpiod_direction_output(fan->gpio0, !!(speed & 1)); in gpd_pocket_fan_set_speed() 60 gpiod_direction_output(fan->gpio1, !!(speed & 2)); in gpd_pocket_fan_set_speed() 62 fan->last_speed = speed; in gpd_pocket_fan_set_speed() 75 struct gpd_pocket_fan_data *fan = in gpd_pocket_fan_worker() local [all …]
|
| /kernel/linux/linux-4.19/Documentation/devicetree/bindings/hwmon/ |
| D | npcm750-pwm-fan.txt | 1 Nuvoton NPCM7xx PWM and Fan Tacho controller device 4 controller outputs and 16 Fan tachometer controller inputs. 6 Required properties for pwm-fan node 9 - compatible : "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX. 13 * "fan" for the Fan registers. 17 * "fan" for Fan controller operating clock. 18 - interrupts : contain the Fan interrupts with flags for falling edge. 20 - pinctrl-0 : phandle referencing pin configuration of the PWM and Fan 23 fan subnode format: 25 Under fan subnode can be upto 8 child nodes, each child node representing a fan. [all …]
|
| 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. 29 fan subnode format: 31 Under fan subnode there can upto 8 child nodes, with each child node 32 representing a fan. If there are 8 fans each fan can have one PWM port and 33 one/two Fan tach inputs. 45 - aspeed,fan-tach-ch : should specify the Fan tach input channel. [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/hwmon/ |
| D | npcm750-pwm-fan.txt | 1 Nuvoton NPCM7xx PWM and Fan Tacho controller device 4 controller outputs and 16 Fan tachometer controller inputs. 6 Required properties for pwm-fan node 9 - compatible : "nuvoton,npcm750-pwm-fan" for Poleg NPCM7XX. 13 * "fan" for the Fan registers. 17 * "fan" for Fan controller operating clock. 18 - interrupts : contain the Fan interrupts with flags for falling edge. 20 - pinctrl-0 : phandle referencing pin configuration of the PWM and Fan 23 fan subnode format: 25 Under fan subnode can be upto 8 child nodes, each child node representing a fan. [all …]
|
| 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. 29 fan subnode format: 31 Under fan subnode there can upto 8 child nodes, with each child node 32 representing a fan. If there are 8 fans each fan can have one PWM port and 33 one/two Fan tach inputs. 45 - aspeed,fan-tach-ch : should specify the Fan tach input channel. [all …]
|
| /kernel/linux/linux-5.10/drivers/hwmon/ |
| D | mlxreg-fan.c | 20 * Minimum and maximum FAN allowed speed in percent: from 20% to 100%. Values 22 * setting FAN speed dynamic minimum. For example, if value is set to 14 (40%) 34 * FAN datasheet defines the formula for RPM calculations as RPM = 15/t-high. 116 struct mlxreg_fan *fan = dev_get_drvdata(dev); in mlxreg_fan_read() local 123 tacho = &fan->tacho[channel]; in mlxreg_fan_read() 126 err = regmap_read(fan->regmap, tacho->reg, ®val); in mlxreg_fan_read() 130 *val = MLXREG_FAN_GET_RPM(regval, fan->divider, in mlxreg_fan_read() 131 fan->samples); in mlxreg_fan_read() 135 err = regmap_read(fan->regmap, tacho->reg, ®val); in mlxreg_fan_read() 150 err = regmap_read(fan->regmap, fan->pwm.reg, ®val); in mlxreg_fan_read() [all …]
|
| /kernel/linux/linux-4.19/drivers/hwmon/ |
| D | mlxreg-fan.c | 20 * Minimum and maximum FAN allowed speed in percent: from 20% to 100%. Values 22 * setting FAN speed dynamic minimum. For example, if value is set to 14 (40%) 32 * FAN datasheet defines the formula for RPM calculations as RPM = 15/t-high. 114 struct mlxreg_fan *fan = dev_get_drvdata(dev); in mlxreg_fan_read() local 121 tacho = &fan->tacho[channel]; in mlxreg_fan_read() 124 err = regmap_read(fan->regmap, tacho->reg, ®val); in mlxreg_fan_read() 128 *val = MLXREG_FAN_GET_RPM(regval, fan->divider, in mlxreg_fan_read() 129 fan->samples); in mlxreg_fan_read() 133 err = regmap_read(fan->regmap, tacho->reg, ®val); in mlxreg_fan_read() 148 err = regmap_read(fan->regmap, fan->pwm.reg, ®val); in mlxreg_fan_read() [all …]
|
| /kernel/linux/linux-4.19/Documentation/hwmon/ |
| D | g762 | 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 19 fan revolution, ...); Those can be modified via devicetree bindings 24 fan1_target: set desired fan speed. This only makes sense in closed-loop 25 fan speed control (i.e. when pwm1_enable is set to 2). 27 fan1_input: provide current fan rotation value in RPM as reported by 28 the fan to the device. 30 fan1_div: fan clock divisor. Supported value are 1, 2, 4 and 8. 32 fan1_pulses: number of pulses per fan revolution. Supported values 35 fan1_fault: reports fan failure, i.e. no transition on fan gear pin for [all …]
|
| D | nct6775 | 62 There are 4 to 5 fan rotation speed sensors, 8 to 15 analog voltage sensors, 64 fan regulation strategies (plus manual fan control mode). 75 Fan rotation speeds are reported in RPM (rotations per minute). An alarm is 77 NCT6775F, fan readings can be divided by a programmable divider (1, 2, 4, 8, 79 do not have a fan speed divider. The driver sets the most suitable fan divisor 80 itself; specifically, it increases the divider value each time a fan speed 81 reading returns an invalid value, and it reduces it if the fan speed reading 89 The driver supports automatic fan control mode known as Thermal Cruise. 91 predefined temperature range. If the temperature goes out of range, fan 99 pwm[1-7] - this file stores PWM duty cycle or DC value (fan speed) in range: [all …]
|
| /kernel/linux/linux-5.10/Documentation/hwmon/ |
| 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 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. 33 fan clock divisor. Supported value are 1, 2, 4 and 8. 36 number of pulses per fan revolution. Supported values 40 reports fan failure, i.e. no transition on fan gear pin for [all …]
|
| D | nct6775.rst | 100 There are 4 to 5 fan rotation speed sensors, 8 to 15 analog voltage sensors, 102 fan regulation strategies (plus manual fan control mode). 113 Fan rotation speeds are reported in RPM (rotations per minute). An alarm is 115 NCT6775F, fan readings can be divided by a programmable divider (1, 2, 4, 8, 117 do not have a fan speed divider. The driver sets the most suitable fan divisor 118 itself; specifically, it increases the divider value each time a fan speed 119 reading returns an invalid value, and it reduces it if the fan speed reading 127 The driver supports automatic fan control mode known as Thermal Cruise. 129 predefined temperature range. If the temperature goes out of range, fan 138 - this file stores PWM duty cycle or DC value (fan speed) in range: [all …]
|
| D | w83792d.rst | 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 56 255 means maximum fan speed. 63 Fan rotation speeds are reported in RPM (rotations per minute). An alarm is 64 triggered if the rotation speed has dropped below a programmable limit. Fan 105 of full speed rotation of corresponding fan. [all …]
|
| /kernel/linux/linux-5.10/drivers/acpi/ |
| D | fan.c | 3 * acpi_fan.c - ACPI Fan Driver ($Revision: 29 $) 19 #include "fan.h" 22 MODULE_DESCRIPTION("ACPI Fan Driver"); 79 .name = "acpi-fan", 90 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_max_state() local 92 if (fan->acpi4) in fan_get_max_state() 93 *state = fan->fps_count - 1; in fan_get_max_state() 102 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_state_acpi4() local 109 dev_err(&device->dev, "Get fan state failed\n"); in fan_get_state_acpi4() 123 for (i = 0; i < fan->fps_count; i++) { in fan_get_state_acpi4() [all …]
|
| /kernel/linux/linux-4.19/drivers/acpi/ |
| D | fan.c | 2 * acpi_fan.c - ACPI Fan Driver ($Revision: 29 $) 33 MODULE_DESCRIPTION("ACPI Fan Driver"); 87 .name = "acpi-fan", 98 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_max_state() local 100 if (fan->acpi4) in fan_get_max_state() 101 *state = fan->fps_count - 1; in fan_get_max_state() 110 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_state_acpi4() local 117 dev_err(&device->dev, "Get fan state failed\n"); in fan_get_state_acpi4() 131 for (i = 0; i < fan->fps_count; i++) { in fan_get_state_acpi4() 134 * corresponding to maximum fan->fps[i].control in fan_get_state_acpi4() [all …]
|