Lines Matching +defs:val +defs:buf

186 #define SCALE(val, from, to) (((val)*(to) + ((from)/2))/(from))  argument
187 #define INS_TO_REG(n, val) \ argument
190 #define INS_FROM_REG(n, val) (SCALE(val, 192, adm1026_scaling[n])) argument
197 #define FAN_TO_REG(val, div) ((val) <= 0 ? 0xff : \ argument
200 #define FAN_FROM_REG(val, div) ((val) == 0 ? -1 : (val) == 0xff ? 0 : \ argument
202 #define DIV_FROM_REG(val) (1 << (val)) argument
203 #define DIV_TO_REG(val) ((val) >= 8 ? 3 : (val) >= 4 ? 2 : (val) >= 2 ? 1 : 0) argument
206 #define TEMP_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), \ argument
208 #define TEMP_FROM_REG(val) ((val) * 1000) argument
209 #define OFFSET_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val(val, -128000, 127000), \ argument
211 #define OFFSET_FROM_REG(val) ((val) * 1000) argument
213 #define PWM_TO_REG(val) (clamp_val(val, 0, 255)) argument
214 #define PWM_FROM_REG(val) (val) argument
216 #define PWM_MIN_TO_REG(val) ((val) & 0xf0) argument
217 #define PWM_MIN_FROM_REG(val) (((val) & 0xf0) + ((val) >> 4)) argument
224 #define DAC_TO_REG(val) DIV_ROUND_CLOSEST(clamp_val(val, 0, 2500) * 255, \ argument
226 #define DAC_FROM_REG(val) (((val) * 2500) / 255) argument
468 char *buf) in in_show()
476 char *buf) in in_min_show()
484 const char *buf, size_t count) in in_min_store()
490 long val; in in_min_store() local
504 char *buf) in in_max_show()
512 const char *buf, size_t count) in in_max_store()
518 long val; in in_max_store() local
582 char *buf) in in16_show()
589 struct device_attribute *attr, char *buf) in in16_min_show()
596 struct device_attribute *attr, const char *buf, in in16_min_store()
601 long val; in in16_min_store() local
618 struct device_attribute *attr, char *buf) in in16_max_show()
625 struct device_attribute *attr, const char *buf, in in16_max_store()
630 long val; in in16_max_store() local
654 char *buf) in fan_show()
663 char *buf) in fan_min_show()
672 struct device_attribute *attr, const char *buf, in fan_min_store()
679 long val; in fan_min_store() local
731 char *buf) in fan_div_show()
739 struct device_attribute *attr, const char *buf, in fan_div_store()
746 long val; in fan_div_store() local
792 char *buf) in temp_show()
800 struct device_attribute *attr, char *buf) in temp_min_show()
808 struct device_attribute *attr, const char *buf, in temp_min_store()
815 long val; in temp_min_store() local
830 struct device_attribute *attr, char *buf) in temp_max_show()
838 struct device_attribute *attr, const char *buf, in temp_max_store()
845 long val; in temp_max_store() local
871 struct device_attribute *attr, char *buf) in temp_offset_show()
880 const char *buf, size_t count) in temp_offset_store()
886 long val; in temp_offset_store() local
907 char *buf) in temp_auto_point1_temp_hyst_show()
917 char *buf) in temp_auto_point2_temp_show()
927 char *buf) in temp_auto_point1_temp_show()
936 const char *buf, size_t count) in temp_auto_point1_temp_store()
942 long val; in temp_auto_point1_temp_store() local
971 struct device_attribute *attr, char *buf) in show_temp_crit_enable()
977 struct device_attribute *attr, const char *buf, size_t count) in set_temp_crit_enable()
981 unsigned long val; in set_temp_crit_enable() local
1007 struct device_attribute *attr, char *buf) in temp_crit_show()
1015 struct device_attribute *attr, const char *buf, in temp_crit_store()
1022 long val; in temp_crit_store() local
1042 struct device_attribute *attr, char *buf) in analog_out_show()
1049 const char *buf, size_t count) in analog_out_store()
1053 long val; in analog_out_store() local
1070 struct device_attribute *attr, char *buf) in cpu0_vid_show()
1082 char *buf) in vrm_show()
1089 const char *buf, size_t count) in vrm_store()
1092 unsigned long val; in vrm_store() local
1109 char *buf) in alarms_show()
1118 char *buf) in alarm_show()
1155 struct device_attribute *attr, char *buf) in alarm_mask_show()
1162 const char *buf, size_t count) in alarm_mask_store()
1167 long val; in alarm_mask_store() local
1196 char *buf) in gpio_show()
1202 const char *buf, size_t count) in gpio_store()
1207 long val; in gpio_store() local
1230 char *buf) in gpio_mask_show()
1236 struct device_attribute *attr, const char *buf, in gpio_mask_store()
1242 long val; in gpio_mask_store() local
1264 char *buf) in pwm1_show()
1271 const char *buf, size_t count) in pwm1_store()
1277 long val; in pwm1_store() local
1294 char *buf) in temp1_auto_point1_pwm_show()
1302 const char *buf, size_t count) in temp1_auto_point1_pwm_store()
1306 unsigned long val; in temp1_auto_point1_pwm_store() local
1326 char *buf) in temp1_auto_point2_pwm_show()
1332 struct device_attribute *attr, char *buf) in pwm1_enable_show()
1340 const char *buf, size_t count) in pwm1_enable_store()
1345 unsigned long val; in pwm1_enable_store() local