diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-03-27 11:48:03 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-04-14 07:46:56 -0400 |
commit | 947e92719db4163da6985afcc9ed3cf4147adbd4 (patch) | |
tree | 3c739c44cf75228398f2da5c237220011890df70 /drivers/hwmon/tmp401.c | |
parent | c409fd43bdea705799d21531600b8f305b120009 (diff) |
hwmon: (tmp401) Drop unused defines, use BIT for bit masks
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/tmp401.c')
-rw-r--r-- | drivers/hwmon/tmp401.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c index be71a3e17cca..04cf0c63a2ea 100644 --- a/drivers/hwmon/tmp401.c +++ b/drivers/hwmon/tmp401.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/bitops.h> | ||
33 | #include <linux/slab.h> | 34 | #include <linux/slab.h> |
34 | #include <linux/jiffies.h> | 35 | #include <linux/jiffies.h> |
35 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
@@ -54,10 +55,8 @@ enum chips { tmp401, tmp411, tmp431 }; | |||
54 | #define TMP401_CONVERSION_RATE_READ 0x04 | 55 | #define TMP401_CONVERSION_RATE_READ 0x04 |
55 | #define TMP401_CONVERSION_RATE_WRITE 0x0A | 56 | #define TMP401_CONVERSION_RATE_WRITE 0x0A |
56 | #define TMP401_TEMP_CRIT_HYST 0x21 | 57 | #define TMP401_TEMP_CRIT_HYST 0x21 |
57 | #define TMP401_CONSECUTIVE_ALERT 0x22 | ||
58 | #define TMP401_MANUFACTURER_ID_REG 0xFE | 58 | #define TMP401_MANUFACTURER_ID_REG 0xFE |
59 | #define TMP401_DEVICE_ID_REG 0xFF | 59 | #define TMP401_DEVICE_ID_REG 0xFF |
60 | #define TMP411_N_FACTOR_REG 0x18 | ||
61 | 60 | ||
62 | static const u8 TMP401_TEMP_MSB[2] = { 0x00, 0x01 }; | 61 | static const u8 TMP401_TEMP_MSB[2] = { 0x00, 0x01 }; |
63 | static const u8 TMP401_TEMP_LSB[2] = { 0x15, 0x10 }; | 62 | static const u8 TMP401_TEMP_LSB[2] = { 0x15, 0x10 }; |
@@ -76,15 +75,15 @@ static const u8 TMP411_TEMP_HIGHEST_MSB[2] = { 0x32, 0x36 }; | |||
76 | static const u8 TMP411_TEMP_HIGHEST_LSB[2] = { 0x33, 0x37 }; | 75 | static const u8 TMP411_TEMP_HIGHEST_LSB[2] = { 0x33, 0x37 }; |
77 | 76 | ||
78 | /* Flags */ | 77 | /* Flags */ |
79 | #define TMP401_CONFIG_RANGE 0x04 | 78 | #define TMP401_CONFIG_RANGE BIT(2) |
80 | #define TMP401_CONFIG_SHUTDOWN 0x40 | 79 | #define TMP401_CONFIG_SHUTDOWN BIT(6) |
81 | #define TMP401_STATUS_LOCAL_CRIT 0x01 | 80 | #define TMP401_STATUS_LOCAL_CRIT BIT(0) |
82 | #define TMP401_STATUS_REMOTE_CRIT 0x02 | 81 | #define TMP401_STATUS_REMOTE_CRIT BIT(1) |
83 | #define TMP401_STATUS_REMOTE_OPEN 0x04 | 82 | #define TMP401_STATUS_REMOTE_OPEN BIT(2) |
84 | #define TMP401_STATUS_REMOTE_LOW 0x08 | 83 | #define TMP401_STATUS_REMOTE_LOW BIT(3) |
85 | #define TMP401_STATUS_REMOTE_HIGH 0x10 | 84 | #define TMP401_STATUS_REMOTE_HIGH BIT(4) |
86 | #define TMP401_STATUS_LOCAL_LOW 0x20 | 85 | #define TMP401_STATUS_LOCAL_LOW BIT(5) |
87 | #define TMP401_STATUS_LOCAL_HIGH 0x40 | 86 | #define TMP401_STATUS_LOCAL_HIGH BIT(6) |
88 | 87 | ||
89 | /* Manufacturer / Device ID's */ | 88 | /* Manufacturer / Device ID's */ |
90 | #define TMP401_MANUFACTURER_ID 0x55 | 89 | #define TMP401_MANUFACTURER_ID 0x55 |