Lines Matching full:thresh

374 static int hdc3020_thresh_get_temp(u16 thresh)  in hdc3020_thresh_get_temp()  argument
384 temp = FIELD_GET(HDC3020_THRESH_TEMP_MASK, thresh) << in hdc3020_thresh_get_temp()
390 static int hdc3020_thresh_get_hum(u16 thresh) in hdc3020_thresh_get_hum() argument
400 hum = FIELD_GET(HDC3020_THRESH_HUM_MASK, thresh) << in hdc3020_thresh_get_hum()
409 u16 thresh; in hdc3020_thresh_set_temp() local
418 thresh = FIELD_PREP(HDC3020_THRESH_TEMP_MASK, temp); in hdc3020_thresh_set_temp()
419 thresh |= (FIELD_GET(HDC3020_THRESH_HUM_MASK, curr_thresh) << in hdc3020_thresh_set_temp()
422 return thresh; in hdc3020_thresh_set_temp()
428 u16 thresh; in hdc3020_thresh_set_hum() local
437 thresh = FIELD_PREP(HDC3020_THRESH_HUM_MASK, hum); in hdc3020_thresh_set_hum()
438 thresh |= FIELD_GET(HDC3020_THRESH_TEMP_MASK, curr_thresh); in hdc3020_thresh_set_hum()
440 return thresh; in hdc3020_thresh_set_hum()
483 int s_val, thresh, clr, ret; in hdc3020_write_thresh() local
503 thresh = ret; in hdc3020_write_thresh()
518 reg_val = hdc3020_thresh_set_temp(s_val, thresh); in hdc3020_write_thresh()
524 s_thresh = (s64)hdc3020_thresh_get_temp(thresh) * 1000000; in hdc3020_write_thresh()
528 thresh = reg_val; in hdc3020_write_thresh()
538 s_thresh = (s64)hdc3020_thresh_get_temp(thresh) * 1000000; in hdc3020_write_thresh()
560 reg_val = hdc3020_thresh_set_hum(s_val, thresh); in hdc3020_write_thresh()
566 s_thresh = (s64)hdc3020_thresh_get_hum(thresh) * 1000000; in hdc3020_write_thresh()
570 thresh = reg_val; in hdc3020_write_thresh()
580 s_thresh = (s64)hdc3020_thresh_get_hum(thresh) * 1000000; in hdc3020_write_thresh()
612 int thresh, clr, ret; in hdc3020_read_thresh() local
630 thresh = hdc3020_thresh_get_temp(ret); in hdc3020_read_thresh()
633 *val = thresh; in hdc3020_read_thresh()
641 *val = abs(thresh - clr); in hdc3020_read_thresh()
649 thresh = hdc3020_thresh_get_hum(ret); in hdc3020_read_thresh()
652 *val = thresh; in hdc3020_read_thresh()
660 *val = abs(thresh - clr); in hdc3020_read_thresh()