1. 27 May, 2014 1 commit
  2. 23 May, 2014 11 commits
  3. 20 May, 2014 11 commits
  4. 16 May, 2014 2 commits
  5. 15 May, 2014 8 commits
  6. 14 May, 2014 7 commits
    • Andrzej Pietrasiewicz's avatar
      usb: gadget: configfs: OS Extended Properties descriptors support · 7419485f
      Andrzej Pietrasiewicz authored
      Add handling of OS Extended Properties descriptors from configfs interface.
      One kind of "OS Descriptors" are "Extended Properties" descriptors, which
      need to be specified per interface or per group of interfaces described
      by an IAD. This patch adds support for creating subdirectories
      in interface.<n> directory located in the function's directory.
      Names of subdirectories created become names of properties.
      Each property contains two attributes: "type" and "data".
      The type can be a numeric value 1..7 while data is a blob interpreted
      depending on the type specified.
      The types are:
      1 - unicode string
      2 - unicode string with environment variables
      3 - binary
      4 - little-endian 32-bit
      5 - big-endian 32-bit
      6 - unicode string with a symbolic link
      7 - multiple unicode strings
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      7419485f
    • Andrzej Pietrasiewicz's avatar
      usb: gadget: f_rndis: OS Descriptors configfs support · a747b095
      Andrzej Pietrasiewicz authored
      Added handling of OS Descriptors support for f_rndis.
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      a747b095
    • Andrzej Pietrasiewicz's avatar
      usb: gadget: configfs: OS Extended Compatibility descriptors support · da424314
      Andrzej Pietrasiewicz authored
      Add handling of OS Extended Compatibility descriptors from configfs interface.
      Hosts which expect the "OS Descriptors" ask only for configurations @ index 0,
      but linux-based USB devices can provide more than one configuration.
      This patch adds marking one of gadget's configurations the configuration
      to be reported at index 0, regardless of the actual sequence of usb_add_config
      invocations used for adding the configurations. The configuration is selected
      by creating a symbolic link pointing to it from the "os_desc" directory
      located at the top of a gadget's directory hierarchy.
      
      One kind of "OS Descriptors" are "Extended Compatibility Descriptors",
      which need to be specified per interface. This patch adds interface.<n>
      directory in function's configfs directory to represent each interface
      defined by the function. Each interface's directory contains two attributes:
      "compatible_id" and "sub_compatible_id", which represent 8-byte
      strings to be reported to the host as the "Compatible ID" and "Sub Compatible
      ID".
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      da424314
    • Andrzej Pietrasiewicz's avatar
      usb: gadget: configfs: OS String support · 87213d38
      Andrzej Pietrasiewicz authored
      Add handling of OS String extension from the configfs interface.
      A directory "os_desc" is added at the top level of a gadget's
      directories hierarchy. In the "os_desc" directory there are
      three attributes: "use", "b_vendor_code" and "qw_sign".
      If "use" contains "0" the OS string is not reported to the host.
      "b_vendor_code" contains a one-byte value which is used
      for custom per-device and per-interface requests.
      "qw_sign" contains an identifier to be reported as the "OS String"
      proper.
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      87213d38
    • Andrzej Pietrasiewicz's avatar
      usb: gadget: f_rndis: OS descriptors support · de7a8d2d
      Andrzej Pietrasiewicz authored
      In order for usb functions to expose OS descriptors they
      need to be made aware of OS descriptors. This involves
      extending the "options" structure and setting up
      appropriate associations.
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      de7a8d2d
    • Andrzej Pietrasiewicz's avatar
      usb: gadget: OS Feature Descriptors support · 37a3a533
      Andrzej Pietrasiewicz authored
      There is a custom (non-USB IF) extension to the USB standard:
      
      http://msdn.microsoft.com/library/windows/hardware/gg463182
      
      They grant permission to use the specification - there is
      "Microsoft OS Descriptor Specification License Agreement"
      under the link mentioned above, and its Section 2 "Grant
      of License", letter (b) reads:
      
      "Patent license. Microsoft hereby grants to You a nonexclusive,
      royalty-free, nontransferable, worldwide license under Microsoft’s
      patents embodied solely within the Specification and that are owned
      or licensable by Microsoft to make, use, import, offer to sell,
      sell and distribute directly or indirectly to Your Licensees Your
      Implementation. You may sublicense this patent license to Your
      Licensees under the same terms and conditions."
      
      The said extension is maintained by Microsoft for Microsoft.
      
      Yet it is fairly common for various devices to use it, and a
      popular proprietary operating system expects devices to provide
      "OS descriptors", so Linux-based USB gadgets whishing to be able
      to talk to a variety of operating systems should be able to provide
      the "OS descriptors".
      
      This patch adds optional support for gadgets whishing to expose
      the so called "OS Feature Descriptors", that is "Extended Compatibility ID"
      and "Extended Properties".
      
      Hosts which do request "OS descriptors" from gadgets do so during
      the enumeration phase and before the configuration is set with
      SET_CONFIGURATION. What is more, those hosts never ask for configurations
      at indices other than 0. Therefore, gadgets whishing to provide
      "OS descriptors" must designate one configuration to be used with
      this kind of hosts - this is what os_desc_config is added for in
      struct usb_composite_dev. There is an additional advantage to it:
      if a gadget provides "OS descriptors" and designates one configuration
      to be used with such non-USB-compliant hosts it can invoke
      "usb_add_config" in any order because the designated configuration
      will be reported to be at index 0 anyway.
      
      This patch also adds handling vendor-specific requests addressed
      at device or interface and related to handling "OS descriptors".
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      37a3a533
    • Andrzej Pietrasiewicz's avatar
      usb: gadget: OS String support · 19824d5e
      Andrzej Pietrasiewicz authored
      There is a custom (non-USB IF) extension to the USB standard:
      
      http://msdn.microsoft.com/library/windows/hardware/gg463182
      
      They grant permission to use the specification - there is
      "Microsoft OS Descriptor Specification License Agreement"
      under the link mentioned above, and its Section 2 "Grant
      of License", letter (b) reads:
      
      "Patent license. Microsoft hereby grants to You a nonexclusive,
      royalty-free, nontransferable, worldwide license under Microsoft’s
      patents embodied solely within the Specification and that are owned
      or licensable by Microsoft to make, use, import, offer to sell,
      sell and distribute directly or indirectly to Your Licensees Your
      Implementation. You may sublicense this patent license to Your
      Licensees under the same terms and conditions."
      
      The said extension is maintained by Microsoft for Microsoft.
      
      Yet it is fairly common for various devices to use it, and a
      popular proprietary operating system expects devices to provide
      "OS descriptors", so Linux-based USB gadgets whishing to be able
      to talk to a variety of operating systems should be able to provide
      the "OS descriptors".
      
      This patch adds optional support for gadgets whishing to expose
      the so called "OS String" under index 0xEE of language 0.
      The contents of the string is generated based on the qw_sign
      array and b_vendor_code.
      
      Interested gadgets need to set the cdev->use_os_string flag,
      fill cdev->qw_sign with appropriate values and fill cdev->b_vendor_code
      with a value of their choice.
      
      This patch does not however implement responding to any vendor-specific
      USB requests.
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      19824d5e