* Driver question: multiple instances of same char device
@ 2007-07-10 13:06 Jon Dufresne
2007-07-10 13:13 ` Vitaliy Ivanov
2007-07-13 15:32 ` Alan Cox
0 siblings, 2 replies; 4+ messages in thread
From: Jon Dufresne @ 2007-07-10 13:06 UTC (permalink / raw)
To: Linux Kernel Mailing List
I am relatively new to linux device development. And want to understand
Linux conventions.
Suppose I have a PCI card that is represented in the system by a
character device.
If I have two of those PCI cards in the system when the driver module
loads, is it convention to have two different major numbers, or have one
major number and two different minor numbers?
Thanks,
Jon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Driver question: multiple instances of same char device
2007-07-10 13:06 Driver question: multiple instances of same char device Jon Dufresne
@ 2007-07-10 13:13 ` Vitaliy Ivanov
2007-07-10 13:31 ` Jon Dufresne
2007-07-13 15:32 ` Alan Cox
1 sibling, 1 reply; 4+ messages in thread
From: Vitaliy Ivanov @ 2007-07-10 13:13 UTC (permalink / raw)
To: Jon Dufresne; +Cc: Linux Kernel Mailing List
On 7/10/07, Jon Dufresne <jon.dufresne@infinitevideocorporation.com> wrote:
> I am relatively new to linux device development. And want to understand
> Linux conventions.
>
> Suppose I have a PCI card that is represented in the system by a
> character device.
>
> If I have two of those PCI cards in the system when the driver module
> loads, is it convention to have two different major numbers, or have one
> major number and two different minor numbers?
>
> Thanks,
> Jon
You can start your kernel hacking way from ldd. It can be found at:
http://lwn.net/Kernel/LDD3/
There are a few other books by R. Love or Greg KH that you can read.
Such questions are fully covered there.
Best,
Vitaliy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Driver question: multiple instances of same char device
2007-07-10 13:13 ` Vitaliy Ivanov
@ 2007-07-10 13:31 ` Jon Dufresne
0 siblings, 0 replies; 4+ messages in thread
From: Jon Dufresne @ 2007-07-10 13:31 UTC (permalink / raw)
To: Vitaliy Ivanov; +Cc: Linux Kernel Mailing List
Thanks,
I have been using this book as a source, and it is a great one at that.
I thought I read the char device chapter enough times to get what I
needed out of it but apparently not. I just reread it and realized that
my answer was there.
Thanks again,
Jon
On Tue, 2007-07-10 at 16:13 +0300, Vitaliy Ivanov wrote:
> On 7/10/07, Jon Dufresne <jon.dufresne@infinitevideocorporation.com> wrote:
> > I am relatively new to linux device development. And want to understand
> > Linux conventions.
> >
> > Suppose I have a PCI card that is represented in the system by a
> > character device.
> >
> > If I have two of those PCI cards in the system when the driver module
> > loads, is it convention to have two different major numbers, or have one
> > major number and two different minor numbers?
> >
> > Thanks,
> > Jon
>
> You can start your kernel hacking way from ldd. It can be found at:
> http://lwn.net/Kernel/LDD3/
>
> There are a few other books by R. Love or Greg KH that you can read.
>
> Such questions are fully covered there.
>
> Best,
> Vitaliy
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Driver question: multiple instances of same char device
2007-07-10 13:06 Driver question: multiple instances of same char device Jon Dufresne
2007-07-10 13:13 ` Vitaliy Ivanov
@ 2007-07-13 15:32 ` Alan Cox
1 sibling, 0 replies; 4+ messages in thread
From: Alan Cox @ 2007-07-13 15:32 UTC (permalink / raw)
To: Jon Dufresne; +Cc: Linux Kernel Mailing List
On Tue, 10 Jul 2007 09:06:36 -0400
Jon Dufresne <jon.dufresne@infinitevideocorporation.com> wrote:
> I am relatively new to linux device development. And want to understand
> Linux conventions.
>
> Suppose I have a PCI card that is represented in the system by a
> character device.
>
> If I have two of those PCI cards in the system when the driver module
> loads, is it convention to have two different major numbers, or have one
> major number and two different minor numbers?
Usually one major and two minor, although sysfs and udev deals with much
of it now
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-13 15:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-10 13:06 Driver question: multiple instances of same char device Jon Dufresne
2007-07-10 13:13 ` Vitaliy Ivanov
2007-07-10 13:31 ` Jon Dufresne
2007-07-13 15:32 ` Alan Cox
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®