Difference between revisions of "TSC2102 Linux driver"

From ArmadeusWiki
Jump to: navigation, search
m (Miscelleanous)
m
Line 38: Line 38:
 
[[Image:Tslib_test.png]]
 
[[Image:Tslib_test.png]]
  
If it does not work you can quickly check driver fonctionnality; touch the screen and check that tsc2102 interrupts count is increasing:
+
If it does not work you can quickly check driver functionality; touch the screen and check that tsc2102 interrupts count is increasing:
 
<pre class="apf">
 
<pre class="apf">
 
  # cat /proc/interrupts
 
  # cat /proc/interrupts
Line 58: Line 58:
 
</pre>
 
</pre>
  
Further informations concerning the tslib can be found [[tslib | here]]
+
Further information concerning the tslib can be found [[tslib | here]]
  
 
===Audio===
 
===Audio===
Line 64: Line 64:
 
You can play sounds through [[ALSA| ALSA interface]].
 
You can play sounds through [[ALSA| ALSA interface]].
  
===Miscelleanous===
+
===Miscellaneous===
 
* get temperature and voltage with [http://lxr.linux.no/source/Documentation/hwmon/sysfs-interface?v=2.6.18 hwmon] (Hardware Monitoring) interface. For example, get board temperature from TSC210x:
 
* get temperature and voltage with [http://lxr.linux.no/source/Documentation/hwmon/sysfs-interface?v=2.6.18 hwmon] (Hardware Monitoring) interface. For example, get board temperature from TSC210x:
 
<pre class="apf">
 
<pre class="apf">

Revision as of 15:47, 1 September 2009

This page details the installation and the usage of the Linux drivers for the TSC210x chips (touch & temp/voltage control). Sound (ALSA) specific part can be found here.

Driver Installation

These drivers are now installed by default in standard Armadeus rootfs. Here you will find instructions to know how we configured Linux to activate these drivers (may be useful if you want to deactivate them).

Architecture

Touchscreen (tsc2102_ts.ko) HWmon ALSA
TSC210x Main (SPI) driver (tsc2102.ko)
Linux API

Usage

  • load all the needed drivers:
 # modprobe tsc2102_ts
 TI TSC2102 driver initializing
 input: TSC2102 Touchscreen as /class/input/input0
 TSC2102 touchscreen driver initialized

Touchscreen

Before use, the touchscreen has to be (at least one time) calibrated:

 # ts_calibrate

Tslib calibrate.png

Then it can be tested with:

 # ts_test

Tslib test.png

If it does not work you can quickly check driver functionality; touch the screen and check that tsc2102 interrupts count is increasing:

 # cat /proc/interrupts
           CPU0
 26:          0         MPU  IMX-uart
 29:         17         MPU  IMX-uart
 30:         22         MPU  IMX-uart
 35:         12         MPU  imx-mmc
 39:         14         MPU  I2C_IMX
 40:         16         MPU  imx-spi.2
 41:          0         MPU  imx-spi.1
 59:       3682         MPU  i.MX Timer Tick
 60:          0         MPU  DMA
 61:          0         MPU  DMA
 110:         0        GPIO  eth0
 168:         0        GPIO  tsc2102   <<<<--------
 Err:         0
 #

Further information concerning the tslib can be found here

Audio

You can play sounds through ALSA interface.

Miscellaneous

  • get temperature and voltage with hwmon (Hardware Monitoring) interface. For example, get board temperature from TSC210x:
 # modprobe hwmon
 # cat /sys/class/hwmon/hwmon0/device/temp1_input         -- result in m°C

Links