Home
last modified time | relevance | path

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

/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
706 data->in_##reg[channel] = in_to_reg(val, channel, data->scale_in); \
1470 *val = in_from_reg(data->in[channel], channel, data->scale_in); in w83627ehf_do_read_in()
1474 data->scale_in); in w83627ehf_do_read_in()
1478 data->scale_in); in w83627ehf_do_read_in()
1864 data->scale_in = scale_in_w83627uhg; in w83627ehf_probe()
[all …]
Dnct6775.h102 const u16 *scale_in; /* internal scaling factors */ member
Dw83793.c143 static u8 scale_in[] = { 2, 2, 2, 16, 16, 16, 8, 24, 24, 16 }; variable
967 val = val * scale_in[index] + scale_in_add[index]; in show_in()
987 val = (val + scale_in[index] / 2) / scale_in[index]; in store_in()
993 val -= scale_in_add[index] / scale_in[index]; in store_in()
Dnct6775-core.c986 static const u16 scale_in[15] = { variable
1725 in_from_reg(data->in[nr][index], nr, data->scale_in)); in show_in_reg()
1743 data->in[nr][index] = in_to_reg(val, nr, data->scale_in); in store_in_reg()
3526 data->scale_in = scale_in; in nct6775_probe()
4051 data->scale_in = scale_in_6798; in nct6775_probe()