From e10600ea699386c6e5db0f5199edbcea848cc5f4 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Mon, 23 Sep 2013 16:34:20 +0200 Subject: [PATCH] meta-digi-dey: rework mdev touchscreen handler So it creates '/dev/input/touchscreen0' symbolic link for well known touch screen devices. Signed-off-by: Javier Viguera --- .../recipes-core/busybox/busybox-1.20.2/ts | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/ts b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/ts index e518ccc2e..5c3c0dcc3 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/ts +++ b/meta-digi-dey/recipes-core/busybox/busybox-1.20.2/ts @@ -3,21 +3,19 @@ # # ts # -# Copyright (C) 2010 by Digi International Inc. +# Copyright (C) 2013 by Digi International Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # +# !Description: symlink known touchscreen devices # -# !Description: symlink touchscreen devices +# Values of '/sys/class/input/eventX/device/name': # -# i.MX5X: -# ts0 -> mxc_ts (i.MX51) -# ts0 -> da9052-tsi (i.MX53) -# ts1 -> ADS784x (Fusion and ADS cannot be enabled simultaneously) -# ts1 -> Fusion touch +# i.MX5X: mxc_ts, da9052-tsi, ADS784x, fusion touch +# i.MX28: mxs-lradc # #=============================================================================== @@ -26,16 +24,7 @@ mdev=$(basename ${MDEV}) -if echo "${DEL_PLATFORM}" | grep -qs 'mx5'; then - if grep -qs 'mxc_ts' /sys/class/input/${mdev}/device/name; then - ln -sf ${mdev} /dev/input/ts0 - elif grep -qs 'tsi' /sys/class/input/${mdev}/device/name; then - ln -sf ${mdev} /dev/input/ts0 - elif grep -qs 'ADS784x' /sys/class/input/${mdev}/device/name; then - ln -sf ${mdev} /dev/input/ts1 - elif grep -qs 'fusion' /sys/class/input/${mdev}/device/name; then - ln -sf ${mdev} /dev/input/ts1 - fi -else - grep -qs '[Tt]ouch' /sys/class/input/${mdev}/device/name && ln -sf ${mdev} /dev/input/ts0 +if grep -qs '\(mxc_ts\|da9052-tsi\|ADS784x\|fusion\|mxs-lradc\|[Tt]ouch\)' \ + /sys/class/input/${mdev}/device/name; then + ln -sf ${mdev} /dev/input/touchscreen0 fi