Home
last modified time | relevance | path

Searched refs:fan (Results 1 – 25 of 71) sorted by relevance

123

/drivers/macintosh/
Dwindfarm_fcu_controls.c81 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 …]
Dtherm_windtunnel.c57 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 …]
Dwindfarm_smu_controls.c259 struct device_node *smu, *fans, *fan; in smu_controls_init() local
273 for (fan = NULL; in smu_controls_init()
274 fans && (fan = of_get_next_child(fans, fan)) != NULL;) { in smu_controls_init()
277 fct = smu_fan_create(fan, 0); in smu_controls_init()
280 "RPM fan %s\n", fan->name); in smu_controls_init()
292 for (fan = NULL; in smu_controls_init()
293 fans && (fan = of_get_next_child(fans, fan)) != NULL;) { in smu_controls_init()
296 fct = smu_fan_create(fan, 1); in smu_controls_init()
299 "PWM fan %s\n", fan->name); in smu_controls_init()
Dtherm_adt746x.c91 static void write_fan_speed(struct thermostat *th, int speed, int fan);
148 static void write_fan_speed(struct thermostat *th, int speed, int fan) in write_fan_speed() argument
157 if (th->type == ADT7467 && fan == 1) in write_fan_speed()
160 if (th->last_speed[fan] != speed) { in write_fan_speed()
164 "for %s fan.\n", sensor_location[fan+1]); in write_fan_speed()
167 "for %s fan.\n", speed, sensor_location[fan+1]); in write_fan_speed()
173 manual = read_reg(th, MANUAL_MODE[fan]); in write_fan_speed()
175 write_reg(th, MANUAL_MODE[fan], in write_fan_speed()
176 manual | MANUAL_MASK | th->pwm_inv[fan]); in write_fan_speed()
177 write_reg(th, FAN_SPD_SET[fan], speed); in write_fan_speed()
[all …]
/drivers/gpu/drm/nouveau/core/subdev/therm/
Dfan.c35 nouveau_fan_update(struct nouveau_fan *fan, bool immediate, int target) in nouveau_fan_update() argument
37 struct nouveau_therm *therm = fan->parent; in nouveau_fan_update()
45 spin_lock_irqsave(&fan->lock, flags); in nouveau_fan_update()
47 target = fan->percent; in nouveau_fan_update()
48 target = max_t(u8, target, fan->bios.min_duty); in nouveau_fan_update()
49 target = min_t(u8, target, fan->bios.max_duty); in nouveau_fan_update()
50 if (fan->percent != target) { in nouveau_fan_update()
52 fan->percent = target; in nouveau_fan_update()
56 duty = fan->get(therm); in nouveau_fan_update()
75 ret = fan->set(therm, duty); in nouveau_fan_update()
[all …]
Dbase.c36 struct nouveau_therm_trip_point *trip = priv->fan->bios.trip, in nouveau_therm_update_trip()
44 for (i = 0; i < priv->fan->bios.nr_fan_trip; i++) { in nouveau_therm_update_trip()
69 u8 linear_min_temp = priv->fan->bios.linear_min_temp; in nouveau_therm_update_linear()
70 u8 linear_max_temp = priv->fan->bios.linear_max_temp; in nouveau_therm_update_linear()
76 return priv->fan->bios.min_duty; in nouveau_therm_update_linear()
78 return priv->fan->bios.max_duty; in nouveau_therm_update_linear()
82 duty *= (priv->fan->bios.max_duty - priv->fan->bios.min_duty); in nouveau_therm_update_linear()
84 duty += priv->fan->bios.min_duty; in nouveau_therm_update_linear()
109 if (priv->fan->bios.nr_fan_trip) in nouveau_therm_update()
173 return priv->fan->bios.min_duty; in nouveau_therm_attr_get()
[all …]
Dfantog.c80 struct nouveau_fantog_priv *priv = (void *)tpriv->fan; in nouveau_fantog_get()
88 struct nouveau_fantog_priv *priv = (void *)tpriv->fan; in nouveau_fantog_set()
102 tpriv->fan = &priv->base; in nouveau_fantog_create()
Dfanpwm.c40 struct nouveau_fanpwm_priv *priv = (void *)tpriv->fan; in nouveau_fanpwm_get()
61 struct nouveau_fanpwm_priv *priv = (void *)tpriv->fan; in nouveau_fanpwm_set()
98 tpriv->fan = &priv->base; in nouveau_fanpwm_create()
Dnvd0.c110 if (priv->base.fan->tach.func != DCB_GPIO_UNUSED) { in nvd0_therm_init()
111 nv_mask(priv, 0x00d79c, 0x000000ff, priv->base.fan->tach.line); in nvd0_therm_init()
/drivers/gpu/drm/nouveau/core/subdev/bios/
Dtherm.c156 struct nvbios_therm_fan *fan) in nvbios_therm_fan_parse() argument
166 fan->nr_fan_trip = 0; in nvbios_therm_fan_parse()
172 fan->min_duty = value & 0xff; in nvbios_therm_fan_parse()
173 fan->max_duty = (value & 0xff00) >> 8; in nvbios_therm_fan_parse()
176 fan->nr_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()
187 fan->pwm_freq = value; in nvbios_therm_fan_parse()
190 fan->bump_period = value; in nvbios_therm_fan_parse()
193 fan->slow_down_period = value; in nvbios_therm_fan_parse()
[all …]
Dperf.c62 struct nvbios_perf_fan *fan) in nvbios_perf_fan_parse() argument
70 fan->pwm_divisor = nv_ro16(bios, perf + 6); in nvbios_perf_fan_parse()
72 fan->pwm_divisor = 0; in nvbios_perf_fan_parse()
/drivers/hwmon/
Dultra45_env.c147 #define fan(index) \ macro
148 static SENSOR_DEVICE_ATTR(fan##index##_speed, S_IRUGO | S_IWUSR, \
150 static SENSOR_DEVICE_ATTR(fan##index##_fault, S_IRUGO, \
153 fan(0);
154 fan(1);
155 fan(2);
156 fan(3);
157 fan(4);
Dadm9240.c173 u8 fan[2]; /* ro fan1_input */ member
322 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[attr->index], in show_fan()
430 #define fan(nr) \ macro
431 static SENSOR_DEVICE_ATTR(fan##nr##_input, S_IRUGO, \
433 static SENSOR_DEVICE_ATTR(fan##nr##_div, S_IRUGO, \
435 static SENSOR_DEVICE_ATTR(fan##nr##_min, S_IRUGO | S_IWUSR, \
438 fan(1);
439 fan(2);
740 data->fan[i] = i2c_smbus_read_byte_data(client, in adm9240_update_device()
744 if (data->valid && data->fan[i] == 255 && in adm9240_update_device()
Demc6w201.c67 u16 fan[2][5]; member
169 data->fan[input][nr] = in emc6w201_update_device()
172 data->fan[min][nr] = in emc6w201_update_device()
275 if (data->fan[sf][nr] == 0 || data->fan[sf][nr] == 0xFFFF) in show_fan()
278 rpm = 5400000U / data->fan[sf][nr]; in show_fan()
305 data->fan[sf][nr] = val; in set_fan()
307 data->fan[sf][nr]); in set_fan()
Dadm1029.c154 u8 fan[ARRAY_SIZE(ADM1029_REG_FAN)]; member
176 if (data->fan[attr->index] == 0 in show_fan()
178 || data->fan[attr->index] == 255) { in show_fan()
183 / data->fan[attr->index]; in show_fan()
431 data->fan[nr] = in adm1029_update_device()
Dsmsc47b397.c112 u16 fan[4]; member
143 data->fan[i] = smsc47b397_read_value(data, in smsc47b397_update_device()
145 data->fan[i] |= smsc47b397_read_value(data, in smsc47b397_update_device()
198 return sprintf(buf, "%d\n", fan_from_reg(data->fan[attr->index])); in show_fan()
Dabituguru3.c955 SENSOR_ATTR_2(fan%d_input, 0444, show_value, NULL, 0, 0),
956 SENSOR_ATTR_2(fan%d_min, 0444, show_value, NULL, 1, 0),
957 SENSOR_ATTR_2(fan%d_alarm, 0444, show_alarm, NULL, 0, 0),
958 SENSOR_ATTR_2(fan%d_beep, 0444, show_mask, NULL,
960 SENSOR_ATTR_2(fan%d_shutdown, 0444, show_mask, NULL,
962 SENSOR_ATTR_2(fan%d_alarm_enable, 0444, show_mask, NULL,
964 SENSOR_ATTR_2(fan%d_label, 0444, show_label, NULL, 0, 0)
Dvt8231.c170 u8 fan[2]; /* Register value */ member
502 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr], in show_fan()
595 static SENSOR_DEVICE_ATTR(fan##offset##_input, S_IRUGO, \
597 static SENSOR_DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, \
599 static SENSOR_DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \
900 data->fan[i] = vt8231_read_value(data, in vt8231_update_device()
928 if (!data->fan[0] && data->fan_min[0]) in vt8231_update_device()
930 else if (data->fan[0] && !data->fan_min[0]) in vt8231_update_device()
933 if (!data->fan[1] && data->fan_min[1]) in vt8231_update_device()
935 else if (data->fan[1] && !data->fan_min[1]) in vt8231_update_device()
Dsmsc47m1.c133 u8 fan[3]; /* Register value */ member
182 FAN_FROM_REG(data->fan[nr], in get_fan()
390 static SENSOR_DEVICE_ATTR(fan##offset##_input, S_IRUGO, get_fan, \
392 static SENSOR_DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \
394 static SENSOR_DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, \
396 static SENSOR_DEVICE_ATTR(fan##offset##_alarm, S_IRUGO, get_fan_alarm, \
826 data->fan[i] = smsc47m1_read_value(data, in smsc47m1_update_device()
Damc6821.c202 u16 fan[FAN1_IDX_LEN]; member
588 if (0 == data->fan[ix]) in get_fan()
590 return sprintf(buf, "%d\n", (int)(6000000 / data->fan[ix])); in get_fan()
624 data->fan[ix] = (u16) clamp_val(val, 1, 0xFFFF); in set_fan()
626 data->fan[ix] & 0xFF)) { in set_fan()
632 fan_reg_hi[ix], data->fan[ix] >> 8)) { in set_fan()
1009 data->fan[i] = i2c_smbus_read_byte_data( in amc6821_update_device()
1012 data->fan[i] += i2c_smbus_read_byte_data( in amc6821_update_device()
Dsis5595.c195 u8 fan[2]; /* Register value */ member
376 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr], in show_fan()
483 static SENSOR_DEVICE_ATTR(fan##offset##_input, S_IRUGO, \
485 static SENSOR_DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \
487 static SENSOR_DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, \
726 data->fan[i] = in sis5595_update_device()
Dvia686a.c327 u8 fan[2]; /* Register value */ member
512 return sprintf(buf, "%d\n", FAN_FROM_REG(data->fan[nr], in show_fan()
572 static SENSOR_DEVICE_ATTR(fan##offset##_input, S_IRUGO, \
574 static SENSOR_DEVICE_ATTR(fan##offset##_min, S_IRUGO | S_IWUSR, \
576 static SENSOR_DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, \
782 data->fan[i - 1] = in via686a_update_device()
/drivers/char/
Di8k.c238 static int i8k_get_fan_status(int fan) in i8k_get_fan_status() argument
242 regs.ebx = fan & 0xff; in i8k_get_fan_status()
249 static int i8k_get_fan_speed(int fan) in i8k_get_fan_speed() argument
253 regs.ebx = fan & 0xff; in i8k_get_fan_speed()
260 static int i8k_set_fan(int fan, int speed) in i8k_set_fan() argument
265 regs.ebx = (fan & 0xff) | (speed << 8); in i8k_set_fan()
267 return i8k_smm(&regs) ? : i8k_get_fan_status(fan); in i8k_set_fan()
/drivers/hwmon/pmbus/
Ducd9000.c55 static int ucd9000_get_fan_config(struct i2c_client *client, int fan) in ucd9000_get_fan_config() argument
61 if (data->fan_data[fan][3] & 1) in ucd9000_get_fan_config()
65 fan_config |= (data->fan_data[fan][3] & 0x06) >> 1; in ucd9000_get_fan_config()
/drivers/platform/x86/
Dacerhdf.c247 u8 fan; in acerhdf_get_fanstate() local
249 if (ec_read(bios_cfg->fanreg, &fan)) in acerhdf_get_fanstate()
252 if (fan != bios_cfg->cmd.cmd_off) in acerhdf_get_fanstate()

123