• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ sdhci_resume_host函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中sdhci_resume_host函数的典型用法代码示例。如果您正苦于以下问题:C++ sdhci_resume_host函数的具体用法?C++ sdhci_resume_host怎么用?C++ sdhci_resume_host使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了sdhci_resume_host函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sdhci_pm_resume

static int sdhci_pm_resume(struct device *dev) {
    int retval = 0;
    unsigned long flags;
    struct platform_device *pdev = container_of(dev, struct platform_device, dev);
    struct sdhci_host *host = platform_get_drvdata(pdev);
    struct mmc_host *mmc = host->mmc;
    spin_lock_irqsave(&host->lock, flags);
    if(host->ops->set_clock)
        host->ops->set_clock(host, 1);
    spin_unlock_irqrestore(&host->lock, flags);

#ifdef CONFIG_MMC_HOST_WAKEUP_SUPPORTED
        if(!strcmp(host->hw_name, "Spread SDIO host1")) {
            sdhci_host_wakeup_clear(host);
        }
#endif
    retval = sdhci_resume_host(host);
    if(!retval) {
#ifdef CONFIG_PM_RUNTIME
        if(pm_runtime_enabled(dev))
            pm_runtime_put_autosuspend(dev);
#endif
    }
    return retval;

}
开发者ID:LinkLunk,项目名称:android_kernel_samsung_mint,代码行数:26,代码来源:sc8810g.c


示例2: sdhci_s3c_resume

static int sdhci_s3c_resume(struct platform_device *dev)
{
	struct sdhci_host *host = platform_get_drvdata(dev);

	sdhci_resume_host(host);
	return 0;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:7,代码来源:sdhci-s3c.c


示例3: sdhci_s3c_resume

static int sdhci_s3c_resume(struct platform_device *dev)
{
	struct sdhci_host *host = platform_get_drvdata(dev);
	struct sdhci_s3c *sc = sdhci_priv(host);

	/* add by cym 20130328 */
#if MMC2_SKIP_SUSPEND
    /* mmc2 is s3c_device_hsmmc3 */
    if (2 == host->mmc->index) {
        printk(KERN_INFO "skip %s for %s dev->id(%d)\n", __func__, mmc_hostname(host->mmc), dev->id);
        return 0;
    }
    else {
        printk(KERN_INFO "%s for %s dev->id(%d)\n", __func__, mmc_hostname(host->mmc), dev->id);
    }
#endif
	/* end add */

	sdhci_resume_host(host);
/* add by cym 20130328 */
#ifndef MMC2_SKIP_SUSPEND
/* end add */
	if(!(host->mmc->caps & MMC_CAP_NONREMOVABLE)){//lisw hotplug during suspend
		int status = gpio_get_value(sc->ext_cd_gpio);
		if (sc->pdata->ext_cd_gpio_invert)
			status = !status;
		sdhci_s3c_notify_change(sc->pdev, status);

	}
/* add by cym 20130328 */
#endif
/* end add */
	return 0;
}
开发者ID:Android-Dongyf,项目名称:itop-kernel,代码行数:34,代码来源:sdhci-s3c.c


示例4: sdhci_s3c_resume

static int sdhci_s3c_resume(struct platform_device *dev)
{
	struct sdhci_host *host = platform_get_drvdata(dev);

#if defined(CONFIG_WIMAX_CMC)/* && defined(CONFIG_TARGET_LOCALE_NA)*/

	struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
	u32 ier;
#endif
#ifdef CONFIG_MACH_MIDAS_01_BD
	/* turn vdd_tflash off if a card exists*/
	if (sdhci_s3c_get_card_exist(host))
		sdhci_s3c_vtf_on_off(1);
	else
		sdhci_s3c_vtf_on_off(0);

#endif
	sdhci_resume_host(host);
#if defined(CONFIG_WIMAX_CMC)/* && defined(CONFIG_TARGET_LOCALE_NA)*/

	if (pdata->enable_intr_on_resume) {
		ier = sdhci_readl(host, SDHCI_INT_ENABLE);
		ier |= SDHCI_INT_CARD_INT;
		sdhci_writel(host, ier, SDHCI_INT_ENABLE);
		sdhci_writel(host, ier, SDHCI_SIGNAL_ENABLE);
	}
#endif
	return 0;
}
开发者ID:1yankeedt,项目名称:D710BST_FL24_Kernel,代码行数:29,代码来源:sdhci-s3c.c


示例5: sdhci_acpi_resume

static int sdhci_acpi_resume(struct device *dev)
{
	struct sdhci_acpi_host *c = dev_get_drvdata(dev);

	sdhci_acpi_byt_setting(&c->pdev->dev);

	return sdhci_resume_host(c->host);
}
开发者ID:zefie,项目名称:nxt_andx86_kernel,代码行数:8,代码来源:sdhci-acpi.c


示例6: tegra_sdhci_resume

static int tegra_sdhci_resume(struct platform_device *pdev)
{
	struct tegra_sdhci_host *host = platform_get_drvdata(pdev);
	int ret;

	tegra_sdhci_enable_clock(host, 1);
	ret = sdhci_resume_host(host->sdhci);
	if (ret)
		pr_err("%s: failed, error = %d\n", __func__, ret);

	return ret;
}
开发者ID:stayboogy,项目名称:android_kernel_moto_wingray_3.2,代码行数:12,代码来源:sdhci-tegra.c


示例7: sdhci_pxav3_resume

static int sdhci_pxav3_resume(struct device *dev)
{
	int ret;
	struct sdhci_host *host = dev_get_drvdata(dev);

	pm_runtime_get_sync(dev);
	ret = sdhci_resume_host(host);
	pm_runtime_mark_last_busy(dev);
	pm_runtime_put_autosuspend(dev);

	return ret;
}
开发者ID:AK101111,项目名称:linux,代码行数:12,代码来源:sdhci-pxav3.c


示例8: sdhci_pltfm_resume

static int sdhci_pltfm_resume(struct platform_device *pdev)
{
	struct sdio_dev *dev = platform_get_drvdata(pdev);
	struct sdhci_host *host = dev->host;

	/*
	 * If the device type is WIFI, and WiFi is enabled,
	 * turn on the clock since currently
	 * the WIFI driver does not support turning on/off the
	 * clock dynamicly.
	 */
	if (dev->devtype == SDIO_DEV_TYPE_WIFI && sdhci_test_sdio_enabled(dev))
		sdhci_pltfm_clk_enable(host, 1);

#if 0
	if (dev->devtype == SDIO_DEV_TYPE_SDMMC && dev->cd_gpio >= 0) {
		ret =
		    request_irq(gpio_to_irq(dev->cd_gpio),
				sdhci_pltfm_cd_interrupt,
				IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
				"sdio cd", dev);
		if (ret) {
			dev_err(&pdev->dev, "Unable to request card detection "
				"irq=%d for gpio=%d\n",
				gpio_to_irq(dev->cd_gpio), dev->cd_gpio);
			return ret;
		}
	}
#endif

#ifndef CONFIG_MMC_UNSAFE_RESUME
	/*
	 * card state might have been changed during system suspend.
	 * Need to sync up only if MMC_UNSAFE_RESUME is not enabled
	 */
	if (dev->devtype == SDIO_DEV_TYPE_SDMMC && dev->cd_gpio >= 0) {
		if (gpio_get_value_cansleep(dev->cd_gpio) == 0)
			bcm_kona_sd_card_emulate(dev, 1);
		else
			bcm_kona_sd_card_emulate(dev, 0);
	}
#endif
	dev->suspended = 0;

	if (dev->devtype == SDIO_DEV_TYPE_WIFI) {
		printk(KERN_DEBUG "%s: WiFi resume\n", __FUNCTION__);
		sdhci_resume_host(host);
	}
	return 0;
}
开发者ID:CVlaspoel,项目名称:VSMC-i9105p,代码行数:50,代码来源:sdhci-pltfm-kona.c


示例9: sdhci_sirf_resume

static int sdhci_sirf_resume(struct device *dev)
{
	struct sdhci_host *host = dev_get_drvdata(dev);
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
	int ret;

	ret = clk_enable(pltfm_host->clk);
	if (ret) {
		dev_dbg(dev, "Resume: Error enabling clock\n");
		return ret;
	}

	return sdhci_resume_host(host);
}
开发者ID:asmalldev,项目名称:linux,代码行数:14,代码来源:sdhci-sirf.c


示例10: sdhci_resume

static int sdhci_resume(struct device *dev)
{
	struct sdhci_host *host = dev_get_drvdata(dev);
	struct spear_sdhci *sdhci = dev_get_platdata(dev);
	int ret;

	ret = clk_enable(sdhci->clk);
	if (ret) {
		dev_dbg(dev, "Resume: Error enabling clock\n");
		return ret;
	}

	return sdhci_resume_host(host);
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:14,代码来源:sdhci-spear.c


示例11: tegra_sdhci_resume

static int tegra_sdhci_resume(struct platform_device *pdev)
{
	struct tegra_sdhci_host *host = platform_get_drvdata(pdev);
	int ret;
#ifdef CONFIG_MACH_SAMSUNG_VARIATION_TEGRA	
	int i, present;
#endif
	u8 pwr;
	if (host->card_always_on && is_card_sdio(host->sdhci->mmc->card)) {
		int ret = 0;

		if (device_may_wakeup(&pdev->dev)) {
		        disable_irq_wake(host->sdhci->irq);
		}

		/* soft reset SD host controller and enable interrupts */
		ret = tegra_sdhci_restore(host->sdhci);
		if (ret) {
			pr_err("%s: failed, error = %d\n", __func__, ret);
			return ret;
		}

		mmiowb();
#ifdef CONFIG_MACH_SAMSUNG_VARIATION_TEGRA
		for(i=0;i<20;i++){
			present = sdhci_readl(host->sdhci, SDHCI_PRESENT_STATE);
			if((present & SDHCI_CARD_PRESENT) == SDHCI_CARD_PRESENT)
				break;
			mdelay(5);
//			printk(KERN_ERR "MMC : %s : 6(Card Presnet %x) : %d \n",mmc_hostname(host->sdhci->mmc),present,i);
		}
#endif
		host->sdhci->mmc->ops->set_ios(host->sdhci->mmc,
			&host->sdhci->mmc->ios);
		return 0;
	}

	tegra_sdhci_enable_clock(host, 1);

	pwr = SDHCI_POWER_ON;
	sdhci_writeb(host->sdhci, pwr, SDHCI_POWER_CONTROL);
	host->sdhci->pwr = 0;

	ret = sdhci_resume_host(host->sdhci);
	if (ret)
		pr_err("%s: failed, error = %d\n", __func__, ret);

	return ret;
}
开发者ID:Jb2005,项目名称:SamSung-Galaxy-Tab-10.1-Model-GT-P7510,代码行数:49,代码来源:sdhci-tegra.c


示例12: sdhci_s3c_resume

static int sdhci_s3c_resume(struct platform_device *dev)
{
	struct sdhci_host *host = platform_get_drvdata(dev);

#ifdef CONFIG_MACH_MIDAS_01_BD
	/* turn vdd_tflash off if a card exists*/
	if (sdhci_s3c_get_card_exist(host))
		sdhci_s3c_vtf_on_off(1);
	else
		sdhci_s3c_vtf_on_off(0);

#endif
	sdhci_resume_host(host);
	return 0;
}
开发者ID:Ante0,项目名称:xxICSKernel,代码行数:15,代码来源:sdhci-s3c.c


示例13: sdhci_s3c_resume

static int sdhci_s3c_resume(struct platform_device *dev)
{
	struct sdhci_host *host = platform_get_drvdata(dev);
	struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
	u32 ier;

	sdhci_resume_host(host);

	if (pdata->enable_intr_on_resume) {
		ier = sdhci_readl(host, SDHCI_INT_ENABLE);
		ier |= SDHCI_INT_CARD_INT;
		sdhci_writel(host, ier, SDHCI_INT_ENABLE);
		sdhci_writel(host, ier, SDHCI_SIGNAL_ENABLE);
	}

	return 0;
}
开发者ID:abc2402878,项目名称:linux-tiny210v2,代码行数:17,代码来源:sdhci-s3c.c


示例14: sdhci_pltfm_resume

static int sdhci_pltfm_resume(struct device *device)
{
	struct sdio_dev *dev =
		platform_get_drvdata(to_platform_device(device));
	struct sdhci_host *host = dev->host;
	int ret = 0;

	if (sdhci_pltfm_rpm_enabled(dev)) {
		/*
		 * Note that we havent done a put_sync. The
		 * pm core takes care of that.
		 */
		pm_runtime_get_sync(dev->dev);
	} else {
		ret = sdhci_pltfm_clk_enable(dev, 1);
		if (ret) {
			dev_err(dev->dev,
				"Failed to enable clock during resume\n");
			return -EAGAIN;
		}
	}

	ret = sdhci_resume_host(host);
	if (ret) {
		dev_err(dev->dev,
		 "Unable to resume sdhci host err=%d\n", ret);
		return ret;
	}

	if (!sdhci_pltfm_rpm_enabled(dev)) {
		ret = sdhci_pltfm_clk_enable(dev, 0);
		if (ret) {
			dev_err(dev->dev,
				"Failed to disable clock during resume\n");
			/* Not really a big error to cry and return*/
		}
	}

	dev->suspended = 0;

	if (dev->devtype == SDIO_DEV_TYPE_EMMC)
		host->mmc->pm_flags |= MMC_PM_KEEP_POWER;

	return 0;
}
开发者ID:birey,项目名称:android_kernel_samsung_kyleproxx,代码行数:45,代码来源:sdhci-pltfm-kona.c


示例15: sdhci_s3c_resume

static int sdhci_s3c_resume(struct platform_device *dev)
{
	struct sdhci_host *host = platform_get_drvdata(dev);
	sdhci_resume_host(host);
	
#if defined(CONFIG_WIMAX_CMC) && defined(CONFIG_TARGET_LOCALE_NA)
      	struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
	u32 ier;
	if (pdata->enable_intr_on_resume) {
                ier = sdhci_readl(host, SDHCI_INT_ENABLE);
                ier |= SDHCI_INT_CARD_INT;
                sdhci_writel(host, ier, SDHCI_INT_ENABLE);
                sdhci_writel(host, ier, SDHCI_SIGNAL_ENABLE);
        } 
#endif

	return 0;
}
开发者ID:morristech,项目名称:enigma-i9100,代码行数:18,代码来源:sdhci-s3c.c


示例16: sdhci_pltfm_resume

static int sdhci_pltfm_resume(struct device *dev)
{
	struct sdhci_host *host = dev_get_drvdata(dev);
	int ret = 0;

	if (host->ops && host->ops->resume)
		ret = host->ops->resume(host);
	if (ret) {
		dev_err(dev, "resume hook failed, error = %d\n", ret);
		return ret;
	}

	ret = sdhci_resume_host(host);
	if (ret)
		dev_err(dev, "resume failed, error = %d\n", ret);

	return ret;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:18,代码来源:sdhci-pltfm.c


示例17: tegra_sdhci_resume

static int tegra_sdhci_resume(struct platform_device *pdev)
{
	struct tegra_sdhci_host *host = platform_get_drvdata(pdev);
	int ret;
	u8 pwr;

	MMC_printk("%s:+", mmc_hostname(host->sdhci->mmc));

	if ((host->card_always_on && is_card_sdio(host->sdhci->mmc->card))||is_card_mmc(host->sdhci->mmc->card)) {
		int ret = 0;

		if (device_may_wakeup(&pdev->dev)) {
		        disable_irq_wake(host->sdhci->irq);
		}

		/* soft reset SD host controller and enable interrupts */
		ret = tegra_sdhci_restore(host->sdhci);
		if (ret) {
			pr_err("%s: failed, error = %d\n", __func__, ret);
			return ret;
		}

		mmiowb();
		host->sdhci->mmc->ops->set_ios(host->sdhci->mmc,
			&host->sdhci->mmc->ios);
		 printk("tegra_sdhci_suspend: skip %s resume(always on)!\n",is_card_mmc(host->sdhci->mmc->card)?"eMMC":"SDIO");
		return 0;
	}

	tegra_sdhci_enable_clock(host, 1);

	pwr = SDHCI_POWER_ON;
	sdhci_writeb(host->sdhci, pwr, SDHCI_POWER_CONTROL);
	host->sdhci->pwr = 0;

	ret = sdhci_resume_host(host->sdhci);
	if (ret)
		pr_err("%s: failed, error = %d\n", __func__, ret);

	MMC_printk("%s:-", mmc_hostname(host->sdhci->mmc));
	return ret;
}
开发者ID:m4ttyw,项目名称:linux_kernel_TF101,代码行数:42,代码来源:sdhci-tegra.c


示例18: sdhci_pltfm_suspend

static int sdhci_pltfm_suspend(struct device *dev)
{
	struct sdhci_host *host = dev_get_drvdata(dev);
	int ret;

	ret = sdhci_suspend_host(host);
	if (ret) {
		dev_err(dev, "suspend failed, error = %d\n", ret);
		return ret;
	}

	if (host->ops && host->ops->suspend)
		ret = host->ops->suspend(host);
	if (ret) {
		dev_err(dev, "suspend hook failed, error = %d\n", ret);
		sdhci_resume_host(host);
	}

	return ret;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:20,代码来源:sdhci-pltfm.c


示例19: sdhci_pltfm_resume

static int sdhci_pltfm_resume(struct platform_device *dev)
{
	struct sdhci_host *host = platform_get_drvdata(dev);
	int ret = 0;
	MMC_printk("%s: ++", mmc_hostname(host->mmc));

	if (host->ops && host->ops->resume)
		ret = host->ops->resume(host);
	if (ret) {
		dev_err(&dev->dev, "resume hook failed, error = %d\n", ret);
		return ret;
	}

	ret = sdhci_resume_host(host);
	if (ret)
		dev_err(&dev->dev, "resume failed, error = %d\n", ret);

	MMC_printk("%s: --", mmc_hostname(host->mmc));
	return ret;
}
开发者ID:FrozenCow,项目名称:tf101-katkernel,代码行数:20,代码来源:sdhci-pltfm.c


示例20: xsdhcips_resume

/**
 * xsdhcips_resume - Resume method for the driver
 * @dev:	Address of the device structure
 * Returns 0 on success and error value on error
 *
 * Resume operation after suspend
 */
static int xsdhcips_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct sdhci_host *host = platform_get_drvdata(pdev);
	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
	struct xsdhcips *xsdhcips = pltfm_host->priv;
	int ret;

	ret = clk_enable(xsdhcips->aperclk);
	if (ret) {
		dev_err(dev, "Cannot enable APER clock.\n");
		return ret;
	}

	ret = clk_enable(xsdhcips->devclk);
	if (ret) {
		dev_err(dev, "Cannot enable device clock.\n");
		clk_disable(xsdhcips->aperclk);
		return ret;
	}

	return sdhci_resume_host(host);
}
开发者ID:FadyAzar,项目名称:linux-te-3.9,代码行数:30,代码来源:sdhci-of-xilinxps.c



注:本文中的sdhci_resume_host函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ sdhci_writeb函数代码示例发布时间:2022-05-30
下一篇:
C++ sdhci_remove_host函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap