Home
last modified time | relevance | path

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

/Linux-v5.10/drivers/hwmon/
Dw83627ehf.c291 static inline long in_from_reg(u8 reg, u8 nr, const u16 *scale_in) in in_from_reg() argument
293 return DIV_ROUND_CLOSEST(reg * scale_in[nr], 100); in in_from_reg()
296 static inline u8 in_to_reg(u32 val, u8 nr, const u16 *scale_in) in in_to_reg() argument
298 return clamp_val(DIV_ROUND_CLOSEST(val * 100, scale_in[nr]), 0, 255); in in_to_reg()
320 const u16 *scale_in; member
708 data->in_##reg[channel] = in_to_reg(val, channel, data->scale_in); \
1472 *val = in_from_reg(data->in[channel], channel, data->scale_in); in w83627ehf_do_read_in()
1476 data->scale_in); in w83627ehf_do_read_in()
1480 data->scale_in); in w83627ehf_do_read_in()
1874 data->scale_in = scale_in_w83627uhg; in w83627ehf_probe()
[all …]
Dw83793.c143 static u8 scale_in[] = { 2, 2, 2, 16, 16, 16, 8, 24, 24, 16 }; variable
968 val = val * scale_in[index] + scale_in_add[index]; in show_in()
988 val = (val + scale_in[index] / 2) / scale_in[index]; in store_in()
994 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()