/kernel/linux/linux-5.10/drivers/macintosh/ |
D | windfarm_fcu_controls.c | 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() 156 fan->target = value; in wf_fcu_fan_set_rpm() [all …]
|
D | therm_windtunnel.c | 57 struct i2c_client *fan; member 158 write_reg( x.fan, 0x25, val, 1 ); in tune_fan() 159 write_reg( x.fan, 0x20, 0, 1 ); in tune_fan() 179 casetemp = read_reg(x.fan, 0x0b, 1) << 8; in poll_temp() 180 casetemp |= (read_reg(x.fan, 0x06, 1) & 0x7) << 5; in poll_temp() 215 x.r0 = read_reg( x.fan, 0x00, 1 ); in setup_hardware() 216 x.r1 = read_reg( x.fan, 0x01, 1 ); in setup_hardware() 217 x.r20 = read_reg( x.fan, 0x20, 1 ); in setup_hardware() 218 x.r23 = read_reg( x.fan, 0x23, 1 ); in setup_hardware() 219 x.r25 = read_reg( x.fan, 0x25, 1 ); in setup_hardware() [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ |
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 | fan.c | 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() 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() 49 fan->percent = target; in nvkm_fan_update() 53 duty = fan->get(therm); in nvkm_fan_update() 55 spin_unlock_irqrestore(&fan->lock, flags); in nvkm_fan_update() [all …]
|
D | fanpwm.c | 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() 75 if (card_type <= NV_40 || (fan->func.log[0] & 1)) in nvkm_fanpwm_set() [all …]
|
D | base.c | 40 struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, in nvkm_therm_update_trip() 48 for (i = 0; i < therm->fan->bios.nr_fan_trip; i++) { in nvkm_therm_update_trip() 78 return therm->fan->bios.min_duty; in nvkm_therm_compute_linear_duty() 80 return therm->fan->bios.max_duty; in nvkm_therm_compute_linear_duty() 84 duty *= (therm->fan->bios.max_duty - therm->fan->bios.min_duty); in nvkm_therm_compute_linear_duty() 86 duty += therm->fan->bios.min_duty; in nvkm_therm_compute_linear_duty() 93 u8 min = therm->fan->bios.linear_min_temp; in nvkm_therm_update_linear() 94 u8 max = therm->fan->bios.linear_max_temp; in nvkm_therm_update_linear() 129 switch(therm->fan->bios.fan_mode) { in nvkm_therm_update() 164 nvkm_therm_cstate(struct nvkm_therm *therm, int fan, int dir) in nvkm_therm_cstate() argument [all …]
|
/kernel/linux/linux-5.10/drivers/platform/x86/ |
D | gpd-pocket-fan.c | 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 79 if (thermal_zone_get_temp(fan->dts0, &t0) || in gpd_pocket_fan_worker() 80 thermal_zone_get_temp(fan->dts1, &t1)) { in gpd_pocket_fan_worker() 81 dev_warn(fan->dev, "Error getting temperature\n"); in gpd_pocket_fan_worker() 88 speed = fan->last_speed; in gpd_pocket_fan_worker() [all …]
|
/kernel/linux/linux-5.10/drivers/hwmon/ |
D | mlxreg-fan.c | 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() 173 struct mlxreg_fan *fan = dev_get_drvdata(dev); in mlxreg_fan_write() local 182 return regmap_write(fan->regmap, fan->pwm.reg, val); in mlxreg_fan_write() 233 HWMON_CHANNEL_INFO(fan, [all …]
|
/kernel/linux/linux-5.10/drivers/acpi/ |
D | fan.c | 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 123 for (i = 0; i < fan->fps_count; i++) { in fan_get_state_acpi4() 130 if (fan->fif.fine_grain_ctrl && control < fan->fps[i].control) { in fan_get_state_acpi4() 133 } else if (control == fan->fps[i].control) { in fan_get_state_acpi4() 137 if (i == fan->fps_count) { in fan_get_state_acpi4() 169 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_cur_state() local 171 if (fan->acpi4) in fan_get_cur_state() [all …]
|
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
D | fan.c | 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 75 fan->type = NVBIOS_THERM_FAN_TOGGLE; in nvbios_fan_parse() [all …]
|
D | therm.c | 153 nvbios_therm_fan_parse(struct nvkm_bios *bios, struct nvbios_therm_fan *fan) in nvbios_therm_fan_parse() argument 163 fan->nr_fan_trip = 0; in nvbios_therm_fan_parse() 164 fan->fan_mode = NVBIOS_THERM_FAN_OTHER; in nvbios_therm_fan_parse() 170 fan->min_duty = value & 0xff; in nvbios_therm_fan_parse() 171 fan->max_duty = (value & 0xff00) >> 8; in nvbios_therm_fan_parse() 174 fan->nr_fan_trip++; in nvbios_therm_fan_parse() 175 if (fan->fan_mode > NVBIOS_THERM_FAN_TRIP) in nvbios_therm_fan_parse() 176 fan->fan_mode = NVBIOS_THERM_FAN_TRIP; in nvbios_therm_fan_parse() 177 cur_trip = &fan->trip[fan->nr_fan_trip - 1]; in nvbios_therm_fan_parse() 183 cur_trip = &fan->trip[fan->nr_fan_trip - 1]; in nvbios_therm_fan_parse() [all …]
|
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/hwmon/ |
D | npcm750-pwm-fan.txt | 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. 23 fan subnode format: 25 Under fan subnode can be upto 8 child nodes, each child node representing a fan. 26 Each fan subnode must have one PWM channel and atleast one Fan tach channel. 36 - fan-tach-ch : specify the Fan tach input channel. 38 the fan tach channel number that used. 48 pwm_fan:pwm-fan-controller@103000 { [all …]
|
D | pwm-fan.txt | 1 Bindings for a fan connected to the PWM lines 4 - compatible : "pwm-fan" 5 - pwms : the PWM that is used to control the PWM fan 10 - fan-supply : phandle to the regulator that provides power to the fan 12 describes the tachometer output of the fan as an 14 defined number of interrupts per fan revolution, which 17 - pulses-per-revolution : define the tachometer pulses per fan revolution as 22 fan0: pwm-fan { 23 compatible = "pwm-fan"; 50 fan0: pwm-fan { [all …]
|
D | max6650.txt | 1 Bindings for MAX6651 and MAX6650 I2C fan controllers 11 - maxim,fan-microvolt : The supply voltage of the fan, either 5000000 uV or 13 - maxim,fan-prescale : Pre-scaling value, as per datasheet [1]. Lower values 16 - maxim,fan-target-rpm: Initial requested fan rotation speed. If specified, the 18 This ensures the fan is already running before userspace 22 fan-max6650: max6650@1b { 25 maxim,fan-microvolt = <12000000>; 26 maxim,fan-prescale = <4>; 27 maxim,fan-target-rpm = <1200>;
|
D | gpio-fan.txt | 1 Bindings for fan connected to GPIO lines 4 - compatible : "gpio-fan" 9 - gpio-fan,speed-map: A mapping of possible fan RPM speeds and the 13 the fan, and a udev event will be fired. 17 min and max states are derived from the speed-map of the fan. 24 compatible = "gpio-fan"; 27 gpio-fan,speed-map = <0 0 33 compatible = "gpio-fan"; 36 gpio-fan,speed-map = <0 0>,
|
/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 | max31790.rst | 23 PWM outputs. The desired fan speeds (or PWM duty cycles) are written 25 or can be used to modulate the fan's power terminals using an external 28 Tachometer inputs monitor fan tachometer logic outputs for precise (+/-1%) 29 monitoring and control of fan RPM as well as detection of fan failure. 38 fan[1-12]_input RO fan tachometer speed in RPM 39 fan[1-12]_fault RO fan experienced fault 40 fan[1-6]_target RW desired fan speed in RPM
|
D | g760a.rst | 19 The GMT G760A Fan Speed PWM Controller is connected directly to a fan 20 and performs closed-loop control of the fan speed. 22 The fan speed is programmed by setting the period via 'pwm1' of two 26 Setting a period of 0 stops the fan; setting the period to 255 sets 27 fan to maximum speed. 29 The measured fan rotation speed returned via 'fan1_input' is derived 31 source and a 2 pulse-per-revolution fan. 34 the G760A chip's status register: Bit 0 is set when the actual fan 35 speed differs more than 20% with respect to the programmed fan speed; 36 bit 1 is set when fan speed is below 1920 RPM.
|
D | max31785.rst | 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. 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. 38 fan[1-4]_alarm Fan alarm. 39 fan[1-4]_fault Fan fault. 40 fan[1-8]_input Fan RPM. On the MAX31785A, inputs 5-8 correspond to the 42 fan[1-4]_target Fan input target 58 2: Automatic PWM (tach-feedback RPM fan-control) [all …]
|
/kernel/linux/linux-5.10/arch/arm/boot/dts/ |
D | aspeed-bmc-amd-ethanolx.dts | 177 fan@0 { 179 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 182 fan@1 { 184 aspeed,fan-tach-ch = /bits/ 8 <0x01>; 187 fan@2 { 189 aspeed,fan-tach-ch = /bits/ 8 <0x02>; 192 fan@3 { 194 aspeed,fan-tach-ch = /bits/ 8 <0x03>; 197 fan@4 { 199 aspeed,fan-tach-ch = /bits/ 8 <0x04>; [all …]
|
D | aspeed-bmc-lenovo-hr855xg2.dts | 340 fan@0 { 342 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 345 fan@1 { 347 aspeed,fan-tach-ch = /bits/ 8 <0x01>; 350 fan@2 { 352 aspeed,fan-tach-ch = /bits/ 8 <0x02>; 355 fan@3 { 357 aspeed,fan-tach-ch = /bits/ 8 <0x03>; 360 fan@4 { 362 aspeed,fan-tach-ch = /bits/ 8 <0x04>; [all …]
|
D | aspeed-bmc-lenovo-hr630.dts | 335 fan@0 { 337 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 340 fan@1 { 342 aspeed,fan-tach-ch = /bits/ 8 <0x01>; 345 fan@2 { 347 aspeed,fan-tach-ch = /bits/ 8 <0x02>; 350 fan@3 { 352 aspeed,fan-tach-ch = /bits/ 8 <0x03>; 355 fan@4 { 357 aspeed,fan-tach-ch = /bits/ 8 <0x04>; [all …]
|
D | aspeed-bmc-opp-swift.dts | 346 fan@0 { 347 compatible = "pmbus-fan"; 350 maxim,fan-rotor-input = "tach"; 351 maxim,fan-pwm-freq = <25000>; 352 maxim,fan-no-watchdog; 353 maxim,fan-no-fault-ramp; 354 maxim,fan-ramp = <2>; 355 maxim,fan-fault-pin-mon; 358 fan@1 { 359 compatible = "pmbus-fan"; [all …]
|
D | aspeed-bmc-opp-tacoma.dts | 477 fan@0 { 478 compatible = "pmbus-fan"; 481 maxim,fan-rotor-input = "tach"; 482 maxim,fan-pwm-freq = <25000>; 483 maxim,fan-dual-tach; 484 maxim,fan-no-watchdog; 485 maxim,fan-no-fault-ramp; 486 maxim,fan-ramp = <2>; 487 maxim,fan-fault-pin-mon; 490 fan@1 { [all …]
|
D | aspeed-bmc-microsoft-olympus.dts | 177 fan@0 { 179 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 182 fan@1 { 184 aspeed,fan-tach-ch = /bits/ 8 <0x01>; 187 fan@2 { 189 aspeed,fan-tach-ch = /bits/ 8 <0x02>; 192 fan@3 { 194 aspeed,fan-tach-ch = /bits/ 8 <0x03>; 197 fan@4 { 199 aspeed,fan-tach-ch = /bits/ 8 <0x04>; [all …]
|