Re: [PATCH 4/6 v3] USB: musb: blackfin: pm: make it work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 24-10-2010 00:45, Mike Frysinger wrote:

From: Bob Liu<lliubbo@xxxxxxxxx>

Split the USB MMR init steps out into a helper func that both the platform
init and the resume code may call.

Then while suspending, the gpio_vrsel will change from high to low which
will generate a wakeup event and resume the system immediately, so we need
to manually drive it low before we sleep.

Signed-off-by: Bob Liu<lliubbo@xxxxxxxxx>
Signed-off-by: Mike Frysinger<vapier@xxxxxxxxxx>
[...]

diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 611a9d2..4410319 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
[...]
@@ -394,6 +399,26 @@ int __init musb_platform_init(struct musb *musb, void *board_data)
  	return 0;
  }

+#ifdef CONFIG_PM
+void musb_platform_save_context(struct musb *musb,
+			struct musb_context_registers *musb_context)
+{
+	if (is_host_active(musb))
+		/*
+		* During hibernate gpio_vrsel will change from high to low which
+		* will generate wakeup event resume the system immediately.
+		* Set it to 0 before hibernate to avoid this wakeup event.
+		*/

   You still didn't fix the comment style...

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux