]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: Allow end-users root-less access to USB analyzers 20527/head
authorBastien Nocera <hadess@hadess.net>
Tue, 24 Aug 2021 11:54:02 +0000 (13:54 +0200)
committerBastien Nocera <hadess@hadess.net>
Thu, 2 Sep 2021 14:01:28 +0000 (16:01 +0200)
Procotol analyzers are external devices used to capture traffic over a
wire so that it could be analysed. End-users at the console should be
able to access those devices without requiring root access.

This change obsoletes the need to install Total Phase's "Linux drivers",
which are really just udev rules and hotplug usermap files to do that:
https://www.totalphase.com/products/usb-drivers-linux/

hwdb.d/70-analyzers.hwdb [new file with mode: 0644]
hwdb.d/meson.build
hwdb.d/parse_hwdb.py
src/login/70-uaccess.rules.in

diff --git a/hwdb.d/70-analyzers.hwdb b/hwdb.d/70-analyzers.hwdb
new file mode 100644 (file)
index 0000000..4865f0b
--- /dev/null
@@ -0,0 +1,33 @@
+# This file is part of systemd.
+#
+# Database for signal analyzers (protocol analyzers, logic analyzers,
+# oscilloscopes, multimeters, bench power supplies, etc.) that should
+# be accessible to the seat owner.
+#
+# Permitted keys:
+#   Specify if a device is a signal analyzer
+#   ID_SIGNAL_ANALYZER=1|0
+
+###########################################################
+# Total Phase
+###########################################################
+# Aarvark I2C/SPI Host Adapter
+usb:v0403pe0d0*
+ ID_SIGNAL_ANALYZER=1
+
+# Beagle Protocol Analyzers
+usb:v1679p2001*
+ ID_SIGNAL_ANALYZER=1
+
+# Cheetah SPI Host Adapter
+usb:v1679p2002*
+ ID_SIGNAL_ANALYZER=1
+
+# Komodo CAN Duo Interface
+usb:v1679p3001*
+ ID_SIGNAL_ANALYZER=1
+
+# Power Delivery Analyzers
+usb:v1679p6003*
+usb:v0483pdf11*
+ ID_SIGNAL_ANALYZER=1
index 4f3560e37f869ad8c405d7054d4ec30b6cb5e7d8..fc6ee7c64986aaf64f57161d137c068d0ca7dbed 100644 (file)
@@ -27,6 +27,7 @@ hwdb_files_test = files('''
         60-keyboard.hwdb
         60-seat.hwdb
         60-sensor.hwdb
+        70-analyzers.hwdb
         70-joystick.hwdb
         70-mouse.hwdb
         70-pointingstick.hwdb
index 3cd4b486a6b0981941f76fe54b2ebab08ff56079..dea71acfe93309f96928ad2676b1c19eda68a9e0 100755 (executable)
@@ -147,6 +147,7 @@ def property_grammar():
              ('ID_INPUT_TOUCHPAD', Or((Literal('0'), Literal('1')))),
              ('ID_INPUT_TOUCHSCREEN', Or((Literal('0'), Literal('1')))),
              ('ID_INPUT_TRACKBALL', Or((Literal('0'), Literal('1')))),
+             ('ID_SIGNAL_ANALYZER', Or((Literal('0'), Literal('1')))),
              ('POINTINGSTICK_SENSITIVITY', INTEGER),
              ('POINTINGSTICK_CONST_ACCEL', REAL),
              ('ID_INPUT_JOYSTICK_INTEGRATION', Or(('internal', 'external'))),
index 56e1087fef94b782b86b3409d40454dd760acde1..28740ea647b14e0062729761f094866c476fa7ab 100644 (file)
@@ -80,4 +80,7 @@ ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess"
 # 3D printers, CNC machines, laser cutters, 3D scanners, etc.
 ENV{ID_MAKER_TOOL}=="?*", TAG+="uaccess"
 
+# Protocol analyzers
+ENV{ID_SIGNAL_ANALYZER}=="?*", ENV{DEVTYPE}=="usb_device", TAG+="uaccess"
+
 LABEL="uaccess_end"