Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > fe93b8d411a3b514c29ecb9bffe06fe8 > files > 2

barry-libs-0.17-0.3.20100730git.fc14.i686.rpm

#
# Blackberry devices
#
# Note: the following rules may appear wasteful, in that bcharge is run
#       twice: once for changing the mode, and once again after the
#       device resets itself to enter this mode.  This is required
#       in order to support older kernels (approx. 2.6.20 to 2.6.22) with
#       CONFIG_USB_SUSPEND enabled.  The second time bcharge is run
#       is when the -p argument comes into play, adjusting the device's
#       autosuspend settings.
#
# Note: SUBSYSTEM=="usb_device" is not reliably available on all kernels
#       and all versions of udev, so instead we use the very first
#       kernel message of: SUBSYSTEM=="usb", ENV{DEVTYPE}="usb_device"
#       (See the output of 'udevadm monitor --kernel')
#       Since the device is likely not created at this point, we
#       can't set permissions... so permissions are handled in the
#       generic 99-blackberry-perms.rules file.
#

#
# Older devices that only use 0x0001 (no USB Mass Storage)
#
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
	ATTR{idVendor}=="0fca", ATTR{idProduct}=="0001", \
	RUN="/usr/sbin/bcharge -p %p"

#
# Newer devices with USB Mass Storage:
#     0x8007 usually get transformed into 0x8004
#     0x8004 sometimes get transformed into 0x0004
#     0x0006 usually get transformed into 0x0004
#

# 0x0006 turns into 0x0004, so no need to fiddle with autosuspend here
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
	ATTR{idVendor}=="0fca", ATTR{idProduct}=="0006", \
	RUN="/usr/sbin/bcharge"

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
	ATTR{idVendor}=="0fca", ATTR{idProduct}=="8007", \
	RUN="/usr/sbin/bcharge -p %p"

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
	ATTR{idVendor}=="0fca", ATTR{idProduct}=="8004", \
	RUN="/usr/sbin/bcharge -p %p"

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
	ATTR{idVendor}=="0fca", ATTR{idProduct}=="8001", \
	RUN="/usr/sbin/bcharge -p %p"

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", \
	ATTR{idVendor}=="0fca", ATTR{idProduct}=="0004", \
	RUN="/usr/sbin/bcharge -p %p"