* Question about several drivers for one physical device
@ 2008-12-30 12:43 Per Andreas Gulbrandsen
2008-12-30 15:05 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Per Andreas Gulbrandsen @ 2008-12-30 12:43 UTC (permalink / raw)
To: linux-kernel
Hi.
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?
--
mvh
Per Andreas Gulbrandsen
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question about several drivers for one physical device
2008-12-30 12:43 Question about several drivers for one physical device Per Andreas Gulbrandsen
@ 2008-12-30 15:05 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2008-12-30 15:05 UTC (permalink / raw)
To: Per Andreas Gulbrandsen; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-30 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-30 12:43 Question about several drivers for one physical device Per Andreas Gulbrandsen
2008-12-30 15:05 ` Geert Uytterhoeven
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®