1. 16 May, 2012 6 commits
    • Greg Kroah-Hartman's avatar
      USB: serial: ch341: make the reset_resume callback actually work. · 1c1eaba8
      Greg Kroah-Hartman authored
      I hooked up the wrong callback in my previous patch, this should fix it.
      Reported-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1c1eaba8
    • Andrzej Pietrasiewicz's avatar
      staging: usb: gadget: Add FunctionFS support to Configurable Composite Gadget driver · 45027982
      Andrzej Pietrasiewicz authored
      Add FunctionFS support.
      It allows certain USB functions to be provided from userspace, e.g. MTP,
      PTP, adb.
      
      The functions provided by the gadget itself are enumerated in
      /sys/class/ccg0/functions. The functions which can be supplied
      from userspace must be enumerated in /sys/class/ccg0/f_fs/user_functions.
      No other userspace functions can be used than specified in the above mentioned
      file, but just specifying them there is not enough to activate them.
      The userspace functions in order to be activated need also be enumerated
      in /sys/class/ccg0/functions.
      
      An example sequence of operations can be as follows:
      
      $ echo 0 > /sys/class/ccg_usb/ccg0/enable
      
      $ echo -n 0x2d01 > /sys/module/g_ccg/parameters/idProduct
      $ echo -n MyDevice > /sys/module/g_ccg/parameters/iSerialNumber
      $ echo -n 0x1d6b > /sys/module/g_ccg/parameters/idVendor
      $ echo -n Manufacturer > /sys/module/g_ccg/parameters/iManufacturer
      $ echo -n Product > /sys/module/g_ccg/parameters/iProduct
      $ echo -n bcdDevice > /sys/module/g_ccg/parameters/bcdDevice
      
      $ echo adb,mtp,ptp > /sys/class/ccg_usb/ccg0/f_fs/user_functions
      $ echo mass_storage,ptp > /sys/class/ccg_usb/ccg0/functions
      $ echo /file.img > /sys/class/ccg_usb/ccg0/f_mass_storage/lun/file
      
      $ mkdir -p /dev/usbgadget/ptp
      $ mount -t functionfs ptp /dev/usbgadget/ptp
      $ ./ptp &
      
      $ echo 1 > /sys/class/ccg_usb/ccg0/enable
      
      The above example declares that adb, mtp and ptp functions can be supplied
      from userspace through FunctionFS. But of them all only ptp is actually
      activated, together with mass_storage, the latter being implemented in
      the gadget itself (in kernel, not in userspace). The list of functions
      can be modified at runtime while the gadget is not enabled, that is,
      after
      
      $ echo 0 > /sys/class/ccg_usb/ccg0/enable
      
      The FunctionFS function is implicitly handled by the gadget, that is,
      if a userspace function name is provided in
      /sys/class/ccg_usb/ccg0/functions, then the FunctionFS function
      is activated.
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      45027982
    • Mike Lockwood's avatar
      staging: usb: gadget: Add Configurable Composite Gadget driver · 332bb43f
      Mike Lockwood authored
      The Configurable Gadget driver is a composite driver that allows
      userspace to change at runtime the list of functions enabled in
      its configuration and to configure these functions. It supports
      multiple functions: acm, rndis, and mass storage.
      
      It is usually controlled by a daemon that changes the configuration
      based on user settings. For example, rndis is enabled when the user
      enables sharing the phone data connection.
      
      As an example on how to use it, the following shell commands will
      make the gadget disconnect from the host and make it be re-enumerated
      as a composite with 1 rndis and 2 acm interfaces, and a different
      product id:
      
      echo 0       > /sys/class/ccg_usb/ccg0/enable
      echo rndis,acm > /sys/class/ccg_usb/ccg0/functions
      echo 2       > /sys/class/ccg_usb/ccg0/f_acm/instances
      echo -n 0x2d01 > /sys/module/g_ccg/parameters/idProduct
      echo 1       > /sys/class/ccg_usb/ccg0/enable
      
      The driver requires a gadget controller that supports software
      control of the D+ pullup and the controller driver must support
      disabling the pullup during composite_bind.
      Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
      Signed-off-by: default avatarBenoit Goby <benoit@android.com>
      	[import from android.c, implement review comments, remove adb,mtp,ptp,accessory]
      Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      332bb43f
    • Bjørn Mork's avatar
      USB: serial: generic driver is only for testing · 3a230038
      Bjørn Mork authored
      Make some noise during probe to make sure the users
      are aware of the intended purpose of this driver.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3a230038
    • Nicolas Ferre's avatar
      usb: gadget: at91_udc: fix endpoint descriptor dereference · 5eaee54b
      Nicolas Ferre authored
      The patch 5a6506f0 (Update at91_udc to use usb_endpoint_descriptor inside the
      struct usb_ep) removes the desc field of struct at91_ep. This convertion had
      not been completed which leads to a compilation error.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5eaee54b
    • Sasha Levin's avatar
      usb: fix breakage on systems without ACPI · ea79c2ed
      Sasha Levin authored
      Commit da0af6e7 ("usb: Bind devices to ACPI devices when possible") really
      tries to force-bind devices even when impossible, unlike what it says in
      the subject.
      
      CONFIG_ACPI is not an indication that ACPI tables are actually present, nor
      is an indication that any USB relevant information is present in them. There
      is no reason to fail the creation of a USB bus if it can't bind it to
      ACPI device during initialization.
      
      On systems with CONFIG_ACPI set but without ACPI tables it would cause a
      boot panic.
      Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ea79c2ed
  2. 15 May, 2012 18 commits
  3. 14 May, 2012 15 commits
  4. 12 May, 2012 1 commit