OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Hardware Monitoring, Thermal Zone Drivers
Nick Lee
post Aug 2 2010, 01:19 AM
Post #1





Group: Members
Posts: 2
Joined: 30-July 10
Member No.: 83,187



I'm trying to include the driver for National Semiconductor's LM63 chip in our build and am having trouble getting it to work. I've selected the following in the kernel configuration:

(*) I2C Support
(*) I2C Device Interface
(*) Autoselect Pertinent Helper Modules
(M) Hardware Monitoring Support
(M) National Semiconductor LM63
(M) Generic Thermal sysfs driver
(*) Hardware Monitoring Support

In bitbake, I've added kernel-modules and lmsensors-apps. The latter seems to exclude all the required libraries from the final image, even though they get built - but when I copy them manually to the board, I can run i2cdump, etc. Running i2cdump on the correct address for the sensor I'm trying to read gives me the temperature, as expected. However, when I link a program to libsensors (which also has to be copied across manually, which is probably a clue to what the problem is), and attempt to read from the sensor using the interface provided by lmsensors, it fails with an error code which I've traced to the part of the source code that reads from sysfs. Looking in sysfs, there appears to be no entry for the temperature sensor, though I'm not entirely sure where it should be! I've done modprobe lm63 and modprobe thermal_sys.

Should there be an entry somewhere in /dev or /sys/fs for the various sensors supported by the LM63 module?
How do I correctly add support for this module in bitbake / kernel config, as I'm convinced there are bits missing?

Hope I've provided enough information - if there is anything missing, please ask!

Ta,

Nick
Go to the top of the page
 
+Quote Post
Nick Lee
post Aug 3 2010, 06:11 AM
Post #2





Group: Members
Posts: 2
Joined: 30-July 10
Member No.: 83,187



Ok, I've made some progress. I've added kernel-modules, lmsensors-apps, lmsensors-scripts, libsensors, sysfsutils and various perl modules required by sensors-detect to the bitbake recipe for my image. I've commented out the PCI detection in sensors-detect, since I don't have /sys/bus/pci on my system. When I run it it claims I have no sensors. This is after I've modprobed lm63 (to add a driver for lm96163 chip). When I run my software against the lmsensors library, I'm managing to get a list of features out of the chip, but can't read a particular feature:

(my debug)
Feature 51: temp1
Feature 52: temp1_high
Feature 57: temp2
Feature 58: temp2_high
Feature 59: temp2_low
Feature 60: temp2_crit
Feature 80: temp2_crit_hyst
Feature 81: alarms
Feature 84: fan1
Feature 87: pwm1
Feature 88: pwm1_enable
Could not get feature: returned -4 (Can't access procfs/sysfs file)

dmesg also comes up with the following on modprobe lm63:

i2c-core: driver [lm63] registered
i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x4c
i2c-adapter i2c-0: master_xfer[0] W, addr=0x4c, len=0
i2c-adapter i2c-0: master_xfer[0] W, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[1] R, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[0] W, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[1] R, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[0] W, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[1] R, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[0] W, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[1] R, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[0] W, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[1] R, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[0] W, addr=0x4c, len=1
i2c-adapter i2c-0: master_xfer[1] R, addr=0x4c, len=1
i2c-adapter i2c-0: Unsupported chip (man_id=0x01, chip_id=0x49).

The lmsensors library documentation suggests inserting kernel module i2c-sensors, but as far as I can work out, this hasn't been in the kernel since version 2.6.14.

Hope this means something to somebody and that they can help!

Nick
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th August 2014 - 01:12 PM