Touchscreen controller temperature patch

John S. Skogtvedt jss2k2 at
Thu Nov 15 00:24:22 CET 2007

A forum user requested[1] 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
accurate anyway.

The temperature returned is that on the touchscreen controller chip, not
external/ambient temperature.

 apply patch, boot, cat /proc/tsc_temp

Is the patch clean enough to be committed? And is this a feature we want?


>From :

"""Temperature calculation:

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...
Name: tsc_temp.diff

More information about the dslinux-devel mailing list