Re: Findind input event device path with libudev

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

 



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?

Thanks,

Nuno

On 11/16/2011 12:02 PM, Nuno Santos wrote:
Hi,

I found an example on how to use libudev to iterate over devices present in the system to find its precise path since the path can be different everytime we plug a device into the system.

http://www.signal11.us/oss/udev/

In this example, the type of device searched is hidraw, however I have already tried input, event, etc and none of this match criterias in the following function:

|*udev_enumerate_add_match_subsystem*(enumerate,*"hidraw"*);|


Only hidraw seems to work.

Can I use this technic to found the path a of input event device?

Thanks,

With my best regards,

Nuno

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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