diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2009-11-18 14:10:49 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2009-12-22 13:42:27 +0100 |
commit | e7d66e8c58c475b2452dba43c748c1365480636b (patch) | |
tree | 9152e04f9e578738d175ddd011543db3943bfb97 /recipes/xserver-kdrive-common | |
parent | 4fd62efecf86b97028c8d3a31356430397453b36 (diff) |
xserver-kdrive-common: add Ts_Calibrat script for Xorg
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes/xserver-kdrive-common')
-rw-r--r-- | recipes/xserver-kdrive-common/xserver-kdrive-common/Xserver | 28 | ||||
-rw-r--r-- | recipes/xserver-kdrive-common/xserver-kdrive-common/shr/89xTs_Calibrate | 23 |
2 files changed, 45 insertions, 6 deletions
diff --git a/recipes/xserver-kdrive-common/xserver-kdrive-common/Xserver b/recipes/xserver-kdrive-common/xserver-kdrive-common/Xserver index 584cb0a53c..2e0db5bfbb 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} 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 0000000000..b852c0cb1d --- /dev/null +++ b/recipes/xserver-kdrive-common/xserver-kdrive-common/shr/89xTs_Calibrate @@ -0,0 +1,23 @@ +#!/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 + # moved in 2.6.31 + SYSFS_CALIBRATION_DIR=/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/s3c2410-ts/calibration +fi + +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 |