All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nuno Santos <nsantos@edigma.com>
To: linux-input@vger.kernel.org
Subject: Re: Findind input event device path with libudev
Date: Wed, 16 Nov 2011 14:44:08 +0000	[thread overview]
Message-ID: <4EC3CC38.9080304@edigma.com> (raw)
In-Reply-To: <4EC3A656.7050800@edigma.com>

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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2011-11-16 14:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 12:02 Findind input event device path with libudev Nuno Santos
2011-11-16 14:44 ` Nuno Santos [this message]
2011-11-16 19:12   ` Antonio Ospite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EC3CC38.9080304@edigma.com \
    --to=nsantos@edigma.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.