All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] (-_-)
@ 2013-02-02  8:43 Amit Bhaira
  2013-02-02 14:54 ` Wolfgang Grandegger
  0 siblings, 1 reply; 3+ messages in thread
From: Amit Bhaira @ 2013-02-02  8:43 UTC (permalink / raw)
  To: Xenomai

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 ??


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai] (-_-)
  2013-02-02  8:43 [Xenomai] (-_-) Amit Bhaira
@ 2013-02-02 14:54 ` Wolfgang Grandegger
  2013-02-02 15:46   ` Amit Bhaira
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Grandegger @ 2013-02-02 14:54 UTC (permalink / raw)
  To: Amit Bhaira; +Cc: Xenomai

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai] (-_-)
  2013-02-02 14:54 ` Wolfgang Grandegger
@ 2013-02-02 15:46   ` Amit Bhaira
  0 siblings, 0 replies; 3+ messages in thread
From: Amit Bhaira @ 2013-02-02 15:46 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai

got it.. thanks for the code ..it's very worthy

On 2/2/13, Wolfgang Grandegger <wg@grandegger.com> wrote:
> 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.
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-02 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-02  8:43 [Xenomai] (-_-) Amit Bhaira
2013-02-02 14:54 ` Wolfgang Grandegger
2013-02-02 15:46   ` Amit Bhaira

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.