Re: [linux-sunxi] Re: [PATCH][RFC] Add standalone driver for the A20 Soc TP embedded temperature sensor

2014-11-09 Thread Thomas . Kaiser
thomas.kai...@phg-online.de wrote:
 In the meantime I realized that it's bit 7 of the touchpanel's TP_CTRL1 
 register so when sunxi-dbgreg.ko is loaded I should succeed with
 
 echo 'f1c25004'  /sys/devices/virtual/misc/sunxi-dbgreg/rw/read;
 
 Corentin's code in this module as well as the sunxi-dbgreg-workaround I use 
 set bit 4 to 1 but leave bit 7 untouched.

Just realized my mistake. The method I used (writing \x10 to TP_CTRL1 using 
sunxi-dbgreg.ko) led to bit 7 being cleared and therefore setting CHOP_TEMP_EN 
from enable to disable. Restoring the default by writing \x90 to TP_CTRL1 gives 
temperature readouts way closer to reality. If CHOP_TEMP_EN is disabled the 
temperatures reported show in some situations a rather large offset to the 
actual temperatures in one or the other direction. If  CHOP_TEMP_EN is enabled 
the deviation is much smaller.

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH][RFC] Add standalone driver for the A20 Soc TP embedded temperature sensor

2014-11-05 Thread Thomas . Kaiser
clabbe.montjoie wrote:
 For the temperature value, I cannot found any document on how to transform 
 the raw value in °C.
 [...]
 Under heavy loads, the temperature of both sensors rise linearly.

But based on a series of tests with and without heatsinks applied to the A20 I 
came to the conclusion that the values reported here must be already 
pre-calibrated. The base idle temperatures reported without an applied heatsink 
are way higher compared to the value of the very same A20 with heatsink:

http://forum.lemaker.org/forum.php?mod=redirectgoto=findpostptid=8137pid=40817

Does anyone have a clue how the A20's CHOP_TEMP_EN register (according to the 
A20's user manual: Chop temperature calibration enable: 0: Disable, 1: 
Enable) can be read/set?

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: [PATCH][RFC] Add standalone driver for the A20 Soc TP embedded temperature sensor

2014-11-05 Thread Christian Ege
Am 05.11.2014 12:44 schrieb thomas.kai...@phg-online.de:

 clabbe.montjoie wrote:
  For the temperature value, I cannot found any document on how to
transform the raw value in °C.
  [...]
  Under heavy loads, the temperature of both sensors rise linearly.

 But based on a series of tests with and without heatsinks applied to the
A20 I came to the conclusion that the values reported here must be already
pre-calibrated. The base idle temperatures reported without an applied
heatsink are way higher compared to the value of the very same A20 with
heatsink:


http://forum.lemaker.org/forum.php?mod=redirectgoto=findpostptid=8137pid=40817

 Does anyone have a clue how the A20's CHOP_TEMP_EN register (according to
the A20's user manual: Chop temperature calibration enable: 0: Disable, 1:
Enable) can be read/set?

For read write access from user space you can try to use devmem2 with the
address given in the user manual.

http://manpages.ubuntu.com/manpages/natty/man1/devmem2.1.html

Regards,
Christian

 --
 You received this message because you are subscribed to the Google Groups
linux-sunxi group.
 To unsubscribe from this group and stop receiving emails from it, send an
email to linux-sunxi+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.