1. 22 1月, 2013 2 次提交
    • S
      usb: gadget: allocate & giveback serial ports instead hard code them · 19b10a88
      Sebastian Andrzej Siewior 提交于
      This patch removes gserial_setup() and gserial_cleanup() and adds
      gserial_alloc_line() and gserial_free_line() to replace them.
      
      The initial setup of u_serial happens now on module load time. A
      maximum of four TTY ports can be requested which is the current limit.
      In theory we could extend this limit, the hard limit is the number of
      available endpoints.
      alloc_tty_driver() is now called at module init time with the max
      available ports. The per-line footprint here is on 32bit is 3 * size of
      pointer + 60 bytes (for cdevs).
      The remaining memory (struct gs_port) is allocated once a port is
      requested.
      
      With this change it is possible to load g_multi and g_serial at the same
      time. GS0 receives the module that is loaded first, GS1 is received by
      the next module and so on. With the configfs interface the port number
      can be exported and the device node is more predictable. Nothing changes
      for g_serial and friends as long as one module is used.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      19b10a88
    • S
      usb: gadget: u_serial: convert into a module · 3249ca22
      Sebastian Andrzej Siewior 提交于
      Every user of u_serial has now to select the U_SERIAL symbol instead of
      including the file.
      There is one limition with this: ports and and gs_tty_driver are global
      variables in u_serial. Since all users share them, there can be only one
      user loaded at a time i.e. either g_serial or g_nokia.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      3249ca22
  2. 10 9月, 2012 11 次提交
  3. 24 1月, 2012 1 次提交
  4. 10 9月, 2011 1 次提交
    • K
      usb gadget: clean up FSF boilerplate text · 28c9fc68
      Klaus Schwarzkopf 提交于
      remove the following two paragraphs as they are not needed:
      
      This program is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
      License for more details.
      
      You should have received a copy of the GNU General Public License along with
      this program; if not, write to the Free Software Foundation, Inc.,59
      Temple Place - Suite 330, Boston, MA  02111-1307, USA.
      Signed-off-by: NKlaus Schwarzkopf <schwarzkopf@sensortherm.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      28c9fc68
  5. 02 7月, 2011 1 次提交
  6. 23 10月, 2010 4 次提交
  7. 11 8月, 2010 2 次提交
  8. 19 3月, 2010 1 次提交
  9. 17 2月, 2010 1 次提交
  10. 12 12月, 2009 2 次提交
  11. 25 3月, 2009 1 次提交
  12. 18 10月, 2008 1 次提交
  13. 17 10月, 2008 1 次提交
  14. 26 7月, 2008 1 次提交
  15. 22 7月, 2008 2 次提交
    • D
      usb_gadget: composite cdc gadget fault handling · ac90e365
      David Brownell 提交于
      These two fixes ensure the new "CDC Composite Device" gadget
      fails cleanly when it's loaded on hardware that can't support
      this particular gadget driver.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ac90e365
    • D
      usb gadget: new "CDC Composite" gadget driver · 19e20680
      David Brownell 提交于
      This is a simple example of a composite gadget, combining two
      Communications Class Device (CDC) functions:  ECM and ACM.
      
      This provides a clear example of how the composite gadget framework
      is intended to work.  It's surprising that MS-Windows (or at least,
      XP and previous) won't "just work" with something this simple...
      
      One /proc/bus/usb/devices listing looks like:
      
        T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 46 Spd=480 MxCh= 0
        D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
        P:  Vendor=0525 ProdID=a4aa Rev= 3.01
        S:  Manufacturer=Linux 2.6.26-rc6-pnut with net2280
        S:  Product=CDC Composite Gadget
        C:* #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr=  2mA
        I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
        E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
        I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
        I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
        E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
        E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
        I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
        E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
        I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
        E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
        E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Not all USB peripheral controller hardware can support this driver.
      All the highspeed-capable peripheral controllers with drivers now in
      the mainline kernel seem to support this, as does omap_udc.  But
      many full speed controllers don't have enough endpoints, or (as with
      the PXA controllers) don't support altsettings.
      
      Lightly tested.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      19e20680