From: "Peter 'p2' De Schrijver" <peter.de-schrijver@nokia.com>
To: ext Koen Kooi <k.kooi@student.utwente.nl>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] Driver for omap34xx temperature sensor. second version.
Date: Thu, 29 May 2008 15:42:22 +0300 [thread overview]
Message-ID: <20080529124222.GJ5025@codecarver.research.nokia.com> (raw)
In-Reply-To: <46EB7024-F979-48A9-AA23-5B33C4A85F85@student.utwente.nl>
Hi,
>>> root@beagleboard:/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 :)
Cheers,
Peter.
--
goa is a state of mind
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-05-29 12:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 13:56 [PATCH] Driver for omap34xx temperature sensor Peter 'p2' De Schrijver
2008-05-20 21:29 ` Paul Walmsley
2008-05-23 10:49 ` [PATCH] Driver for omap34xx temperature sensor. second version Peter 'p2' De Schrijver
2008-05-28 20:35 ` Tony Lindgren
2008-05-28 23:08 ` Koen Kooi
2008-05-28 23:12 ` Tony Lindgren
2008-05-29 7:22 ` Koen Kooi
2008-05-29 12:42 ` Peter 'p2' De Schrijver [this message]
2008-11-18 17:26 ` Koen Kooi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080529124222.GJ5025@codecarver.research.nokia.com \
--to=peter.de-schrijver@nokia.com \
--cc=k.kooi@student.utwente.nl \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox