[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: udev question



John L Fjellstad wrote:
> Sam Halliday writes:
> > however... there is one major problem! instead of creating the link to
> > /dev/input/mouseX, it is creating to the link to /dev/input/ts2, which
> > does not appear to be a valid mouse device. how can i fix it? (ts2
> > appears only when the usb mouse is plugged in)
> 
> Please post your udev rule.

BUS="usb", SYSFS{idProduct}="0201", SYSFS{product}="PS/2+USB Mouse",
NAME="input/%k", SYMLINK="usbmouse"

>  Also, post the output of
> udevinfo -p `udevinfo -q path -n /dev/input/ts2` -a

#########################################################
udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

  looking at class device '/sys/class/input/ts2':
    SYSFS{dev}="13:130"

follow the class device's "device"
  looking at the device chain at
'/sys/devices/pci0001:01/0001:01:1b.0/usb2/2-1/2-1:1.0':
    BUS="usb"
    ID="2-1:1.0"
    SYSFS{bAlternateSetting}=" 0"
    SYSFS{bInterfaceClass}="03"
    SYSFS{bInterfaceNumber}="00"
    SYSFS{bInterfaceProtocol}="02"
    SYSFS{bInterfaceSubClass}="01"
    SYSFS{bNumEndpoints}="01"
    SYSFS{detach_state}="0"
    SYSFS{iInterface}="00"

  looking at the device chain at
'/sys/devices/pci0001:01/0001:01:1b.0/usb2/2-1':
    BUS="usb"
    ID="2-1"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="00"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="100mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0001"
    SYSFS{bmAttributes}="a0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="3"
    SYSFS{idProduct}="0201"
    SYSFS{idVendor}="1267"
    SYSFS{maxchild}="0"
    SYSFS{product}="PS/2+USB Mouse"
    SYSFS{speed}="1.5"
    SYSFS{version}=" 1.10"

  looking at the device chain at '/sys/devices/pci0001:01/0001:01:1b.0/usb2':
    BUS="usb"
    ID="usb2"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="09"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="  0mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0206"
    SYSFS{bmAttributes}="c0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="1"
    SYSFS{idProduct}="0000"
    SYSFS{idVendor}="0000"
    SYSFS{manufacturer}="Linux 2.6.7-ibookg4-bootsplash ohci_hcd"
    SYSFS{maxchild}="3"
    SYSFS{product}="NEC Corporation USB"
    SYSFS{serial}="0001:01:1b.0"
    SYSFS{speed}="12"
    SYSFS{version}=" 1.10"

  looking at the device chain at '/sys/devices/pci0001:01/0001:01:1b.0':
    BUS="pci"
    ID="0001:01:1b.0"
    SYSFS{class}="0x0c0310"
    SYSFS{detach_state}="0"
    SYSFS{device}="0x0035"
    SYSFS{devspec}="/pci@f2000000/usb@1b"
    SYSFS{irq}="63"
    SYSFS{subsystem_device}="0x0035"
    SYSFS{subsystem_vendor}="0x1033"
    SYSFS{vendor}="0x1033"

  looking at the device chain at '/sys/devices/pci0001:01':
    BUS=""
    ID="pci0001:01"
    SYSFS{detach_state}="0"
#########################################################

> udevinfo -p `udevinfo -q path -n /dev/input/mouseX` -a
> where X is the number for the usb mouse.

#########################################################

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

  looking at class device '/sys/class/input/mouse2':
    SYSFS{dev}="13:34"

follow the class device's "device"
  looking at the device chain at
'/sys/devices/pci0001:01/0001:01:1b.0/usb2/2-1/2-1:1.0':
    BUS="usb"
    ID="2-1:1.0"
    SYSFS{bAlternateSetting}=" 0"
    SYSFS{bInterfaceClass}="03"
    SYSFS{bInterfaceNumber}="00"
    SYSFS{bInterfaceProtocol}="02"
    SYSFS{bInterfaceSubClass}="01"
    SYSFS{bNumEndpoints}="01"
    SYSFS{detach_state}="0"
    SYSFS{iInterface}="00"

  looking at the device chain at
'/sys/devices/pci0001:01/0001:01:1b.0/usb2/2-1':
    BUS="usb"
    ID="2-1"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="00"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="100mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0001"
    SYSFS{bmAttributes}="a0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="3"
    SYSFS{idProduct}="0201"
    SYSFS{idVendor}="1267"
    SYSFS{maxchild}="0"
    SYSFS{product}="PS/2+USB Mouse"
    SYSFS{speed}="1.5"
    SYSFS{version}=" 1.10"

  looking at the device chain at '/sys/devices/pci0001:01/0001:01:1b.0/usb2':
    BUS="usb"
    ID="usb2"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bDeviceClass}="09"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bMaxPower}="  0mA"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bNumInterfaces}=" 1"
    SYSFS{bcdDevice}="0206"
    SYSFS{bmAttributes}="c0"
    SYSFS{detach_state}="0"
    SYSFS{devnum}="1"
    SYSFS{idProduct}="0000"
    SYSFS{idVendor}="0000"
    SYSFS{manufacturer}="Linux 2.6.7-ibookg4-bootsplash ohci_hcd"
    SYSFS{maxchild}="3"
    SYSFS{product}="NEC Corporation USB"
    SYSFS{serial}="0001:01:1b.0"
    SYSFS{speed}="12"
    SYSFS{version}=" 1.10"

  looking at the device chain at '/sys/devices/pci0001:01/0001:01:1b.0':
    BUS="pci"
    ID="0001:01:1b.0"
    SYSFS{class}="0x0c0310"
    SYSFS{detach_state}="0"
    SYSFS{device}="0x0035"
    SYSFS{devspec}="/pci@f2000000/usb@1b"
    SYSFS{irq}="63"
    SYSFS{subsystem_device}="0x0035"
    SYSFS{subsystem_vendor}="0x1033"
    SYSFS{vendor}="0x1033"

  looking at the device chain at '/sys/devices/pci0001:01':
    BUS=""
    ID="pci0001:01"
    SYSFS{detach_state}="0"
#########################################################

Attachment: pgpTuhJN4xd_P.pgp
Description: PGP signature


Reply to: