From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <510D288B.60305@grandegger.com> Date: Sat, 02 Feb 2013 15:54:03 +0100 From: Wolfgang Grandegger MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] (-_-) List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Bhaira Cc: Xenomai@xenomai.org On 02/02/2013 09:43 AM, Amit Bhaira wrote: > Hey guys suppose I am having 5 same kind of devices, and i am writing > a driver for them. Then where is should i register my > device(rtdm_dev_regisger())?? in probe(once) or in init(5 times) .. > and i will use it in probe all of them will be having same name so how > would rt_dev_open() differentiate them ?? This is not much different to a normal Linux driver. In your platform, pci or whatever probe function you call rtdm_dev_register(), where you also provide a name for that device (rtdm_dev->device_name). Have a look for example to: http://www.rts.uni-hannover.de/xenomai/lxr/source/ksrc/drivers/serial/rt_mpc52xx_uart.c#1276 Wolfgang.