/drivers/hwmon/ |
H A D | emc6w201.c | 273 unsigned rpm; local 276 rpm = 0; 278 rpm = 5400000U / data->fan[sf][nr]; 280 return sprintf(buf, "%u\n", rpm);
|
H A D | g760a.c | 34 #define G760A_REG_FAN_STA_RPM_LOW 0x2 /* below 1920rpm */ 52 u8 act_cnt; /* formula: cnt = (CLK * 30)/(rpm * P) */ 55 * bit 1: set when fan speed below 1920 rpm 114 unsigned int rpm = 0; local 118 rpm = rpm_from_cnt(data->act_cnt, data->clk, data->fan_div); 121 return sprintf(buf, "%d\n", rpm);
|
H A D | gpio-fan.c | 176 static int rpm_to_speed_index(struct gpio_fan_data *fan_data, unsigned long rpm) argument 182 if (speed[i].rpm >= rpm) 268 return sprintf(buf, "%d\n", fan_data->speed[0].rpm); 277 fan_data->speed[fan_data->num_speed - 1].rpm); 285 return sprintf(buf, "%d\n", fan_data->speed[fan_data->speed_index].rpm); 292 unsigned long rpm; local 295 if (kstrtoul(buf, 10, &rpm)) 305 set_fan_speed(fan_data, rpm_to_speed_index(fan_data, rpm)); 454 speed[i].rpm [all...] |
H A D | ultra45_env.c | 101 int rpm, period; local 107 rpm = FAN_PERIOD_TO_RPM(period); 109 rpm = 0; 111 return sprintf(buf, "%d\n", rpm); 118 unsigned long rpm; local 124 err = kstrtoul(buf, 10, &rpm); 128 if (!rpm) 131 period = FAN_RPM_TO_PERIOD(rpm);
|
H A D | emc2103.c | 48 /* equation 4 from datasheet: rpm = (3932160 * multipler) / count */ 290 int rpm = 0; local 292 rpm = (FAN_RPM_FACTOR * data->fan_multiplier) / data->fan_tach; 293 return sprintf(buf, "%d\n", rpm); 375 int rpm = 0; local 379 rpm = (FAN_RPM_FACTOR * data->fan_multiplier) 382 return sprintf(buf, "%d\n", rpm);
|
H A D | g762.c | 196 static inline unsigned char cnt_from_rpm(u32 rpm, u32 clk_freq, u16 p, argument 199 if (!rpm) /* to stop the fan, set cnt to 255 */ 202 return clamp_val(((clk_freq * 30 * gear_mult) / (rpm * p * clk_div)), 741 unsigned int rpm = 0; local 749 rpm = rpm_from_cnt(data->act_cnt, data->clk_freq, 756 return sprintf(buf, "%u\n", rpm); 945 unsigned int rpm; local 951 rpm = rpm_from_cnt(data->set_cnt, data->clk_freq, 957 return sprintf(buf, "%u\n", rpm);
|
H A D | gl518sm.c | 94 static inline u8 FAN_TO_REG(long rpm, int div) argument 97 if (rpm == 0) 99 rpmdiv = clamp_val(rpm, 1, 960000) * div;
|
H A D | lm80.c | 78 static inline unsigned char FAN_TO_REG(unsigned rpm, unsigned div) argument 80 if (rpm == 0) 82 rpm = clamp_val(rpm, 1, 1000000); 83 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
H A D | max6650.c | 179 int rpm; local 190 rpm = ((data->tach[attr->index] * 120) / DIV_FROM_REG(data->count)); 191 return sprintf(buf, "%d\n", rpm); 239 int kscale, ktach, rpm; local 246 * then multiply by 60 to give rpm. 251 rpm = 60 * kscale * clock / (256 * (ktach + 1)); 252 return sprintf(buf, "%d\n", rpm); 261 unsigned long rpm; local 264 err = kstrtoul(buf, 10, &rpm); 268 rpm [all...] |
H A D | sis5595.c | 140 static inline u8 FAN_TO_REG(long rpm, int div) argument 142 if (rpm <= 0) 144 if (rpm > 1350000) 146 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
H A D | via686a.c | 171 static inline u8 FAN_TO_REG(long rpm, int div) argument 173 if (rpm == 0) 175 rpm = clamp_val(rpm, 1, 1000000); 176 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 255);
|
H A D | asb100.c | 126 static u8 FAN_TO_REG(long rpm, int div) argument 128 if (rpm == -1) 130 if (rpm == 0) 132 rpm = clamp_val(rpm, 1, 1000000); 133 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
H A D | f75375s.c | 260 static inline u16 rpm_to_reg(int rpm) argument 262 if (rpm < 367 || rpm > 0xffff) 264 return 1500000 / rpm;
|
H A D | lm78.c | 93 static inline u8 FAN_TO_REG(long rpm, int div) argument 95 if (rpm <= 0) 97 if (rpm > 1350000) 99 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
H A D | smsc47m1.c | 217 int rpm = (data->pwm[nr] & 0x7F) == 0x00 ? 0 : local 221 return sprintf(buf, "%d\n", rpm); 230 int rpm = MIN_FROM_REG(data->fan_preload[nr], local 232 return sprintf(buf, "%d\n", rpm);
|
H A D | vt8231.c | 146 static inline u8 FAN_TO_REG(long rpm, int div) argument 148 if (rpm <= 0 || rpm > 1310720) 150 return clamp_val(1310720 / (rpm * div), 1, 255);
|
H A D | w83792d.c | 234 FAN_TO_REG(long rpm, int div) argument 236 if (rpm == 0) 238 rpm = clamp_val(rpm, 1, 1000000); 239 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
H A D | w83l786ng.c | 85 FAN_TO_REG(long rpm, int div) argument 87 if (rpm == 0) 89 rpm = clamp_val(rpm, 1, 1000000); 90 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
H A D | adt7475.c | 238 static inline u16 rpm2tach(unsigned long rpm) argument 240 if (rpm == 0) 243 return clamp_val((90000 * 60) / rpm, 1, 0xFFFF);
|
H A D | f71805f.c | 242 static inline u16 fan_to_reg(long rpm) argument 249 if (rpm < 367) 251 return 1500000 / rpm;
|
H A D | nct6683.c | 321 unsigned int rpm[NCT6683_NUM_REG_FAN]; member in struct:nct6683_data 628 for (i = 0; i < ARRAY_SIZE(data->rpm); i++) { 632 data->rpm[i] = nct6683_read16(data, 715 return sprintf(buf, "%d\n", data->rpm[sattr->index]);
|
H A D | w83627hf.c | 260 static inline u8 FAN_TO_REG(long rpm, int div) argument 262 if (rpm == 0) 264 rpm = clamp_val(rpm, 1, 1000000); 265 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
H A D | w83781d.c | 166 FAN_TO_REG(long rpm, int div) argument 168 if (rpm == 0) 170 rpm = clamp_val(rpm, 1, 1000000); 171 return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
|
/drivers/ide/ |
H A D | ide-floppy.c | 316 u16 transfer_rate, sector_size, cyls, rpm; local 338 rpm = be16_to_cpup((__be16 *)&buf[8 + 28]); 346 "%d sector size, %d rpm\n", 348 sectors, transfer_rate / 8, sector_size, rpm);
|
/drivers/regulator/ |
H A D | qcom_rpm-regulator.c | 24 #include <dt-bindings/mfd/qcom-rpm.h> 56 struct qcom_rpm *rpm; member in struct:qcom_rpm_reg 200 return qcom_rpm_write(vreg->rpm, 563 { .compatible = "qcom,rpm-pm8058-pldo", .data = &pm8058_pldo }, 564 { .compatible = "qcom,rpm-pm8058-nldo", .data = &pm8058_nldo }, 565 { .compatible = "qcom,rpm-pm8058-smps", .data = &pm8058_smps }, 566 { .compatible = "qcom,rpm-pm8058-ncp", .data = &pm8058_ncp }, 567 { .compatible = "qcom,rpm-pm8058-switch", .data = &pm8058_switch }, 569 { .compatible = "qcom,rpm-pm8901-pldo", .data = &pm8901_pldo }, 570 { .compatible = "qcom,rpm [all...] |