4 # Note: the following rules may appear wasteful, in that bcharge is run
5 # twice: once for changing the mode, and once again after the
6 # device resets itself to enter this mode. This is required
7 # in order to support older kernels (approx. 2.6.20 to 2.6.22) with
8 # CONFIG_USB_SUSPEND enabled. The second time bcharge is run
9 # is when the -p argument comes into play, adjusting the device's
10 # autosuspend settings.
12 # Note2: the SUBSYSTEM and ENV{DEVTYPE} checks are to prevent bcharge from
13 # running each time a new endpoint is discovered by udev.
17 # Older devices that only use 0x0001 (no USB Mass Storage)
19 BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0001", SYMLINK+="bb-%k", GROUP="plugdev", MODE="0660", RUN="/usr/sbin/bcharge -p %p"
21 BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0001", SYMLINK+="bb-%k", GROUP="plugdev", MODE="0660", RUN="/usr/sbin/bcharge -p %p"
24 # Newer devices with USB Mass Storage, 0x0006 + 0x0004.
27 BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0006", GROUP="plugdev", MODE="0660", RUN="/usr/sbin/bcharge"
28 BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0004", SYMLINK+="bb-%k", GROUP="plugdev", MODE="0660", RUN="/usr/sbin/bcharge -p %p"
30 BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0006", GROUP="plugdev", MODE="0660", RUN="/usr/sbin/bcharge"
31 BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0004", SYMLINK+="bb-%k", GROUP="plugdev", MODE="0660", RUN="/usr/sbin/bcharge -p %p"