porting driver 2.4 -> 2.6, confused by device model
Sebastian Kuzminsky
seb at highlab.com
Fri Feb 23 17:15:49 CST 2007
Greg KH <greg at kroah.com> wrote:
> > As far as I can tell, this device does not fit well into any of the
> > existing classes. LDD3 talks about a "simple" class, but it seems like
> > it's been removed since that book was written. Should I create a new
> > class for the device?
>
> Have you looked into the comedi interface? It should provide what you
> need for a framework that creates the proper device ids. I think it
> will end up in the kernel tree soon/eventually, so you might want to use
> it.
Wow, comedi is still around? I looked into that back when I first wrote
the 2.4 driver about 10 years ago. I'll check them out again.
> > Should I somehow call make a kobject for each device node and call
> > kobject_uevent() directly?
>
> If you really want to do this on your own, see the chapter about the
> driver model in the book, Linux Device Drivers, third edition, online
> for free, that talks about how to hook up your code to let udev work
> properly.
>
> Note that the book is a bit out of date, and the functions that it tells
> you to use there are no longer present. Instead use the device_create()
> functions.
I'll have to re-read that chapter a couple of more times before it'll
make any sense to me...
> If you have specific questions after reading this, please let me know.
Thanks Greg!
--
Sebastian Kuzminsky hash bang bin bash
More information about the Kernel-mentors
mailing list