Home
last modified time | relevance | path

Searched refs:scale_in (Results 1 – 3 of 3) sorted by relevance

/Linux-v5.4/drivers/hwmon/
Dw83627ehf.c403 static inline long in_from_reg(u8 reg, u8 nr, const u16 *scale_in) in in_from_reg() argument
405 return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100); in in_from_reg()
408 static inline u8 in_to_reg(u32 val, u8 nr, const u16 *scale_in) in in_to_reg() argument
410 return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255); in in_to_reg()
440 const u16 *scale_in; member
939 data->scale_in)); \
960 data->in_##reg[nr] = in_to_reg(val, nr, data->scale_in); \ in show_in_reg()
2336 data->scale_in = scale_in_w83627uhg; in w83627ehf_probe()
2338 data->scale_in = scale_in_common; in w83627ehf_probe()
Dw83793.c143 static u8 scale_in[] = { 2, 2, 2, 16, 16, 16, 8, 24, 24, 16 }; variable
969 val = val * scale_in[index] + scale_in_add[index]; in show_in()
989 val = (val + scale_in[index] / 2) / scale_in[index]; in store_in()
995 val -= scale_in_add[index] / scale_in[index]; in store_in()
Dnct6775.c1050 static const u16 scale_in[15] = { variable
1057 return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100); in in_from_reg()
1062 return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255); in in_to_reg()