File tree Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Expand file tree Collapse file tree 3 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Guess module: touchscreen
2
+
3
+ This module tries to guess modules for touchscreen devices.
4
+
5
+ Touchscreen modules may be necessary, for example, if you
6
+ need to enter a password to unlock an encrypted mobile device.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -eu
2
+ # SPDX-License-Identifier: GPL-3.0-or-later
3
+
4
+ . guess-functions
5
+
6
+ $TRACE_SOURCE " Processing ..."
7
+
8
+ # The idea comes from tslib. Touchscreen devices have
9
+ # the INPUT_PROP_DIRECT property, which is determined
10
+ # by the first from zero bit of the property number
11
+
12
+ INPUT_PROP_DIRECT=1
13
+ bitmask=$(( 1 << $INPUT_PROP_DIRECT ))
14
+
15
+ for i in " $SYSFS_PATH " /class/input/event* /device/properties; do
16
+ [ -f " $i " ] ||
17
+ continue
18
+
19
+ readline prop " $i "
20
+
21
+ (( $prop & $bitmask )) ||
22
+ continue
23
+
24
+ p=" $( readlink -e " $i " ) "
25
+
26
+ while [ " $p " != " $SYSFS_PATH " /devices ]; do
27
+ if [ -f " $p " /modalias ]; then
28
+ readline alias " $p " /modalias
29
+ guess_modalias " $alias "
30
+ fi
31
+ p=" ${p%/* } "
32
+ done
33
+ done
Original file line number Diff line number Diff line change
1
+ # SPDX-License-Identifier: GPL-3.0-or-later
2
+ .PHONY : guess-touchscreen
3
+
4
+ guess-touchscreen :
5
+ $V echo " Processing $@ ..."
6
+ @ GUESS_SUFFIX=rescue:$@ \
7
+ $(DETECTDIR ) /touchscreen/action
8
+
9
+ guess : guess-touchscreen
You can’t perform that action at this time.
0 commit comments