summaryrefslogtreecommitdiff
diff options
authorKai-Chuan Hsieh <kaichuan.hsieh@canonical.com>2020-10-26 17:10:06 +0800
committerKai-Chuan Hsieh <kaichuan.hsieh@canonical.com>2020-10-26 17:10:06 +0800
commit8a50805571e88c7b8db21886d3596033098f0595 (patch)
tree2e3703850466093649a8ffb7f45a2cad3f425220
parent9a3bfd8f7db32f364b9c78de0b26e93c46e8f145 (diff)
parent9327c1cd0853bdd2413792c0b0dbe7d1d41da650 (diff)
Merge branch 'palm-detect-support'
-rw-r--r--units/touchpad/jobs.pxu30
-rw-r--r--units/touchpad/test-plan.pxu1
2 files changed, 31 insertions, 0 deletions
diff --git a/units/touchpad/jobs.pxu b/units/touchpad/jobs.pxu
index 2fcdbc3..bb6f596 100644
--- a/units/touchpad/jobs.pxu
+++ b/units/touchpad/jobs.pxu
@@ -218,6 +218,36 @@ _siblings:
[{ "id": "touchpad/continuous-move-after-suspend",
"depends": "suspend/suspend_advanced touchpad/continuous-move" }]
+unit: template
+template-resource: device
+template-filter: device.category == 'TOUCHPAD'
+template-unit: job
+plugin: shell
+category_id: com.canonical.plainbox::touchpad
+id: touchpad/palm-rejection-firmware-labeling_{product_slug}
+requires: device.driver == 'hid-multitouch'
+estimated_duration: 5.0
+command:
+ abs_caps=$(cat </sys{path}/capabilities/abs)
+ abs_caps_hex=$((16#"$abs_caps"))
+ tool_type_bit=$((abs_caps_hex >> 55))
+ support=$((tool_type_bit & 1))
+ if [ $support -eq 1 ]; then
+ exit 0
+ else
+ echo "Touchapd info:"
+ cat </sys{path}/name
+ cat </sys{path}/modalias
+ echo "Touchpad EV_ABS capabilities:"
+ echo "$abs_caps"
+ exit 1
+ fi
+_summary: Touchpad EV_ABS capability check
+_description:
+ Libinput firmware/labeling palm detection rely on touchpad ABS_MT_TOOL_TYPE
+ capability. This test checks touchpad's EV_ABS capability to
+ make sure that firmware/labeling bit is set in touchpad firmware.
+
id: touchpad/palm-rejection
plugin: user-interact
category_id: com.canonical.plainbox::touchpad
diff --git a/units/touchpad/test-plan.pxu b/units/touchpad/test-plan.pxu
index 188e7f2..39769d0 100644
--- a/units/touchpad/test-plan.pxu
+++ b/units/touchpad/test-plan.pxu
@@ -30,6 +30,7 @@ _description:
Touchpad tests (Automated)
include:
touchpad/detected-as-mouse certification-status=blocker
+ touchpad/palm-rejection-firmware-labeling_.* certification-status=blocker
id: after-suspend-touchpad-cert-full