From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6858 invoked by alias); 19 May 2009 15:17:02 -0000 Received: (qmail 6842 invoked by uid 22791); 19 May 2009 15:17:00 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail05.solnet.ch (HELO mail05.solnet.ch) (212.101.4.139) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 May 2009 15:16:52 +0000 Received: from mail05.solnet.ch ([127.0.0.1]) by localhost (mail05.solnet.ch [127.0.0.1]) (SolNet-Check, port 10024) with LMTP id qTq9AzfpRVCt; Tue, 19 May 2009 15:16:48 +0000 (UTC) Received: from beta.intefo.ch (static-212-101-18-64.adsl.solnet.ch [212.101.18.64]) by mail05.solnet.ch (Postfix) with ESMTP id 0AA8239994; Tue, 19 May 2009 15:16:48 +0000 (UTC) Received: from beta.intefo.ch ([127.0.0.1]) by localhost (beta.intefo.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4nlfjJUcXqeL; Tue, 19 May 2009 17:16:47 +0200 (CEST) Received: from [192.168.1.20] (simon.intefo.ch [192.168.1.20]) by beta.intefo.ch (Postfix) with ESMTP id 770F577024E; Tue, 19 May 2009 17:16:47 +0200 (CEST) Message-ID: <4A12CD5F.20901@intefo.ch> Date: Tue, 19 May 2009 15:17:00 -0000 From: Simon Kallweit User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Andrew Lunn CC: Chris Holgate , ecos-devel@sourceware.org Subject: Re: STM32 USB support References: <4A11CAAA.8040900@intefo.ch> <4A11D861.8090206@zynaptic.com> <4A11E5DF.2000403@intefo.ch> <4A129C34.9090606@zynaptic.com> <20090519120004.GI20046@lunn.ch> In-Reply-To: <20090519120004.GI20046@lunn.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-05/txt/msg00031.txt.bz2 Andrew Lunn wrote: >>>> There is a significant difference from the other USB drivers which I >>>> should probably flag up (and document). The endpoint configuration is >>>> generated dynamically from the USB descriptors. This gives a lot of >>>> flexibility and potentially allows support for multiple configurations >>>> (untested!). However, the downside is that I had to leave out devtab >>>> support since the devtab entries need to be set statically. >>>> >>> Don't you think it's possible to have both options? I haven't looked at >>> the USB subsystem or any drivers, but I think a public driver should >>> behave as the subsystem intends. Maybe the subsystem could be extended >>> for more dynamic usage though. >> The official docs say "To support this the device driver can provide a >> devtab entry for each endpoint". I took that to mean that devtab >> support was optional - and the dynamic endpoint configuration is a much >> more useful feature IMHO. >> >> Previously supported hardware has had fixed endpoint configurations >> which makes the static devtab entries easy to implement. However, with >> dynamic endpoint configuration, the low-level driver doesn't know >> a-priori what endpoints to generate devtab entries for - and nor should it! > > The AT91 USB driver has something similar to this. It can configure > the endpoints by looking at the USB descriptors. > > I don't remember how it works with respect to devtab entries. Chris, do you have any example code using your driver? I was wondering if your approach to dynamically set the endpoint configurations should be offered as an official alternative to the devtab entries (or we may even get rid of the devtab entries). I may be working on USB serial and ethernet support. The USB serial driver at least seems to be tailored for the AT91 driver right now and cannot be used generically yet. We could change that to use dynamic setup of endpoints, which I think would be a great idea. Simon