本文整理汇总了C++中pm_runtime_status_suspended函数的典型用法代码示例。如果您正苦于以下问题:C++ pm_runtime_status_suspended函数的具体用法?C++ pm_runtime_status_suspended怎么用?C++ pm_runtime_status_suspended使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pm_runtime_status_suspended函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}