1. 27 9月, 2015 2 次提交
  2. 06 8月, 2015 3 次提交
  3. 05 8月, 2015 3 次提交
    • R
      usb: gadget: add endpoint capabilities helper macros · 80e6e384
      Robert Baldyga 提交于
      Add macros useful while initializing array of endpoint capabilities
      structures. These macros makes structure initialization more compact
      to decrease number of code lines and increase readability of code.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      80e6e384
    • R
      usb: gadget: add endpoint capabilities flags · 734b5a2a
      Robert Baldyga 提交于
      Introduce struct usb_ep_caps which contains information about capabilities
      of usb endpoints - supported transfer types and directions. This structure
      should be filled by UDC driver for each of its endpoints, and will be
      used in epautoconf in new ep matching mechanism which will replace ugly
      guessing of endpoint capabilities basing on its name.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      734b5a2a
    • R
      usb: gadget: encapsulate endpoint claiming mechanism · cc476b42
      Robert Baldyga 提交于
      So far it was necessary for usb functions to set ep->driver_data in
      endpoint obtained from autoconfig to non-null value, to indicate that
      endpoint is claimed by function (in autoconfig it was checked if endpoint
      has set this field to non-null value, and if it has, it was assumed that
      it is claimed). It could cause bugs because if some function doesn't
      set this field autoconfig could return the same endpoint more than one
      time.
      
      To help to avoid such bugs this patch adds claimed flag to struct usb_ep,
      and  encapsulates endpoint claiming mechanism inside usb_ep_autoconfig_ss()
      and usb_ep_autoconfig_reset(), so now usb functions don't need to perform
      any additional actions to mark endpoint obtained from autoconfig as claimed.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      cc476b42
  4. 31 7月, 2015 3 次提交
  5. 29 7月, 2015 3 次提交
  6. 20 3月, 2015 2 次提交
  7. 11 3月, 2015 1 次提交
  8. 30 1月, 2015 1 次提交
  9. 04 11月, 2014 2 次提交
  10. 25 9月, 2014 1 次提交
  11. 12 9月, 2014 1 次提交
  12. 09 9月, 2014 1 次提交
  13. 22 8月, 2014 1 次提交
  14. 18 12月, 2013 1 次提交
    • R
      usb: gadget: add "maxpacket_limit" field to struct usb_ep · e117e742
      Robert Baldyga 提交于
      This patch adds "maxpacket_limit" to struct usb_ep. This field contains
      maximum value of maxpacket supported by driver, and is set in driver probe.
      This value should be used by autoconfig() function, because value of field
      "maxpacket" is set to value from endpoint descriptor when endpoint becomes
      enabled. So when autoconfig() function will be called again for this endpoint,
      "maxpacket" value will contain wMaxPacketSize from descriptior instead of
      maximum packet size for this endpoint.
      
      For this reason this patch adds new field "maxpacket_limit" which contains
      value of maximum packet size (which defines maximum endpoint capabilities).
      This value is used in ep_matches() function used by autoconfig().
      
      Value of "maxpacket_limit" should be set in UDC driver probe function, using
      usb_ep_set_maxpacket_limit() function, defined in gadget.h. This function
      set choosen value to both "maxpacket_limit" and "maxpacket" fields.
      
      This patch modifies UDC drivers by adding support for maxpacket_limit.
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      e117e742
  15. 10 12月, 2013 2 次提交
  16. 29 7月, 2013 1 次提交
  17. 15 5月, 2013 1 次提交
  18. 18 3月, 2013 4 次提交
  19. 25 1月, 2013 1 次提交
  20. 22 1月, 2013 2 次提交
    • S
      usb: gadget: composite: introduce usb_gstrings_attach() · 9bb2859f
      Sebastian Andrzej Siewior 提交于
      The USB strings don't (yet) fully work in multiple configs/gadget
      environment. The string id is assigned to the descriptor and the struct
      usb_strings. We create a copy of the individual descriptor so we don't
      clash if we use a function more than once. However, we have only one
      struct usb_string for each string.
      
      Currently each function which is used multiple times checks for
      "id != 0" and only assigns string ids if it did not happen yet. This
      works well if we use the same function multiple times as long as we do
      it within the "one" gadget we have. Trouble starts once we use the same
      function in a second gadget.
      
      In order to solve this I introduce usb_gstrings_attach(). This function will
      crate a copy all structs except for the strings which are not copied.
      After the copy it will assign USB ids and attach it to cdev.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9bb2859f
    • S
      usb: gadget: udc-core: introduce UDC binding by name · 4c49a5f0
      Sebastian Andrzej Siewior 提交于
      This patch adds udc_attach_driver() which allows to bind an UDC which is
      specified by name to a driver. The name of available UDCs can be
      obtained from /sys/class/udc. This interface is intended for configfs
      interface.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      4c49a5f0
  21. 31 10月, 2012 1 次提交
    • S
      usb: gadget: always update HS/SS descriptors and create a copy of them · 10287bae
      Sebastian Andrzej Siewior 提交于
      HS and SS descriptors are staticaly created. They are updated during the
      bind process with the endpoint address, string id or interface numbers.
      
      After that, the descriptor chain is linked to struct usb_function which
      is used by composite in order to serve the GET_DESCRIPTOR requests,
      number of available configs and so on.
      
      There is no need to assign the HS descriptor only if the UDC supports
      HS speed because composite won't report those to the host if HS support
      has not been reached. The same reasoning is valid for SS.
      
      This patch makes sure each function updates HS/SS descriptors
      unconditionally and uses the newly introduced helper function to create a
      copy the descriptors for the speed which is supported by the UDC.
      
      While at that, also rename f->descriptors to f->fs_descriptors in order
      to make it more explicit what that means.
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      10287bae
  22. 10 9月, 2012 3 次提交