type = "(none)"; 
type = "no"; 
static int __init omap_udc_probe(struct device *dev){	struct platform_device	*odev = to_platform_device(dev);	int			status = -ENODEV;	int			hmc;	struct otg_transceiver	*xceiv = 0;	const char		*type = 0;	struct omap_usb_config	*config = dev->platform_data;	/* NOTE:  "knows" the order of the resources! */	if (!request_mem_region(odev->resource[0].start, 			odev->resource[0].end - odev->resource[0].start + 1,			driver_name)) {		DBG("request_mem_region failed\n");		return -EBUSY;	}	INFO("OMAP UDC rev %d.%d%s\n",		UDC_REV_REG >> 4, UDC_REV_REG & 0xf,		config->otg ? ", Mini-AB" : "");	/* use the mode given to us by board init code */	if (cpu_is_omap15xx()) {		hmc = HMC_1510;		type = "(unknown)";		if (machine_is_omap_innovator()) {			/* just set up software VBUS detect, and then			 * later rig it so we always report VBUS.			 * FIXME without really sensing VBUS, we can't			 * know when to turn PULLUP_EN on/off; and that			 * means we always "need" the 48MHz clock.			 */			u32 tmp = FUNC_MUX_CTRL_0_REG;			FUNC_MUX_CTRL_0_REG &= ~VBUS_CTRL_1510;			tmp |= VBUS_MODE_1510;			tmp &= ~VBUS_CTRL_1510;			FUNC_MUX_CTRL_0_REG = tmp;		}	} else {		hmc = HMC_1610;		switch (hmc) {		case 3:		case 11:		case 16:		case 19:		case 25:			xceiv = otg_get_transceiver();			if (!xceiv) {				DBG("external transceiver not registered!\n");				if (config->otg)					goto cleanup0;				type = "(unknown external)";			} else				type = xceiv->label;			break;		case 0:			/* POWERUP DEFAULT == 0 */		case 4:		case 12:		case 20:			type = "INTEGRATED";			break;		case 21:			/* internal loopback */			type = "(loopback)";			break;		case 14:			/* transceiverless */			type = "(none)";			break;		default:			ERR("unrecognized UDC HMC mode %d\n", hmc);			return -ENODEV;		}	}	INFO("hmc mode %d, transceiver %s\n", hmc, type);	/* a "gadget" abstracts/virtualizes the controller */	status = omap_udc_setup(odev, xceiv);	if (status) {		goto cleanup0;	}	xceiv = 0;	// "udc" is now valid	pullup_disable(udc);#if	defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)	udc->gadget.is_otg = (config->otg != 0);#endif	/* USB general purpose IRQ:  ep0, state changes, dma, etc */	status = request_irq(odev->resource[1].start, omap_udc_irq,			SA_SAMPLE_RANDOM, driver_name, udc);	if (status != 0) {		ERR( "can't get irq %ld, err %d\n",			odev->resource[1].start, status);		goto cleanup1;	}	/* USB "non-iso" IRQ (PIO for all but ep0) */	status = request_irq(odev->resource[2].start, omap_udc_pio_irq,			SA_SAMPLE_RANDOM, "omap_udc pio", udc);	if (status != 0) {		ERR( "can't get irq %ld, err %d\n",			odev->resource[2].start, status);		goto cleanup2;	}#ifdef	USE_ISO	status = request_irq(odev->resource[3].start, omap_udc_iso_irq,			SA_INTERRUPT, "omap_udc iso", udc);	if (status != 0) {		ERR("can't get irq %ld, err %d\n",			odev->resource[3].start, status);		goto cleanup3;	}#endif	create_proc_file();	device_add(&udc->gadget.dev);	return 0;#ifdef	USE_ISOcleanup3:	free_irq(odev->resource[2].start, udc);#endifcleanup2:	free_irq(odev->resource[1].start, udc);cleanup1:	kfree (udc);	udc = 0;cleanup0:	if (xceiv)		put_device(xceiv->dev);	release_mem_region(odev->resource[0].start,			odev->resource[0].end - odev->resource[0].start + 1);	return status;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/313980c92724cf42877a7bdafdef439ee9d68ccb/omap_udc.c/clean/drivers/usb/gadget/omap_udc.c