summaryrefslogtreecommitdiff
path: root/hwdb.d
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2020-03-03 14:40:00 +0100
committerGitHub <noreply@github.com>2020-03-03 14:40:00 +0100
commit1c5b427f5d3649cfa1bbd0371430bf062251da26 (patch)
tree407f44d60b63da00f1ce76b7de5c537be4e0f42f /hwdb.d
parentfdb0405edd90a3016165a83f3f075de7bae3084e (diff)
downloadsystemd-1c5b427f5d3649cfa1bbd0371430bf062251da26.tar.gz
hwdb: 60-sensor.hwdb: Add proximity sensor udev property (#14845)
Devices with proximity sensors can specify a near level that indicates when an object is considered close to the device.
Diffstat (limited to 'hwdb.d')
-rw-r--r--hwdb.d/60-sensor.hwdb4
-rwxr-xr-xhwdb.d/parse_hwdb.py1
2 files changed, 5 insertions, 0 deletions
diff --git a/hwdb.d/60-sensor.hwdb b/hwdb.d/60-sensor.hwdb
index b57662afb1..abedbaca81 100644
--- a/hwdb.d/60-sensor.hwdb
+++ b/hwdb.d/60-sensor.hwdb
@@ -41,11 +41,15 @@
#
# Allowed properties are:
# ACCEL_MOUNT_MATRIX=<matrix>
+# PROXIMITY_NEAR_LEVEL=<value>
#
# where <matrix> is a mount-matrix in the format specified in the IIO
# subsystem[1]. The default, when unset, is equivalent to:
# ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1
# eg. the identity matrix.
+# and <value> is an integer value above which an object is considered
+# close by a proximity sensor:
+# PROXIMITY_NEAR_LEVEL=100
#
# [1]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=dfc57732ad38f93ae6232a3b4e64fd077383a0f1
#
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
index b5395b11fe..579c45fda0 100755
--- a/hwdb.d/parse_hwdb.py
+++ b/hwdb.d/parse_hwdb.py
@@ -128,6 +128,7 @@ def property_grammar():
('KEYBOARD_LED_CAPSLOCK', Literal('0')),
('ACCEL_MOUNT_MATRIX', mount_matrix),
('ACCEL_LOCATION', Or(('display', 'base'))),
+ ('PROXIMITY_NEAR_LEVEL', INTEGER),
)
fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE')
for name, val in props]