Op 29 mei 2008, om 14:42 heeft Peter 'p2' De Schrijver het volgende geschreven:

Hi,

[EMAIL PROTECTED]:/sys/class/hwmon/hwmon0/device# cat temp1_input
96

does anyone from TI have a hint if the chip is really that hot, or
that we need to scale the value?

Maybe it's in Fahrenheit?

That was my first thought, but looking that the omap3530 TRM
(spruf98.pdf) on page 836:

ADC code  Temperature °C
                   From    To
0                 -40         -40
32               -0.7        0.8
64                44.9      46.3
96                89.3      90.6

And that maps to the adc_to_temp var at line 69 from 
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;f=drivers/hwmon/omap34xx_temp.c
Even if it didn't map, the raw ADC value is  only ±6 °C off from the
real temperature around that point. So the adc value the kernel reads
gets translated correctly to °C, so if we think it's incorrect, the
kernel might be reading the ADC wrong.


The driver basically does what's described in figure 7-16 of the
omap3430 TRM. Ie, rise SOC, wait until EOCZ rises, lower SOC, wait EOCZ goes low, read result. The timeouts are taken directly from this figure.
So I can't really see what the driver would be doing wrong, unless
obviously the hardware doesn't work the way the TRM describes :)

Some interesting observations:

[EMAIL PROTECTED]:~# cat /sys/devices/platform/omap34xx_temp/temp1_input
45
[EMAIL PROTECTED]:~# cat /sys/devices/platform/omap34xx_temp/temp1_input
80

The beagle is using an ES3.0 omap3, the evm an ES2.1 omap3, so I suspect something got fixed in between :)

regards,

Koen

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to