Skip to contentSkip to conversation

LM75: "ERROR: Can't get temperature data!"

lm-sensors Michael Brian Willis 3 participants 7 messages Nov 2, 2007 – Nov 17, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

I am having trouble getting my LM75 temp sensor to work on a custom embedded system. I have two MAX1619 chips that appear to be recognized by the "sensors" command. Also, "sensors-detect" seems to find everybody. However, I get "ERROR: Can't get temperature data" for the LM75 when I run the "sensors" command (see below).

--------

[root@myboard]# sensors
max1619-i2c-0-19
Adapter: MPC adapter
M/B Temp: 33.00 (temp1)
CPU Temp: 0.00 (temp2)

max1619-i2c-0-1a
Adapter: MPC adapter
M/B Temp: 30.00 (temp1)
CPU Temp: 127.00 (temp2)

lm75-i2c-0-48
Adapter: MPC adapter
ERROR: Can't get temperature data!

Here are some relevant version numbers:
Denx Linux kernel: 2.6.21
libsensors: 2.10.5
sysfsutils: 2.1.0
i2ctools: 3.0.0
--------

I have the LM75 kernel module loaded:

[root@myboard]# lsmod
Module                  Size  Used by
lm75                    4592  0
max1619                 5776  0

Any help anybody can provide is greatly appreciated,

Regards,

Michael Willis
Applied Research Labs - University of Texas
willis <at> arlut . utexas . edu

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw

Hi Michael,

Quoted 22 lines · Michael Brian Willis

I am having trouble getting my LM75 temp sensor to work on a custom embedded system. I have two MAX1619 chips that appear to be recognized by the "sensors" command. Also, "sensors-detect" seems to find everybody. However, I get "ERROR: Can't get temperature data" for the LM75 when I run the "sensors" command (see below).

--------

[root@myboard]# sensors
max1619-i2c-0-19
Adapter: MPC adapter
M/B Temp: 33.00 (temp1)
CPU Temp: 0.00 (temp2)

max1619-i2c-0-1a
Adapter: MPC adapter
M/B Temp: 30.00 (temp1)
CPU Temp: 127.00 (temp2)

lm75-i2c-0-48
Adapter: MPC adapter
ERROR: Can't get temperature data!

Quoted 5 lines

Here are some relevant version numbers:
Denx Linux kernel: 2.6.21
libsensors: 2.10.5
sysfsutils: 2.1.0
i2ctools: 3.0.0

Note: i2ctools doesn't matter here.

Quoted 9 lines

--------

I have the LM75 kernel module loaded:

[root@myboard]# lsmod
Module                  Size  Used by
lm75                    4592  0
max1619                 5776  0

Any help anybody can provide is greatly appreciated,

Odd. Please check that no older libsensors version gets in the way (sensors -v). If you have strace installed, please provide the output of "strace sensors".

Also, please provide the output of "ls -lR /sys/class/hwmon/*/device/".

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Michael Brian Willis

Jean,

Thank you for your response. Below is the information you requested. Thanks again for your help!

Michael Willis

-----

Quoted 2 lines

Odd. Please check that no older libsensors version gets in the way (sensors -v).

[root@myboard /]# sensors -v
sensors version 2.10.5 with libsensors version 2.10.5

Quoted 1 line

Also, please provide the output of "ls -lR /sys/class/hwmon/*/device/".

[root@myboard /]# ls -lR /sys/class/hwmon/*/device/ /sys/class/hwmon/hwmon0/device/:
total 0

-r--r--r-- 1 root root 4096 Dec 31  1969 alarms
lrwxrwxrwx 1 root root    0 Dec 31  1969 bus -> ../../../../../bus/i2c
lrwxrwxrwx 1 root root    0 Dec 31  1969 driver -
Quoted 1 line

../../../../../bus/i2c/drivers/max1619

lrwxrwxrwx 1 root root 0 Dec 31 1969 hwmon:hwmon0 -

Quoted 1 line

../../../../../class/hwmon/hwmon0

-r--r--r-- 1 root root 4096 Dec 31 1969 name
lrwxrwxrwx 1 root root 0 Dec 31 1969 subsystem -

Quoted 1 line

../../../../../bus/i2c

-r--r--r-- 1 root root 4096 Dec 31  1969 temp1_input
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_crit
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_crit_hyst
-r--r--r-- 1 root root 4096 Dec 31  1969 temp2_input
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_max
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_min
--w------- 1 root root 4096 Dec 31  1969 uevent

/sys/class/hwmon/hwmon1/device/:
total 0

lrwxrwxrwx 1 root root    0 Dec 31  1969 bus -> ../../../../../bus/i2c
lrwxrwxrwx 1 root root    0 Dec 31  1969 driver -
Quoted 1 line

../../../../../bus/i2c/drivers/lm75

lrwxrwxrwx 1 root root 0 Dec 31 1969 hwmon:hwmon1 -

Quoted 1 line

../../../../../class/hwmon/hwmon1

drwxr-xr-x 2 root root    0 Dec 31  1969 lm75
-r--r--r-- 1 root root 4096 Dec 31  1969 name
lrwxrwxrwx 1 root root    0 Dec 31  1969 subsystem -
Quoted 1 line

../../../../../bus/i2c

--w------- 1 root root 4096 Dec 31 1969 uevent

/sys/class/hwmon/hwmon1/device/lm75:
total 0

-r--r--r-- 1 root root 4096 Dec 31  1969 temp1_input
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp1_max
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp1_max_hyst
Quoted 2 lines

If you have strace installed, please provide the output
of "strace sensors".

[root@myboard /]# strace sensors execve("/usr/local/bin/sensors", ["sensors"], [/* 19 vars */]) = 0
brk(0) = 0x10039000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory) open("/usr/local/lib/tls/ppc8540/libsensors.so.3", O_RDONLY) = -1 ENOENT (No such file or directory) stat64("/usr/local/lib/tls/ppc8540", 0x7ff84088) = -1 ENOENT (No such file or directory) open("/usr/local/lib/tls/libsensors.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/tls", 0x7ff84088) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/ppc8540/libsensors.so.3", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/ppc8540", 0x7ff84088) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libsensors.so.3", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\320"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size%1817, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30000000
mmap(0xff65000, 306020, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xff65000
mprotect(0xff7f000, 61440, PROT_NONE) = 0
mmap(0xff8e000, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x19000) = 0xff8e000
mmap(0xffaf000, 2916, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_ANONYMOUS, -1, 0) = 0xffaf000
close(3) = 0
open("/usr/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size8842, ...}) = 0 mmap(NULL, 38842, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30001000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\17\345"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size93784, ...}) = 0 mmap(0xfe40000, 1520028, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3000b000
mprotect(0x3016a000, 53248, PROT_NONE) = 0
mmap(0x30177000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0x16c000) = 0x30177000
mmap(0x3017c000, 8604, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_ANONYMOUS, -1, 0) = 0x3017c000
close(3) = 0
open("/usr/local/lib/libm.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\17\323"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size†5520, ...}) = 0 mmap(0xfd30000, 852680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfd30000
mprotect(0xfde2000, 106496, PROT_NONE) = 0
mmap(0xfdfc000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0xbc000) = 0xfdfc000
close(3) = 0
open("/usr/local/lib/libsysfs.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0-`"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size3414, ...}) = 0 mmap(0xfd05000, 109684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfd05000
mprotect(0xfd10000, 61440, PROT_NONE) = 0
mmap(0xfd1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0xa000) = 0xfd1f000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3017f000

mprotect(0xfdfc000, 16384, PROT_READ)   = 0
mprotect(0x30177000, 16384, PROT_READ)  = 0
mprotect(0xffef000, 4096, PROT_READ)    = 0
munmap(0x30001000, 38842)               = 0
brk(0)                                  = 0x10039000
brk(0x1005a000)                         = 0x1005a000

open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_sizeU553968, ...}) = 0 mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x30180000
close(3) = 0
open("/etc/sensors.conf", O_RDONLY) = 3
lstat64("/sys/class/i2c-adapter", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/sys/class/i2c-adapter", O_RDONLY|O_NONBLOCK|O_LARGEFILE| O_DIRECTORY) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
getdents(4, /* 3 entries */, 4096) = 52
lstat64("/sys/class/i2c-adapter/i2c-0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, /* 0 entries */, 4096) = 0
close(4) = 0
lstat64("/sys/class/i2c-adapter/i2c-0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/sys/class/i2c-adapter", O_RDONLY|O_NONBLOCK|O_LARGEFILE| O_DIRECTORY) = 4
fstat64(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
getdents(4, /* 3 entries */, 4096) = 52
lstat64("/sys/class/i2c-adapter/i2c-0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, /* 0 entries */, 4096) = 0
close(4) = 0
lstat64("/sys/class/i2c-adapter/i2c-0/name", {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 stat64("/sys/class/i2c-adapter/i2c-0/name", {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 open("/sys/class/i2c-adapter/i2c-0/name", O_RDONLY) = 4
read(4, "MPC adapter\n", 4096) = 12
close(4) = 0
lstat64("/sys/class/hwmon", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 open("/sys/class/hwmon", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) 4 fstat64(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
getdents(4, /* 4 entries */, 4096) = 72
lstat64("/sys/class/hwmon/hwmon1", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat64("/sys/class/hwmon/hwmon0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, /* 0 entries */, 4096) = 0
close(4) = 0
lstat64("/sys/class/hwmon/hwmon0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat64("/sys/class/hwmon/hwmon1", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
open("/sys/class/hwmon", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) 4 fstat64(4, {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC) = 0
getdents(4, /* 4 entries */, 4096) = 72
lstat64("/sys/class/hwmon/hwmon1", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lstat64("/sys/class/hwmon/hwmon0", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
getdents(4, /* 0 entries */, 4096) = 0
close(4) = 0
lstat64("/sys/class/hwmon/hwmon0/device", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/class/hwmon/hwmon0/device", "../../../devices/platform/fsl-i2c.1/i2c-0/0-001a", 256) = 48 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/bus", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/bus", "../../../../../bus/i2c", 256) = 22 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/driver", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/driver", "../../../../../bus/i2c/drivers/max1619", 256) = 38 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/subsystem", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/subsystem", "../../../../../bus/i2c", 256) = 22 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/name", {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 stat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/name", {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/name", O_RDONLY) = 4
read(4, "max1619\n", 4096) = 8
close(4) = 0
stat64("/sys/class/i2c-adapter/i2c-0/device/name", {st_mode=S_IFREG| 0444, st_size@96, ...}) = 0 open("/sys/class/i2c-adapter/i2c-0/device/name", O_RDONLY) = 4
read(4, "MPC adapter\n", 4096) = 12
close(4) = 0
lstat64("/sys/class/hwmon/hwmon1/device", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/class/hwmon/hwmon1/device", "../../../devices/platform/fsl-i2c.1/i2c-0/0-0048", 256) = 48 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/bus", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/bus", "../../../../../bus/i2c", 256) = 22 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/driver", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/driver", "../../../../../bus/i2c/drivers/lm75", 256) = 35 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/subsystem", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0 readlink("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/subsystem", "../../../../../bus/i2c", 256) = 22 lstat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/name", {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 stat64("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/name", {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/name", O_RDONLY) = 4
read(4, "lm75\n", 4096) = 5
close(4) = 0
stat64("/sys/class/i2c-adapter/i2c-0/device/name", {st_mode=S_IFREG| 0444, st_size@96, ...}) = 0 open("/sys/class/i2c-adapter/i2c-0/device/name", O_RDONLY) = 4

read(4, "MPC adapter\n", 4096)          = 12
close(4)                                = 0
ioctl(3, TCGETS, 0x7ff84848)            = -1 ENOTTY (Inappropriate ioctl

for device)
fstat64(3, {st_mode=S_IFREG|0644, st_size…179, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30001000
read(3, "# Sensors configuration file use"..., 8192) = 8192 read(3, "its may have all sorts of weird "..., 8192) = 8192
read(3, "+12V\"\n label in5 \"-12V\"\n l"..., 8192) = 8192
read(3, "1 \"Fan1\"\n label fan2 \"Fan2\"\n "..., 8192) = 8192
read(3, "\n# What is your VCore? It is pro"..., 8192) = 8192 read(3, "fixed inside\n# the chip for thes"..., 8192) = 8192 read(3, " compute in5 -(36/10)*@, -@/(36/"..., 8192) = 8192
read(3, "r kernels only.\n# set ain_co"..., 8192) = 8192
read(3, "(^ (3435 / 298.15 - 3435 / (273."..., 8192) = 8192
read(3, "@/2\n compute in10 @*2, @/2\n\n#"..., 8192) = 8192
read(3, "an3 \"SYS FAN Speed\"\n label fan"..., 8192) = 3259

read(3, "", 4096)                       = 0
read(3, "", 8192)                       = 0
ioctl(3, TCGETS, 0x7ff83868)            = -1 ENOTTY (Inappropriate ioctl

for device)
close(3) = 0
munmap(0x30001000, 4096) = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size%460, ...}) = 0 mmap(NULL, 25460, PROT_READ, MAP_SHARED, 3, 0) = 0x30001000
close(3) = 0
open("/usr/lib/gconv/ISO8859-1.so", O_RDONLY) = 3
read(3, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\4"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_sizef876, ...}) = 0 mmap(0xfcd4000, 131096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xfcd4000
mprotect(0xfcd6000, 118784, PROT_NONE) = 0
mmap(0xfcf3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED| MAP_DENYWRITE, 3, 0xf000) = 0xfcf3000

close(3)                                = 0
mprotect(0xfcf3000, 4096, PROT_READ)    = 0
brk(0x1007f000)                         = 0x1007f000
brk(0x10077000)                         = 0x10077000

fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(4, 64), ...}) = 0 ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30008000
write(1, "max1619-i2c-0-1a\n", 17max1619-i2c-0-1a
) = 17
write(1, "Adapter: MPC adapter\n", 21Adapter: MPC adapter
) = 21 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp1_input", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30009000

read(3, "28000\n", 4096)                = 6
close(3)                                = 0
munmap(0x30009000, 4096)                = 0

write(1, "M/B Temp: 28.00 (temp1)\n", 24M/B Temp: 28.00 (temp1) ) = 24 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_input", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30009000

read(3, "127000\n", 4096)               = 7
close(3)                                = 0
munmap(0x30009000, 4096)                = 0

write(1, "CPU Temp: 127.00 (temp2)\n", 25CPU Temp: 127.00 (temp2) ) = 25 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_min_label", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_min", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size@96, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30009000

read(3, "-55000\n", 4096)               = 7
close(3)                                = 0
munmap(0x30009000, 4096)                = 0

write(1, " temp2_min: -55.00 (temp2_min)\n", 32 temp2_min: -55.00 (temp2_min)
) = 32 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_max_label", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_max", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size@96, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30009000

read(3, "127000\n", 4096)               = 7
close(3)                                = 0
munmap(0x30009000, 4096)                = 0

write(1, " temp2_max: 127.00 (temp2_max)\n", 32 temp2_max: 127.00 (temp2_max)
) = 32 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_crit_label", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_crit", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size@96, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30009000

read(3, "100000\n", 4096)               = 7
close(3)                                = 0
munmap(0x30009000, 4096)                = 0

write(1, " temp2_crit: 100.00 (temp2_crit"..., 34 temp2_crit: 100.00 (temp2_crit)
) = 34 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_hyst_label", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/temp2_crit_hyst", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size@96, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30009000

read(3, "95000\n", 4096)                = 6
close(3)                                = 0
munmap(0x30009000, 4096)                = 0

write(1, " temp2_hyst: 95.00 (temp2_hyst)"..., 33 temp2_hyst: 95.00 (temp2_hyst)
) = 33 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/alarms_label", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-001a/alarms", O_RDONLY) 3 fstat64(3, {st_mode=S_IFREG|0444, st_size@96, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30009000

read(3, "148\n", 4096)                  = 4
close(3)                                = 0
munmap(0x30009000, 4096)                = 0

write(1, "alarms: 148.00 (alarms)\n", 24alarms: 148.00 (alarms) ) = 24
write(1, "\n", 1
) = 1
write(1, "lm75-i2c-0-48\n", 14lm75-i2c-0-48
) = 14
write(1, "Adapter: MPC adapter\n", 21Adapter: MPC adapter ) = 21 open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/temp_label", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/temp1_input", O_RDONLY) = -1 ENOENT (No such file or directory) open("/sys/devices/platform/fsl-i2c.1/i2c-0/0-0048/_", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, "ERROR: Can\'t get temperature dat"..., 35ERROR: Can't get temperature data!
) = 35
write(1, "\n", 1
) = 1
exit_group(0) = ?
Process 1966 detached

---------

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Michael Brian Willis

Hi Michael,

Quoted 8 lines · Michael Brian Willis

Thank you for your response. Below is the information you requested. Thanks again for your help!
-----

Quoted 2 lines

Odd. Please check that no older libsensors version gets in the way (sensors -v).

[root@myboard /]# sensors -v
sensors version 2.10.5 with libsensors version 2.10.5

OK, that's correct.

Quoted 5 lines
Quoted 1 line

Also, please provide the output of "ls -lR /sys/class/hwmon/*/device/".

[root@myboard /]# ls -lR /sys/class/hwmon/*/device/ /sys/class/hwmon/hwmon0/device/:
total 0
-r--r--r-- 1 root root 4096 Dec 31 1969 alarms

Unrelated to your problem, but it seems to me that your clock is slightly off ;)

Review

Quoted 12 lines
lrwxrwxrwx 1 root root    0 Dec 31  1969 bus -> ../../../../../bus/i2c
lrwxrwxrwx 1 root root    0 Dec 31  1969 driver -> ../../../../../bus/i2c/drivers/max1619
lrwxrwxrwx 1 root root    0 Dec 31  1969 hwmon:hwmon0 -> ../../../../../class/hwmon/hwmon0
-r--r--r-- 1 root root 4096 Dec 31  1969 name
lrwxrwxrwx 1 root root    0 Dec 31  1969 subsystem -> ../../../../../bus/i2c
(quoted diff) +0 -7
-r--r--r-- 1 root root 4096 Dec 31  1969 temp1_input
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_crit
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_crit_hyst
-r--r--r-- 1 root root 4096 Dec 31  1969 temp2_input
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_max
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp2_min
--w------- 1 root root 4096 Dec 31  1969 uevent

This one looks correct.

Quoted 12 lines

/sys/class/hwmon/hwmon1/device/:
total 0

lrwxrwxrwx 1 root root    0 Dec 31  1969 bus -> ../../../../../bus/i2c
lrwxrwxrwx 1 root root    0 Dec 31  1969 driver -> ../../../../../bus/i2c/drivers/lm75
lrwxrwxrwx 1 root root    0 Dec 31  1969 hwmon:hwmon1 -> ../../../../../class/hwmon/hwmon1
drwxr-xr-x 2 root root    0 Dec 31  1969 lm75
-r--r--r-- 1 root root 4096 Dec 31  1969 name
lrwxrwxrwx 1 root root    0 Dec 31  1969 subsystem -> ../../../../../bus/i2c
--w------- 1 root root 4096 Dec 31  1969 uevent

/sys/class/hwmon/hwmon1/device/lm75:
total 0

Review

Quoted 3 lines
(quoted diff) +0 -3
-r--r--r-- 1 root root 4096 Dec 31  1969 temp1_input
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp1_max
-rw-r--r-- 1 root root 4096 Dec 31  1969 temp1_max_hyst

But this one does not! The attributes are in a subdirectory ("lm75") instead of being directly in the device's directory. libsensors doesn't expect this and fails. The lm75 driver in the vanilla kernel does NOT do this, so I suspect that you're using a modified driver.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#4 lore raw
In reply to Michael Brian Willis
Quoted 1 line · Jean Delvare

Unrelated to your problem, but it seems to me that your clock is slightly off ;)

Just slightly :) I just haven't set up my ntp server yet.

Quoted 4 lines

But this one does not! The attributes are in a subdirectory ("lm75") instead of being directly in the device's directory. libsensors doesn't expect this and fails. The lm75 driver in the vanilla kernel does NOT do this, so I suspect that you're using a modified driver.

I am using the LM75 driver that comes with the Denx embedded linux kernel. I found the place in the LM75 driver (drivers/hwmon/lm75.c) where it specifies the attributes to be placed in a separate folder:

static const struct attribute_group lm75_group = {
	
	//don't put attritube files in a separate folder
	//.name  = "lm75",
	.attrs = lm75_attributes,
};

Commenting out the .name line fixes the problem and I can now read temperature data from the LM75.

Thank you so much for all of your help! I'm very glad to get this issue resolved.

Regards,

Michael Willis
Applied Research Labs - University of Texas
willis <at> arlut . utexas . edu

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#5 lore raw
In reply to Michael Brian Willis

Hi Michael,

Quoted 19 lines · Michael Brian Willis
Quoted 1 line · Jean Delvare

Unrelated to your problem, but it seems to me that your clock is slightly off ;)

Just slightly :) I just haven't set up my ntp server yet.

Quoted 4 lines

But this one does not! The attributes are in a subdirectory ("lm75") instead of being directly in the device's directory. libsensors doesn't expect this and fails. The lm75 driver in the vanilla kernel does NOT do this, so I suspect that you're using a modified driver.

I am using the LM75 driver that comes with the Denx embedded linux kernel. I found the place in the LM75 driver (drivers/hwmon/lm75.c) where it specifies the attributes to be placed in a separate folder:

static const struct attribute_group lm75_group = {
	
	//don't put attritube files in a separate folder
	//.name  = "lm75",
	.attrs = lm75_attributes,
};
Quoted 5 lines

Commenting out the .name line fixes the problem and I can now read temperature data from the LM75.

Thank you so much for all of your help! I'm very glad to get this issue resolved.

Glad to know. That's really weird from Denx to have done that, as it breaks lm-sensors as you can see, and I fail to see what advantage there can be to have the attributes in a subfolder anyway. Feel free to complain loudly to them for wasting everybody's time.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#6 lore raw
In reply to Michael Brian Willis

Hello Jean,

Quoted 13 lines · On Fri, 9 Nov 2007 14:19:02 +0100 Jean Delvare wrote:
Quoted 12 lines · Michael Brian Willis
static const struct attribute_group lm75_group = {
	
	//don't put attritube files in a separate folder
	//.name  = "lm75",
	.attrs = lm75_attributes,
};

Commenting out the .name line fixes the problem and I can now read temperature data from the LM75.

Quoted 7 lines
Quoted 2 lines

Thank you so much for all of your help! I'm very glad to get this issue resolved.

Glad to know. That's really weird from Denx to have done that, as it breaks lm-sensors as you can see, and I fail to see what advantage there can be to have the attributes in a subfolder anyway. Feel free to complain loudly to them for wasting everybody's time.

fixed this issue in the Denx Kernel, see:

http://www.denx.de/cgi-bin/gitweb.cgi?p=linux-2.6-denx.git;a=commitdiff;h�89b567f940d2e83d7f1d98321c80435c63ce97;hp72f7b6d74b241558b63895ea9da9744b24e8a8

thanks
Heiko

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors