static int msm_sdcc_cfg_mpm_sdiowakeup(struct device *dev, unsigned mode)
{
	   struct platform_device *pdev;
	   enum msm_mpm_pin pin;
		int ret = 0;

	   pdev = container_of(dev, struct platform_device, dev);

	   /* Only SDCC4 slot connected to WLAN chip has wakeup capability */
	   if (pdev->id == 4)
			   pin = MSM_MPM_PIN_SDC4_DAT1;
	   else
			   return -EINVAL;

		switch (mode) {
		case SDC_DAT1_DISABLE:
				ret = msm_mpm_enable_pin(pin, 0);
				break;
		case SDC_DAT1_ENABLE:
				ret = msm_mpm_set_pin_type(pin, IRQ_TYPE_LEVEL_LOW);
				ret = msm_mpm_enable_pin(pin, 1);
				break;
		case SDC_DAT1_ENWAKE:
				ret = msm_mpm_set_pin_wake(pin, 1);
				break;
		case SDC_DAT1_DISWAKE:
				ret = msm_mpm_set_pin_wake(pin, 0);
				break;
		default:
				ret = -EINVAL;
				break;
		}
		return ret;
}
static int __devexit ehci_msm2_remove(struct platform_device *pdev)
{
	struct msm_usb_host_platform_data *pdata;
	struct usb_hcd *hcd = platform_get_drvdata(pdev);
	struct msm_hcd *mhcd = hcd_to_mhcd(hcd);

	pdata = mhcd->dev->platform_data;
	if (mhcd->pmic_gpio_dp_irq) {
		if (mhcd->pmic_gpio_dp_irq_enabled)
			disable_irq_wake(mhcd->pmic_gpio_dp_irq);
		free_irq(mhcd->pmic_gpio_dp_irq, mhcd);
	} else if (pdata->mpm_xo_wakeup_int) {
		msm_mpm_set_pin_wake(pdata->mpm_xo_wakeup_int, 0);
		msm_mpm_enable_pin(pdata->mpm_xo_wakeup_int, 0);
	}
	device_init_wakeup(&pdev->dev, 0);
	pm_runtime_set_suspended(&pdev->dev);

	usb_remove_hcd(hcd);

	msm_xo_put(mhcd->xo_handle);
	msm_ehci_vbus_power(mhcd, 0);
	msm_ehci_init_vbus(mhcd, 0);
	msm_ehci_ldo_enable(mhcd, 0);
	msm_ehci_ldo_init(mhcd, 0);
	msm_ehci_init_vddcx(mhcd, 0);

	msm_ehci_init_clocks(mhcd, 0);
	wake_lock_destroy(&mhcd->wlock);
	iounmap(hcd->regs);
	usb_put_hcd(hcd);

#if defined(CONFIG_DEBUG_FS)
	debugfs_remove_recursive(dent_ehci);
#endif
	return 0;
}