[PATCH 3/3] musb: use neednop flag for nop registration

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

 



Some of the boards based on OMAP3 (like OMAP3EVM) and all the
board on OMAP4 uses nop transceiver so register and unregister
it based on '.neednop' flag passed from board files.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@xxxxxx>
---
 drivers/usb/musb/omap2430.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 50591e7..2ec1bc4 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -198,6 +198,9 @@ int __init musb_platform_init(struct musb *musb)
 	omap_cfg_reg(AE5_2430_USB0HS_STP);
 #endif
 
+	if (data->neednop)
+		usb_nop_xceiv_register();
+
 	/* We require some kind of external transceiver, hooked
 	 * up through ULPI.  TWL4030-family PMICs include one,
 	 * which needs a driver, drivers aren't always needed.
@@ -323,8 +326,12 @@ static int musb_platform_resume(struct musb *musb)
 
 int musb_platform_exit(struct musb *musb)
 {
+	struct omap_musb_board_data *data = musb->board_data;
 
 	musb_platform_suspend(musb);
 
+	if (data->neednop)
+		usb_nop_xceiv_unregister();
+
 	return 0;
 }
-- 
1.6.2.4

--
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