summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ham <bob.ham@puri.sm>2018-09-13 11:10:31 +0000
committerBob Ham <bob.ham@puri.sm>2019-04-24 13:01:21 +0000
commita2a9ed6d9a044e6b6734964355b6bdeafd740aeb (patch)
tree5d902a62a90f3be2f86101d8e6f2c71a6def9a68
parent6c8a9a4a57ff6f38587bec6e0063fe645728130b (diff)
simtech: Add udev rules to blacklist SIM7100 audio portupstream/1.10.0+git20190424740aeb
We don't want the audio TTY port probed so we set ID_MM_CANDIDATE to 0 just for that TTY. We also want it in the audio group instead of the dialout group.
-rw-r--r--plugins/Makefile.am4
-rw-r--r--plugins/simtech/85-mm-simtech-ports.rules15
2 files changed, 18 insertions, 1 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 6a8c8245..866673d8 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -596,7 +596,9 @@ libmm_plugin_simtech_la_SOURCES = \
libmm_plugin_simtech_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS)
libmm_plugin_simtech_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS)
-dist_udevrules_DATA += simtech/77-mm-simtech-port-types.rules
+dist_udevrules_DATA += \
+ simtech/77-mm-simtech-port-types.rules \
+ simtech/85-mm-simtech-ports.rules
AM_CFLAGS += -DTESTUDEVRULESDIR_SIMTECH=\"${srcdir}/simtech\"
diff --git a/plugins/simtech/85-mm-simtech-ports.rules b/plugins/simtech/85-mm-simtech-ports.rules
new file mode 100644
index 00000000..f8dfef40
--- /dev/null
+++ b/plugins/simtech/85-mm-simtech-ports.rules
@@ -0,0 +1,15 @@
+ACTION!="add|change|move", GOTO="mm_simtech_port_blacklist_end"
+SUBSYSTEM!="tty", GOTO="mm_simtech_port_blacklist_end"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1e0e", GOTO="mm_simtech_port_blacklist"
+GOTO="mm_simtech_port_blacklist_end"
+
+LABEL="mm_simtech_port_blacklist"
+
+# This test must be separate because idVendor/idProduct and
+# bInterfaceNumber are on different parents
+SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{.MM_USBIFNUM}="$attr{bInterfaceNumber}"
+
+# SIMCom SIM7100
+ATTRS{idVendor}=="1e0e", ATTRS{idProduct}=="9001", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_CANDIDATE}="0", GROUP="audio"
+
+LABEL="mm_simtech_port_blacklist_end"