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)
20 BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0001", SYMLINK+="bb-%k", RUN="/usr/sbin/bcharge -p %p"
22 BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0001", SYMLINK+="bb-%k", RUN="/usr/sbin/bcharge -p %p"
25 # Newer devices with USB Mass Storage, 0x0006 + 0x0004.
28 BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0006", RUN="/usr/sbin/bcharge"
29 BUS=="usb", SUBSYSTEM=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0004", SYMLINK+="bb-%k", RUN="/usr/sbin/bcharge -p %p"
31 BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0006", RUN="/usr/sbin/bcharge"
32 BUS=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="0004", SYMLINK+="bb-%k", RUN="/usr/sbin/bcharge -p %p"