1. 16 5月, 2012 19 次提交
    • A
      staging: usb: gadget: Add FunctionFS support to Configurable Composite Gadget driver · 45027982
      Andrzej Pietrasiewicz 提交于
      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: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Acked-by: NMichal Nazarewicz <mina86@mina86.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      45027982
    • M
      staging: usb: gadget: Add Configurable Composite Gadget driver · 332bb43f
      Mike Lockwood 提交于
      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: NMike Lockwood <lockwood@android.com>
      Signed-off-by: NBenoit Goby <benoit@android.com>
      	[import from android.c, implement review comments, remove adb,mtp,ptp,accessory]
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      332bb43f
    • B
      USB: serial: generic driver is only for testing · 3a230038
      Bjørn Mork 提交于
      Make some noise during probe to make sure the users
      are aware of the intended purpose of this driver.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3a230038
    • N
      usb: gadget: at91_udc: fix endpoint descriptor dereference · 5eaee54b
      Nicolas Ferre 提交于
      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: NNicolas Ferre <nicolas.ferre@atmel.com>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5eaee54b
    • S
      usb: fix breakage on systems without ACPI · ea79c2ed
      Sasha Levin 提交于
      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: NSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ea79c2ed
    • G
      USB: symbolserial.c: remove dbg() usage · e4083ea5
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the symbolserial.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Johan Hovold <jhovold@gmail.com>
      CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      CC: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4083ea5
    • G
      USB: spcp8x5.c: remove dbg() usage · fe2baf87
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the spcp8x5.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fe2baf87
    • G
      USB: qcserial.c: remove dbg() usage · 9760b283
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the qcserial.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Thomas Tuttle <ttuttle@chromium.org>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Paul Gortmaker <paul.gortmaker@windriver.com>
      CC: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9760b283
    • G
      USB: navman.c: remove dbg() usage · 00c533fd
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the navman.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      00c533fd
    • G
      USB: ir-usb.c: remove dbg() usage · 9f857ae9
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the ir-usb.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Johan Hovold <jhovold@gmail.com>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9f857ae9
    • G
      USB: ipaq.c: remove dbg() usage · f73e1ffa
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the ipaq.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Johan Hovold <jhovold@gmail.com>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f73e1ffa
    • G
      USB: generic.c: remove dbg() usage · 689c2781
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the generic.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      689c2781
    • G
      USB: f81232.c: remove dbg() usage · a94e9b94
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the f81232.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a94e9b94
    • G
      USB: belkin_sa.c: remove dbg() usage · c89aa638
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the belkin_sa.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: William Greathouse <wgreathouse@smva.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c89aa638
    • G
      USB: ark3116.c: remove dbg() usage · d2f20e12
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the ark3116.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      CC: Bart Hartgers <bart.hartgers@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d2f20e12
    • G
      USB: aircable.c: remove dbg() usage · 66afb5b5
      Greg Kroah-Hartman 提交于
      dbg() is a usb-serial specific macro.  This patch converts
      the aircable.c driver to use dev_dbg() instead to tie into the
      dynamic debug infrastructure.
      
      CC: Paul Gortmaker <paul.gortmaker@windriver.com>
      CC: Rusty Russell <rusty@rustcorp.com.au>
      CC: Alan Stern <stern@rowland.harvard.edu>
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      66afb5b5
    • G
      USB: serial: sierra: put reset_resume callback back. · 6971113e
      Greg Kroah-Hartman 提交于
      A few patches ago, I removed the reset_resume callback in this driver.
      Now that the usb-serial core supports reset_resume, put this driver
      callback back as well, so it should work identically to how it was
      originally.
      
      Now if this function really is doing what it should be doing, well,
      that's a different story, but we are at least doing the identical thing
      that we were before...
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Anton Samokhvalov <pg83@yandex.ru>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6971113e
    • G
      USB: serial: ch341: put reset_resume callback back. · 622b80cf
      Greg Kroah-Hartman 提交于
      A few patches ago, I removed the reset_resume callback, changing it to
      resume instead.  Now that the usb-serial core supports reset_resume, put
      this driver callback back as well, so it should work identically to how
      it was originally.
      
      Now if this function really is doing what it should be doing, well,
      that's a different story, but we are at least doing the identical thing
      that we were before...
      
      Cc: Johan Hovold <jhovold@gmail.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      622b80cf
    • G
      USB: serial: hook up reset_resume callback · 7186364e
      Greg Kroah-Hartman 提交于
      The callback is now hooked up for any USB to serial driver that wants
      it.  We only register the callback if any of the usb-serial structures
      want it, this keeps the USB core happy.
      
      Thanks to Alan Stern for the ideas on how to do this.
      
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7186364e
  2. 15 5月, 2012 16 次提交
  3. 14 5月, 2012 3 次提交
  4. 12 5月, 2012 2 次提交