From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernd Porr Date: Mon, 01 Dec 2008 18:27:30 +0000 Subject: Re: usb coldplug problem Message-Id: <49342C92.1060004@f2s.com> List-Id: References: <403A9FAC.2010904@free.fr> In-Reply-To: <403A9FAC.2010904@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Ok. I'll look into that. So, you mean that I create with the "request firmware" a new udev event which then could also call "comedi_config"? The problem just now is that I don't get any udev events during coldplug. Do you think this will also solve that issue? One practical thing: it's probably a good idea to work on the driver version which goes into the kernel and not the one in the comedi CVS. Where can I check out my module just now? Thanks! /Bernd Greg KH wrote: > On Mon, Dec 01, 2008 at 03:21:56PM +0000, Bernd Porr wrote: >> Hi! >> >> It's not that easy. The actual udev event triggers comedi_config which does >> _also_ the firmware upload on the side. Even if I upload the firmware via >> sysfs I still need to run comedi_config to set up the comedi device. > > Then do it like other USB devices do it: > - usb probe function calls request firmware > - after request firmware succeeds, then initialize the comedi > interface > > That way the driver will work like all other Linux USB devices do :) > >> Therefore it's simpler to do it via comedi_config as this supports firmware >> upload anyway and people can also do it manually if udev is not supported, >> for example on embedded systems. > > udev is supported everywhere. It's in my daughter's cell phone (the > number 1 selling phone in the USA this year) and if udev isn't there, > than the "generic" way of having hotplug handle firmware events is still > going to work properly for you. > > thanks, > > greg k-h > -- www: http://www.berndporr.me.uk/ http://www.linux-usb-daq.co.uk/ http://www.myfriendhelen.org.uk/ Mobile: +44 (0)7840 340069 Work: +44 (0)141 330 5237 University of Glasgow Department of Electronics & Electrical Engineering 72 Oakfield Avenue (Rankine Building for deliveries) Glasgow, G12 8LT