/Linux-v4.19/drivers/platform/x86/ |
D | gpd-pocket-fan.c | 44 static void gpd_pocket_fan_set_speed(struct gpd_pocket_fan_data *fan, int speed) in gpd_pocket_fan_set_speed() argument 46 if (speed == fan->last_speed) in gpd_pocket_fan_set_speed() 49 gpiod_direction_output(fan->gpio0, !!(speed & 1)); in gpd_pocket_fan_set_speed() 50 gpiod_direction_output(fan->gpio1, !!(speed & 2)); in gpd_pocket_fan_set_speed() 52 fan->last_speed = speed; in gpd_pocket_fan_set_speed() 65 struct gpd_pocket_fan_data *fan = in gpd_pocket_fan_worker() local 69 if (thermal_zone_get_temp(fan->dts0, &t0) || in gpd_pocket_fan_worker() 70 thermal_zone_get_temp(fan->dts1, &t1)) { in gpd_pocket_fan_worker() 71 dev_warn(fan->dev, "Error getting temperature\n"); in gpd_pocket_fan_worker() 78 speed = fan->last_speed; in gpd_pocket_fan_worker() [all …]
|
/Linux-v4.19/drivers/macintosh/ |
D | windfarm_fcu_controls.c | 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() 157 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 …]
|
/Linux-v4.19/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 | 38 struct nvbios_therm_trip_point *trip = therm->fan->bios.trip, in nvkm_therm_update_trip() 46 for (i = 0; i < therm->fan->bios.nr_fan_trip; i++) { in nvkm_therm_update_trip() 76 return therm->fan->bios.min_duty; in nvkm_therm_compute_linear_duty() 78 return therm->fan->bios.max_duty; in nvkm_therm_compute_linear_duty() 82 duty *= (therm->fan->bios.max_duty - therm->fan->bios.min_duty); in nvkm_therm_compute_linear_duty() 84 duty += therm->fan->bios.min_duty; in nvkm_therm_compute_linear_duty() 91 u8 min = therm->fan->bios.linear_min_temp; in nvkm_therm_update_linear() 92 u8 max = therm->fan->bios.linear_max_temp; in nvkm_therm_update_linear() 127 switch(therm->fan->bios.fan_mode) { in nvkm_therm_update() 161 nvkm_therm_cstate(struct nvkm_therm *therm, int fan, int dir) in nvkm_therm_cstate() argument [all …]
|
/Linux-v4.19/drivers/hwmon/ |
D | mlxreg-fan.c | 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() 171 struct mlxreg_fan *fan = dev_get_drvdata(dev); in mlxreg_fan_write() local 180 return regmap_write(fan->regmap, fan->pwm.reg, val); in mlxreg_fan_write() 289 struct mlxreg_fan *fan = cdev->devdata; in mlxreg_fan_get_cur_state() local [all …]
|
/Linux-v4.19/drivers/acpi/ |
D | fan.c | 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 131 for (i = 0; i < fan->fps_count; i++) { in fan_get_state_acpi4() 138 if (fan->fif.fine_grain_ctrl && control < fan->fps[i].control) { in fan_get_state_acpi4() 141 } else if (control == fan->fps[i].control) { in fan_get_state_acpi4() 145 if (i == fan->fps_count) { in fan_get_state_acpi4() 177 struct acpi_fan *fan = acpi_driver_data(device); in fan_get_cur_state() local 179 if (fan->acpi4) in fan_get_cur_state() [all …]
|
/Linux-v4.19/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-v4.19/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 | 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. 16 min and max states are derived from the speed-map of the fan. 23 compatible = "gpio-fan"; 26 gpio-fan,speed-map = <0 0 32 compatible = "gpio-fan"; 35 gpio-fan,speed-map = <0 0>,
|
D | aspeed-pwm-tacho.txt | 6 There can be upto 8 fans supported. Each fan can have one PWM output and 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 45 - aspeed,fan-tach-ch : should specify the Fan tach input channel. 63 fan@0 { 66 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 69 fan@1 { 71 aspeed,fan-tach-ch = /bits/ 8 <0x01 0x02>;
|
/Linux-v4.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 | max31790 | 19 PWM outputs. The desired fan speeds (or PWM duty cycles) are written 21 or can be used to modulate the fan's power terminals using an external 24 Tachometer inputs monitor fan tachometer logic outputs for precise (+/-1%) 25 monitoring and control of fan RPM as well as detection of fan failure. 33 fan[1-12]_input RO fan tachometer speed in RPM 34 fan[1-12]_fault RO fan experienced fault 35 fan[1-6]_target RW desired fan speed in RPM 37 pwm[1-6] RW fan target duty cycle (0-255)
|
D | g760a | 15 The GMT G760A Fan Speed PWM Controller is connected directly to a fan 16 and performs closed-loop control of the fan speed. 18 The fan speed is programmed by setting the period via 'pwm1' of two 22 Setting a period of 0 stops the fan; setting the period to 255 sets 23 fan to maximum speed. 25 The measured fan rotation speed returned via 'fan1_input' is derived 27 source and a 2 pulse-per-revolution fan. 30 the G760A chip's status register: Bit 0 is set when the actual fan 31 speed differs more than 20% with respect to the programmed fan speed; 32 bit 1 is set when fan speed is below 1920 RPM.
|
D | max31785 | 15 The Maxim MAX31785 is a PMBus device providing closed-loop, multi-channel fan 16 management with temperature and remote voltage sensing. Various fan control 18 dual tachometer measurements, and fan health monitoring. 21 readings in attributes fan[5-8]_input. By contrast the MAX31785 only exposes 22 the slowest rotor measurement, and does so in the fan[1-4]_input attributes. 33 fan[1-4]_alarm Fan alarm. 34 fan[1-4]_fault Fan fault. 35 fan[1-8]_input Fan RPM. On the MAX31785A, inputs 5-8 correspond to the 37 fan[1-4]_target Fan input target 53 2: Automatic PWM (tach-feedback RPM fan-control) [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). 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: 102 pwm[1-7]_enable - this file controls mode of fan/temperature control: [all …]
|
D | adm9240 | 41 temperature, two fan speeds and chassis intrusion. Measured values can 63 with independent fan speed measurement cycles counting alternating rising 64 edges of the fan tacho inputs. 66 DS1780 measurement cycle is about once per second including fan speed. 68 LM81 measurement cycle is about once per 400ms including fan speed. 82 Two fan tacho inputs are provided, the ADM9240 gates an internal 22.5kHz 87 Automatic fan clock divider 91 - fan clock divider not changed 92 - auto fan clock adjuster enabled for valid fan speed reading 96 - fan clock divider set to max [all …]
|
D | f71882fg | 71 These chips also have fan controlling features, using either DC or PWM, in 88 Both PWM (pulse-width modulation) and DC fan speed control methods are 99 There are 2 modes to specify the speed of the fan, PWM duty cycle (or DC 101 mode where the actual RPM of the fan (as measured) is controlled and the speed 102 gets specified as 0-100% of the fan#_full_speed file. 105 whole lot of a difference when modifying fan control settings. The only 106 important difference is that in RPM mode the 0-100% controls the fan speed 107 between 0-100% of fan#_full_speed. It is assumed that if the BIOS programs 108 RPM mode, it will also set fan#_full_speed properly, if it does not then 109 fan control will not work properly, unless you set a sane fan#_full_speed [all …]
|
/Linux-v4.19/arch/arm/boot/dts/ |
D | aspeed-bmc-opp-romulus.dts | 238 fan@0 { 240 aspeed,fan-tach-ch = /bits/ 8 <0x08>; 243 fan@1 { 245 aspeed,fan-tach-ch = /bits/ 8 <0x09>; 248 fan@2 { 250 aspeed,fan-tach-ch = /bits/ 8 <0x0a>; 253 fan@3 { 255 aspeed,fan-tach-ch = /bits/ 8 <0x0b>; 258 fan@4 { 260 aspeed,fan-tach-ch = /bits/ 8 <0x0c>; [all …]
|
D | aspeed-bmc-quanta-q71l.dts | 357 fan@0 { 359 aspeed,fan-tach-ch = /bits/ 8 <0x00>; 362 fan@1 { 364 aspeed,fan-tach-ch = /bits/ 8 <0x01>; 367 fan@2 { 369 aspeed,fan-tach-ch = /bits/ 8 <0x02>; 372 fan@3 { 374 aspeed,fan-tach-ch = /bits/ 8 <0x03>; 377 fan@4 { 379 aspeed,fan-tach-ch = /bits/ 8 <0x04>; [all …]
|
/Linux-v4.19/Documentation/thermal/ |
D | nouveau_thermal | 12 This driver allows to read the GPU core temperature, drive the GPU fan and 17 have one of those, temperature and/or fan management through Nouveau's HWMON 51 Not all cards have a drivable fan. If you do, then the following HWMON 54 * pwm1_enable: Current fan management mode (NONE, MANUAL or AUTO); 61 * fan1_input: Speed in RPM of your fan. 63 Your fan can be driven in different modes: 65 * 0: The fan is left untouched; 66 * 1: The fan can be driven in manual (use pwm1 to change the speed); 67 * 2; The fan is driven automatically depending on the temperature. 69 NOTE: Be sure to use the manual mode if you want to drive the fan speed manually [all …]
|