コード例 #1
0
static int __init usbh2_init(void)
{
	struct platform_device *h2_pdev;

	pr_debug("%s: \n", __func__);

	if (machine_is_mx31_3ds()) {
		struct regulator *usbh2_regux;
		usbh2_config.xcvr_pwr =
			kmalloc(sizeof(struct fsl_xcvr_power), GFP_KERNEL);
		if (!(usbh2_config.xcvr_pwr))
			return -ENOMEM;

		usbh2_regux = regulator_get(NULL, "GPO1");
		usbh2_config.xcvr_pwr->regu1 = usbh2_regux;
		usbh2_regux = regulator_get(NULL, "GPO3");
		usbh2_config.xcvr_pwr->regu2 = usbh2_regux;
	}

	h2_pdev = host_pdev_register(usbh2_resources,
			ARRAY_SIZE(usbh2_resources), &usbh2_config);
#ifdef CONFIG_USB_EHCI_ARC_H2_WAKE_UP
	/* set host2 may and should wakeup */
	device_init_wakeup(&(h2_pdev->dev), 1);
#endif
	return 0;
}
コード例 #2
0
ファイル: usb_h2.c プロジェクト: fread-ink/fread-kernel-k4
static int __init usbh2_init(void)
{
	pr_debug("%s: \n", __func__);

	host_pdev_register(usbh2_resources, ARRAY_SIZE(usbh2_resources),
			   &usbh2_config);
	return 0;
}
コード例 #3
0
ファイル: usb.c プロジェクト: gtvhacker/Logitech-Revue
static int __init mx27_usb_init(void)
{
	struct fsl_usb2_platform_data __attribute__((unused)) *pdata;

	pr_debug("%s: \n", __FUNCTION__);

#ifdef CONFIG_USB_EHCI_ARC_H1
	host_pdev_register(usbh1_resources, ARRAY_SIZE(usbh1_resources),
			   &usbh1_config);
#endif

#ifdef CONFIG_USB_EHCI_ARC_H2
	host_pdev_register(usbh2_resources, ARRAY_SIZE(usbh2_resources),
			   &usbh2_config);
#endif

#ifdef CONFIG_USB_EHCI_ARC_OTG
#if defined(CONFIG_MC13783_MXC)	|| defined(CONFIG_ISP1301_MXC)
	host_pdev_register(otg_resources, ARRAY_SIZE(otg_resources),
			   &mxc_serial_host_config);
#elif defined(CONFIG_ISP1504_MXC)
	host_pdev_register(otg_resources, ARRAY_SIZE(otg_resources),
			   &mxc_isp1504_config);
#endif
#endif

#if defined(CONFIG_USB_GADGET_ARC) || defined(CONFIG_OTG_BTC_ARC)
	if (platform_device_register(&otg_udc_device)) {
		printk(KERN_ERR "usb: can't register OTG Gadget\n");
	} else {
		pdata = otg_udc_device.dev.platform_data;
		printk(KERN_INFO "usb: OTG gadget (%s) registered\n",
		       pdata->transceiver);
	}
#endif

#ifdef CONFIG_USB_OTG
	if (platform_device_register(&fsl_device))
		printk(KERN_ERR "usb: can't register otg device\n");
	else
		printk(KERN_INFO "usb: OTG OTG registered\n");
#endif

	return 0;
}
コード例 #4
0
static int __init usbh2_init(void)
{
	pr_debug("%s: \n", __func__);

	if (machine_is_mx51_3ds() ||
	    (machine_is_mx51_babbage() && (cpu_is_mx51_rev(CHIP_REV_2_0) >= 1)))
		return 0;

	host_pdev_register(usbh2_resources, ARRAY_SIZE(usbh2_resources),
			   &usbh2_config);
	return 0;
}
コード例 #5
0
ファイル: usb_h2.c プロジェクト: despierto/imx_233_linux
static int __init usbh2_init(void)
{
	pr_debug("%s: \n", __func__);

	if (machine_is_mx31_3ds()) {
		struct regulator *usbh2_regux;
		usbh2_config.xcvr_pwr =
			kmalloc(sizeof(struct fsl_xcvr_power), GFP_KERNEL);
		if (!(usbh2_config.xcvr_pwr))
			return -ENOMEM;

		usbh2_regux = regulator_get(NULL, "GPO1");
		usbh2_config.xcvr_pwr->regu1 = usbh2_regux;
		usbh2_regux = regulator_get(NULL, "GPO3");
		usbh2_config.xcvr_pwr->regu2 = usbh2_regux;
	}

	host_pdev_register(usbh2_resources, ARRAY_SIZE(usbh2_resources),
			   &usbh2_config);
	return 0;
}