[PATCH v1] usb: ohci-at91: Set RemoteWakeupConnected bit explicitly.

2016-09-29 Thread Wenyou Yang
The reset value of RWC is 0, set RemoteWakeupConnected bit explicitly before calling ohci_run, it also fixes the issue that the mass storage stick connected wasn't suspended when the system suspend. Signed-off-by: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 9 ++--- 1 file chang

[PATCH v2] usb: ohci-at91: Use descriptor-based gpio APIs

2016-09-29 Thread Wenyou Yang
Use the descriptor-based interface to manipulate GPIOs, instead of the legacy integer-based interface. Signed-off-by: Wenyou Yang --- Changes in v2: - Retain the vbus_pin_active_low[] member and its manipulations. drivers/usb/host/ohci-at91.c | 121

[PATCH v1] usb: ohci-at91: Use descriptor-based gpio APIs

2016-09-28 Thread Wenyou Yang
Use the descriptor-based interface to manipulate GPIOs, instead of the legacy integer-based interface. In the meanwhile, remove unneeded vbus_pin_active_low[...] member. Signed-off-by: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 120 ++- 1 file

[RESEND PATCH v1] usb: ohci-at91: Use descriptor-based gpio APIs

2016-09-28 Thread Wenyou Yang
Use the descriptor-based interface to manipulate GPIOs, instead of the legacy integer-based interface. In the meanwhile, remove unneeded vbus_pin_active_low[...] member. Signed-off-by: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 120 ++- 1 file

[PATCH v1] usb: ohci-at91: Use descriptor-based gpio APIs

2016-09-28 Thread Wenyou Yang
Use the descriptor-based interface to manipulate GPIOs, instead of the legacy integer-based interface. In the meanwhile, remove unneeded vbus_pin_active_low[...] member. Signed-off-by: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 120 ++- 1 file

[PATCH v7] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-08-22 Thread Wenyou Yang
. Signed-off-by: Wenyou Yang Reviewed-by: Alexandre Belloni Acked-by: Nicolas Ferre --- Changes in v7: - Rename ohci_at91_port_ctrl() to ohci_at91_port_suspend(). - Add check valid_port(wIndex) before invoke ohci_at91_port_suspend(). - Call ohci_at91_port_suspend() directly on suspend/resume

[PATCH v6] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-08-21 Thread Wenyou Yang
. Signed-off-by: Wenyou Yang Reviewed-by: Alexandre Belloni Acked-by: Nicolas Ferre --- Changes in v6: - Set all the suspend bits for all the ports in the OHCIICR register at once, instead of port by port. - Amend the commit log for clearer. Changes in v5: - Use the USB_PORT_FEAT_SUSPEND

[PATCH v5] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-08-03 Thread Wenyou Yang
control is by setting the SUSPEND_A/B/C fields of SFR_OHCIICR(OHCI Interrupt Configuration Register) in the SFR while OHCI USB suspend. This setting operation must be done before the USB clock disabled, clear them after the USB clock enabled. Signed-off-by: Wenyou Yang Reviewed-by: Alexandre Belloni

[PATCH v4] usb: ohci-at91: Forcibly suspend ports while USB suspend

2016-06-20 Thread Wenyou Yang
is enabled. Signed-off-by: Wenyou Yang --- Changes in v4: - To check whether the SFR node with "atmel,sama5d2-sfr" compatible is present or not to decide if this feature is applied or not when USB OHCI suspend/resume, instead of new compatible. - Drop the compatible "atm

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

2016-06-07 Thread Wenyou Yang
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 ohci-node. arch/arm/boot/dts/sama5d2.dtsi | 2 +- 1 file changed, 1 inser

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

2016-06-07 Thread Wenyou Yang
is enabled. Signed-off-by: Wenyou Yang --- Changes in v3: - Change the compatible description for more precise. Changes in v2: - Add compatible to support forcibly suspend the ports. - Add soc/at91/at91_sfr.h to accommodate the defines. - Add error checking for .sfr_regmap. - Remove

[PATCH v3 0/2] ARM: ohci-at91: Add support to forcibly suspend ports while sleep

2016-06-07 Thread Wenyou Yang
soc/at91/at91_sfr.h to accommodate the defines. - Add error checking for .sfr_regmap. - Remove unnecessary regmap_read() statement. - Use the new compatible for ohci-node. Wenyou Yang (2): usb: ohci-at91: Forcibly suspend ports while USB suspend ARM: at91/dt: sama5d2: Use new compatible for

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

2016-05-31 Thread Wenyou Yang
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 v2: - Use the new compatible for ohci-node. arch/arm/boot/dts/sama5d2.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletio

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

2016-05-31 Thread Wenyou Yang
is enabled. Signed-off-by: Wenyou Yang --- Changes in v2: - Add compatible to support forcibly suspend the ports. - Add soc/at91/at91_sfr.h to accommodate the defines. - Add error checking for .sfr_regmap. - Remove unnecessary regmap_read() statement. .../devicetree/bindings/usb/atmel

[PATCH v2 0/2] ARM: ohci-at91: Add support to forcibly suspend ports while sleep

2016-05-31 Thread Wenyou Yang
.sfr_regmap. - Remove unnecessary regmap_read() statement. - Use the new compatible for ohci-node. Wenyou Yang (2): usb: ohci-at91: Forcibly suspend ports while USB suspend ARM: at91/dt: sama5d2: Use new compatible for ohci node .../devicetree/bindings/usb/atmel-usb.txt | 5

[PATCH] usb: ohci-at91: Suspend the ports while USB suspending

2016-05-11 Thread Wenyou Yang
: Wenyou Yang --- drivers/usb/host/ohci-at91.c | 63 1 file changed, 63 insertions(+) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index d177372..ce898e0 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci