* udev/hotplug and automatic /dev node creation @ 2006-01-18 2:47 Horst Schirmeier 2006-01-18 4:07 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Horst Schirmeier @ 2006-01-18 2:47 UTC (permalink / raw) To: linux-kernel Hi, I'm looking for documentation regarding how to write a Linux kernel module that creates its own /dev node via udev/hotplug. register_chrdev() and a simple udev/rules.d/ entry don't seem to be sufficient... Any suggestions on where to start reading are welcome. Kind regards, Horst -- PGP-Key 0xD40E0E7A ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev/hotplug and automatic /dev node creation 2006-01-18 2:47 udev/hotplug and automatic /dev node creation Horst Schirmeier @ 2006-01-18 4:07 ` Greg KH 2006-01-18 12:13 ` Horst Schirmeier 2006-01-25 12:50 ` Horst Schirmeier 0 siblings, 2 replies; 5+ messages in thread From: Greg KH @ 2006-01-18 4:07 UTC (permalink / raw) To: linux-kernel On Wed, Jan 18, 2006 at 03:47:10AM +0100, Horst Schirmeier wrote: > Hi, > > I'm looking for documentation regarding how to write a Linux kernel > module that creates its own /dev node via udev/hotplug. > register_chrdev() and a simple udev/rules.d/ entry don't seem to be > sufficient... Yes, register_chrdev() will do nothing for udev. Take a look at the book, Linux Device Drivers, third edition (free online). In the chapter about the driver model, there is a section about what udev needs. The functions it says to use are no longer in the kernel, but it should point you in the right direction (hint, use class_device_create().) If you have a pointer to your code, I can probably knock out a patch for you very quickly. thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev/hotplug and automatic /dev node creation 2006-01-18 4:07 ` Greg KH @ 2006-01-18 12:13 ` Horst Schirmeier 2006-01-25 12:50 ` Horst Schirmeier 1 sibling, 0 replies; 5+ messages in thread From: Horst Schirmeier @ 2006-01-18 12:13 UTC (permalink / raw) To: linux-kernel On Tue, 17 Jan 2006, Greg KH wrote: > On Wed, Jan 18, 2006 at 03:47:10AM +0100, Horst Schirmeier wrote: > > Hi, > > > > I'm looking for documentation regarding how to write a Linux kernel > > module that creates its own /dev node via udev/hotplug. > > register_chrdev() and a simple udev/rules.d/ entry don't seem to be > > sufficient... > > Yes, register_chrdev() will do nothing for udev. > > Take a look at the book, Linux Device Drivers, third edition (free > online). In the chapter about the driver model, there is a section > about what udev needs. The functions it says to use are no longer in > the kernel, but it should point you in the right direction (hint, use > class_device_create().) Thank you very much, I'll look into this book and class_device_create(). > If you have a pointer to your code, I can probably knock out a patch for > you very quickly. I have no doubt you'll be able to do that, but my primary intention is to dig into that myself :) thanks again. Kind regards, Horst -- PGP-Key 0xD40E0E7A ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev/hotplug and automatic /dev node creation 2006-01-18 4:07 ` Greg KH 2006-01-18 12:13 ` Horst Schirmeier @ 2006-01-25 12:50 ` Horst Schirmeier 2006-01-25 15:33 ` Greg KH 1 sibling, 1 reply; 5+ messages in thread From: Horst Schirmeier @ 2006-01-25 12:50 UTC (permalink / raw) To: Greg KH; +Cc: linux-kernel On Tue, 17 Jan 2006, Greg KH wrote: > On Wed, Jan 18, 2006 at 03:47:10AM +0100, Horst Schirmeier wrote: > > Hi, > > > > I'm looking for documentation regarding how to write a Linux kernel > > module that creates its own /dev node via udev/hotplug. > > register_chrdev() and a simple udev/rules.d/ entry don't seem to be > > sufficient... > > Yes, register_chrdev() will do nothing for udev. > > Take a look at the book, Linux Device Drivers, third edition (free > online). In the chapter about the driver model, there is a section > about what udev needs. The functions it says to use are no longer in > the kernel, but it should point you in the right direction (hint, use > class_device_create().) > > If you have a pointer to your code, I can probably knock out a patch for > you very quickly. Now I'm using class_create() and class_device_create() (together with class_device_destroy() and class_destroy()), which works fine on 2.6.15 and 2.6.16-rc1, and with some hackish LINUX_VERSION_CODE-checking #define wrapper around class_device_create() also on 2.6.13 and 2.6.14... But: Is there a common way to get this working on 2.6.12 or earlier? Kind regards, Horst -- PGP-Key 0xD40E0E7A ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udev/hotplug and automatic /dev node creation 2006-01-25 12:50 ` Horst Schirmeier @ 2006-01-25 15:33 ` Greg KH 0 siblings, 0 replies; 5+ messages in thread From: Greg KH @ 2006-01-25 15:33 UTC (permalink / raw) To: linux-kernel On Wed, Jan 25, 2006 at 01:50:17PM +0100, Horst Schirmeier wrote: > On Tue, 17 Jan 2006, Greg KH wrote: > > On Wed, Jan 18, 2006 at 03:47:10AM +0100, Horst Schirmeier wrote: > > > Hi, > > > > > > I'm looking for documentation regarding how to write a Linux kernel > > > module that creates its own /dev node via udev/hotplug. > > > register_chrdev() and a simple udev/rules.d/ entry don't seem to be > > > sufficient... > > > > Yes, register_chrdev() will do nothing for udev. > > > > Take a look at the book, Linux Device Drivers, third edition (free > > online). In the chapter about the driver model, there is a section > > about what udev needs. The functions it says to use are no longer in > > the kernel, but it should point you in the right direction (hint, use > > class_device_create().) > > > > If you have a pointer to your code, I can probably knock out a patch for > > you very quickly. > > Now I'm using class_create() and class_device_create() (together with > class_device_destroy() and class_destroy()), which works fine on > 2.6.15 and 2.6.16-rc1, and with some hackish LINUX_VERSION_CODE-checking > #define wrapper around class_device_create() also on 2.6.13 and > 2.6.14... > > But: Is there a common way to get this working on 2.6.12 or earlier? Look at the class_simple* functions in that older kernel version. They should do much of the same thing of what you need. Hope this helps, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-25 15:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-01-18 2:47 udev/hotplug and automatic /dev node creation Horst Schirmeier 2006-01-18 4:07 ` Greg KH 2006-01-18 12:13 ` Horst Schirmeier 2006-01-25 12:50 ` Horst Schirmeier 2006-01-25 15:33 ` Greg KH
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox