/linux-6.1.9/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 | 56 struct i2c_client *fan; member 157 write_reg( x.fan, 0x25, val, 1 ); in tune_fan() 158 write_reg( x.fan, 0x20, 0, 1 ); in tune_fan() 178 casetemp = read_reg(x.fan, 0x0b, 1) << 8; in poll_temp() 179 casetemp |= (read_reg(x.fan, 0x06, 1) & 0x7) << 5; in poll_temp() 214 x.r0 = read_reg( x.fan, 0x00, 1 ); in setup_hardware() 215 x.r1 = read_reg( x.fan, 0x01, 1 ); in setup_hardware() 216 x.r20 = read_reg( x.fan, 0x20, 1 ); in setup_hardware() 217 x.r23 = read_reg( x.fan, 0x23, 1 ); in setup_hardware() 218 x.r25 = read_reg( x.fan, 0x25, 1 ); in setup_hardware() [all …]
|
/linux-6.1.9/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 …]
|
/linux-6.1.9/drivers/platform/x86/ |
D | gpd-pocket-fan.c | 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() 63 fan->last_speed = speed; in gpd_pocket_fan_set_speed() 76 struct gpd_pocket_fan_data *fan = in gpd_pocket_fan_worker() local 80 if (thermal_zone_get_temp(fan->dts0, &t0) || in gpd_pocket_fan_worker() 81 thermal_zone_get_temp(fan->dts1, &t1)) { in gpd_pocket_fan_worker() 82 dev_warn(fan->dev, "Error getting temperature\n"); in gpd_pocket_fan_worker() 89 speed = fan->last_speed; in gpd_pocket_fan_worker() [all …]
|
/linux-6.1.9/drivers/hwmon/ |
D | mlxreg-fan.c | 86 struct mlxreg_fan *fan; member 123 struct mlxreg_fan *fan = dev_get_drvdata(dev); in mlxreg_fan_read() local 131 tacho = &fan->tacho[channel]; in mlxreg_fan_read() 138 if (tacho->prsnt && fan->tachos_per_drwr) { in mlxreg_fan_read() 139 err = regmap_read(fan->regmap, tacho->prsnt, ®val); in mlxreg_fan_read() 147 if (BIT(channel / fan->tachos_per_drwr) & regval) { in mlxreg_fan_read() 154 err = regmap_read(fan->regmap, tacho->reg, ®val); in mlxreg_fan_read() 158 *val = MLXREG_FAN_GET_RPM(regval, fan->divider, in mlxreg_fan_read() 159 fan->samples); in mlxreg_fan_read() 163 err = regmap_read(fan->regmap, tacho->reg, ®val); in mlxreg_fan_read() [all …]
|
/linux-6.1.9/drivers/acpi/ |
D | fan_core.c | 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() 80 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_state_acpi4() local 88 if (fan->fif.fine_grain_ctrl) { in fan_get_state_acpi4() 95 *state = (int) fst.control / fan->fif.step_size; in fan_get_state_acpi4() 100 for (i = 0; i < fan->fps_count; i++) { in fan_get_state_acpi4() 101 if (fst.control == fan->fps[i].control) in fan_get_state_acpi4() [all …]
|
D | fan_attr.c | 68 struct acpi_fan *fan = acpi_driver_data(acpi_dev); in show_fine_grain_control() local 70 return sprintf(buf, "%d\n", fan->fif.fine_grain_ctrl); in show_fine_grain_control() 75 struct acpi_fan *fan = acpi_driver_data(device); in acpi_fan_create_attributes() local 78 sysfs_attr_init(&fan->fine_grain_control.attr); in acpi_fan_create_attributes() 79 fan->fine_grain_control.show = show_fine_grain_control; in acpi_fan_create_attributes() 80 fan->fine_grain_control.store = NULL; in acpi_fan_create_attributes() 81 fan->fine_grain_control.attr.name = "fine_grain_control"; in acpi_fan_create_attributes() 82 fan->fine_grain_control.attr.mode = 0444; in acpi_fan_create_attributes() 83 status = sysfs_create_file(&device->dev.kobj, &fan->fine_grain_control.attr); in acpi_fan_create_attributes() 88 sysfs_attr_init(&fan->fst_speed.attr); in acpi_fan_create_attributes() [all …]
|
/linux-6.1.9/arch/arm/boot/dts/ |
D | aspeed-bmc-amd-daytonax.dts | 231 fan@0 { 233 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 236 fan@1 { 238 aspeed,fan-tach-ch = /bits/ 8 <0x01>; 241 fan@2 { 243 aspeed,fan-tach-ch = /bits/ 8 <0x02>; 246 fan@3 { 248 aspeed,fan-tach-ch = /bits/ 8 <0x03>; 251 fan@4 { 253 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-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 …]
|
D | aspeed-bmc-facebook-wedge40.dts | 34 fan@0 { 36 aspeed,fan-tach-ch = /bits/ 8 <0x00 0x01>; 39 fan@1 { 41 aspeed,fan-tach-ch = /bits/ 8 <0x02 0x03>; 44 fan@6 { 46 aspeed,fan-tach-ch = /bits/ 8 <0x04 0x05>; 49 fan@7 { 51 aspeed,fan-tach-ch = /bits/ 8 <0x06 0x07>;
|
/linux-6.1.9/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 …]
|
/linux-6.1.9/Documentation/devicetree/bindings/hwmon/ |
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 11 - interrupts : This contains an interrupt specifier for each fan 14 interrupts per fan revolution, which require that 17 - pulses-per-revolution : define the number of pulses per fan revolution for 23 fan0: pwm-fan { 24 compatible = "pwm-fan"; 51 fan0: pwm-fan { [all …]
|
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 | 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>,
|
/linux-6.1.9/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 | dell-smm-hwmon.rst | 18 automatically adjust fan speed (please notice that it currently uses 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 39 fan[1-3]_target RO Expected Fan speed in RPM 40 pwm[1-3] RW Control the fan PWM duty-cycle. 41 pwm1_enable WO Enable or disable automatic BIOS fan 50 fan number X. 52 Disabling automatic BIOS fan control [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 41 fan[1-6]_enable RW enable or disable the tachometer input
|