Skip to contentSkip to conversation

Backport to 2.4 kernel of lm77 to use in wrap board

lm-sensors Beat Meier 2 participants 4 messages Aug 10, 2005 – Aug 11, 2005

lore
Share & tools
lore

Beat Meier

author
#0 lore raw

Hello

I'm trying to backport lm77 to kernel 2.4.
lm77.c compiles :-) but it is not recognized on the wrap board. The lm77 on wrap is accessible on secondary I2C bus at address 90h How can I access it there?

I've seen in a thread that in 2.6 you must use scx200_acb (because no userspace support).
What can I use in 2.4 kernel so the lm77 is acessible?

To get/set temperature do I need userspace support?

Thanks for any help

Beat

#1 lore raw

Hi Beat,

Quoted 2 lines · Beat Meier

I'm trying to backport lm77 to kernel 2.4.
lm77.c compiles :-) but it is not recognized on the wrap board.

Just getting it to compile might not be sufficient. There are some significant changes betwen 2.4 and 2.6 as far as hardware monitoring drivers are concerned. But if you copy what is done in lm75.c for example, that should work.

If you get it to work, please send us the modified lm77.c file so that we can add it to lm_sensors.

Quoted 2 lines

The lm77 on wrap is accessible on secondary I2C bus at address 90h. How can I access it there?

You certainly mean 48h.

You need a bus driver for the I2C bus the LM77 chip is connected to.

Quoted 2 lines

I've seen in a thread that in 2.6 you must use scx200_acb (because no userspace support).

This is unrelated. The lack of user-space support means that you won't see the data related to the LM77 chip when running "sensors". User-space doesn't replace the bus driver in any way.

Quoted 1 line

What can I use in 2.4 kernel so the lm77 is acessible?

Linux 2.4 has the scx200_acb driver too, if this is what you need. It's not distributed with lm_sensors, it is part of the official kernel tree.

You can use sensors-detect and/or i2cdetect to make sure your i2c bus is properly set up before even trying the lm77 driver.

Quoted 1 line

To get/set temperature do I need userspace support?

You don't need it, it's only more convenient.

--
Jean Delvare

#2 lore raw
In reply to Beat Meier

Hi Beat,

Quoted 5 lines
Quoted 1 line

You certainly mean 48h.

The manual of the wrap board says the following:

The LM77 thermal sensor sits on the secondary I2C bus, at address 90h.

And it's wrong. They're confusing the first byte sent in a write transaction ((48h << 1) + 0 = 90h) with the 7-bit address of the device (0x48). That's a common mistake.

Quoted 9 lines
Quoted 1 line

You need a bus driver for the I2C bus the LM77 chip is connected to.

This driver is not already available? How can I identify the bus? How to I setup a bus?

I've seen that in openbsd there is support for LM77 and Nationl Geode SC1100.
Could we have a clue from there? I don't have BSD so I cannot identify in which packages this stuff is ...

I don't know, I've never worked with such boards before.

Quoted 2 lines

I'm trying since days to connect to the national web site with no luck
...

Try the AMD website. National Semiconductor sold their Geode buisness to AMD some years ago.

Signature · 1 line
Jean Delvare
#3 lore raw
In reply to Beat Meier

Hi Beat,

Please reply to the list rather than to me only.

Quoted 11 lines

The problem is that if I to
modprobe scx200_acb in Linux 2.4
the message
No such device
comes
If I try to use i2detect -a 1 etc. the messages
No such device
comes also and i have created /dev/i2c-X
Do I need other modules form the kernel than scx200_acb? I have a self compiled kernel
This is in fact for SCX200 and not SC1100. Can I use it?

I really don't know. I never used such boards myself, and I probably won't until someone decides to donate one.

Reading the original post from Andras Bali (who wrote the lm77 driver) reveals that he was using the scx200_acb driver under Linux 2.6, but had to change some values to get it to work:

http://lists.lm-sensors.org/pipermail/lm-sensors/2004-July/008163.html

Maybe you need to do the same changes to the 2.4 driver, and maybe even more if the 2.6 driver is more up to date that the 2.4 driver.

Maybe Andras Bali would be able to help you as he seemed to know the hardware very well.

--
Jean Delvare