/drivers/macintosh/ |
D | therm_pm72.c | 497 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 …]
|
D | therm_pm72.h | 196 int rpm; member 300 int rpm; member
|
/drivers/hwmon/ |
D | ultra45_env.c | 101 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()
|
D | max6650.c | 159 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()
|
D | gpio-fan.c | 175 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()
|
D | g760a.c | 135 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()
|
D | emc2103.c | 293 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()
|
D | lm80.c | 78 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()
|
D | w83l786ng.c | 85 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()
|
D | asb100.c | 126 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()
|
D | via686a.c | 171 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()
|
D | emc6w201.c | 273 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()
|
D | smsc47m1.c | 181 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()
|
D | sis5595.c | 140 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()
|
D | it87.c | 417 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()
|
D | lm78.c | 93 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()
|
D | f75375s.c | 260 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()
|
D | w83791d.c | 226 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()
|
D | w83792d.c | 234 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()
|
D | gl518sm.c | 94 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()
|
D | w83781d.c | 166 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()
|
D | w83627hf.c | 260 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()
|
D | vt8231.c | 146 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()
|
D | lm93.c | 616 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/ |
D | ide-floppy.c | 316 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()
|