Re: [PATCH] Driver for omap34xx temperature sensor. second version.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux