Touchscreen controller temperature patch
John S. Skogtvedt
jss2k2 at getmail.no
Thu Nov 15 00:24:22 CET 2007
A forum user requested the feature to get the DS temperature.
I haven't done any "kernel hacking" before but I gave it a shot.
The patch isn't 100% clean. I'm not sure about overloading the
FIFO_POWER case and and 3 bits of the temperature (20.12 fixed point) is
lost. But that probably shouldn't matter, the temperature isn't that
The temperature returned is that on the touchscreen controller chip, not
apply patch, boot, cat /proc/tsc_temp
Is the patch clean enough to be committed? And is this a feature we want?
>From http://www.bottledlight.com/ds/index.php/Misc/TouchScreen :
Temperature diode two has a 91 times larger current, and the absolute
temperature can be calculated based on the measurements of the two
sensors. I'll present a fixed point algorithm for computing the
temperature in degrees C (see the TSC 2046 datasheet for the original
temperature(deg C) = 8490 * (V_I91 - V_I1) - 273*4096; (in 20.12 fixed
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the dslinux-devel