* [Xenomai] RTDM - Dynamic linking of device @ 2012-12-13 9:21 alex alex 2012-12-15 11:57 ` Gilles Chanteperdrix 0 siblings, 1 reply; 6+ messages in thread From: alex alex @ 2012-12-13 9:21 UTC (permalink / raw) To: xenomai Hi, I need to link new devices once my module is loaded and I'd like to know if we can do this with RTDM? Are we forced to link the device in the "_init" fonction ? Or is there an other way to do the connection device/driver than using rtdm_dev_register<http://www.xenomai.org/documentation/trunk/html/api/group__devregister.html#ga6a191b3d206680c48cad2047adb9fc98>wich doesn't allow to do what I want? Thanks for your answer. Alex. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] RTDM - Dynamic linking of device 2012-12-13 9:21 [Xenomai] RTDM - Dynamic linking of device alex alex @ 2012-12-15 11:57 ` Gilles Chanteperdrix [not found] ` <CAPpP=rPn8k2LTwrYQ_XkKE4vaiazfREnfCJEE5nbY0iD7Apofw@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Gilles Chanteperdrix @ 2012-12-15 11:57 UTC (permalink / raw) To: alex alex; +Cc: xenomai On 12/13/2012 10:21 AM, alex alex wrote: > Hi, > > I need to link new devices once my module is loaded and I'd like to know if > we can do this with RTDM? > Are we forced to link the device in the "_init" fonction ? If you link the device in the "_init" function it will link the new device once the module is loaded. > Or is there an > other way to do the connection device/driver than using > rtdm_dev_register<http://www.xenomai.org/documentation/trunk/html/api/group__devregister.html#ga6a191b3d206680c48cad2047adb9fc98>wich > doesn't allow to do what I want? I do not really understand what you are talking about. If something does not work, please post code demonstrating what does not work. -- Gilles. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAPpP=rPn8k2LTwrYQ_XkKE4vaiazfREnfCJEE5nbY0iD7Apofw@mail.gmail.com>]
* Re: [Xenomai] RTDM - Dynamic linking of device [not found] ` <CAPpP=rPn8k2LTwrYQ_XkKE4vaiazfREnfCJEE5nbY0iD7Apofw@mail.gmail.com> @ 2012-12-16 2:43 ` Gilles Chanteperdrix [not found] ` <CAPpP=rMyDyfzLr=85+=KF-kMn1mYkGmd=ykRj71d40+35BOzdg@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Gilles Chanteperdrix @ 2012-12-16 2:43 UTC (permalink / raw) To: alex alex; +Cc: Xenomai On 12/16/2012 03:01 AM, alex alex wrote: > Infact, I wonder if it is possible with RTDM to add devices after the > module is loaded. > My module is used by programs that do not allow me to know in advance > how many device linked to the module there will be and what will be > their name. > With "rtdm_dev_register" I have to declare statically a fixed number of > device with a fixed name for each so I wonder if there is a dynamic way > to add device after the module loading. I do not understand what prevents you from calling rtdm_dev_register with dynamic parameters... Again, please post the code which does not work to help us understand what your problem is. -- Gilles. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAPpP=rMyDyfzLr=85+=KF-kMn1mYkGmd=ykRj71d40+35BOzdg@mail.gmail.com>]
[parent not found: <50CF00C4.7030701@xenomai.org>]
[parent not found: <CAPpP=rPhXs54eQMX_2L2an-t86LBc0ChTbkbTOTbUzTbDpunCg@mail.gmail.com>]
* Re: [Xenomai] RTDM - Dynamic linking of device [not found] ` <CAPpP=rPhXs54eQMX_2L2an-t86LBc0ChTbkbTOTbUzTbDpunCg@mail.gmail.com> @ 2012-12-18 16:29 ` Gilles Chanteperdrix 2012-12-19 9:39 ` alex alex 0 siblings, 1 reply; 6+ messages in thread From: Gilles Chanteperdrix @ 2012-12-18 16:29 UTC (permalink / raw) To: Xenomai On 12/18/2012 03:38 PM, alex alex wrote: > Thanks for your answer, I have corrected the example program. > > What I would like to do is add x devices after that the module be loaded > and without naming these devices statically in the module, so am I forced > to call x times rtdm_dev_register with x declarations of the rtdm_device > structure in test.c? > If there is an other way, please tell me what it is. What about creating a first static device with an ioctl allowing to create other devices? -- Gilles. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] RTDM - Dynamic linking of device 2012-12-18 16:29 ` Gilles Chanteperdrix @ 2012-12-19 9:39 ` alex alex 2012-12-19 10:07 ` Philippe Gerum 0 siblings, 1 reply; 6+ messages in thread From: alex alex @ 2012-12-19 9:39 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: Xenomai Infact I thought "rtdm_dev_register" worked exclusively in the _init function as indicated by the documentation. Following your advice I have tested "rtdm_dev_register" in another function of my RTDM driver (ioctl) and it works well. I think you might change the doc of rtdm_dev_register to : This service can be called from: - Kernel module initialization/cleanup code - Kernel-based task Same for rtdm_dev_unregister Alex. 2012/12/18 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> > On 12/18/2012 03:38 PM, alex alex wrote: > >> Thanks for your answer, I have corrected the example program. >> >> What I would like to do is add x devices after that the module be loaded >> and without naming these devices statically in the module, so am I forced >> to call x times rtdm_dev_register with x declarations of the rtdm_device >> structure in test.c? >> If there is an other way, please tell me what it is. >> > > What about creating a first static device with an ioctl allowing to create > other devices? > > -- > Gilles. > > ______________________________**_________________ > Xenomai mailing list > Xenomai@xenomai.org > http://www.xenomai.org/**mailman/listinfo/xenomai<http://www.xenomai.org/mailman/listinfo/xenomai> > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai] RTDM - Dynamic linking of device 2012-12-19 9:39 ` alex alex @ 2012-12-19 10:07 ` Philippe Gerum 0 siblings, 0 replies; 6+ messages in thread From: Philippe Gerum @ 2012-12-19 10:07 UTC (permalink / raw) To: alex alex; +Cc: Xenomai On 12/19/2012 10:39 AM, alex alex wrote: > Infact I thought "rtdm_dev_register" worked exclusively in the _init > function as indicated by the documentation. Following your advice I have > tested "rtdm_dev_register" in another function of my RTDM driver (ioctl) > and it works well. > > I think you might change the doc of rtdm_dev_register to : > > This service can be called from: > > - Kernel module initialization/cleanup code > - Kernel-based task > > Same for rtdm_dev_unregister > Nope. Kernel-based task in the context of Xenomai means a primary mode context over a lightweight Xenomai task, which is not what you want. Kernel module init/cleanup code implies secondary mode, this is the gist of the matter. This may be made clearer in the doc though. > Alex. > 2012/12/18 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> > >> On 12/18/2012 03:38 PM, alex alex wrote: >> >>> Thanks for your answer, I have corrected the example program. >>> >>> What I would like to do is add x devices after that the module be loaded >>> and without naming these devices statically in the module, so am I forced >>> to call x times rtdm_dev_register with x declarations of the rtdm_device >>> structure in test.c? >>> If there is an other way, please tell me what it is. >>> >> >> What about creating a first static device with an ioctl allowing to create >> other devices? >> >> -- >> Gilles. >> >> ______________________________**_________________ >> Xenomai mailing list >> Xenomai@xenomai.org >> http://www.xenomai.org/**mailman/listinfo/xenomai<http://www.xenomai.org/mailman/listinfo/xenomai> >> > _______________________________________________ > Xenomai mailing list > Xenomai@xenomai.org > http://www.xenomai.org/mailman/listinfo/xenomai > -- Philippe. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-12-19 10:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-13 9:21 [Xenomai] RTDM - Dynamic linking of device alex alex
2012-12-15 11:57 ` Gilles Chanteperdrix
[not found] ` <CAPpP=rPn8k2LTwrYQ_XkKE4vaiazfREnfCJEE5nbY0iD7Apofw@mail.gmail.com>
2012-12-16 2:43 ` Gilles Chanteperdrix
[not found] ` <CAPpP=rMyDyfzLr=85+=KF-kMn1mYkGmd=ykRj71d40+35BOzdg@mail.gmail.com>
[not found] ` <50CF00C4.7030701@xenomai.org>
[not found] ` <CAPpP=rPhXs54eQMX_2L2an-t86LBc0ChTbkbTOTbUzTbDpunCg@mail.gmail.com>
2012-12-18 16:29 ` Gilles Chanteperdrix
2012-12-19 9:39 ` alex alex
2012-12-19 10:07 ` Philippe Gerum
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.