15 Feb, 2012

1 commit


14 Feb, 2012

2 commits


09 Feb, 2012

6 commits

  • This patch adds SS descriptors to the ACM & generic serial gadget. The
    ACM part was tested with minicom + dummy + send / receive files over
    ttyACM ttyGS0.
    The generic serial part (f_serial) was not tested (haven't found a
    driver on the host side).
    The nokia & multi gadget use HS at most.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     
  • Since commit 72c973dd aka ("usb: gadget: add usb_endpoint_descriptor to
    struct usb_ep) the descriptor is part of the ep. Most gadgets like
    g_zero or masstorage call config_ep_by_speed() to grab an available
    endpoint which may be used for FS/HS/SS bulk/iso/intr and in a second
    they assign the proper descriptor by calling config_ep_by_speed(). This
    is good so far. A few of them like ncm call config_ep_by_speed() only if
    ep->desc not assigned earlier. That means ep->desc is never assigned if
    the endpoint was used by another gadget before it was removed.

    Some of those gadgets also assign ep->driver_data to NULL on reset or
    ep_disable part _but_ keep a reference to this endpoint. At ep_enable
    time they assign driver_data to their private data. This probably needs
    a clean up of its own.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     
  • Problem:
    pch_udc continues operation even if VBUS becomes Low.
    pch_udc performs D+ pulling up before VBUS becomes High.
    USB device should be controlled according to VBUS state.

    Root cause:
    The current pch_udc is not always monitoring VBUS.

    Solution:
    The change of VBUS is detected using an interrupt of GPIO.
    If VBUS became Low, pch_udc handles 'disconnect'.
    After VBUS became High, a pull improves D+, and pch_udc
    handles 'connect'.

    [ balbi@ti.com : make it actually compile ]

    Signed-off-by: Tomoya MORINAGA
    Signed-off-by: Felipe Balbi

    Tomoya MORINAGA
     
  • Problem:
    In USB Suspend, pch_udc handles 'disconnect'.

    Root cause:
    The current pch_udc is not monitoring VBUS.
    When USB cable is disconnected, USB Device Controller generates
    an interrupt of USB Suspend.
    pch_udc cannot distinguish it is USB Suspend or disconnect.
    Therefore, pch_udc handles 'disconnect' after an interrupt of
    USB Suspend happend.

    Solution:
    VBUS is detected through GPIO.
    After an interrupt produced USB Suspend, if VBUS is Low,
    pch_udc handles 'disconnect'.
    If VBUS is High, pch_udc handles 'suspend'.

    Signed-off-by: Tomoya MORINAGA
    Signed-off-by: Felipe Balbi

    Tomoya MORINAGA
     
  • _ep to ep is a pointer substraction so ep won't be zero unless _ep was
    8. This was not intendent by the author, it was probably a typo while
    checking for NULL of the argument.

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Alan Stern
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     
  • If the stream check fails then we leave ep->desc assigend but we return
    with an error code. The caller assumes the endpoint is not enabled
    (which is the case) but it can not enable it again due to this
    assigment.

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Alan Stern
    Signed-off-by: Felipe Balbi

    Sebastian Andrzej Siewior
     

30 Jan, 2012

1 commit


24 Jan, 2012

21 commits


20 Jan, 2012

9 commits