blob: 550bfa4576202c6f6f8f9c3f73ab8921971fd234 [file] [log] [blame]
Richard Zhaod142d6b2012-09-12 14:58:05 +03001/*
2 * Copyright 2012 Freescale Semiconductor, Inc.
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/* Used to set SoC specific callbacks */
13struct usbmisc_ops {
14 /* It's called once when probe a usb device */
15 int (*init)(struct device *dev);
Michael Grzeschika0685332013-03-30 12:54:01 +020016 /* It's called once after adding a usb device */
17 int (*post)(struct device *dev);
Richard Zhaod142d6b2012-09-12 14:58:05 +030018};
19
20struct usbmisc_usb_device {
21 struct device *dev; /* usb controller device */
22 int index;
23
Fabio Estevam7b8bc3a2013-01-27 22:45:05 -020024 unsigned int disable_oc:1; /* over current detect disabled */
Michael Grzeschika0685332013-03-30 12:54:01 +020025 unsigned int evdo:1; /* set external vbus divider option */
Richard Zhaod142d6b2012-09-12 14:58:05 +030026};
27
28int usbmisc_set_ops(const struct usbmisc_ops *ops);
29void usbmisc_unset_ops(const struct usbmisc_ops *ops);
30int
31usbmisc_get_init_data(struct device *dev, struct usbmisc_usb_device *usbdev);