- From: Bernd Porr <bp1_at_cn.stir.ac.uk>
- Date: Sun, 04 May 2003 23:56:34 +0100
Hi! One bug in the driver-DIY section: Add a line to “comedi/drivers/Makefile”, using your freshly defined variable, i.e., CONFIG_COMEDI_MYDRIVER. ^ It should say "Makefile.in" /Bernd Herman Bruyninckx wrote: >On Fri, 2 May 2003, Bernd Porr wrote: > > > >>how often is "attach" called from comedi. >> >> >Once: at module load time typically. > >[...] > > >>Therefore the question: can I put the usb_probe in the attach routine of >>comedi? >> >> > >I think it belongs there. But I also think you should ask these >questions on the Comedi mailing list :-) I have volunteered to write >some documentation, but not to become a private helpdesk.. > > > >>In docu you wrote that there should be no global variables and I >>really appreciate that. However, I would need a global array for the >>usb-devices attached to the bus if I were to use the module_init >>function. >> >> >This seems to me to be a sign that you need one more layer of driver >interface: the USB layer. Similar to having the parport or PCI layer. >This layer exists only once in your system, and serves as the "global" >information for the more dynamic layers on top of it. I might >misunderstand your problem, though... > >So, you would get one attach for the USB layer, and one for each >device on the USB platform. The latter is more dynamic, and uses the >USB driver's "local" data as "global" data in its own device driver. > >Herman > > -- http://www.cn.stir.ac.uk/~bp1/ mailto:bp1_at_cn.stir.ac.uk
Received on 2003-05-04Z21:56:34