Lines Matching +defs:val +defs:buf
71 #define RAW_FROM_REG(val) val argument
73 #define BOOL_FROM_REG(val) ((val) ? 0 : 1) argument
74 #define BOOL_TO_REG(val) ((val) ? 0 : 1) argument
76 #define TEMP_CLAMP(val) clamp_val(val, -119000, 136000) argument
77 #define TEMP_TO_REG(val) (DIV_ROUND_CLOSEST(TEMP_CLAMP(val), 1000) + 119) argument
78 #define TEMP_FROM_REG(val) (((val) - 119) * 1000) argument
88 #define FAN_FROM_REG(val, div) ((val) == 0 ? 0 : (480000 / ((val) * (div)))) argument
90 #define IN_CLAMP(val) clamp_val(val, 0, 255 * 19) argument
91 #define IN_TO_REG(val) DIV_ROUND_CLOSEST(IN_CLAMP(val), 19) argument
92 #define IN_FROM_REG(val) ((val) * 19) argument
94 #define VDD_CLAMP(val) clamp_val(val, 0, 255 * 95 / 4) argument
95 #define VDD_TO_REG(val) DIV_ROUND_CLOSEST(VDD_CLAMP(val) * 4, 95) argument
96 #define VDD_FROM_REG(val) DIV_ROUND_CLOSEST((val) * 95, 4) argument
98 #define DIV_FROM_REG(val) (1 << (val)) argument
100 #define BEEP_MASK_TO_REG(val) ((val) & 0x7f & data->alarm_mask) argument
101 #define BEEP_MASK_FROM_REG(val) ((val) & 0x7f) argument
154 int val; in gl518_update_device() local
255 struct device_attribute *attr, char *buf) in fan_input_show()
264 char *buf) in fan_min_show()
273 char *buf) in fan_div_show()
341 struct device_attribute *attr, const char *buf, in fan_min_store()
348 unsigned long val; in fan_min_store() local
375 struct device_attribute *attr, const char *buf, in fan_div_store()
382 unsigned long val; in fan_div_store() local
449 char *buf) in alarm_show()
465 char *buf) in beep_show()
473 const char *buf, size_t count) in beep_store()