Source
18
18
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
19
*/
20
20
21
21
/*
22
22
This file contains common code for encoding/decoding LM75 type
23
23
temperature readings, which are emulated by many of the chips
24
24
we support. As the user is unlikely to load more than one driver
25
25
which contains this code, we don't worry about the wasted space.
26
26
*/
27
27
28
-
#include <linux/hwmon.h>
28
+
#include <linux/kernel.h>
29
29
30
30
/* straight from the datasheet */
31
31
#define LM75_TEMP_MIN (-55000)
32
32
#define LM75_TEMP_MAX 125000
33
33
#define LM75_SHUTDOWN 0x01
34
34
35
35
/* TEMP: 0.001C/bit (-55C to +125C)
36
36
REG: (0.5C/bit, two's complement) << 7 */
37
37
static inline u16 LM75_TEMP_TO_REG(long temp)
38
38
{