Re: How does the driver initialize corresponding with several same devices ?
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Wed, Apr 18, 2012 at 05:16:01PM +0800, Li Haifeng wrote: > I make a driver module and built in the kernel. There are three devices use > the same driver on the hardware platform. To use each device, the probe > function of the driver module should be probed. So, the driver module is > registered in the kernel. > > My question is, how times should the probe function of the driver be called > and create nodes in devfs to corresponding with the three devices? It depends on what your architecture supports. If you have support for device tree, your entry in the device tree will make the subsystem call your probe function for each device it finds. You can then check the `compatible` entry of the device node and your driver is then able to register itself to the kernel subsystem. Greetings, Philipp _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
[Newbies FAQ] [Linux Kernel Development] [IETF Annouce] [Git] [Networking] [Security] [Bugtraq] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux Networking] [Linux RAID] [Linux SCSI] [Linux ACPI]