**********************************************************************

 README.TXT for the LINUX Touch Panel Driver

 Copyright(C) 2001-2002 Fujitsu Component.  All rights reserved.

**********************************************************************

1. Introduction

  This driver work on X Window system (Xfree86) of LINUX.
  This driver supports the following operations by Fujitsu Component
  Touch Panel

    Absolute mode. 
    2 valuators (x and y axis). 
    1 button. 


  This driver can be used as a controller of Serial, PS2, and USB I/F Controller. 

    Serial I/F Controller : N010-0559-V021,-V022,-V031,-V032 
    PS2 I/F Controller    : N010-0559-V041,-V042,-V043,-V051 
    USB I/F Controller    : A1NC41120-0004


  Details of the environment that this driver works are as follows.  

    LINUX Kernel Version is 2.2.14 and 2.4.2
    Xfree86 Version is 3.3.6 and 4.0.3


  It was confirmed that this driver worked by the following LINUX distributions. 

    Red Hat Linux 6.2J
    Red Hat Linux 7.1
    TurboLinux Server Japanese 6.1

2. Installation

   ### Note capital letters and small letters. ### 
   
 2.1 In case of LINUX Kernel Version is 2.2.14 and Xfree86 Version is 3.3.6

    (1) Copy "FidFont" in the directory of "/etc"
    
    (2) Copy "xf86Fidt.so" in the directory of "/usr/X11R6/lib/modules"

    (3) Modify the Xfree86 configuration file as the following 1) 2) 3).  
        In most cases the "XF86Config" file is located in "/etc/x11" 
        (or in "/etc"). 

        1)Add "ModulePath" of the Files section. 

            Section "Files"
               .
               .
                ModulePath   "/usr/X11R6/lib/modules"
            EndSection


        2)Add the "Module" section. 

            Section "Module"
               Load "xf86Fidt.so"
            EndSection


        3)Add the "XInput" section. 
          1. Serial interface Touch Panel Setting

           Section "XInput"
               SubSection "FidTouchPanel"
                   DeviceName "fidtouch"
                   Port "/dev/ttyS0"        # your serial port
                   interfacetype "serial"
                   SetRate 5
                   Beep 0
                   Freq 1000
                   Duration 50
                   BeepTiming 0
                   SpinTop 0
                   XYConvert 0
                   alwayscore
               EndSubSection
          EndSection

          This sample parameter is the following setting. 
           * Connected port = /dev/ttyS0 
             (In most cases the "/dev/ttyS0" is the Serial1(com1) port.)
           * Coordinates sending interval = 25ms (5*5ms)   
           * Beep is not sounded
           * Frequency of Beep = 1000Hz
           * Beep time = 50ms
           * Beep rings when touching. 
           * There is no coordinates rotation.
           * X and Y coordinates are not converted.
           * The touch panel is always used. 

         2. PS2 interface Touch Panel Setting

           Section "XInput"
               SubSection "FidTouchPanel"
                   DeviceName "fidtouch"
                   Port "/dev/psaux"        # your PS2 port
                   interfacetype "ps2"
                   Beep 0
                   Freq 1000
                   Duration 50
                   BeepTiming 0
                   SpinTop 0
                   XYConvert 0
                   alwayscore
               EndSubSection
           EndSection

           This sample parameter is the following setting. 
           * Connected port = /dev/psaux 
             (In most cases the "/dev/psaux" is the PS2 port.)
           * Beep is not sounded
           * Frequency of Beep = 1000Hz
           * Beep time = 50ms
           * Beep rings when touching. 
           * There is no coordinates rotation.
           * X and Y coordinates are not converted.
           * The touch panel is always used. 

          Attention:
            Delete the PS2 mouse parameter of the Pointer section 
            so that the device should not do the conflict. 

         3. Details of parameter

         1) Port
          Specify the port where the device is connected.

         2) interfacetype
          Specify the interface type of the device. 
            "serial" : Serial interface Touch Panel
            "ps2"    : PS2 interface Touch Panel

         3) DeviceName
          Specify "fidtouch". This name is a command parameter of xsetpointer. 
          Change the name when the name overlaps.  

         4) SetRate 
         This parameter is Serial interface Touch Panel only.
         Specify Coordinates sending interval.Decide the value within the
         range of 2-31 ( 2*5ms=10ms - 31*5ms=155ms). 5 ( 5*5ms=25ms) is
         recommended.

         5) Beep 
         Specify whether to sound Beep. 
          0 : There is no Beep. 
          1 : There is Beep. 

         6) Freq 
         Specify the frequency of Beep. Decide the value within the
         range of 37-10000 ( 37Hz - 10000Hz). 1000 (1000Hz) is recommended.

         7) Duration 
         Specify the Beep time. Decide the value within the range of 1-1000 
         ( 1ms - 1000ms). 50 (50ms) is recommended.

         8) BeepTiming 
         Specify timing by which Beep is sounded. 
           0 : Touch sounds the sound when on.
           1 : Touch sounds the sound when off. 
         
         9) SpinTop
         Coordinates are rotated by the following values.
           0 : There is no coordinates rotation. 
           1 : Coordinates rotate right 90 times. 
           2 : Coordinates rotate right 180 times. 
           3 : Coordinates rotate right 270 times. 

         10) XYConvert
         X and Y coordinates are changed by the following values.
           0 : X and Y coordinates are not converted.
           1 : X coordinates reverse. 
           2 : Y coordinates reverse. 

         11) alwayscore
         Specify alwayscore when you always use the touch panel. 
         The touch panel does not work even if X Windows system is started 
         when alwayscore is not specified. The touch panel works when the 
         xsetpointer command is executed. 

 2.2 In case of LINUX Kernel Version is 2.4.2 and Xfree86 Version is 4.0.3
	
    Please do only (1)-(3) when you use Serial and PS/2. 
    Please do (1)-(7) when you use USB. 

    (1) Copy "FidTouch_drv.o" in the directory of "/usr/X11R6/lib/modules/input"
    
    (2) Copy "FidFont" in the directory of "etc"

    (3) Modify the Xfree86 configuration file as the following 1) 2).  
        In most cases the "XF86Config-4" file is located in "/etc/x11" 
        (or in "/etc"). 

        1)Add "InputDevice" of the ServerLayout section. 

            Section "ServerLayout"
               .
               .
                InputDevice    "TouchPanel" "alwaysCore"
            EndSection


        2)Add the "InputDevice" section. 
          1. Serial interface Touch Panel Setting

           Section "InputDevice"
               Identifier  "TouchPanel"
               Driver      "FidTouch"
               Option      "DeviceName" "fidtouch"
               Option      "Device" "/dev/ttyS0"
               Option      "interfacetype" "serial"
               Option      "SetRate" "5"
               Option      "Beep" "0"
               Option      "Freq" "1000"
               Option      "Duration" "50"
               Option      "BeepTiming" "0"
               Option      "SpinTop" "0"
               Option      "XYConvert" "0"
           EndSection

          This sample parameter is the following setting. 
           * Connected port = /dev/ttyS0 
             (In most cases the "/dev/ttyS0" is the Serial1(com1) port.)
           * Coordinates sending interval = 25ms (5*5ms)   
           * Beep is not sounded
           * Frequency of Beep = 1000Hz
           * Beep time = 50ms
           * Beep rings when touching. 
           * There is no coordinates rotation.
           * X and Y coordinates are not converted.
           * The touch panel is always used. 

         2. PS2 interface Touch Panel Setting

           Section "InputDevice"
               Identifier  "TouchPanel"
               Driver      "FidTouch"
               Option      "DeviceName" "fidtouch"
               Option      "Device" "/dev/psaux"
               Option      "interfacetype" "ps2"
               Option      "Beep" "0"
               Option      "Freq" "1000"
               Option      "Duration" "50"
               Option      "BeepTiming" "0"
               Option      "SpinTop" "0"
               Option      "XYConvert" "0"
           EndSection

           This sample parameter is the following setting. 
           * Connected port = /dev/psaux 
             (In most cases the "/dev/psaux" is the PS2 port.)
           * Beep is not sounded
           * Frequency of Beep = 1000Hz
           * Beep time = 50ms
           * Beep rings when touching. 
           * There is no coordinates rotation.
           * X and Y coordinates are not converted.
           * The touch panel is always used. 

          Attention:
            Delete the PS2 mouse parameter of the Pointer section 
            so that the device should not do the conflict. 

         3. USB interface TouchPanel Setting

           Section "InputDevice"
               Identifier  "TouchPanel"
               Driver      "FidTouch"
               Option      "DeviceName" "fidtouch"
               Option      "Device" "/dev/FidTouch"
               Option      "interfacetype" "usb"
               Option      "Beep" "0"
               Option      "Freq" "1000"
               Option      "Duration" "50"
               Option      "BeepTiming" "0"
               Option      "SpinTop" "0"
               Option      "XYConvert" "0"
           EndSection

           This sample parameter is the following setting. 
           * Connected port = /dev/FidTouch 
             (The "/dev/FidTouch" is setting only for Fujitsu Component 
              Touch Panel for USB. )
           * Beep is not sounded
           * Frequency of Beep = 1000Hz
           * Beep time = 50ms
           * Beep rings when touching. 
           * There is no coordinates rotation.
           * X and Y coordinates are not converted.
           * The touch panel is always used. 

         4. Details of parameter

         1) DeviceName
          Specify "fidtouch". This name is a command parameter of xsetpointer. 
          Change when the name overlaps. 

         2) Device
          Specify the port where the device is connected.

         3) interfacetype
          Specify the interface type of the device. 
            "serial" : Serial interface Touch Panel
            "ps2"    : PS2 interface Touch Panel
            "usb"    : USB interface Touch Panel

         4) Beep 
         Specify whether to sound Beep. 
          0 : There is no Beep. 
          1 : There is Beep. 

         5) Freq 
         Specify the frequency of Beep. Decide the value within the
         range of 37-10000 ( 37Hz - 10000Hz). 1000 (1000Hz) is recommended.

         6) Duration 
         Specify the Beep time. Decide the value within the range of 1-1000 
         ( 1ms - 1000ms). 50 (50ms) is recommended.

         7) BeepTiming 
         Specify timing by which Beep is sounded. 
           0 : Touch sounds the sound when on.
           1 : Touch sounds the sound when off. 
           
         8) SpinTop
         Coordinates are rotated by the following values.
           0 : There is no coordinates rotation. 
           1 : Coordinates rotate right 90 times. 
           2 : Coordinates rotate right 180 times. 
           3 : Coordinates rotate right 270 times. 

         9) XYConvert
         X and Y coordinates are changed by the following values.
           0 : X and Y coordinates are not converted.
           1 : X coordinates reverse. 
           2 : Y coordinates reverse. 
         
        Attention:
            If you use the PS/2 touch panel with LINUX Kernel Version 2.4.2 ,
            Please do the following process. 
            
            1)Please comment out the following part of PS/2 driver.
              
              PS/2 driver file:
                 /usr/src/linux-2.4.2-2/drivers/char/pc_keyb.c. 
             
             Comment out part:
                 static inline void handle_mouse_event(unsigned char scancode)
                 {
                 .
                 .
                 //   else if(scancode == AUX_RECONNECT){
                 //   queue->head = queue->tail = 0;  /* Flush input queue */
                 //   __aux_write_ack(AUX_ENABLE_DEV);  /* ping the mouse :) */
                 //   return;
                 //   }
                 .
                 .
                 #endif
                 }
                
            2)Please restructure the kernel. 

    (4) Copy "FidTouch.o" in the directory of "/lib/modules/2.4.2-2/kernel/drivers/usb"
 
    (5) It is written in the last line of the "modules.dep" file located in 
       "/lib/modules/2.4.2-2" as "/lib/modules/2.4.2-2/kernel/drivers/usb/FidTouch.o:". 

    (6) The sentence like the following examples is written in the "modules.conf" file 
        located in "/etc". 

        Default sentences:
          alias parport_lowlevel parport_pc
          alias usb_controller usb-ohci

        Mended sentences:
          alias parport_lowlevel parport_pc
          alias usb_controller usb-ohci
          post-install usb-ohci modprobe input
          post-install input modprobe FidTouch

    (7) "FidTouch_load" in the floppy disk is executed.

    Attention:
       1) The default sentences of procedure (5) might be different.
       2) This USB touch panel driver does not correspond to the PNP operation. 

3.Calibration

 Match coordinates of the touch panel by the GUI program ("fidcals","fidcalpu")

 1)Start X window system (Xfree86).
 2)Run "fidcals".
 3)Touch two cross on the screen. 
 4)Restart X window. Then,the calibration become effective.

 The Calibration file is written in "/etc/FidtDataS" for Serial.
 The Calibration file is written in "/etc/FidtDataP" for PS2 and USB.

 Attention:
   * In the case that PS/2,USB Touch Panel, select "fidcalpu"
     at step 2) this time.
     
   * The display character of the Calibration software is set by "/etc/FidFont". 
     This file is the following setting. 
     
      The first line  : Displayed character.
      The second line : Font of displayed character.


4.Limitations
 
 1)Automatic detection of the mouse might start when Linux starts. 
   At this time,The touch panel might be found as a mouse. 
   In this case,Please do not register the touch panel as a mouse. 
    
 2)X Window does not operate only by the touch panel for LINUX Kernel 
   Version 2.4.2 , Xfree86 Version 4.0.3.