naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
8d419f
From 125cb47adf05421d00e25aee4a143ef2c473aeb9 Mon Sep 17 00:00:00 2001
8d419f
From: Davide Cavalca <davide@cavalca.name>
8d419f
Date: Sun, 30 Jan 2022 09:28:52 -0800
8d419f
Subject: [PATCH] hwdb: add new database file for PDA devices
8d419f
8d419f
Add a new database for handhelds (PDAs, calculators, etc.) that should be
8d419f
accessible the seat owner.
8d419f
8d419f
The database is initially populated with Texas Instruments calculators
8d419f
and linking cables, which removes the need to installing dedicated udev
8d419f
rules for them.
8d419f
8d419f
(cherry picked from commit 7d75376e1f0a83dba76d3a08edbb50923e02e3d3)
8d419f
8d419f
Related: #2087778
8d419f
---
8d419f
 hwdb.d/70-pda.hwdb   | 39 +++++++++++++++++++++++++++++++++++++++
8d419f
 hwdb.d/meson.build   |  1 +
8d419f
 hwdb.d/parse_hwdb.py |  1 +
8d419f
 3 files changed, 41 insertions(+)
8d419f
 create mode 100644 hwdb.d/70-pda.hwdb
8d419f
8d419f
diff --git a/hwdb.d/70-pda.hwdb b/hwdb.d/70-pda.hwdb
8d419f
new file mode 100644
8d419f
index 0000000000..e122acca6f
8d419f
--- /dev/null
8d419f
+++ b/hwdb.d/70-pda.hwdb
8d419f
@@ -0,0 +1,39 @@
8d419f
+# This file is part of systemd.
8d419f
+#
8d419f
+# Database for handhelds (PDAs, calculators, etc.) that should be accessible
8d419f
+# the seat owner.
8d419f
+#
8d419f
+# Permitted keys:
8d419f
+#   Specify if a device is a signal analyzer
8d419f
+#   ID_PDA=1|0
8d419f
+
8d419f
+###########################################################
8d419f
+# Texas Instruments
8d419f
+###########################################################
8d419f
+# SilverLink
8d419f
+usb:v0451pE001*
8d419f
+ ID_PDA=1
8d419f
+
8d419f
+# TI-84 Plus DirectLink
8d419f
+usb:v0451pE003*
8d419f
+ ID_PDA=1
8d419f
+
8d419f
+# TI-89 Titanium DirectLink
8d419f
+usb:v0451pE004*
8d419f
+ ID_PDA=1
8d419f
+
8d419f
+# TI-84 Plus Silver Edition DirectLink
8d419f
+usb:v0451pE008*
8d419f
+ ID_PDA=1
8d419f
+
8d419f
+# TI-Nspire DirectLink
8d419f
+usb:v0451pE012*
8d419f
+ ID_PDA=1
8d419f
+
8d419f
+# TI-Nspire Lab Cradle
8d419f
+usb:v0451pE01C*
8d419f
+ ID_PDA=1
8d419f
+
8d419f
+# TI-Nspire CX II DirectLink
8d419f
+usb:v0451pE022*
8d419f
+ ID_PDA=1
8d419f
diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build
8d419f
index 8ff044131c..fc72ebb2bd 100644
8d419f
--- a/hwdb.d/meson.build
8d419f
+++ b/hwdb.d/meson.build
8d419f
@@ -31,6 +31,7 @@ hwdb_files_test = files('''
8d419f
         70-cameras.hwdb
8d419f
         70-joystick.hwdb
8d419f
         70-mouse.hwdb
8d419f
+        70-pda.hwdb
8d419f
         70-pointingstick.hwdb
8d419f
         70-touchpad.hwdb
8d419f
         80-ieee1394-unit-function.hwdb
8d419f
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
8d419f
index aef0331ace..194a71ac08 100755
8d419f
--- a/hwdb.d/parse_hwdb.py
8d419f
+++ b/hwdb.d/parse_hwdb.py
8d419f
@@ -136,6 +136,7 @@ def property_grammar():
8d419f
              ('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER),
8d419f
              ('ID_AUTOSUSPEND', Or((Literal('0'), Literal('1')))),
8d419f
              ('ID_PERSIST', Or((Literal('0'), Literal('1')))),
8d419f
+             ('ID_PDA', Or((Literal('0'), Literal('1')))),
8d419f
              ('ID_INPUT', Or((Literal('0'), Literal('1')))),
8d419f
              ('ID_INPUT_ACCELEROMETER', Or((Literal('0'), Literal('1')))),
8d419f
              ('ID_INPUT_JOYSTICK', Or((Literal('0'), Literal('1')))),