9 #define MAX_LINE_LEN 255
11 int omap_get_real_temperature()
13 char buf[MAX_LINE_LEN];
19 if ( ( fd = open("/sys/devices/platform/omap34xx_temp/temp1_input", O_RDONLY) ) == -1 )
22 numread = read(fd, buf, MAX_LINE_LEN - 1);
32 value = strtol(buf, &endp, 0);
34 if ( endp == buf || errno == ERANGE )
40 int omap_get_raw_temperature()
42 char buf[MAX_LINE_LEN];
48 if ( ( fd = open("/sys/devices/platform/omap34xx_temp/temp1_input_raw", O_RDONLY) ) == -1 )
51 numread = read(fd, buf, MAX_LINE_LEN - 1);
61 value = strtol(buf, &endp, 0);
63 if ( endp == buf || errno == ERANGE )