Antwort: Re: udev example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Greg,

there is no standard device class for our drivers. We are making devices for the LON field bus. These devices are connected to the PC with different kinds: USB, PCI, PC-104, Serial.
Until now we used a character device with a fixed major and minor number. But now we want to use the new udev file system.
For the USB device the usb_register_dev() implicitly creates the /dev entries.
But what generally function can I use for other drivers to create /dev entries?

Thanks and best regards, Volker



Greg KH <greg@xxxxxxxxx>

02.11.2007 18:58

       
        An:        vschober@xxxxxxxxxx
        Kopie:        kernelnewbies <kernelnewbies@xxxxxxxxxxxx>
        Thema:        Re: udev example



On Fri, Nov 02, 2007 at 10:46:30AM -0700, vschober@xxxxxxxxxx wrote:
> On 21 Nov. 2006, 23:34, Greg KH <g...@xxxxxxxxx> wrote:
> > A: No.
> > Q: Should I include quotations after my reply?
> >
> > On Tue, Nov 21, 2006 at 09:36:24AM -0600, Dinesh wrote:
> > > Thanks Greg,
> >
> > > So, you mean, Linux Device Drivers 3rd edition notes on udev (pages
> > > 403-405) is not of much use?
> >
> > Yes, LDD3 is out of date in this area, but the concepts remain the same,
> > only the functions called have changed.  Much like the majority of that
> > book, use it for the concepts and ideas, as much of the specific
> > functions used are no longer correct.
>
> What function names I must look for now to create the /dev entries?
> In a driver for a USB device does usb_register_dev() create the /dev
> entries, but I don't know, what function I can call in a driver for a
> PCI device.

The bus type does not dictate how you will operate with userspace, that
is only how you will talk to the bus core.

It all depends on what type of device you are writing a driver for.  If
you have a PCI scsi device, then you use the scsi core to create the
device nodes and do the block core functions for you.

Same thing goes if you are writing a Input device driver that happens to
be a PCI device.

So, what type of device is this?

thanks,

greg k-h


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux