Home
last modified time | relevance | path

Searched refs:rpm (Results 1 – 25 of 32) sorted by relevance

12

/drivers/macintosh/
Dtherm_pm72.c497 static int set_rpm_fan(int fan_index, int rpm) in set_rpm_fan() argument
511 if (rpm < min) in set_rpm_fan()
512 rpm = min; in set_rpm_fan()
513 else if (rpm > max) in set_rpm_fan()
514 rpm = max; in set_rpm_fan()
515 buf[0] = rpm >> (8 - fcu_rpm_shift); in set_rpm_fan()
516 buf[1] = rpm << fcu_rpm_shift; in set_rpm_fan()
722 BUILD_SHOW_FUNC_INT(cpu0_exhaust_fan_rpm, processor_state[0].rpm)
728 BUILD_SHOW_FUNC_INT(cpu1_exhaust_fan_rpm, processor_state[1].rpm)
735 BUILD_SHOW_FUNC_INT(drives_fan_rpm, drives_state.rpm)
[all …]
Dtherm_pm72.h196 int rpm; member
300 int rpm; member
/drivers/hwmon/
Dultra45_env.c101 int rpm, period; in show_fan_speed() local
107 rpm = FAN_PERIOD_TO_RPM(period); in show_fan_speed()
109 rpm = 0; in show_fan_speed()
111 return sprintf(buf, "%d\n", rpm); in show_fan_speed()
118 unsigned long rpm; in set_fan_speed() local
124 err = kstrtoul(buf, 10, &rpm); in set_fan_speed()
128 if (!rpm) in set_fan_speed()
131 period = FAN_RPM_TO_PERIOD(rpm); in set_fan_speed()
Dmax6650.c159 int rpm; in get_fan() local
170 rpm = ((data->tach[attr->index] * 120) / DIV_FROM_REG(data->count)); in get_fan()
171 return sprintf(buf, "%d\n", rpm); in get_fan()
219 int kscale, ktach, rpm; in get_target() local
231 rpm = 60 * kscale * clock / (256 * (ktach + 1)); in get_target()
232 return sprintf(buf, "%d\n", rpm); in get_target()
241 unsigned long rpm; in set_target() local
244 err = kstrtoul(buf, 10, &rpm); in set_target()
248 rpm = clamp_val(rpm, FAN_RPM_MIN, FAN_RPM_MAX); in set_target()
260 ktach = ((clock * kscale) / (256 * rpm / 60)) - 1; in set_target()
Dgpio-fan.c175 static int rpm_to_speed_index(struct gpio_fan_data *fan_data, int rpm) in rpm_to_speed_index() argument
181 if (speed[i].rpm >= rpm) in rpm_to_speed_index()
267 return sprintf(buf, "%d\n", fan_data->speed[0].rpm); in show_rpm_min()
276 fan_data->speed[fan_data->num_speed - 1].rpm); in show_rpm_max()
284 return sprintf(buf, "%d\n", fan_data->speed[fan_data->speed_index].rpm); in show_rpm()
291 unsigned long rpm; in set_rpm() local
294 if (kstrtoul(buf, 10, &rpm)) in set_rpm()
304 set_fan_speed(fan_data, rpm_to_speed_index(fan_data, rpm)); in set_rpm()
457 speed[i].rpm = u; in gpio_fan_get_of_pdata()
Dg760a.c135 unsigned int rpm = 0; in show_fan() local
139 rpm = rpm_from_cnt(data->act_cnt, data->clk, data->fan_div); in show_fan()
142 return sprintf(buf, "%d\n", rpm); in show_fan()
Demc2103.c293 int rpm = 0; in show_fan() local
295 rpm = (FAN_RPM_FACTOR * data->fan_multiplier) / data->fan_tach; in show_fan()
296 return sprintf(buf, "%d\n", rpm); in show_fan()
378 int rpm = 0; in show_fan_target() local
382 rpm = (FAN_RPM_FACTOR * data->fan_multiplier) in show_fan_target()
385 return sprintf(buf, "%d\n", rpm); in show_fan_target()
Dlm80.c78 static inline unsigned char FAN_TO_REG(unsigned rpm, unsigned div) in FAN_TO_REG() argument
80 if (rpm == 0) in FAN_TO_REG()
82 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
83 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Dw83l786ng.c85 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
87 if (rpm == 0) in FAN_TO_REG()
89 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
90 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Dasb100.c126 static u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
128 if (rpm == -1) in FAN_TO_REG()
130 if (rpm == 0) in FAN_TO_REG()
132 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
133 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Dvia686a.c171 static inline u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
173 if (rpm == 0) in FAN_TO_REG()
175 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
176 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 255); in FAN_TO_REG()
Demc6w201.c273 unsigned rpm; in show_fan() local
276 rpm = 0; in show_fan()
278 rpm = 5400000U / data->fan[sf][nr]; in show_fan()
280 return sprintf(buf, "%u\n", rpm); in show_fan()
Dsmsc47m1.c181 int rpm = (data->pwm[nr] & 0x7F) == 0x00 ? 0 : in get_fan() local
185 return sprintf(buf, "%d\n", rpm); in get_fan()
194 int rpm = MIN_FROM_REG(data->fan_preload[nr], in get_fan_min() local
196 return sprintf(buf, "%d\n", rpm); in get_fan_min()
Dsis5595.c140 static inline u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
142 if (rpm <= 0) in FAN_TO_REG()
144 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Dit87.c417 static inline u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
419 if (rpm == 0) in FAN_TO_REG()
421 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
422 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
425 static inline u16 FAN16_TO_REG(long rpm) in FAN16_TO_REG() argument
427 if (rpm == 0) in FAN16_TO_REG()
429 return clamp_val((1350000 + rpm) / (rpm * 2), 1, 0xfffe); in FAN16_TO_REG()
Dlm78.c93 static inline u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
95 if (rpm <= 0) in FAN_TO_REG()
97 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Df75375s.c260 static inline u16 rpm_to_reg(int rpm) in rpm_to_reg() argument
262 if (rpm < 367 || rpm > 0xffff) in rpm_to_reg()
264 return 1500000 / rpm; in rpm_to_reg()
Dw83791d.c226 static u8 fan_to_reg(long rpm, int div) in fan_to_reg() argument
228 if (rpm == 0) in fan_to_reg()
230 rpm = clamp_val(rpm, 1, 1000000); in fan_to_reg()
231 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in fan_to_reg()
Dw83792d.c234 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
236 if (rpm == 0) in FAN_TO_REG()
238 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
239 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Dgl518sm.c94 static inline u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
97 if (rpm == 0) in FAN_TO_REG()
99 rpmdiv = clamp_val(rpm, 1, 960000) * div; in FAN_TO_REG()
Dw83781d.c166 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
168 if (rpm == 0) in FAN_TO_REG()
170 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
171 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Dw83627hf.c260 static inline u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
262 if (rpm == 0) in FAN_TO_REG()
264 rpm = clamp_val(rpm, 1, 1000000); in FAN_TO_REG()
265 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); in FAN_TO_REG()
Dvt8231.c146 static inline u8 FAN_TO_REG(long rpm, int div) in FAN_TO_REG() argument
148 if (rpm == 0) in FAN_TO_REG()
150 return clamp_val(1310720 / (rpm * div), 1, 255); in FAN_TO_REG()
Dlm93.c616 static u16 LM93_FAN_TO_REG(long rpm) in LM93_FAN_TO_REG() argument
620 if (rpm == 0) { in LM93_FAN_TO_REG()
623 rpm = clamp_val(rpm, 1, 1000000); in LM93_FAN_TO_REG()
624 count = clamp_val((1350000 + rpm) / rpm, 1, 0x3ffe); in LM93_FAN_TO_REG()
/drivers/ide/
Dide-floppy.c316 u16 transfer_rate, sector_size, cyls, rpm; in ide_floppy_get_flexible_disk_page() local
338 rpm = be16_to_cpup((__be16 *)&buf[8 + 28]); in ide_floppy_get_flexible_disk_page()
348 sectors, transfer_rate / 8, sector_size, rpm); in ide_floppy_get_flexible_disk_page()

12