Skip to content

kernel: add touch_count sysfs for touchscreen drivers - #70

Merged
greatgitsby merged 4 commits into
masterfrom
feat/touch-count-sysfs
Mar 27, 2026
Merged

kernel: add touch_count sysfs for touchscreen drivers#70
greatgitsby merged 4 commits into
masterfrom
feat/touch-count-sysfs

Conversation

@greatgitsby

@greatgitsby greatgitsby commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add kernel patches exposing touch_count sysfs attribute on both Samsung (s6sy761) and FocalTech (edt-ft5x06) touchscreen drivers, incrementing on each finger release event
  • Fix comma.sh to reference input0 instead of input2 to match mainline kernel input device numbering
  • This enables the tap-based factory reset detection in comma.sh

Test plan

  • Verified on device (Samsung s6sy761 panel): 1 tap → count +1, 3 taps → count +3, 5 taps → count +5
  • Verify on bantian (FocalTech FT3367) device

Expose a touch_count sysfs attribute on both the Samsung (s6sy761) and
FocalTech (edt-ft5x06) touchscreen drivers, incrementing on each finger
release. This is needed by comma.sh to detect tap-based factory reset
during early boot. Also fix comma.sh to reference input0 instead of
input2 to match mainline kernel input device numbering.

Tested on device: 1 tap=1, 3 taps=3, 5 taps=5.
Use /sys/class/input/input*/device/touch_count so comma.sh works on
both mainline (input0) and vendor kernel (input2).
@github-actions

github-actions Bot commented Mar 23, 2026

Copy link
Copy Markdown

vamOS System Profile

Changes vs master

Metric Change
Used space 3468.7MB → 3471.5MB (+2.8MB)
Sparse image 3404.6MB → 3407.4MB (+2.7MB)
Package count 522 → 522

Added packages: freetype-2.14.3_1, freetype-devel-2.14.3_1, less-692_1, libpng-1.6.56_1, libpng-devel-1.6.56_1, pv-1.10.5_1

Removed packages: freetype-2.14.2_1, freetype-devel-2.14.2_1, less-691_1, libpng-1.6.55_1, libpng-devel-1.6.55_1, pv-1.10.4_1

Directory size changes (>1MB)
Directory Change

Metric Value
Used space 3471.5MB / 5959.5MB
Files 55642
Directories 4431
Symlinks 3456
Packages 522

Top 10 Directories

Directory Size

Category Breakdown

Category Size %
xbps packages 2478.2MB 71.3%
Python venv 655.3MB 18.8%
Firmware 11.2MB .3%
Other 326.6MB 9.4%

Top 10 Packages by Size

Package Size
mit-krb5-libs-1.21.3_1 270.4MB
gawk-5.3.2_1 210.3MB
llvm-21_3 148.6MB
libldns-1.9.0_1 124.3MB
pd-mapper-1.0_1 74MB
libclang21-21.1.7_1 70.2MB
glib-2.86.1_2 67.1MB
gcc-14.2.1+20250405_4 65.4MB
libcap-progs-2.77_1 56MB
cmake-4.2.2_1 53.2MB

Top 30 Files by Size

File Size
/usr/lib/llvm/21/lib/libLLVM.so.21.1 124.3MB
/usr/lib/llvm/21/lib/libMLIR.so.21.1 89.7MB
/usr/lib/llvm/21/bin/mlir-transform-opt 82.9MB
/usr/lib/llvm/21/lib/libclang-cpp.so.21.1 56MB
/usr/lib/llvm/21/bin/mlir-translate 53.2MB
/usr/lib/llvm/21/bin/llvm-exegesis 52MB
/usr/lib/llvm/21/bin/llvm-bolt-binary-analysis 50.6MB
/usr/local/venv/lib/python3.12/site-packages/ffmpeg/install/lib/libavcodec.a 50.5MB
/usr/bin/uv 48.1MB
/usr/lib/gcc/aarch64-linux-gnu/14.2/gnat1 40.1MB
/usr/bin/gdb 38.1MB
/usr/lib/gcc/aarch64-linux-gnu/14.2/cc1plus 37.3MB
/usr/lib/libgallium-25.3.3.so 35.4MB
/usr/lib/libllvm-qcom.so 35.2MB
/usr/lib/gcc/aarch64-linux-gnu/14.2/cc1 35.2MB
/usr/lib/gcc/aarch64-linux-gnu/14.2/lto1 33.9MB
/usr/bin/lto-dump 33.9MB
/usr/lib/libRusticlOpenCL.so.1.0.0 32.5MB
/usr/local/venv/bin/ruff 31.8MB
/usr/share/icu/78.2/icudt78l.dat 31.5MB
/usr/lib/llvm/21/lib/libclang.so.21.1.7 30.2MB
/usr/lib/llvm/21/bin/c-index-test 28.6MB
/usr/local/venv/lib/python3.12/site-packages/gcc_arm_none_eabi/toolchain/libexec/gcc/arm-none-eabi/13.2.1/cc1 28.2MB
/usr/lib/libz3.so 27.9MB
/usr/bin/run 26.6MB
/usr/local/venv/lib/python3.12/site-packages/numpy.libs/libscipy_openblas64_-71e1b124.so 23.6MB
/usr/comma/updater 23.5MB
/usr/comma/setup 23.5MB
/usr/comma/reset 23.5MB
/usr/local/uv/python/cpython-3.12.13-linux-aarch64-gnu/bin/python3.12 22.1MB

@greatgitsby greatgitsby changed the title feat: add touch_count sysfs for touchscreen drivers kernel: add touch_count sysfs for touchscreen drivers Mar 23, 2026
@greatgitsby

Copy link
Copy Markdown
Collaborator Author

validated on both mici and tizi

@greatgitsby
greatgitsby merged commit ec87231 into master Mar 27, 2026
2 checks passed
@greatgitsby
greatgitsby deleted the feat/touch-count-sysfs branch March 27, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants