2008-12-04 08:43:33 +08:00
|
|
|
# do not edit this file, it will be overwritten on update
|
|
|
|
|
2015-03-13 00:15:15 +08:00
|
|
|
ACTION=="remove", GOTO="serial_end"
|
|
|
|
SUBSYSTEM!="tty", GOTO="serial_end"
|
|
|
|
|
2021-03-10 17:17:23 +08:00
|
|
|
SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
|
2022-11-03 08:39:36 +08:00
|
|
|
SUBSYSTEMS=="pci", ENV{ID_BUS}=="", ENV{ID_BUS}="pci", \
|
|
|
|
ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}", \
|
|
|
|
IMPORT{builtin}="hwdb --subsystem=pci"
|
2015-03-13 00:15:15 +08:00
|
|
|
|
|
|
|
# /dev/serial/by-path/, /dev/serial/by-id/ for USB devices
|
|
|
|
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end"
|
2008-12-04 08:43:33 +08:00
|
|
|
|
2011-07-20 06:20:00 +08:00
|
|
|
SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}"
|
2008-12-04 08:43:33 +08:00
|
|
|
|
2011-08-05 08:00:30 +08:00
|
|
|
IMPORT{builtin}="path_id"
|
2011-07-20 06:20:00 +08:00
|
|
|
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}"
|
|
|
|
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}"
|
2008-12-04 08:43:33 +08:00
|
|
|
|
2022-11-03 08:52:23 +08:00
|
|
|
ENV{ID_BUS}=="", GOTO="serial_end"
|
2015-03-13 00:15:15 +08:00
|
|
|
ENV{ID_SERIAL}=="", GOTO="serial_end"
|
|
|
|
ENV{ID_USB_INTERFACE_NUM}=="", GOTO="serial_end"
|
2011-07-20 06:20:00 +08:00
|
|
|
ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}"
|
|
|
|
ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}-port$env{.ID_PORT}"
|
2008-12-04 08:43:33 +08:00
|
|
|
|
2015-03-13 00:15:15 +08:00
|
|
|
LABEL="serial_end"
|