1 # There are a number of modifiers that are allowed to be used in some of the
2 # fields. See the udev man page for a full description of them.
5 # These are some example rules that you could use to name your devices.
7 # If anyone has any other examples that they think should be in here for others
8 # to use, please send them to greg@kroah.com
11 # Looking for scsi bus id 42:0:0:1
12 BUS=="scsi", PROGRAM="/bin/echo -n test-%b", RESULT=="test-42:0:0:1", NAME="%c"
15 BUS=="usb", SYSFS{vendor}=="FUJIFILM", SYSFS{model}=="M100", NAME="camera%n"
17 # USB Epson printer to be called lp_epson
18 BUS=="usb", SYSFS_serial=="HXOLL0012202323480", NAME="lp_epson"
20 # USB HP printer to be called lp_hp
21 BUS=="usb", SYSFS{serial}=="W09090207101241330", NAME="lp_hp"
23 # sound card with PCI bus id 00:0b.0 to be the first sound card
24 BUS=="pci", ID=="00:0b.0", NAME="dsp"
26 # sound card with PCI bus id 00:07.1 to be the second sound card
27 BUS=="pci", ID=="00:07.1", NAME="dsp1"
29 # ttyUSB1 should always be called visor
30 KERNEL=="ttyUSB1", NAME="visor"
31 KERNEL=="ttyUSB0", NAME="pl2303"
33 # a devfs like way to name some tty devices
34 KERNEL=="ttyS*", NAME="tts/%n"
35 KERNEL=="tty*", NAME="vc/%n"
37 # if this is a ide cdrom, name it the default name, and create a symlink to cdrom
38 BUS=="ide", KERNEL=="*[!0-9]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT=="cdrom", NAME="%k", SYMLINK+="cdrom"
40 # DRI devices always go into a subdirectory (as per the LSB spec)
41 KERNEL=="card*", NAME="dri/card%n"
43 # create all 15 partitions of a USB flash card reader
44 BUS=="scsi", SYSFS{model}=="CF/MD", NAME{all_partitions}="compactflash"
47 KERNEL=="controlC[0-9]*", NAME="snd/%k"
48 KERNEL=="hw[CD0-9]*", NAME="snd/%k"
49 KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k"
50 KERNEL=="midi[CD0-9]*", NAME="snd/%k"
51 KERNEL=="timer", NAME="snd/%k"
52 KERNEL=="seq", NAME="snd/%k"
55 KERNEL=="mice", NAME="input/%k"
56 KERNEL=="mouse*", NAME="input/%k"
57 KERNEL=="event*", NAME="input/%k"
58 KERNEL=="js*", NAME="input/%k"
59 KERNEL=="ts*", NAME="input/%k"
62 RUN="/sbin/udev_run_devd"