Rasmus Villemoes | 22 Aug 14:59 2014
Picon

[PATCH] drivers: usb: gadget: fusb300_udc.h: Fix typo in include guard

Signed-off-by: Rasmus Villemoes <linux@...>
---
 drivers/usb/gadget/udc/fusb300_udc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/fusb300_udc.h b/drivers/usb/gadget/udc/fusb300_udc.h
index ae811d8..ad39f89 100644
--- a/drivers/usb/gadget/udc/fusb300_udc.h
+++ b/drivers/usb/gadget/udc/fusb300_udc.h
 <at>  <at>  -12,7 +12,7  <at>  <at> 

 
 #ifndef __FUSB300_UDC_H__
-#define __FUSB300_UDC_H_
+#define __FUSB300_UDC_H__

 #include <linux/kernel.h>

--

-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Krzysztof Opasiak | 22 Aug 13:59 2014

[PATCH v2 00/16] Add import from/export to file functionality

Dear Matt,

This quite big series adds new part of libusbg API which allows to
import/export gadget/function/configuration from/to file.

Motivation:

Libusbg allows to create a binary file which set up custom
gadget. This is useful but if we have to create custom binary for
each gadget we wast a lot of work which kernel people put to separate
code from configuration. This leads us to main idea of gadget
schemes. Allow to create simple, human readable config file which
library will be able to translate into usb gadget.

Description:

Gadget schemes is idea of describing gadget/function/configuration in
config file. To not reinvent the wheel I have used existing library
libconfig [1]. This means that the syntax is similar to this described
in documentation of libconfig.

I have extended the library with set of usbg_export_*() functions
which allows to export selected gadget to given FILE. There is also
set of complementary usbg_import_*() functions which allows to read
scheme of gadget/function/config from file and create it using
configfs.

To avoid name conflict I have used the convention that
usbg_import_gadget() function takes name of new gadget as parameter
and usbg_export_gadget() doesn't export gadget name to scheme
(Continue reading)

Krzysztof Opasiak | 22 Aug 13:56 2014

[PATCH v2 0/3] Small fixes and clean up

Dear Matt,

This is a small series which fix usbg_set_function_attrs()
which previously tried to set attributes which are read only
on configfs.

I have also went through code and marked attributes which should not
change during function calls with const qualifiers.

Third patch is a small enhancement which replace ether_aton() and
ether_ntoa() calls with their reentrant versions ether_aton_r() and
ether_ntoa().

I'm looking froward for your review and merge if you find it
suitable. I have also created a github pull request:

https://github.com/libusbg/libusbg/pull/7

Please let me also notice that there are still three patch series
which are pending for your review and some of them are waiting for
quite a long time:

https://github.com/libusbg/libusbg/pull/6 - since 10th of June
(this is reopened pull request #5 due to some git issues)
https://github.com/libusbg/libusbg/pull/4 - since 9th of May
https://github.com/libusbg/libusbg/pull/3 - since 2nd of April

--
BR's
Krzysztof Opasiak
(Continue reading)

Yoshihiro Shimoda | 22 Aug 13:14 2014

[PATCH 4/4] usb: renesas_usbhs: fix the usb_pkt_pop()

This patch fixes the usb_pkt_pop(). If a gadget driver calls
usb_ep_dequeue(), this driver will call the usb_pkt_pop().
So, the usb_pkt_pop() should cancel the transaction.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...>
---
 drivers/usb/renesas_usbhs/fifo.c |   30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index 1564829..b0c97a3 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
 <at>  <at>  -108,19 +108,45  <at>  <at>  static struct usbhs_pkt *__usbhsf_pkt_get(struct usbhs_pipe *pipe)
 	return list_first_entry(&pipe->list, struct usbhs_pkt, node);
 }

+static void usbhsf_fifo_clear(struct usbhs_pipe *pipe,
+			      struct usbhs_fifo *fifo);
+static void usbhsf_fifo_unselect(struct usbhs_pipe *pipe,
+				 struct usbhs_fifo *fifo);
+static struct dma_chan *usbhsf_dma_chan_get(struct usbhs_fifo *fifo,
+					    struct usbhs_pkt *pkt);
+#define usbhsf_dma_map(p)	__usbhsf_dma_map_ctrl(p, 1)
+#define usbhsf_dma_unmap(p)	__usbhsf_dma_map_ctrl(p, 0)
+static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map);
 struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)
 {
 	struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
+	struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
(Continue reading)

Kiran Kumar Raparthy | 22 Aug 11:50 2014

[RFC 2/2] usb: otg: Temporarily hold wakeupsource on charger and disconnect events

From: Todd Poynor <toddpoynor@...>

usb: otg: Temporarily hold wakeupsource on charger and disconnect events

Allow other parts of the system to react to the charger connect/disconnect
event without allowing the system to suspend before the other parts can process
the event. This wakeup_source times out after 2 seconds; if nobody else holds a
wakeup_source by that time then the device can sleep.

This patch also refactoras the logic of wakeupsource_init,otg_notifications and
handle event funtions

This is one of the number of patches from the Android AOSP tegra.git tree,
which is used on Android devices. so I wanted to submit it for
review to see if it should go upstream.

Cc: Felipe Balbi <balbi@...>
Cc: Greg Kroah-Hartman <gregkh@...>
Cc: linux-kernel@...
Cc: linux-usb@...
Cc: Android Kernel Team <kernel-team@...>
Cc: John Stultz <john.stultz@...>
Signed-off-by: Todd Poynor <toddpoynor@...>
Signed-off-by: Kiran Raparthy <kiran.kumar@...>
[kiran: Added context to commit message]
---
 drivers/usb/phy/otg-wakeupsource.c | 108 ++++++++++++++-----------------------
 include/linux/usb/otg.h            |   2 +
 2 files changed, 41 insertions(+), 69 deletions(-)

(Continue reading)

Kiran Kumar Raparthy | 22 Aug 11:49 2014

[RFC 1/2] USB: OTG: Hold wakeupsource when VBUS present

From: Todd Poynor <toddpoynor@...>

USB: OTG: Hold wakeupsource when VBUS present

Enabled by default, can disable with:
   echo N > /sys/module/otg_wakeupsource/parameters/enabled

This is one of the number of patches from the Android AOSP common.git tree,
which is used on almost all Android devices. so I wanted to submit it for
review to see if it should go upstream.

Cc: Felipe Balbi <balbi@...>
Cc: Greg Kroah-Hartman <gregkh@...>
Cc: linux-kernel@...
Cc: linux-usb@...
Cc: Android Kernel Team <kernel-team@...>
Cc: John Stultz <john.stultz@...>
Cc: Arve Hjønnevåg <arve@...>
Cc: Benoit Goby <benoit@...>
Signed-off-by: Todd Poynor <toddpoynor@...>
Signed-off-by: Kiran Raparthy <kiran.kumar@...>
[kiran: Added context to commit message
	Included build fix from Benoit Goby and Arve Arve Hjønnevåg
	Removed lock->held field in driver as this mechanism is provided in wakeup.c
	wakelock(wl) terminology replaced with wakeup_source(ws)
	sys entry(module param) field modified to otg_wakeupsource
	__pm_stay_awake and __pm_relax called directly from the main
	code instead of calling them via otgws_grab,otgws_drop]
---
 drivers/usb/phy/Kconfig            |   8 ++
(Continue reading)

Paul Zimmerman | 21 Aug 22:28 2014

[PATCH] usb: gadget: document a usb_ep_dequeue() requirement

Document the requirement that the request be dequeued and its
completion routine called before usb_ep_dequeue() returns. Also
fix some capitalization issues in the existing text.

Signed-off-by: Paul Zimmerman <paulz@...>
Acked-by: Alan Stern <stern@...>
---
 include/linux/usb/gadget.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index c3a6185..c540557 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
 <at>  <at>  -345,12 +345,13  <at>  <at>  static inline int usb_ep_queue(struct usb_ep *ep,
  *  <at> ep:the endpoint associated with the request
  *  <at> req:the request being canceled
  *
- * if the request is still active on the endpoint, it is dequeued and its
+ * If the request is still active on the endpoint, it is dequeued and its
  * completion routine is called (with status -ECONNRESET); else a negative
- * error code is returned.
+ * error code is returned. This is guaranteed to happen before the call to
+ * usb_ep_dequeue() returns.
  *
- * note that some hardware can't clear out write fifos (to unlink the request
- * at the head of the queue) except as part of disconnecting from usb.  such
+ * Note that some hardware can't clear out write fifos (to unlink the request
+ * at the head of the queue) except as part of disconnecting from usb. Such
  * restrictions prevent drivers from supporting configuration changes,
(Continue reading)

Laurent Pinchart | 21 Aug 16:54 2014

[PATCH 0/4] UVC gadget patches for v3.18

Hi Felipe,

These patches have previously been posted to linux-usb. I've rebased them on
top of your master branch. Could you please apply them to your tree for v3.18 ?

Andrzej Pietrasiewicz (1):
  usb: gadget: f_uvc: fix potential memory leak

Michael Grzeschik (2):
  usb: gadget/uvc: Change KERN_INFO to KERN_DEBUG on request shutdown
  usb: gadget/uvc: remove DRIVER_VERSION{,_NUMBER}

Philipp Zabel (1):
  usb: gadget/uvc: Add support for DMABUF importing

 drivers/usb/gadget/function/f_uvc.c     | 5 ++---
 drivers/usb/gadget/function/uvc.h       | 3 ---
 drivers/usb/gadget/function/uvc_queue.c | 2 +-
 drivers/usb/gadget/function/uvc_v4l2.c  | 2 +-
 drivers/usb/gadget/function/uvc_video.c | 2 +-
 5 files changed, 5 insertions(+), 9 deletions(-)

--

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@...
(Continue reading)

Nikhil Badola | 21 Aug 09:26 2014

[PATCH] drivers: usb :fsl: Add support for USB controller version-2.5

Add support for USB controller version-2.5 used in
T4240 rev2.0, T1024, B3421, T1040, T2080, LS1021A.

Signed-off-by: Nikhil Badola <nikhil.badola@...>
---
	- Depends on commit 990c2c7829d98517228f2b2ff14919c83b75e124
	  drivers: usb: fsl: Check IP version 2.4 for mph USB controller

 drivers/usb/host/fsl-mph-dr-of.c | 5 +++++
 include/linux/fsl_devices.h      | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index e0315de..45b9e36 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
 <at>  <at>  -127,6 +127,7  <at>  <at>  static int usb_get_ver_info(struct device_node *np)
 	 * returns 1 for usb controller version 1.6
 	 * returns 2 for usb controller version 2.2
 	 * returns 3 for usb controller version 2.4
+	 * returns 4 for usb controller version 2.5
 	 * returns 0 otherwise
 	 */
 	if (of_device_is_compatible(np, "fsl-usb2-dr")) {
 <at>  <at>  -136,6 +137,8  <at>  <at>  static int usb_get_ver_info(struct device_node *np)
 			ver = FSL_USB_VER_2_2;
 		else if (of_device_is_compatible(np, "fsl-usb2-dr-v2.4"))
 			ver = FSL_USB_VER_2_4;
+		else if (of_device_is_compatible(np, "fsl-usb2-dr-v2.5"))
+			ver = FSL_USB_VER_2_5;
(Continue reading)

Nikhil Badola | 21 Aug 09:13 2014

[PATCH] drivers: usb: fsl: Check IP version 2.4 for mph USB controller

Check 2.4 IP version for multi port host USB controller and
return FSL_USB_VER_2_4 macro

Signed-off-by: Nikhil Badola <nikhil.badola@...>
---
 drivers/usb/host/fsl-mph-dr-of.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c
index 9162d1b..e0315de 100644
--- a/drivers/usb/host/fsl-mph-dr-of.c
+++ b/drivers/usb/host/fsl-mph-dr-of.c
 <at>  <at>  -126,6 +126,7  <at>  <at>  static int usb_get_ver_info(struct device_node *np)
 	/*
 	 * returns 1 for usb controller version 1.6
 	 * returns 2 for usb controller version 2.2
+	 * returns 3 for usb controller version 2.4
 	 * returns 0 otherwise
 	 */
 	if (of_device_is_compatible(np, "fsl-usb2-dr")) {
 <at>  <at>  -150,6 +151,8  <at>  <at>  static int usb_get_ver_info(struct device_node *np)
 			ver = FSL_USB_VER_1_6;
 		else if (of_device_is_compatible(np, "fsl-usb2-mph-v2.2"))
 			ver = FSL_USB_VER_2_2;
+		else if (of_device_is_compatible(np, "fsl-usb2-mph-v2.4"))
+			ver = FSL_USB_VER_2_4;
 		else /* for previous controller versions */
 			ver = FSL_USB_VER_OLD;
 	}
--

-- 
(Continue reading)

Alan Stern | 20 Aug 23:09 2014
Picon

RE: Transient USB disconnects

On Wed, 20 Aug 2014, David Laight wrote:

> > On Tue, 19 Aug 2014, David Laight wrote:
> > 
> > > From: Alan Stern
> > >
> > > > Since the device is plugged into a hub, the hub knows about the
> > > > disconnection.  But it can't inform the kernel until the host
> > > > controller polls it, which occurs at 128-ms intervals.
> > >
> > > That rather explains the delay in the error reporting.
> > > I rather hoped it would be a little quicker.
> > > I presume the kernel can't force a status poll after a URB failure?
> > 
> > I suppose that could be added.  It doesn't seem to be terribly
> > important.  Rapidly detecting disconnects is a separate issue from too
> > much noise in the log when a disconnect occurs.
> 
> Indeed...
> There isn't much point tracing URB failures if the reason is a disconnect.
> I know the logic would get contorted, but it would be more user-friendly
> to only report the disconnect - even if it isn't checked until after the
> first reset fail.

The error messages could be changed to debug messages.  But maybe we 
can do a better job of reducing them.  Does the patch below help?

> > > The usbhid driver (at least the version I'm using ubuntu 3.11.0-26)
> > > is a bit noisy on usb unplugs.
> > 
(Continue reading)


Gmane