From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Per Andreas Gulbrandsen <theperan@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about several drivers for one physical device
Date: Tue, 30 Dec 2008 16:05:32 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0812301604170.14380@anakin> (raw)
In-Reply-To: <164c42ea0812300443m6d034108h56ca71c86e52a641@mail.gmail.com>
On Tue, 30 Dec 2008, Per Andreas Gulbrandsen wrote:
> I have two drivers that both use the same device, an FPGA connected
> via pci. These two pci drivers represent different functionality in
> the FPGA, and they each have it's own BAR. My problem is that I can't
> get these two drivers to correctly initialize. Only the first one
> loaded actually finds the device (which one of the two doesn't
> matter). The second driver I load never has it's probe method run, and
> so it doesn't initialize correctly. I am aware that integrating these
> two drivers in one module is a possiblity, but since these two drivers
> aren't really related (except that they both drive an FPGA) I would
> like to keep them as two separate modules. My question is really: Is
> there another way to do this, or will I have to integrate the two so
> they share init/exit/probe methods?
You can create a third driver that binds to the PCI device and creates a new
bus type with two devices. Then the two other drivers can bind to the latter
two devices.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
prev parent reply other threads:[~2008-12-30 15:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-30 12:43 Per Andreas Gulbrandsen
2008-12-30 15:05 ` Geert Uytterhoeven [this message]
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=Pine.LNX.4.64.0812301604170.14380@anakin \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=theperan@gmail.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®