From: Martin.Jansa <[email protected]>

---
 .../xserver-xorg-conf/om-gta02/xorg.conf           |   52 ++++++++++++++++----
 .../xserver-kdrive-common/Xserver                  |   28 ++++++++--
 .../xserver-kdrive-common/shr/89xTs_Calibrate      |   18 +++++++
 3 files changed, 82 insertions(+), 16 deletions(-)
 create mode 100644 
recipes/xserver-kdrive-common/xserver-kdrive-common/shr/89xTs_Calibrate

diff --git a/recipes/xorg-xserver/xserver-xorg-conf/om-gta02/xorg.conf 
b/recipes/xorg-xserver/xserver-xorg-conf/om-gta02/xorg.conf
index 3fc8d83..7d7589f 100644
--- a/recipes/xorg-xserver/xserver-xorg-conf/om-gta02/xorg.conf
+++ b/recipes/xorg-xserver/xserver-xorg-conf/om-gta02/xorg.conf
@@ -1,20 +1,52 @@
+Section "Module"
+        Load    "glx"
+        Load   "dri2"
+EndSection
+
+
 Section "Monitor"
-        Identifier      "Builtin Default Monitor"
+        Identifier      "LCD Panel"
 EndSection
 
+
 Section "Device"
-        Identifier      "Builtin Default glamo Device 0"
-        Driver  "glamo"
-EndSection
+        Identifier      "Glamo Graphics Chip"
+        Driver          "glamo"
+EndSection  
+
 
 Section "Screen"
-        Identifier      "Builtin Default glamo Screen 0"
-        Device  "Builtin Default glamo Device 0"
-        Monitor "Builtin Default Monitor"
+        Identifier      "Default Screen"
+        Device          "Glamo Graphics Chip"
+        Monitor         "LCD Panel"
 EndSection
 
-Section "ServerLayout"
-        Identifier      "Builtin Default Layout"
-        Screen  "Builtin Default glamo Screen 0"
+
+Section "InputDevice"
+       Identifier      "Power Button"
+       Driver          "evdev"
+       Option          "Device"        "/dev/input/event0"
 EndSection
 
+
+Section "InputDevice"
+       Identifier      "AUX Button"
+       Driver          "evdev"
+       Option          "Device"        "/dev/input/event4"
+EndSection
+
+
+Section "InputDevice"
+       Identifier      "Touchscreen"
+       Driver          "evdev"
+       Option          "Device"        "/dev/input/event1"
+EndSection
+
+
+Section "ServerLayout"
+        Identifier      "Default Layout"
+        Screen          "Default Screen"
+       InputDevice     "Power Button"
+       InputDevice     "AUX Button"
+       InputDevice     "Touchscreen"
+EndSection
diff --git a/recipes/xserver-kdrive-common/xserver-kdrive-common/Xserver 
b/recipes/xserver-kdrive-common/xserver-kdrive-common/Xserver
index 584cb0a..f3d93a2 100644
--- a/recipes/xserver-kdrive-common/xserver-kdrive-common/Xserver
+++ b/recipes/xserver-kdrive-common/xserver-kdrive-common/Xserver
@@ -49,10 +49,13 @@ if [ -z "$TSLIB_TSDEVICE" ] && [ -e 
/dev/touchscreen/ucb1x00 ]; then
   ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00"
 fi
 
-# use usb mouse if present
-# Xorg doesn't support "-mouse" option, and uses /dev/input/mice automatically
-if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ] && [ "$XSERVER" != 
"Xorg" ]; then
-  ARGS="$ARGS -mouse /dev/input/mice"
+# Xorg doesn't support "-mouse" option, and uses /dev/input/mouse0 
automatically
+# On neo we have touchscreen as /dev/input/mice, usb connected mouse would be 
probably mouse0
+if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mouse0 ]; then
+  if [ "$XSERVER" != "/usr/bin/Xorg" ]; then
+    ARGS="$ARGS -mouse /dev/input/mouse0"
+  fi
+  USB_MOUSE="1"
 fi
 
 # start off server in conventional location.
@@ -128,8 +131,21 @@ case `module_id` in
                      fi
                      DPI=142
                 fi 
-                ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -mouse tslib 
-hide-cursor ${PPM} vt1" 
-               XSERVER=/usr/bin/Xglamo 
+
+                if [ "$XSERVER" = "/usr/bin/Xorg" ]; then
+                     if [ "$DPI" = "285" ]; then
+                         # Fix for only 3 columns of icons in illume desktop
+                         DPI=280
+                     fi
+                     if [ -z "${USB_MOUSE}" ]; then
+                         # Fix for segfault while typing on illume keyboard
+                         ARGS="$ARGS -nocursor"
+                     fi
+                     ARGS="$ARGS -dpi ${DPI} ${PPM} vt1"
+                else
+                     ARGS="$ARGS -dpi ${DPI} -screen ${SCREEN_SIZE} -mouse 
tslib -hide-cursor ${PPM} vt1" 
+                     XSERVER=/usr/bin/Xglamo 
+                fi
                ;;
        "Nokia N770")
                 ARGS="$ARGS -dpi 225 -screen ${SCREEN_SIZE} -mouse tslib" 
diff --git 
a/recipes/xserver-kdrive-common/xserver-kdrive-common/shr/89xTs_Calibrate 
b/recipes/xserver-kdrive-common/xserver-kdrive-common/shr/89xTs_Calibrate
new file mode 100644
index 0000000..f707301
--- /dev/null
+++ b/recipes/xserver-kdrive-common/xserver-kdrive-common/shr/89xTs_Calibrate
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ]
+do
+   /usr/bin/xtscal
+done
+
+SYSFS_CALIBRATION_DIR=/sys/bus/i2c/devices/0-0073/s3c2440-ts/calibration
+
+if [ -d $SYSFS_CALIBRATION_DIR ]; then
+  echo 0 > $SYSFS_CALIBRATION_DIR/0
+  echo 80000 > $SYSFS_CALIBRATION_DIR/1
+  echo -8000000 > $SYSFS_CALIBRATION_DIR/2
+  echo -81000 > $SYSFS_CALIBRATION_DIR/3
+  echo 0 > $SYSFS_CALIBRATION_DIR/4
+  echo 75000000 > $SYSFS_CALIBRATION_DIR/5
+  echo 65536 > $SYSFS_CALIBRATION_DIR/6
+fi
-- 
1.6.5

_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to