From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernd Porr Date: Mon, 01 Dec 2008 15:21:56 +0000 Subject: Re: usb coldplug problem Message-Id: <49340114.4000807@elec.gla.ac.uk> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------020207040202060604090507" List-Id: References: <403A9FAC.2010904@free.fr> In-Reply-To: <403A9FAC.2010904@free.fr> To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------020207040202060604090507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. 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. You see I've put in some thought into that earlier. But I'm open for suggestions. ;-) /Bernd www: http://www.berndporr.me.uk/ http://www.linux-usb-daq.co.uk/ Mobile: +44 (0)7840 340069 Work: +44 (0)141 330 5237 University of Glasgow Department of Electronics & Electrical Engineering 72 Oakfield Avenue (for deliveries: Rankine Building) Glasgow, G12 8LT Greg KH wrote: > On Mon, Dec 01, 2008 at 08:46:52AM +0000, Bernd Porr wrote: >> Hi! >> >> I'm the maintainter of the USBDUX board which connects via the USB to >> linux. >> >> In order to work properly the USBDUX needs firmware uploaded. So, I wrote a >> udev rule which uploads the firmware as soon as there's a udev event from >> the USB BUS (this is done via comedi_config). > > Why not just use the firmware functions in the kernel core for this? > That way, when the device is seen by udev, the correct firmware request > function will be called, your firmware will be loaded, and everything > should be just fine. > > No need to reinvent the wheel here :) > > thanks, > > greg k-h --------------020207040202060604090507 Content-Type: text/x-vcard; charset=utf-8; name="B_Porr.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="B_Porr.vcf" begin:vcard fn:Bernd Porr n:Porr;Bernd org:University of Glasgow;Department of Electronics & Electrical Engineering adr:Oakfield Avenue;;Room 519, Rankine Building;Glasgow;Scotland;G12 8LT;Scotland email;internet:b.porr@elec.gla.ac.uk title:Dr tel;work:0141 330 5237 tel;fax:0141 330 6004 tel;cell:07840 340069 x-mozilla-html:FALSE url:http://www.berndporr.me.uk version:2.1 end:vcard --------------020207040202060604090507--