Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-04-14 Thread Roger Quadros
Hi Thomas, On 30/03/15 16:15, Roger Quadros wrote: Without this system suspend is broken on systems that have drivers calling enable/disable_irq_wake() for interrupts based off the dummy irq hook. (e.g. drivers/gpio/gpio-pcf857x.c) http://article.gmane.org/gmane.linux.kernel/1879035

[RFC][PATCH v2 10/13] udc-core: fix lock circular dependency on udc_lock

2015-04-14 Thread Roger Quadros
we need to unlock the usb_lock mutex before calling usb_otg_register_gadget() else it will cause a circular locking dependency. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/gadget/udc/udc-core.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git

[RFC][PATCH v2 11/13] usb: add dual-role mode to dr_mode device tree helper

2015-04-14 Thread Roger Quadros
We need to differentiat between otg and dual-role operation. dual-role means capability to operate as host or device depending on the ID pin status but no support for any of the OTG features like SRP, HNP and on the fly role-swap. The only way to change the role for a dual-role device is to

[RFC][PATCH v2 12/13] usb: dwc3: add dual-role support

2015-04-14 Thread Roger Quadros
Register with the USB OTG core. Since we don't support OTG yet we just work as a dual-role device even if device tree says otg. Use extcon framework to get VBUS/ID cable events and kick the OTG state machine. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/dwc3/core.c | 146

[RFC][PATCH v2 13/13] ARM: dts: dra7x-evm: Enable dual-role for usb1

2015-04-14 Thread Roger Quadros
Now that we have dual-role support working at USB core, enable dual-role support for usb1 controller. Signed-off-by: Roger Quadros rog...@ti.com --- arch/arm/boot/dts/dra7-evm.dts | 2 +- arch/arm/boot/dts/dra72-evm.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[RFC][PATCH v2 03/13] usb: otg-fsm: Prevent build warning VDBG redefined

2015-04-14 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 moving the VDBG defination into the usb-otg-fsm.c file where it is used. Also get rid of MPC_LOC which doesn't seem to be used by anyone. [1] - warning fixed by this patch:

[RFC][PATCH v2 07/13] usb: otg: Add dual-role device (DRD) support

2015-04-14 Thread Roger Quadros
DRD mode is a reduced functionality OTG mode. In this mode we don't support SRP, HNP and dynamic role-swap. In DRD operation, the controller mode (Host or Peripheral) is decided based on the ID pin status. Once a cable plug (Type-A or Type-B) is attached the controller selects the state and

[RFC][PATCH v2 09/13] usb: gadget: udc: adapt to OTG

2015-04-14 Thread Roger Quadros
Register with OTG core when gadget function driver is available and unregister when function driver is unbound. Ignore softconnect sysfs control when we're in OTG mode as OTG FSM takes care of gadget softconnect using the b_bus_req mechanism. Signed-off-by: Roger Quadros rog...@ti.com ---

[RFC][PATCH v2 01/13] usb: otg-fsm: Add documentation for struct otg_fsm

2015-04-14 Thread Roger Quadros
struct otg_fsm is the interface to the OTG state machine. Document the input, output and internal state variables. Definations are taken from Table 7-2 and Table 7-4 of the USB OTG EH Specification Rev.2.0 Re-arrange some of the members as per use case for more clarity. Signed-off-by: Roger

[RFC][PATCH v2 08/13] usb: otg: hub: Notify OTG fsm when A device sets b_hnp_enable

2015-04-14 Thread Roger Quadros
This is the a_set_b_hnp_enable flag in the OTG state machine diagram and must be set when the A-Host has successfully set the b_hnp_enable feature of the OTG-B-Peripheral attached to it. When this bit changes we kick our OTG FSM to make note of the change and act accordingly. Signed-off-by:

[RFC][PATCH v2 00/13] USB: OTG/DRD Core functionality

2015-04-14 Thread Roger Quadros
This is an attempt to centralize OTG/Dual-role functionality in the kernel. As of now I've got Dual-role functionality working pretty reliably on dra7-evm. xhci side of things for OTG/DRD use are fixed in http://thread.gmane.org/gmane.linux.kernel/1923161 Changelog: - v2 - Use

[RFC][PATCH v2 05/13] usb: otg: add OTG core

2015-04-14 Thread Roger Quadros
The OTG core instantiates the OTG Finite State Machine per OTG controller and manages starting/stopping the host and gadget controllers based on the bus state. It provides APIs for the following tasks - Registering an OTG capable controller - Registering Host and Gadget controllers to OTG core -

[RFC][PATCH v2 02/13] usb: otg-fsm: support multiple instances

2015-04-14 Thread Roger Quadros
Move the state_changed variable into struct otg_fsm so that we can support multiple instances. Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/common/usb-otg-fsm.c | 10 -- include/linux/usb/otg-fsm.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git

[RFC][PATCH v2 04/13] usb: gadget: add usb_gadget_start/stop()

2015-04-14 Thread Roger Quadros
The OTG state machine needs a mechanism to start and stop the gadget controller. Add usb_gadget_start() and usb_gadget_stop(). Signed-off-by: Roger Quadros rog...@ti.com --- drivers/usb/gadget/udc/udc-core.c | 74 +++ include/linux/usb/gadget.h| 3 ++

[RFC][PATCH v2 06/13] usb: hcd: Add hcd add/remove functions for OTG use

2015-04-14 Thread Roger Quadros
The existing usb_add/remove_hcd() functionality remains unchanged for non-OTG devices. For OTG devices they only register the HCD with the OTG core. Introduce _usb_add/remove_hcd() for use by OTG core. These functions actually add/remove the HCD. Signed-off-by: Roger Quadros rog...@ti.com ---

[RFC 0/5] PM / clock_ops: provide default runtime ops and cleanup users

2015-04-14 Thread Rajendra Nayak
Most users of PM clocks do the exact same thing in runtime callbacks. Provide default callbacks and cleanup the existing users (keystone/davinci/omap1/sh) Rajendra Nayak (5): PM / clock_ops: Provide default runtime ops to users arm: keystone: remove boilerplate code and use

[RFC 1/5] PM / clock_ops: Provide default runtime ops to users

2015-04-14 Thread Rajendra Nayak
Most users of PM clocks do the extact same things in the runtime suspend/resume callbacks. Provide them USE_PM_CLK_RUNTIME_OPS so as to avoid/remove boilerplate code. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/base/power/clock_ops.c | 38

[RFC 2/5] arm: keystone: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS

2015-04-14 Thread Rajendra Nayak
USE_PM_CLK_RUNTIME_OPS is introduced so we don't repeat the same code to do runtime_suspend and runtime_resume across users of PM clocks. Use it to remove the boilerplate code. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- arch/arm/mach-keystone/pm_domain.c | 33

Re: [PATCH 1/2] pinctrl: bindings: pinctrl: Add support for TI's IODelay configuration

2015-04-14 Thread Lennart Sorensen
On Tue, Mar 17, 2015 at 06:41:51PM -0700, Tony Lindgren wrote: Yeah agreed. I suggest discussing the binding and the generic parsing code for it first :) It seems with the generic binding the actual driver should be just the hardware specific code hopefully. Did this thread go anywhere in

Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-04-14 Thread Gregory CLEMENT
Hi Roger, On 14/04/2015 12:13, Roger Quadros wrote: Hi Thomas, On 30/03/15 16:15, Roger Quadros wrote: Without this system suspend is broken on systems that have drivers calling enable/disable_irq_wake() for interrupts based off the dummy irq hook. (e.g. drivers/gpio/gpio-pcf857x.c)

[RFC 5/5] drivers: sh: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS

2015-04-14 Thread Rajendra Nayak
USE_PM_CLK_RUNTIME_OPS is introduced so we don't repeat the same code to do runtime_suspend and runtime_resume across users of PM clocks. Use it to remove the boilerplate code. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- drivers/sh/pm_runtime.c | 47

[RFC 3/5] arm: omap1: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS

2015-04-14 Thread Rajendra Nayak
USE_PM_CLK_RUNTIME_OPS is introduced so we don't repeat the same code to do runtime_suspend and runtime_resume across users of PM clocks. Use it to remove the boilerplate code. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- arch/arm/mach-omap1/pm_bus.c | 37

[RFC 4/5] arm: davinci: remove boilerplate code and use USE_PM_CLK_RUNTIME_OPS

2015-04-14 Thread Rajendra Nayak
USE_PM_CLK_RUNTIME_OPS is introduced so we don't repeat the same code to do runtime_suspend and runtime_resume across users of PM clocks. Use it to remove the boilerplate code. Signed-off-by: Rajendra Nayak rna...@codeaurora.org --- arch/arm/mach-davinci/pm_domain.c | 32

Re: [RESEND][PATCH] ARM errata, 430973: update the affected revisions

2015-04-14 Thread Jeroen Hofstee
Hello Russell, On 13-04-15 23:35, Russell King - ARM Linux wrote: On Mon, Apr 13, 2015 at 09:28:09AM -0700, Tony Lindgren wrote: * Tony Lindgren t...@atomide.com [150413 07:46]: If what Russell and I are saying is correct, with the above two patches your system should behave properly with

AM335x OMAP2 common clock external fixed-clock registration

2015-04-14 Thread Michael Welling
Greetings, I have developed an AM3354 based SoM and it uses an external SI5351 clock generator to drive the clock inputs for an external duart and I2S audio master clock. With the registration according to the documentation the reference clock is not being detected and hence the clock generator