Re: [PATCH v9 00/14] USB OTG/dual-role framework

2016-06-08 Thread Peter Chen
On Wed, Jun 8, 2016 at 5:03 PM, Roger Quadros wrote: > Hi, > > This series centralizes OTG/Dual-role functionality in the kernel. > As of now I've got Dual-role functionality working pretty reliably on > dra7-evm and am437x-gp-evm. > > DWC3 controller and TI platform related

Re: [PATCH v3 06/12] power: pwrseq: simple: Add support for regulator and generic property

2016-06-08 Thread Krzysztof Kozlowski
On 06/09/2016 04:34 AM, Chen-Yu Tsai wrote: > Hi > > On Thu, Jun 9, 2016 at 3:03 AM, Rob Herring wrote: >> On Tue, Jun 07, 2016 at 11:29:02AM +0200, Krzysztof Kozlowski wrote: >>> On 06/03/2016 04:02 AM, Rob Herring wrote: > Optional properties: > - reset-gpios :

[PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-06-08 Thread Deepa Dinamani
The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC macros. The macros are not y2038 safe. There is no plan to transition them into being y2038 safe. ktime_get_* api's can be used in their place. And, these are y2038 safe. All filesystem timestamps use current_fs_time() for

Re: [PATCH v10 1/7] regulator: fixed: add support for ACPI interface

2016-06-08 Thread Lu Baolu
Hi Felipe and Heikki, On 06/08/2016 12:42 PM, Greg Kroah-Hartman wrote: > On Thu, Jun 02, 2016 at 09:37:23AM +0800, Lu Baolu wrote: >> Add support to retrieve fixed voltage configure information through >> ACPI interface. This is needed for Intel Bay Trail devices, where a >> GPIO is used to

Re: [PATCH v3] usb: phy: mxs: Add DT bindings to configure TX settings

2016-06-08 Thread Peter Chen
On Thu, Jun 9, 2016 at 5:27 AM, Jaret Cantu wrote: > On 03/23/2016 10:21 PM, Peter Chen wrote: >> >> On Wed, Mar 23, 2016 at 02:17:27PM -0400, Jaret Cantu wrote: >>> >>> On 03/23/2016 01:37 PM, Jaret Cantu wrote: On 03/23/2016 12:36 AM, Peter Chen wrote: >

Re: [PATCH v10 6/7] usb: pci-quirks: add Intel USB drcfg mux device

2016-06-08 Thread Lu Baolu
Hi Greg, On 06/08/2016 11:45 PM, Greg Kroah-Hartman wrote: > On Wed, Jun 08, 2016 at 03:56:04PM +0800, Lu Baolu wrote: >> Hi Greg, >> >> On 06/08/2016 12:45 PM, Greg Kroah-Hartman wrote: >>> On Thu, Jun 02, 2016 at 09:37:28AM +0800, Lu Baolu wrote: In some Intel platforms, a single usb port

Re: [PATCH v3 06/12] power: pwrseq: simple: Add support for regulator and generic property

2016-06-08 Thread Chen-Yu Tsai
Hi On Thu, Jun 9, 2016 at 3:03 AM, Rob Herring wrote: > On Tue, Jun 07, 2016 at 11:29:02AM +0200, Krzysztof Kozlowski wrote: >> On 06/03/2016 04:02 AM, Rob Herring wrote: >> >> Optional properties: >> >> - reset-gpios : contains a list of GPIO specifiers. The reset GPIOs are

[RESEND PATCH V2 1/2] soc: brcmstb: Add Product ID and Family ID helper functions

2016-06-08 Thread Al Cooper
Signed-off-by: Al Cooper --- drivers/soc/brcmstb/common.c| 12 include/linux/soc/brcmstb/brcmstb.h | 10 ++ 2 files changed, 22 insertions(+) diff --git a/drivers/soc/brcmstb/common.c b/drivers/soc/brcmstb/common.c index 94e7335..454f4c2 100644

[RESEND PATCH V2 0/2] Add Broadcom USB PHY driver for Broadcom STB SoCs

2016-06-08 Thread Al Cooper
Add Broadcom USB PHY driver for Broadcom STB SoCs. This driver in combination with the generic ohci, ehci and xhci platform drivers will enable USB1.1, USB2.0 and USB3.0 support. NOTE: An unrelated patch is in the pipline to move the file drivers/soc/brcmstb/common.c to

[RESEND PATCH V2 2/2] usb: phy: phy-brcm-usb: Add Broadcom STB USB phy driver

2016-06-08 Thread Al Cooper
Add a new USB Phy driver for Broadcom STB SoCs. This driver supports all Broadcom STB ARM SoCs. This driver in combination with the generic ohci, ehci and xhci platform drivers will enable USB1.1, USB2.0 and USB3.0 support. This Phy driver also supports the Broadcom UDC gadget driver.

uac2: diagnosing uac2 audio gadget problems

2016-06-08 Thread Caleb Crome
Hello, I am attempting to use the USB audo gadget uac2 so that my i.MX6 based Wandboard can be a USB audio device. I am using a stock 4.5 linux with no modifications, direct from git and compiled locally: uname -a shows: Linux wandboard 4.5.0 #4 SMP Tue Jun 7 10:09:16 PDT 2016 armv7l armv7l

Re: [PATCH v3] usb: phy: mxs: Add DT bindings to configure TX settings

2016-06-08 Thread Jaret Cantu
On 03/23/2016 10:21 PM, Peter Chen wrote: On Wed, Mar 23, 2016 at 02:17:27PM -0400, Jaret Cantu wrote: On 03/23/2016 01:37 PM, Jaret Cantu wrote: On 03/23/2016 12:36 AM, Peter Chen wrote: On Mon, Mar 21, 2016 at 12:32:27PM -0400, Jaret Cantu wrote: The TX settings can be calibrated for

Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-06-08 Thread Alexandre Belloni
On 08/06/2016 at 15:26:51 -0500, Rob Herring wrote : > On Wed, Jun 08, 2016 at 12:15:10PM +0800, Wenyou Yang wrote: > > In order to the save power consumption, as a workaround, suspend > > forcibly the USB PORTA/B/C via set the SUSPEND_A/B/C bits of OHCI > > Interrupt Configuration Register in the

Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-06-08 Thread Rob Herring
On Wed, Jun 08, 2016 at 12:15:10PM +0800, Wenyou Yang wrote: > In order to the save power consumption, as a workaround, suspend > forcibly the USB PORTA/B/C via set the SUSPEND_A/B/C bits of OHCI > Interrupt Configuration Register in the SFRs while OHCI USB suspend. > > This suspend operation

Re: [PATCH] ehci-platform: Add support for shared reset controllers

2016-06-08 Thread Hans de Goede
Hi, On 08-06-16 19:47, Alan Stern wrote: On Wed, 8 Jun 2016, Hans de Goede wrote: Add support for shared platform controllers by using devm_reset_control_get_shared_by_index instead of of_reset_control_get_by_index. Note we use the devm function because there is no

Re: [PATCH v4 1/2] Documentation: bindings: add DT documentation for Rockchip USB2PHY

2016-06-08 Thread Rob Herring
On Tue, Jun 07, 2016 at 05:15:53PM +0800, Frank Wang wrote: > Signed-off-by: Frank Wang > --- > > Changes in v4: > - Used 'phy-supply' instead of 'vbus_*-supply'. > > Changes in v3: > - Added 'clocks' and 'clock-names' optional properties. > - Specified 'otg-port'

Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-06-08 Thread Alan Stern
On Wed, 8 Jun 2016, Wenyou Yang wrote: > In order to the save power consumption, as a workaround, suspend > forcibly the USB PORTA/B/C via set the SUSPEND_A/B/C bits of OHCI > Interrupt Configuration Register in the SFRs while OHCI USB suspend. > > This suspend operation must be done before the

Re: [PATCH v3 06/12] power: pwrseq: simple: Add support for regulator and generic property

2016-06-08 Thread Rob Herring
On Tue, Jun 07, 2016 at 11:29:02AM +0200, Krzysztof Kozlowski wrote: > On 06/03/2016 04:02 AM, Rob Herring wrote: > >> Optional properties: > >> - reset-gpios : contains a list of GPIO specifiers. The reset GPIOs are > >> asserted > >> @@ -16,6 +22,7 @@ Optional properties: > >>See

Re: [PATCH] ehci-platform: Add support for shared reset controllers

2016-06-08 Thread Alan Stern
On Wed, 8 Jun 2016, Hans de Goede wrote: > Add support for shared platform controllers by using > devm_reset_control_get_shared_by_index instead of > of_reset_control_get_by_index. > > Note we use the devm function because there is no > of_reset_control_get_shared_by_index, this also leads > to

Re: [PATCH v5 resend 1/2] ehci-platform: Add support for controllers with multiple reset lines

2016-06-08 Thread Greg Kroah-Hartman
On Wed, Jun 08, 2016 at 06:52:30PM +0200, Hans de Goede wrote: > Hi, > > On 08-06-16 07:22, Greg Kroah-Hartman wrote: > > On Thu, Jun 02, 2016 at 05:14:05PM +0200, Hans de Goede wrote: > > > From: Reinder de Haan > > > > > > At least the EHCI/OHCI found on the Allwinnner

[PATCH] ehci-platform: Add support for shared reset controllers

2016-06-08 Thread Hans de Goede
Add support for shared platform controllers by using devm_reset_control_get_shared_by_index instead of of_reset_control_get_by_index. Note we use the devm function because there is no of_reset_control_get_shared_by_index, this also leads to a nice cleanup of the cleanup code. This brings the

Re: [PATCH v5 resend 1/2] ehci-platform: Add support for controllers with multiple reset lines

2016-06-08 Thread Hans de Goede
Hi, On 08-06-16 07:22, Greg Kroah-Hartman wrote: On Thu, Jun 02, 2016 at 05:14:05PM +0200, Hans de Goede wrote: From: Reinder de Haan At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple reset lines, the controller will not initialize while the reset for

Re: [PATCH v10 1/7] regulator: fixed: add support for ACPI interface

2016-06-08 Thread Greg Kroah-Hartman
On Wed, Jun 08, 2016 at 02:43:27PM +0100, Mark Brown wrote: > On Tue, Jun 07, 2016 at 09:42:48PM -0700, Greg Kroah-Hartman wrote: > > On Thu, Jun 02, 2016 at 09:37:23AM +0800, Lu Baolu wrote: > > > > Add support to retrieve fixed voltage configure information through > > > ACPI interface. This is

Re: [PATCH v9 11/14] usb: otg: use dev_dbg() instead of VDBG()

2016-06-08 Thread Joe Perches
On Wed, 2016-06-08 at 12:03 +0300, Roger Quadros wrote: > Now that we have a device reference in struct usb_otg > let's use dev_dbg() for debug messages. dev_vdbg vs dev_dbg The patch subject and commit message don't match the code changes. > diff --git a/drivers/usb/common/usb-otg-fsm.c >

Re: [PATCH v4 0/2] Add a new Rockchip usb2 phy driver

2016-06-08 Thread Heiko Stübner
Hi Frank, Am Dienstag, 7. Juni 2016, 17:15:52 schrieb Frank Wang: > The newer SoCs (rk3366, rk3399) of Rock-chip take a different usb-phy > IP block than rk3288 and before, and most of phy-related registers are > also different from the past, so a new phy driver is required necessarily. > >

Re: Unable to safely detach external HDD on USB 3.0

2016-06-08 Thread Mathias Nyman
On 08.06.2016 16:47, Mathias Nyman wrote: On 06.06.2016 21:31, Alan Stern wrote: On Sat, 4 Jun 2016, Marco Chiappero wrote: On 31/05/2016 16:34, Alan Stern wrote: On Tue, 31 May 2016, Mathias Nyman wrote: xhci specs say that port will move from Disconnected (PLS = RX_DETECT) to Polling if

Re: [PATCH v10 1/7] regulator: fixed: add support for ACPI interface

2016-06-08 Thread Mark Brown
On Tue, Jun 07, 2016 at 09:42:48PM -0700, Greg Kroah-Hartman wrote: > On Thu, Jun 02, 2016 at 09:37:23AM +0800, Lu Baolu wrote: > > Add support to retrieve fixed voltage configure information through > > ACPI interface. This is needed for Intel Bay Trail devices, where a > > GPIO is used to

Re: Unable to safely detach external HDD on USB 3.0

2016-06-08 Thread Mathias Nyman
On 06.06.2016 21:31, Alan Stern wrote: On Sat, 4 Jun 2016, Marco Chiappero wrote: On 31/05/2016 16:34, Alan Stern wrote: On Tue, 31 May 2016, Mathias Nyman wrote: xhci specs say that port will move from Disconnected (PLS = RX_DETECT) to Polling if "SuperSpeed far-end receiver terminations

Re: Race condition in usbfs / libusb when using reap-after-disconnect

2016-06-08 Thread Hans de Goede
Hi, On 07-06-16 17:18, Alan Stern wrote: On Tue, 7 Jun 2016, Hans de Goede wrote: Hi, On 06-06-16 19:03, Alan Stern wrote: On Mon, 6 Jun 2016, Hans de Goede wrote: Hi, On 06-06-16 16:48, Greg Kroah-Hartman wrote: On Mon, Jun 06, 2016 at 01:44:23PM +0200, Hans de Goede wrote: Hi All,

Re: [PATCH 18/62] usb: dwc3: core: simplify suspend/resume operations

2016-06-08 Thread Roger Quadros
Felipe, On 30/05/16 14:34, Felipe Balbi wrote: > now that we have re-factored dwc3_core_init() and > dwc3_core_exit() we can use them for suspend/resume > operations. > > This will help us avoid some common mistakes when > patching code when we have duplicated pieces of code > doing the same

Re: [PATCH v9 08/14] usb: otg: add OTG/dual-role core

2016-06-08 Thread Peter Chen
On Wed, Jun 08, 2016 at 01:12:10PM +0300, Roger Quadros wrote: > Hi, > > On 08/06/16 12:53, Peter Chen wrote: > > On Wed, Jun 08, 2016 at 12:03:40PM +0300, Roger Quadros wrote: > >> +int usb_otg_unregister(struct device *dev) > >> +{ > >> + struct usb_otg *otg; > >> + > >> +

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread Sergei Shtylyov
On 6/8/2016 3:18 PM, joerg Reisenweber wrote: Tony, what do you think about that patch? Tony, PING Yeah I don't know, AFAIK we don't have a generic way to force MUSB to change mode without ID pin. If you have figured something generic for that which does not actually tinker with the PHY

Re: [balbi-usb:testing/next 64/67] phy-generic.c:undefined reference to `usb_gadget_vbus_connect'

2016-06-08 Thread Peter Chen
On Wed, Jun 08, 2016 at 01:32:29PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> > Would you consider only keeps vbus and pull dp API at gadget.h, and move > >> > out others gadget APIs which is dedicated for gadget function? > >> > >> no, sorry :-) All

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread joerg Reisenweber
On Wed 08 June 2016 15:04:02 Sergei Shtylyov wrote: > On 6/8/2016 1:02 PM, Felipe Balbi wrote: > >> * Pali Rohár [160607 05:53]: > Tony, what do you think about that patch? > >>> > >>> Tony, PING > >> > >> Yeah I don't know, AFAIK we don't have a generic way to > >>

Re: [PATCH v9 12/14] usb: hcd: Adapt to OTG core

2016-06-08 Thread Sergei Shtylyov
On 6/8/2016 3:06 PM, Roger Quadros wrote: Introduce usb_otg_add/remove_hcd() for use by host controllers that are part of OTG/dual-role port. Non Device tree platforms can use the otg_dev argument to specify the OTG controller device. If otg_dev is NULL then the device tree node's

Re: [PATCH v9 03/14] usb: hcd.h: Add OTG to HCD interface

2016-06-08 Thread Sergei Shtylyov
On 6/8/2016 3:04 PM, Roger Quadros wrote: The OTG core will use struct otg_hcd_ops to interface with the HCD controller. Host controller driver (HCD) controller? Maybe just HC? :-) OK. OTOH, my googling has shown that HCD may stand for both HC driver and HC device... The host

Re: [PATCH v9 12/14] usb: hcd: Adapt to OTG core

2016-06-08 Thread Roger Quadros
On 08/06/16 14:42, Sergei Shtylyov wrote: > On 6/8/2016 12:03 PM, Roger Quadros wrote: > >> Introduce usb_otg_add/remove_hcd() for use by host >> controllers that are part of OTG/dual-role port. >> >> Non Device tree platforms can use the otg_dev argument >> to specify the OTG controller device.

Re: [PATCH v9 03/14] usb: hcd.h: Add OTG to HCD interface

2016-06-08 Thread Roger Quadros
Hi, On 08/06/16 14:39, Sergei Shtylyov wrote: > Hello. > > On 6/8/2016 12:03 PM, Roger Quadros wrote: > >> The OTG core will use struct otg_hcd_ops to interface >> with the HCD controller. > >Host controller driver (HCD) controller? Maybe just HC? :-) OK. > >> The main purpose of this

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread Sergei Shtylyov
On 6/8/2016 1:02 PM, Felipe Balbi wrote: * Pali Rohár [160607 05:53]: Tony, what do you think about that patch? Tony, PING Yeah I don't know, AFAIK we don't have a generic way to force MUSB to change mode without ID pin. If you have figured something generic for

Re: [PATCH v9 12/14] usb: hcd: Adapt to OTG core

2016-06-08 Thread Sergei Shtylyov
On 6/8/2016 12:03 PM, Roger Quadros wrote: Introduce usb_otg_add/remove_hcd() for use by host controllers that are part of OTG/dual-role port. Non Device tree platforms can use the otg_dev argument to specify the OTG controller device. If otg_dev is NULL then the device tree node's

Re: [PATCH v9 03/14] usb: hcd.h: Add OTG to HCD interface

2016-06-08 Thread Sergei Shtylyov
Hello. On 6/8/2016 12:03 PM, Roger Quadros wrote: The OTG core will use struct otg_hcd_ops to interface with the HCD controller. Host controller driver (HCD) controller? Maybe just HC? :-) The main purpose of this interface is to avoid directly calling HCD APIs from the OTG core as they

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread joerg Reisenweber
On Wed 08 June 2016 13:02:00 Felipe Balbi wrote: > Hi, > > Tony Lindgren writes: > > Yeah I don't know, AFAIK we don't have a generic way to > > force MUSB to change mode without ID pin. If you have figured > #define MUSB_TEST_FORCE_HOST 0x80 > > Can someone confirm on MUSB's

Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-06-08 Thread Nicolas Ferre
Le 08/06/2016 12:04, Nicolas Ferre a écrit : > Le 08/06/2016 06:15, Wenyou Yang a écrit : >> In order to the save power consumption, as a workaround, suspend >> forcibly the USB PORTA/B/C via set the SUSPEND_A/B/C bits of OHCI >> Interrupt Configuration Register in the SFRs while OHCI USB suspend.

Re: [balbi-usb:testing/next 64/67] phy-generic.c:undefined reference to `usb_gadget_vbus_connect'

2016-06-08 Thread Felipe Balbi
Hi, Peter Chen writes: >> > Would you consider only keeps vbus and pull dp API at gadget.h, and move >> > out others gadget APIs which is dedicated for gadget function? >> >> no, sorry :-) All these drivers depend on the gadget API to work. For >> host-only builds,

Re: [PATCH v3 2/2] ARM: at91/dt: sama5d2: Use new compatible for ohci node

2016-06-08 Thread Alexandre Belloni
On 08/06/2016 at 12:06:11 +0200, Nicolas Ferre wrote : > Le 08/06/2016 06:15, Wenyou Yang a écrit : > > Use compatible "atmel,sama5d2-ohci" to be capable of suspending > > ports while sleep to save the power consumption. > > > > Signed-off-by: Wenyou Yang > > --- > > > >

Re: [PATCH v3 4/4] musb: sunxi: Simplify dr_mode handling

2016-06-08 Thread Hans de Goede
Hi, On 08-06-16 12:23, Maxime Ripard wrote: Hi, On Sun, Jun 05, 2016 at 04:59:36PM +0200, Hans de Goede wrote: phy-sun4i-usb now has proper dr_mode handling, it always registers an extcon, and sends a notify with the mode (even when in peripheral- / host-only mode) at least once. So we can

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread Pali Rohár
On Wednesday 08 June 2016 12:02:00 Felipe Balbi wrote: > Hi, > > Tony Lindgren writes: > > * Pali Rohár [160607 05:53]: > >> > Tony, what do you think about that patch? > >> > >> Tony, PING > > > > Yeah I don't know, AFAIK we don't have a generic way to

Re: [PATCH v3 4/4] musb: sunxi: Simplify dr_mode handling

2016-06-08 Thread Maxime Ripard
Hi, On Sun, Jun 05, 2016 at 04:59:36PM +0200, Hans de Goede wrote: > phy-sun4i-usb now has proper dr_mode handling, it always registers an > extcon, and sends a notify with the mode (even when in peripheral- / > host-only mode) at least once. > > So we can simply the sunxi musb glue by always

Re: [balbi-usb:testing/next 64/67] phy-generic.c:undefined reference to `usb_gadget_vbus_connect'

2016-06-08 Thread Peter Chen
On Wed, Jun 08, 2016 at 12:50:57PM +0300, Felipe Balbi wrote: > > Hi, > > Peter Chen writes: > >> >> > Hi Felipe, > >> >> > > >> >> > It causes any drivers which use symbols from gadget.h needs to build > >> >> > USB_GADGET even it only wants to be host function. Any

Re: [PATCH v9 08/14] usb: otg: add OTG/dual-role core

2016-06-08 Thread Roger Quadros
Hi, On 08/06/16 12:53, Peter Chen wrote: > On Wed, Jun 08, 2016 at 12:03:40PM +0300, Roger Quadros wrote: >> +int usb_otg_unregister(struct device *dev) >> +{ >> +struct usb_otg *otg; >> + >> +mutex_lock(_list_mutex); >> +otg = usb_otg_get_data(dev); >> +if (!otg) { >> +

Re: [PATCH v3 2/2] ARM: at91/dt: sama5d2: Use new compatible for ohci node

2016-06-08 Thread Nicolas Ferre
Le 08/06/2016 06:15, Wenyou Yang a écrit : > Use compatible "atmel,sama5d2-ohci" to be capable of suspending > ports while sleep to save the power consumption. > > Signed-off-by: Wenyou Yang > --- > > Changes in v3: None > Changes in v2: > - Use the new compatible for

Re: [PATCH v3 1/2] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-06-08 Thread Nicolas Ferre
Le 08/06/2016 06:15, Wenyou Yang a écrit : > In order to the save power consumption, as a workaround, suspend > forcibly the USB PORTA/B/C via set the SUSPEND_A/B/C bits of OHCI > Interrupt Configuration Register in the SFRs while OHCI USB suspend. > > This suspend operation must be done before

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread Felipe Balbi
Hi, Tony Lindgren writes: > * Pali Rohár [160607 05:53]: >> > Tony, what do you think about that patch? >> > >> >> Tony, PING > > Yeah I don't know, AFAIK we don't have a generic way to > force MUSB to change mode without ID pin. If you have figured >

Re: [balbi-usb:testing/next 64/67] otg.c:undefined reference to `usb_gadget_vbus_disconnect'

2016-06-08 Thread Felipe Balbi
Hi, kbuild test robot writes: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git > testing/next > head: fc4d1f3f522648d92d0c046beedbc1469979499a > commit: 74e51eb7b5b4f7ab33c099c20def3dce0c699006 [64/67] usb: gadget: move > gadget API functions

Re: [PATCH v9 08/14] usb: otg: add OTG/dual-role core

2016-06-08 Thread Peter Chen
On Wed, Jun 08, 2016 at 12:03:40PM +0300, Roger Quadros wrote: > +int usb_otg_unregister(struct device *dev) > +{ > + struct usb_otg *otg; > + > + mutex_lock(_list_mutex); > + otg = usb_otg_get_data(dev); > + if (!otg) { > + dev_err(dev, "otg: %s: device not in otg

Re: [PATCH 23/62] usb: dwc3: implement runtime PM

2016-06-08 Thread Felipe Balbi
Hi, Roger Quadros writes: >> Roger Quadros writes: Roger Quadros writes: > On 30/05/16 14:35, Felipe Balbi wrote: >> this patch implements the most basic pm_runtime >> support for dwc3. Whenever USB cable is dettached, >> then

Re: Nokia N900: musb is in wrong state after boot

2016-06-08 Thread Tony Lindgren
* Pali Rohár [160607 05:53]: > > Tony, what do you think about that patch? > > > > Tony, PING Yeah I don't know, AFAIK we don't have a generic way to force MUSB to change mode without ID pin. If you have figured something generic for that which does not actually tinker

Re: [PATCH 30/62] usb: dwc3: gadget: loop while (timeout)

2016-06-08 Thread Felipe Balbi
Paul Zimmerman writes: > Felipe Balbi writes: > >> instead of having infinite loop and always checking >> timeout value as a break condition, we can just >> decrement timeout inside while's condition. >> >> Signed-off-by: Felipe Balbi

Re: [balbi-usb:testing/next 64/67] phy-generic.c:undefined reference to `usb_gadget_vbus_connect'

2016-06-08 Thread Felipe Balbi
Hi, Peter Chen writes: >> >> > Hi Felipe, >> >> > >> >> > It causes any drivers which use symbols from gadget.h needs to build >> >> > USB_GADGET even it only wants to be host function. Any significant >> >> > benefits after moving it to udc-core.c? >> >> >> >> why is a

Re: [PATCH 23/62] usb: dwc3: implement runtime PM

2016-06-08 Thread Roger Quadros
On 07/06/16 12:42, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> Roger Quadros writes: On 30/05/16 14:35, Felipe Balbi wrote: > this patch implements the most basic pm_runtime > support for dwc3. Whenever USB cable is dettached, > then

[PATCH v9 01/14] usb: hcd: Initialize hcd->flags to 0

2016-06-08 Thread Roger Quadros
When using the OTG/drd library we can call hcd_add/remove consecutively without calling usb_put_hcd/usb_create_hcd in between so hcd->flags can be stale. If the HC dies due to whatever reason then without this patch we get the below error on next hcd_add. [ 91.494257] xhci-hcd xhci-hcd.0.auto:

[PATCH v9 00/14] USB OTG/dual-role framework

2016-06-08 Thread Roger Quadros
Hi, This series centralizes OTG/Dual-role functionality in the kernel. As of now I've got Dual-role functionality working pretty reliably on dra7-evm and am437x-gp-evm. DWC3 controller and TI platform related patches will be sent separately. Series is based on v4.7-rc1. Why?: Currently

[PATCH v9 03/14] usb: hcd.h: Add OTG to HCD interface

2016-06-08 Thread Roger Quadros
The OTG core will use struct otg_hcd_ops to interface with the HCD controller. The main purpose of this interface is to avoid directly calling HCD APIs from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB is m. Signed-off-by: Roger Quadros

[PATCH v9 05/14] usb: otg-fsm: move host controller operations into usb_otg->hcd_ops

2016-06-08 Thread Roger Quadros
This is to prevent missing symbol build error if OTG is enabled (built-in) and HCD core (CONFIG_USB) is module. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/otg_fsm.c | 7 +++ drivers/usb/common/usb-otg-fsm.c | 15

[PATCH v9 07/14] usb: otg: get rid of CONFIG_USB_OTG_FSM in favour of CONFIG_USB_OTG

2016-06-08 Thread Roger Quadros
Let's use CONFIG_USB_OTG as a single config option to enable USB OTG and the OTG FSM. This makes things a lot less confusing. Update all users of CONFIG_USB_OTG_FSM to CONFIG_USB_OTG. Signed-off-by: Roger Quadros Acked-by: Peter Chen ---

[PATCH v9 06/14] usb: gadget.h: Add OTG to gadget interface

2016-06-08 Thread Roger Quadros
The OTG core will use struct otg_gadget_ops to start/stop the gadget controller. The main purpose of this interface is to avoid directly calling usb_gadget_start/stop() from the OTG core as they wouldn't be defined in the built-in symbol table if CONFIG_USB_GADGET is m. Signed-off-by: Roger

[PATCH v9 04/14] usb: otg-fsm: use usb_otg wherever possible

2016-06-08 Thread Roger Quadros
Move otg_fsm into usb_otg and use usb_otg wherever possible in the usb_otg APIs. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/chipidea/ci.h| 1 - drivers/usb/chipidea/core.c | 14 +-- drivers/usb/chipidea/debug.c | 2

[PATCH v9 10/14] usb: otg: add hcd companion support

2016-06-08 Thread Roger Quadros
From: Yoshihiro Shimoda Since some host controller (e.g. EHCI) needs a companion host controller (e.g. OHCI), this patch adds such a configuration to use it in the OTG core. Signed-off-by: Yoshihiro Shimoda Signed-off-by:

[PATCH v9 09/14] usb: of: add an API to get OTG device from USB controller node

2016-06-08 Thread Roger Quadros
The OTG controller and the USB controller can be linked via the 'otg-controller' property in the USB controller's device node. of_usb_get_otg() can be used to get the OTG controller device from the USB controller's device node. Signed-off-by: Roger Quadros Acked-by: Peter Chen

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-06-08 Thread Peter Chen
On Wed, Jun 08, 2016 at 10:32:19AM +0300, Roger Quadros wrote: > Hi, > > On 24/05/16 05:53, Peter Chen wrote: > > On Mon, May 23, 2016 at 01:36:51PM +0300, Roger Quadros wrote: > >> On 23/05/16 13:34, Jun Li wrote: > >>> Hi > >>> > -Original Message- > From: Roger Quadros

[PATCH v9 11/14] usb: otg: use dev_dbg() instead of VDBG()

2016-06-08 Thread Roger Quadros
Now that we have a device reference in struct usb_otg let's use dev_dbg() for debug messages. Signed-off-by: Roger Quadros Acked-by: Peter Chen --- drivers/usb/common/usb-otg-fsm.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-)

[PATCH v9 12/14] usb: hcd: Adapt to OTG core

2016-06-08 Thread Roger Quadros
Introduce usb_otg_add/remove_hcd() for use by host controllers that are part of OTG/dual-role port. Non Device tree platforms can use the otg_dev argument to specify the OTG controller device. If otg_dev is NULL then the device tree node's otg-controller property is used to get the otg_dev

[PATCH v9 08/14] usb: otg: add OTG/dual-role core

2016-06-08 Thread Roger Quadros
It provides APIs for the following tasks - Registering an OTG/dual-role capable controller - Registering Host and Gadget controllers to OTG core - Providing inputs to and kicking the OTG state machine Provide a dual-role device (DRD) state machine. DRD mode is a reduced functionality OTG mode.

[PATCH v9 13/14] usb: gadget: udc: adapt to OTG core

2016-06-08 Thread Roger Quadros
The OTG state machine needs a mechanism to start and stop the gadget controller as well as connect/disconnect from the bus. Add usb_gadget_start(), usb_gadget_stop() and usb_gadget_connect_control(). Introduce usb_otg_add_gadget_udc() to allow controller drivers to register a gadget controller

[PATCH v9 14/14] usb: host: xhci-plat: Add otg device to platform data

2016-06-08 Thread Roger Quadros
Host controllers that are part of an OTG/dual-role instance need to somehow pass the OTG controller device information to the HCD core. We use platform data to pass the OTG controller device. Signed-off-by: Roger Quadros Reviewed-by: Peter Chen ---

[PATCH v9 02/14] usb: otg-fsm: Prevent build warning "VDBG" redefined

2016-06-08 Thread Roger Quadros
If usb/otg-fsm.h and usb/composite.h are included together then it results in the build warning [1]. Prevent that by defining VDBG locally. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch: In file included from drivers/usb/dwc3/core.h:33,

Re: [PATCH] USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails

2016-06-08 Thread Michał Pecio
> If the list pointer contains LIST_POISON then it's already too late; > we've been accessing memory that was deallocated. Not really. I figured that LIST_POISON happens if the ED had been linked and unlinked normally before being submitted abnormally. And in fact, knowing that, I justs managed

Re: [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device

2016-06-08 Thread Baolin Wang
Hi, On 6 June 2016 at 22:59, Felipe Balbi wrote: > > Hi, > > Baolin Wang writes: >> On ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if >> it did not call 'arch_setup_dma_ops' at device creation time, that will >> cause failure when

[balbi-usb:testing/next 64/67] otg.c:undefined reference to `usb_gadget_vbus_disconnect'

2016-06-08 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: fc4d1f3f522648d92d0c046beedbc1469979499a commit: 74e51eb7b5b4f7ab33c099c20def3dce0c699006 [64/67] usb: gadget: move gadget API functions to udc-core config: i386-randconfig-h1-06081244 (attached as

Re: [RFC PATCH 0/5] USB Audio Gadget refactoring

2016-06-08 Thread Ruslan Bilovol
Hi guys, Any feedback on this patch series? Has anybody had a chance to test it? Regards, Ruslan On Tue, May 24, 2016 at 2:50 AM, Ruslan Bilovol wrote: > I came to this patch series when wanted to do two things: > - use UAC1 as virtual ALSA sound card on gadget side,

Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-08 Thread Roger Quadros
On 07/06/16 18:05, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> I might be able to find some time to implement a proof of concept which >>> would allow your platforms to get dual-role with code we already have, >>> but I need DWC3's OTG support which, I'm assuming,

Re: [PATCH v10 6/7] usb: pci-quirks: add Intel USB drcfg mux device

2016-06-08 Thread Lu Baolu
Hi Greg, On 06/08/2016 12:45 PM, Greg Kroah-Hartman wrote: > On Thu, Jun 02, 2016 at 09:37:28AM +0800, Lu Baolu wrote: >> In some Intel platforms, a single usb port is shared between USB host >> and device controllers. The shared port is under control of a switch >> which is defined in the Intel

Re: Re: Re: Re: Re: [PATCH] usb: core: fix a double free in the usb driver

2016-06-08 Thread Chung-Geol Kim
>On Tue, 7 Jun 2016, Chung-Geol Kim wrote: > >> = >> At *remove USB(3.0) Storage >> sequence <1> --> <5> ((Problem Case)) >> = >> VOLD >>

Re: [PATCH v8 13/14] usb: gadget: udc: adapt to OTG core

2016-06-08 Thread Roger Quadros
Hi, On 24/05/16 05:53, Peter Chen wrote: > On Mon, May 23, 2016 at 01:36:51PM +0300, Roger Quadros wrote: >> On 23/05/16 13:34, Jun Li wrote: >>> Hi >>> -Original Message- From: Roger Quadros [mailto:rog...@ti.com] Sent: Monday, May 23, 2016 6:12 PM To: Peter Chen

[PATCH 2/2] usb: renesas_usbhs: protect the CFIFOSEL setting in usbhsg_ep_enable()

2016-06-08 Thread Yoshihiro Shimoda
This patch fixes an issue that the CFIFOSEL register value is possible to be changed by usbhsg_ep_enable() wrongly. And then, a data transfer using CFIFO may not work correctly. For example: # modprobe g_multi file=usb-storage.bin # ifconfig usb0 192.168.1.1 up (During the USB host is sending

[PATCH 1/2] usb: renesas_usbhs: fix NULL pointer dereference in xfer_work()

2016-06-08 Thread Yoshihiro Shimoda
This patch fixes an issue that the xfer_work() is possible to cause NULL pointer dereference if the usb cable is disconnected while data transfer is running. In such case, a gadget driver may call usb_ep_disable()) before xfer_work() is actually called. In this case, the usbhs_pkt_pop() will call

[PATCH 0/2] usb: renesas_usbhs: fix issues on specific situations

2016-06-08 Thread Yoshihiro Shimoda
This patch set is based on the latest Felipe's usb.git / testing/fixes branch. (commit id = 50c763f8c1bac0dc00f7788a75f227276c0efd54) Yoshihiro Shimoda (2): usb: renesas_usbhs: fix NULL pointer dereference in xfer_work() usb: renesas_usbhs: protect the CFIFOSEL setting in usbhsg_ep_enable()

Re: [RFC][PATCH] usb: gadget: Allow to build both USB functions and legacy gadgets

2016-06-08 Thread Peter Chen
On Tue, Jun 07, 2016 at 11:59:57AM +0200, Krzysztof Opasiak wrote: > Hi, > > On Tue, Jun 7, 2016 at 11:06 AM, Peter Chen wrote: > > > > > >>-Original Message- > >>From: linux-usb-ow...@vger.kernel.org > >>[mailto:linux-usb-ow...@vger.kernel.org] > >>On Behalf Of

[PATCH net-next] r8152: replace netdev_alloc_skb_ip_align with napi_alloc_skb

2016-06-08 Thread Hayes Wang
Replace netdev_alloc_skb_ip_align() with napi_alloc_skb() which can save several CPU cycles by avoiding having to disable and re-enable IRQs. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-08 Thread Peter Chen
On Tue, Jun 07, 2016 at 06:05:25PM +0300, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: > >> I might be able to find some time to implement a proof of concept which > >> would allow your platforms to get dual-role with code we already have, > >> but I need DWC3's OTG

RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux

2016-06-08 Thread Jun Li
Hi, Baolu From: Lu Baolu [mailto:baolu...@linux.intel.com] Sent: Wednesday, June 08, 2016 1:11 PM To: Jun Li ; Felipe Balbi ; Roger Quadros ; Peter Chen Cc: Mathias Nyman ; Greg