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

C++ pm_runtime_status_suspended函数代码示例

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

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



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

示例1: ux500_pd_amba_resume_noirq

static int ux500_pd_amba_resume_noirq(struct device *dev)
{
	struct pm_runtime_data *prd = __to_prd(dev);
	int (*callback)(struct device *) = NULL;
	int ret = 0;
	bool is_suspended = pm_runtime_status_suspended(dev);

	dev_vdbg(dev, "%s()\n", __func__);

	/*
	 * Do not bypass AMBA bus pm functions by calling generic
	 * pm directly. A future fix could be to implement a
	 * "pm_bus_generic_*" API which we can use instead.
	 */
	if (dev->bus && dev->bus->pm)
		callback = dev->bus->pm->resume_noirq;

	if (callback)
		ret = callback(dev);
	else
		ret = pm_generic_resume_noirq(dev);

	if (!ret && !is_suspended)
		ux500_pd_enable(prd);

	return ret;
}
开发者ID:1DeMaCr,项目名称:Codina_Kernel-3.x,代码行数:27,代码来源:runtime.c


示例2: mali_dvfs_event_proc

static void mali_dvfs_event_proc(struct work_struct *w)
{
#ifdef CONFIG_MALI_DEVFREQ
	if (mali_devfreq) {
		mutex_lock(&mali_devfreq->lock);
		update_devfreq(mali_devfreq);
		mutex_unlock(&mali_devfreq->lock);
	}
	return 0;
#else
	mali_dvfs_status *dvfs_status;
	mutex_lock(&mali_enable_clock_lock);
	dvfs_status = &mali_dvfs_status_current;

	mali_dvfs_decide_next_level(dvfs_status);

	if (dvfs_status->step >= dvfs_step_max)
		dvfs_status->step = dvfs_step_max-1;
	if (dvfs_status->step < dvfs_step_min)
		dvfs_status->step = dvfs_step_min;

	if (!pm_runtime_status_suspended(dvfs_status->kbdev->osdev.dev))
		kbase_platform_dvfs_set_level(dvfs_status->kbdev, dvfs_status->step);

	mutex_unlock(&mali_enable_clock_lock);
#endif
}
开发者ID:619619,项目名称:T805-Basicrom-Kernel,代码行数:27,代码来源:mali_kbase_dvfs.c


示例3: pm_callback_power_on

static int pm_callback_power_on(struct kbase_device *kbdev)
{
	int result;
	int ret_val;
	struct device *dev = kbdev->dev;

#if (HARD_RESET_AT_POWER_OFF != 1)
	if (!pm_runtime_status_suspended(dev))
		ret_val = 0;
	else
#endif
		ret_val = 1;

	if (unlikely(dev->power.disable_depth > 0)) {
		kbase_platform_on(kbdev);
	} else {
		result = pm_runtime_resume(dev);
		if (result < 0 && result == -EAGAIN)
			kbase_platform_on(kbdev);
		else if (result < 0)
			printk("[mali-midgard]  pm_runtime_resume failed (%d)\n", result);
	}

	return ret_val;
}
开发者ID:HuaweiHonor4C,项目名称:kernel_hi6210sft_mm,代码行数:25,代码来源:mali_kbase_config_hi3635.c


示例4: _od_suspend_noirq

static int _od_suspend_noirq(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct omap_device *od = to_omap_device(pdev);
	int ret;

	/* Don't attempt late suspend on a driver that is not bound */
	if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER)
		return 0;

	ret = pm_generic_suspend_noirq(dev);

	if (!ret && !pm_runtime_status_suspended(dev)) {
		if (pm_generic_runtime_suspend(dev) == 0) {
			if (!pm_runtime_suspended(dev)) {
				/* NOTE: *might* indicate driver race */
				dev_dbg(dev, "%s: Force suspending\n",
					__func__);
				pm_runtime_set_suspended(dev);
				od->flags |= OMAP_DEVICE_SUSPEND_FORCED;
			}
			omap_device_idle(pdev);
			od->flags |= OMAP_DEVICE_SUSPENDED;
		}
	}

	return ret;
}
开发者ID:AeroGirl,项目名称:VAR-SOM-AM33-SDK7-Kernel,代码行数:28,代码来源:omap_device.c


示例5: pm_callback_resume

static inline void pm_callback_resume(struct kbase_device *kbdev)
{
	if (!pm_runtime_status_suspended(kbdev->dev))
		pm_callback_runtime_on(kbdev);
	else
		pm_callback_power_on(kbdev);
}
开发者ID:HuaweiHonor4C,项目名称:kernel_hi6210sft_mm,代码行数:7,代码来源:mali_kbase_config_hi3635.c


示例6: pm_callback_power_on

static int pm_callback_power_on(kbase_device *kbdev)
{
	int result;
	int ret_val;
	struct kbase_os_device *osdev = &kbdev->osdev;
	struct exynos_context *platform;

	platform = (struct exynos_context *) kbdev->platform_context;

	if (pm_runtime_status_suspended(osdev->dev))
		ret_val = 1;
	else
		ret_val = 0;

	if(osdev->dev->power.disable_depth > 0) {
		if(platform->cmu_pmu_status == 0)
			kbase_platform_cmu_pmu_control(kbdev, 1);
		return ret_val;
	}
	result = pm_runtime_resume(osdev->dev);

	if(result < 0 && result == -EAGAIN)
		kbase_platform_cmu_pmu_control(kbdev, 1);
	else if(result < 0)
		OSK_PRINT_ERROR(OSK_BASE_PM, "pm_runtime_get_sync failed (%d)\n", result);

	return ret_val;
}
开发者ID:ktoonsez,项目名称:KTManta,代码行数:28,代码来源:mali_kbase_config_exynos5.c


示例7: img_i2s_out_dev_remove

static int img_i2s_out_dev_remove(struct platform_device *pdev)
{
	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		img_i2s_out_runtime_suspend(&pdev->dev);

	return 0;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:8,代码来源:img-i2s-out.c


示例8: mt6797_afe_pcm_dev_remove

static int mt6797_afe_pcm_dev_remove(struct platform_device *pdev)
{
	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		mt6797_afe_runtime_suspend(&pdev->dev);
	pm_runtime_put_sync(&pdev->dev);

	return 0;
}
开发者ID:Lyude,项目名称:linux,代码行数:9,代码来源:mt6797-afe-pcm.c


示例9: exynos_drd_switch_start_host

/**
 * exynos_drd_switch_start_host -  helper function for starting/stoping the host
 * controller driver.
 *
 * @otg: Pointer to the usb_otg structure.
 * @on: start / stop the host controller driver.
 *
 * Returns 0 on success otherwise negative errno.
 */
static int exynos_drd_switch_start_host(struct usb_otg *otg, int on)
{
    struct exynos_drd_switch *drd_switch = container_of(otg,
                                           struct exynos_drd_switch, otg);
    struct usb_hcd *hcd;
    struct device *xhci_dev;
    int ret = 0;

    if (!otg->host)
        return -EINVAL;

    dev_dbg(otg->phy->dev, "Turn %s host %s\n",
            on ? "on" : "off", otg->host->bus_name);

    hcd = bus_to_hcd(otg->host);
    xhci_dev = hcd->self.controller;

    if (on) {
#if !defined(CONFIG_USB_HOST_NOTIFY)
        wake_lock(&drd_switch->wakelock);
#endif
        /*
         * Clear runtime_error flag. The flag could be
         * set when user space accessed the host while DRD
         * was in B-Dev mode.
         */
        pm_runtime_disable(xhci_dev);
        if (pm_runtime_status_suspended(xhci_dev))
            pm_runtime_set_suspended(xhci_dev);
        else
            pm_runtime_set_active(xhci_dev);
        pm_runtime_enable(xhci_dev);

        ret = pm_runtime_get_sync(xhci_dev);
        if (ret < 0 && ret != -EINPROGRESS) {
            pm_runtime_put_noidle(xhci_dev);
            goto err;
        }

        exynos_drd_switch_ases_vbus_ctrl(drd_switch, 1);
    } else {
        exynos_drd_switch_ases_vbus_ctrl(drd_switch, 0);

        ret = pm_runtime_put_sync(xhci_dev);
        if (ret == -EAGAIN)
            pm_runtime_get_noresume(xhci_dev);
#if !defined(CONFIG_USB_HOST_NOTIFY)
        else
            wake_unlock(&drd_switch->wakelock);
#endif
    }

err:
    /* ret can be 1 after pm_runtime_get_sync */
    return (ret < 0) ? ret : 0;
}
开发者ID:halaszk,项目名称:android_kernel_samsung_lt03,代码行数:65,代码来源:exynos-drd-switch.c


示例10: tegra20_spdif_platform_remove

static int tegra20_spdif_platform_remove(struct platform_device *pdev)
{
	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		tegra20_spdif_runtime_suspend(&pdev->dev);

	tegra_pcm_platform_unregister(&pdev->dev);
	snd_soc_unregister_component(&pdev->dev);

	return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:11,代码来源:tegra20_spdif.c


示例11: sirf_usp_pcm_suspend

static int sirf_usp_pcm_suspend(struct device *dev)
{
	struct sirf_usp *usp = dev_get_drvdata(dev);

	if (!pm_runtime_status_suspended(dev)) {
		regmap_read(usp->regmap, USP_MODE1, &usp->mode1_reg);
		regmap_read(usp->regmap, USP_MODE2, &usp->mode2_reg);
		sirf_usp_pcm_runtime_suspend(dev);
	}
	return 0;
}
开发者ID:AkyZero,项目名称:wrapfs-latest,代码行数:11,代码来源:sirf-usp.c


示例12: tegra30_ahub_remove

static int tegra30_ahub_remove(struct platform_device *pdev)
{
	if (!ahub)
		return -ENODEV;

	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		tegra30_ahub_runtime_suspend(&pdev->dev);

	return 0;
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:11,代码来源:tegra30_ahub.c


示例13: img_spdif_out_dev_remove

static int img_spdif_out_dev_remove(struct platform_device *pdev)
{
	struct img_spdif_out *spdif = platform_get_drvdata(pdev);

	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		img_spdif_out_suspend(&pdev->dev);

	clk_disable_unprepare(spdif->clk_sys);

	return 0;
}
开发者ID:mkrufky,项目名称:linux,代码行数:12,代码来源:img-spdif-out.c


示例14: rockchip_i2s_remove

static int rockchip_i2s_remove(struct platform_device *pdev)
{
	struct rk_i2s_dev *i2s = dev_get_drvdata(&pdev->dev);

	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		i2s_runtime_suspend(&pdev->dev);

	clk_disable_unprepare(i2s->mclk);
	clk_disable_unprepare(i2s->hclk);

	return 0;
}
开发者ID:a2hojsjsjs,项目名称:linux,代码行数:13,代码来源:rockchip_i2s.c


示例15: dev_pm_disarm_wake_irq

/**
 * dev_pm_disarm_wake_irq - Disarm device wake-up
 * @wirq: Device wake-up interrupt
 *
 * Clears up the wake-up event conditionally based on the
 * device_may_wake().
 */
void dev_pm_disarm_wake_irq(struct wake_irq *wirq)
{
	if (!wirq)
		return;

	if (device_may_wakeup(wirq->dev)) {
		disable_irq_wake(wirq->irq);

		if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
		    !pm_runtime_status_suspended(wirq->dev))
			disable_irq_nosync(wirq->irq);
	}
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:20,代码来源:wakeirq.c


示例16: sirf_usp_pcm_resume

static int sirf_usp_pcm_resume(struct device *dev)
{
	struct sirf_usp *usp = dev_get_drvdata(dev);
	int ret;

	if (!pm_runtime_status_suspended(dev)) {
		ret = sirf_usp_pcm_runtime_resume(dev);
		if (ret)
			return ret;
		regmap_write(usp->regmap, USP_MODE1, usp->mode1_reg);
		regmap_write(usp->regmap, USP_MODE2, usp->mode2_reg);
	}
	return 0;
}
开发者ID:AkyZero,项目名称:wrapfs-latest,代码行数:14,代码来源:sirf-usp.c


示例17: gpu_power_on

static int gpu_power_on(kbase_device *kbdev)
{
	int ret_val;
	struct kbase_os_device *osdev = &kbdev->osdev;

	if (pm_runtime_status_suspended(osdev->dev))
		ret_val = 1;
	else
		ret_val = 0;

	pm_runtime_resume(osdev->dev);

	return ret_val;
}
开发者ID:4pao,项目名称:android_kernel_hardkernel_odroidxu3,代码行数:14,代码来源:gpu_notifier.c


示例18: tegra20_spdif_platform_remove

static int tegra20_spdif_platform_remove(struct platform_device *pdev)
{
	struct tegra20_spdif *spdif = dev_get_drvdata(&pdev->dev);

	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		tegra20_spdif_runtime_suspend(&pdev->dev);

	tegra_pcm_platform_unregister(&pdev->dev);
	snd_soc_unregister_dai(&pdev->dev);

	clk_put(spdif->clk_spdif_out);

	return 0;
}
开发者ID:FrozenCow,项目名称:FIRE-ICE,代码行数:15,代码来源:tegra20_spdif.c


示例19: tegra30_dam_remove

static int tegra30_dam_remove(struct platform_device *pdev)
{
	struct tegra30_dam_context *dam;

	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		tegra30_dam_runtime_suspend(&pdev->dev);

	dam = platform_get_drvdata(pdev);
	clk_put(dam->dam_clk);
	tegra30_dam_debug_remove(dam);
	dams_cont_info[pdev->id] = NULL;

	return 0;
}
开发者ID:Toradex-Apalis-TK1-AndroidTV,项目名称:android_kernel_nvidia_mm,代码行数:15,代码来源:tegra30_dam.c


示例20: rockchip_i2s_remove

static int rockchip_i2s_remove(struct platform_device *pdev)
{
	struct rk_i2s_dev *i2s = dev_get_drvdata(&pdev->dev);

	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
		i2s_runtime_suspend(&pdev->dev);

	clk_disable_unprepare(i2s->mclk);
	clk_disable_unprepare(i2s->hclk);
	snd_dmaengine_pcm_unregister(&pdev->dev);
	snd_soc_unregister_component(&pdev->dev);

	return 0;
}
开发者ID:AkyZero,项目名称:wrapfs-latest,代码行数:15,代码来源:rockchip_i2s.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ pm_runtime_suspend函数代码示例发布时间:2022-05-30
下一篇:
C++ pm_runtime_set_active函数代码示例发布时间: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