From 2f02917c5597ae21e6f189bc676b479c6e568645 Mon Sep 17 00:00:00 2001 From: fboltz Date: Sun, 8 Nov 2020 01:15:45 +0100 Subject: [PATCH] Remove unused --- nct6687.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/nct6687.c b/nct6687.c index 0e58bb5..24eb211 100644 --- a/nct6687.c +++ b/nct6687.c @@ -391,31 +391,6 @@ static struct attribute_group *nct6687_create_attr_group(struct device *dev, con return group; } -/* LSB is 16 mV, except for the following sources, where it is 32 mV */ -#define MON_SRC_VCC 0x60 -#define MON_SRC_VSB 0x61 -#define MON_SRC_AVSB 0x62 -#define MON_SRC_VBAT 0x64 - -static inline long in_from_reg(u16 reg, u8 src) -{ - int scale = 16; - - if (src == MON_SRC_VCC || src == MON_SRC_VSB || src == MON_SRC_AVSB || src == MON_SRC_VBAT) - scale <<= 1; - return reg * scale; -} - -static inline u16 in_to_reg(u32 val, u8 src) -{ - int scale = 16; - - if (src == MON_SRC_VCC || src == MON_SRC_VSB || src == MON_SRC_AVSB || src == MON_SRC_VBAT) - scale <<= 1; - - return clamp_val(DIV_ROUND_CLOSEST(val, scale), 0, 127); -} - static u16 nct6687_read(struct nct6687_data *data, u16 address) { u8 page = (u8)(address >> 8);