summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/otg.c
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-08-14 12:44:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-14 12:37:19 -0700
commitc10b4f033e7c0ddba2b7b699d01109e4de46e831 (patch)
tree5bbf40eb6076bfd59c38f8e916f0e686b2eb1cb2 /drivers/usb/chipidea/otg.c
parentd66895f9df6b880fa3a280f5bdfe919169ca37dd (diff)
usb: chipidea: otg: add otg file used to access otgsc
This file is mainly used to access otgsc currently, it may add otg related things in the future. Tested-by: Marek Vasut <marex@denx.de> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/otg.c')
-rw-r--r--drivers/usb/chipidea/otg.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
new file mode 100644
index 000000000000..999a085491d7
--- /dev/null
+++ b/drivers/usb/chipidea/otg.c
@@ -0,0 +1,35 @@
+/*
+ * otg.c - ChipIdea USB IP core OTG driver
+ *
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ *
+ * Author: Peter Chen
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * This file mainly handles otgsc register, it may include OTG operation
+ * in the future.
+ */
+
+#include <linux/usb/otg.h>
+#include <linux/usb/gadget.h>
+#include <linux/usb/chipidea.h>
+
+#include "ci.h"
+#include "bits.h"
+#include "otg.h"
+
+/**
+ * ci_hdrc_otg_init - initialize otgsc bits
+ * ci: the controller
+ */
+int ci_hdrc_otg_init(struct ci_hdrc *ci)
+{
+ ci_enable_otg_interrupt(ci, OTGSC_IDIE);
+
+ return 0;
+}