1*8e22978cSAlexander Shishkin /* 2*8e22978cSAlexander Shishkin * Copyright 2012 Freescale Semiconductor, Inc. 3*8e22978cSAlexander Shishkin * 4*8e22978cSAlexander Shishkin * The code contained herein is licensed under the GNU General Public 5*8e22978cSAlexander Shishkin * License. You may obtain a copy of the GNU General Public License 6*8e22978cSAlexander Shishkin * Version 2 or later at the following locations: 7*8e22978cSAlexander Shishkin * 8*8e22978cSAlexander Shishkin * http://www.opensource.org/licenses/gpl-license.html 9*8e22978cSAlexander Shishkin * http://www.gnu.org/copyleft/gpl.html 10*8e22978cSAlexander Shishkin */ 11*8e22978cSAlexander Shishkin 12*8e22978cSAlexander Shishkin /* Used to set SoC specific callbacks */ 13*8e22978cSAlexander Shishkin struct usbmisc_ops { 14*8e22978cSAlexander Shishkin /* It's called once when probe a usb device */ 15*8e22978cSAlexander Shishkin int (*init)(struct device *dev); 16*8e22978cSAlexander Shishkin /* It's called once after adding a usb device */ 17*8e22978cSAlexander Shishkin int (*post)(struct device *dev); 18*8e22978cSAlexander Shishkin }; 19*8e22978cSAlexander Shishkin 20*8e22978cSAlexander Shishkin struct usbmisc_usb_device { 21*8e22978cSAlexander Shishkin struct device *dev; /* usb controller device */ 22*8e22978cSAlexander Shishkin int index; 23*8e22978cSAlexander Shishkin 24*8e22978cSAlexander Shishkin unsigned int disable_oc:1; /* over current detect disabled */ 25*8e22978cSAlexander Shishkin unsigned int evdo:1; /* set external vbus divider option */ 26*8e22978cSAlexander Shishkin }; 27*8e22978cSAlexander Shishkin 28*8e22978cSAlexander Shishkin int usbmisc_set_ops(const struct usbmisc_ops *ops); 29*8e22978cSAlexander Shishkin void usbmisc_unset_ops(const struct usbmisc_ops *ops); 30*8e22978cSAlexander Shishkin int 31*8e22978cSAlexander Shishkin usbmisc_get_init_data(struct device *dev, struct usbmisc_usb_device *usbdev); 32