mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Nathaniel McCallum" <nathaniel@natemccallum.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] [PATCH] Loaded driver modalias
Date: Tue, 4 Nov 2008 20:55:15 +0100	[thread overview]
Message-ID: <ac3eb2510811041155s3ef2df93w8fdd7ce7c009e994@mail.gmail.com> (raw)
In-Reply-To: <491096D7.10808@natemccallum.com>

On Tue, Nov 4, 2008 at 19:39, Nathaniel McCallum
<nathaniel@natemccallum.com> wrote:
> Please CC me to responses as I'm not subscribed to LKML.  Also, this is my
> first kernel patch, advise is certainly welcome.
>
> For something I'm working on I have the need to answer the question, "given
> a hardware ID, does Linux distro X have a driver to support this hardware?"
> and more specifically, "which drivers support this hardware?" I can,
> generally speaking, get this data from files like
> /lib/modules/*/modules.alias.  However, this does not work for drivers built
> into the kernel.  With that in mind, I've cooked up a little proof of
> concept. Basically, its a sysfs file
> /sys/modules/$module/drivers/$driver/modalias that, when read, contains
> modalias-style filters for this driver.
>
> The attached patch only does this for PCI drivers, each subsystem would need
> a patch like this.  Is this idea crazy?  Is there a better implementation?

Hmm, what if that gets larger than 4k? It seems not really like
something for sysfs. There are also drivers which export a modalias
which matches more devices, than the device it actually would accept
to bind to. Some driver have logic in the match() function to exclude
stuff.

What's the exact information you need? Would it be sufficient  to ask
a bus with a modalias string, which driver of that bus matched that
device?

Kay

  reply	other threads:[~2008-11-04 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 18:39 Nathaniel McCallum
2008-11-04 19:55 ` Kay Sievers [this message]
2008-11-04 20:25   ` Nathaniel McCallum
2008-11-04 21:22   ` Nathaniel McCallum

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=ac3eb2510811041155s3ef2df93w8fdd7ce7c009e994@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathaniel@natemccallum.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®