summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/ci13xxx_imx.h
diff options
context:
space:
mode:
authorRichard Zhao <richard.zhao@freescale.com>2012-09-12 14:58:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-12 11:20:38 -0700
commitd142d6be231713330f9c0d7ee52f23e1b3f19ee4 (patch)
tree22c13437373301d2ff9c2b311c42eaab2d079a1e /drivers/usb/chipidea/ci13xxx_imx.h
parent08d9c74d45ceb581c11d2ab265c32236b0321a56 (diff)
downloadlinux-d142d6be231713330f9c0d7ee52f23e1b3f19ee4.tar.gz
linux-d142d6be231713330f9c0d7ee52f23e1b3f19ee4.tar.bz2
linux-d142d6be231713330f9c0d7ee52f23e1b3f19ee4.zip
USB: chipidea: add imx usbmisc support
i.MX usb controllers share non-core registers, which may include SoC specific controls. We turn it into a usbmisc device and usbmisc driver set operations needed by ci13xxx_imx driver. For example, Sabrelite board has bad over-current design, we can usbmisc to disable over-current detection. Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Richard Zhao <richard.zhao@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/ci13xxx_imx.h')
-rw-r--r--drivers/usb/chipidea/ci13xxx_imx.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.h b/drivers/usb/chipidea/ci13xxx_imx.h
new file mode 100644
index 000000000000..2e88accb3d67
--- /dev/null
+++ b/drivers/usb/chipidea/ci13xxx_imx.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2012 Freescale Semiconductor, Inc.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+/* Used to set SoC specific callbacks */
+struct usbmisc_ops {
+ /* It's called once when probe a usb device */
+ int (*init)(struct device *dev);
+};
+
+struct usbmisc_usb_device {
+ struct device *dev; /* usb controller device */
+ int index;
+
+ int disable_oc:1; /* over current detect disabled */
+};
+
+int usbmisc_set_ops(const struct usbmisc_ops *ops);
+void usbmisc_unset_ops(const struct usbmisc_ops *ops);
+int
+usbmisc_get_init_data(struct device *dev, struct usbmisc_usb_device *usbdev);