Re: Findind input event device path with libudev

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

 



On Wed, 16 Nov 2011 14:44:08 +0000
Nuno Santos <nsantos@xxxxxxxxxx> wrote:

> Hi,
> 
> After digging a little bit around this i found that my problem is with 
> this function:
> 
> dev = udev_device 
> *udev_device_get_parent_with_subsystem_devtype(dev,"usb","usb_device");
> 
> dev is always null. He can't find me the usb device for my input device. 
> Maybe i'm not specifiying subsystem and dev type correctly.
> 
> If I make several calls to udev_device_get_parent I can get to the 
> correct device.
> 
> Does anyone knows what should be the correct subsystem and dev type pair 
> to find the parent usb device for an input device?
> 

You can find out the most specific subsystem and devtype yourself using:

	udevadm monitor

and then plugging the device in.

Regards,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

Attachment: pgpGmRdWoa9ho.pgp
Description: PGP signature


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux