Lines Matching refs:clamp_val
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()
247 #define TEMP1_TO_REG(val) (clamp_val(((val) < 0 ? (val) + 0x100 * 1000 \
255 (clamp_val(((val) < 0 ? (val) + 0x100 * 1000 : (val)) / 1000, 0, 0xff))
264 val = clamp_val(val, 1, 128) >> 1; in DIV_TO_REG()
396 data->in_##reg[nr] = clamp_val(IN_TO_REG(nr, val) / 4, 0, 255); \
644 val = clamp_val(val, 0, 255) >> 4; in store_pwm()
798 data->thermal_cruise[nr] = clamp_val(target_tmp, 0, 255); in store_thermal_cruise()
836 tol_tmp = clamp_val(val, 0, 15); in store_tolerance()
880 data->sf2_points[index][nr] = clamp_val(val, 0, 127); in store_sf2_point()
922 data->sf2_levels[index][nr] = clamp_val((val * 15) / 100, 0, 15); in store_sf2_level()