本文整理汇总了C++中pm_runtime_put_sync函数的典型用法代码示例。如果您正苦于以下问题:C++ pm_runtime_put_sync函数的具体用法?C++ pm_runtime_put_sync怎么用?C++ pm_runtime_put_sync使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pm_runtime_put_sync函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: unblank_framebuffer
static void unblank_framebuffer(int releaseref)
{
struct device *fbdev = NULL;
struct fb_info *fb_info;
struct s3c_fb_win *win;
struct s3c_fb *sfb;
fbdev = get_fb_dev();
if (!fbdev)
return;
fb_info = get_fb_info(fbdev);
if (!fb_info)
return;
/*
* Release the reference we took at the beginning of the TUI session
*/
win = fb_info->par;
sfb = win->parent;
pr_info("%s call s3c_fb_activate_vsync\n", __func__);
s3c_fb_activate_vsync(sfb);
/*
* Unblank the framebuffer
*/
console_lock();
fb_info->flags |= FBINFO_MISC_USEREVENT;
fb_blank(fb_info, FB_BLANK_UNBLANK);
fb_info->flags &= ~FBINFO_MISC_USEREVENT;
console_unlock();
if (releaseref)
pm_runtime_put_sync(sfb->dev);
}
开发者ID:akvaro,项目名称:android_kernel_meizu_mx4pro,代码行数:37,代码来源:tui-hal.c
示例2: jpeg_remove
static int jpeg_remove(struct platform_device *pdev)
{
struct jpeg_dev *dev = platform_get_drvdata(pdev);
del_timer_sync(&dev->watchdog_timer);
flush_workqueue(dev->watchdog_workqueue);
destroy_workqueue(dev->watchdog_workqueue);
v4l2_m2m_release(dev->m2m_dev_enc);
video_unregister_device(dev->vfd_enc);
v4l2_m2m_release(dev->m2m_dev_dec);
video_unregister_device(dev->vfd_dec);
v4l2_device_unregister(&dev->v4l2_dev);
dev->vb2->cleanup(dev->alloc_ctx);
free_irq(dev->irq_no, pdev);
mutex_destroy(&dev->lock);
iounmap(dev->reg_base);
clk_put(dev->clk);
#ifdef CONFIG_PM_RUNTIME
#if defined (CONFIG_CPU_EXYNOS5250)
#ifdef CONFIG_BUSFREQ_OPP
/* lock bus frequency */
dev_unlock(dev->bus_dev, &pdev->dev);
#endif
#else
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
#endif
#endif
kfree(dev);
return 0;
}
开发者ID:Thinkware-Device,项目名称:willow,代码行数:37,代码来源:jpeg_dev.c
示例3: omap_mcbsp_free
void omap_mcbsp_free(unsigned int id)
{
struct omap_mcbsp *mcbsp;
void *reg_cache;
if (!omap_mcbsp_check_valid_id(id)) {
printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
return;
}
mcbsp = id_to_mcbsp_ptr(id);
if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp->pdata->ops->free(id);
/* Disable wakeup behavior */
if (mcbsp->pdata->has_wakeup)
MCBSP_WRITE(mcbsp, WAKEUPEN, 0);
pm_runtime_put_sync(mcbsp->dev);
if (mcbsp->rx_irq)
free_irq(mcbsp->rx_irq, (void *)mcbsp);
free_irq(mcbsp->tx_irq, (void *)mcbsp);
reg_cache = mcbsp->reg_cache;
spin_lock(&mcbsp->lock);
if (mcbsp->free)
dev_err(mcbsp->dev, "McBSP%d was not reserved\n", mcbsp->id);
else
mcbsp->free = true;
mcbsp->reg_cache = NULL;
spin_unlock(&mcbsp->lock);
if (reg_cache)
kfree(reg_cache);
}
开发者ID:08opt,项目名称:linux,代码行数:37,代码来源:mcbsp.c
示例4: omap_rtc_remove
static int __exit omap_rtc_remove(struct platform_device *pdev)
{
struct omap_rtc *rtc = platform_get_drvdata(pdev);
u8 reg;
if (pm_power_off == omap_rtc_power_off &&
omap_rtc_power_off_rtc == rtc) {
pm_power_off = NULL;
omap_rtc_power_off_rtc = NULL;
}
device_init_wakeup(&pdev->dev, 0);
if (!IS_ERR(rtc->clk))
clk_disable_unprepare(rtc->clk);
rtc->type->unlock(rtc);
/* leave rtc running, but disable irqs */
rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, 0);
if (rtc->has_ext_clk) {
reg = rtc_read(rtc, OMAP_RTC_OSC_REG);
reg &= ~OMAP_RTC_OSC_SEL_32KCLK_SRC;
rtc_write(rtc, OMAP_RTC_OSC_REG, reg);
}
rtc->type->lock(rtc);
/* Disable the clock/module */
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);
/* Remove ext_wakeup pinconf */
pinctrl_unregister(rtc->pctldev);
return 0;
}
开发者ID:forgivemyheart,项目名称:linux,代码行数:37,代码来源:rtc-omap.c
示例5: hsic_remoteWakeup_store
static ssize_t hsic_remoteWakeup_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t size)
{
int retval;
int org_req;
if (size > HSIC_ENABLE_SIZE) {
dev_dbg(dev, "Invalid, size = %d\n", size);
return -EINVAL;
}
if (sscanf(buf, "%d", &org_req) != 1) {
dev_dbg(dev, "Invalid, value\n");
return -EINVAL;
}
mutex_lock(&hsic.hsic_mutex);
hsic.remoteWakeup_enable = org_req;
if ((hsic.modem_dev != NULL) &&
(hsic.rh_dev != NULL)) {
if (hsic.remoteWakeup_enable) {
dev_dbg(dev, "Modem dev remote wakeup enabled\n");
device_set_wakeup_capable(&hsic.modem_dev->dev, 1);
device_set_wakeup_capable(&hsic.rh_dev->dev, 1);
} else {
dev_dbg(dev, "Modem dev remote wakeup disabled\n");
device_set_wakeup_capable(&hsic.modem_dev->dev, 0);
device_set_wakeup_capable(&hsic.rh_dev->dev, 0);
}
pm_runtime_get_sync(&hsic.modem_dev->dev);
pm_runtime_put_sync(&hsic.modem_dev->dev);
}
mutex_unlock(&hsic.hsic_mutex);
return size;
}
开发者ID:NotKit,项目名称:android-ia_kernel_intel_baytrail,代码行数:37,代码来源:xhci-ush-pci.c
示例6: hdlcd_drm_unbind
static void hdlcd_drm_unbind(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
struct hdlcd_drm_private *hdlcd = drm->dev_private;
drm_dev_unregister(drm);
if (hdlcd->fbdev) {
drm_fbdev_cma_fini(hdlcd->fbdev);
hdlcd->fbdev = NULL;
}
drm_kms_helper_poll_fini(drm);
component_unbind_all(dev, drm);
of_node_put(hdlcd->crtc.port);
hdlcd->crtc.port = NULL;
pm_runtime_get_sync(drm->dev);
drm_irq_uninstall(drm);
pm_runtime_put_sync(drm->dev);
pm_runtime_disable(drm->dev);
of_reserved_mem_device_release(drm->dev);
drm_mode_config_cleanup(drm);
drm_dev_put(drm);
drm->dev_private = NULL;
dev_set_drvdata(dev, NULL);
}
开发者ID:JamesChenFromChina,项目名称:linux,代码行数:24,代码来源:hdlcd_drv.c
示例7: fimc_capture_open
static int fimc_capture_open(struct file *file)
{
struct fimc_dev *fimc = video_drvdata(file);
int ret = v4l2_fh_open(file);
if (ret)
return ret;
dbg("pid: %d, state: 0x%lx", task_pid_nr(current), fimc->state);
/* Return if the corresponding video mem2mem node is already opened. */
if (fimc_m2m_active(fimc))
return -EBUSY;
set_bit(ST_CAPT_BUSY, &fimc->state);
pm_runtime_get_sync(&fimc->pdev->dev);
if (++fimc->vid_cap.refcnt == 1) {
ret = fimc_pipeline_initialize(fimc,
&fimc->vid_cap.vfd->entity, true);
if (ret < 0) {
dev_err(&fimc->pdev->dev,
"Video pipeline initialization failed\n");
pm_runtime_put_sync(&fimc->pdev->dev);
fimc->vid_cap.refcnt--;
v4l2_fh_release(file);
clear_bit(ST_CAPT_BUSY, &fimc->state);
return ret;
}
ret = fimc_capture_ctrls_create(fimc);
if (!ret && !fimc->vid_cap.user_subdev_api)
ret = fimc_capture_set_default_format(fimc);
}
return ret;
}
开发者ID:artynet,项目名称:linux-3.3.8,代码行数:36,代码来源:fimc-capture.c
示例8: s5p_dp_disable
static void s5p_dp_disable(struct s5p_dp_device *dp)
{
struct s5p_dp_platdata *pdata = dp->dev->platform_data;
mutex_lock(&dp->lock);
if (!dp->enabled)
goto out;
dp->enabled = 0;
//s5p_dp_reset(dp);
//s5p_dp_set_pll_power_down(dp, 1);
//s5p_dp_set_analog_power_down(dp, POWER_ALL, 1);
if (pdata && pdata->phy_exit)
pdata->phy_exit();
clk_disable(dp->clock);
pm_runtime_put_sync(dp->dev);
out:
mutex_unlock(&dp->lock);
}
开发者ID:turter99,项目名称:android_kernel_samsung_jaltektt_perseus_4.2.2,代码行数:24,代码来源:s5p-dp-core.c
示例9: s3c_fb_enable
static void s3c_fb_enable(struct s3c_fb *sfb, int enable)
{
u32 vidcon0 = readl(sfb->regs + VIDCON0);
if (enable && !sfb->output_on)
pm_runtime_get_sync(sfb->dev);
if (enable) {
vidcon0 |= VIDCON0_ENVID | VIDCON0_ENVID_F;
} else {
if (vidcon0 & VIDCON0_ENVID) {
vidcon0 |= VIDCON0_ENVID;
vidcon0 &= ~VIDCON0_ENVID_F;
}
}
writel(vidcon0, sfb->regs + VIDCON0);
if (!enable && sfb->output_on)
pm_runtime_put_sync(sfb->dev);
sfb->output_on = enable;
}
开发者ID:MiniBlu,项目名称:cm11_kernel_htc_msm8974a3ul,代码行数:24,代码来源:s3c-fb.c
示例10: omap_mcbsp_free
void omap_mcbsp_free(unsigned int id)
{
struct omap_mcbsp *mcbsp;
void *reg_cache;
if (!omap_mcbsp_check_valid_id(id)) {
printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
return;
}
mcbsp = id_to_mcbsp_ptr(id);
if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free)
mcbsp->pdata->ops->free(id);
/* Do procedure specific to omap34xx arch, if applicable */
omap34xx_mcbsp_free(mcbsp);
pm_runtime_put_sync(mcbsp->dev);
if (mcbsp->rx_irq)
free_irq(mcbsp->rx_irq, (void *)mcbsp);
free_irq(mcbsp->tx_irq, (void *)mcbsp);
reg_cache = mcbsp->reg_cache;
spin_lock(&mcbsp->lock);
if (mcbsp->free)
dev_err(mcbsp->dev, "McBSP%d was not reserved\n", mcbsp->id);
else
mcbsp->free = true;
mcbsp->reg_cache = NULL;
spin_unlock(&mcbsp->lock);
if (reg_cache)
kfree(reg_cache);
}
开发者ID:303750856,项目名称:linux-3.1,代码行数:36,代码来源:mcbsp.c
示例11: exynos_xhci_runtime_suspend
static int exynos_xhci_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct exynos_xhci_hcd *exynos_xhci;
struct usb_hcd *hcd;
struct xhci_hcd *xhci;
int retval = 0;
dev_dbg(dev, "%s\n", __func__);
exynos_xhci = dev_get_drvdata(dev);
if (!exynos_xhci)
return -EINVAL;
hcd = exynos_xhci->hcd;
if (!hcd)
return -EINVAL;
xhci = hcd_to_xhci(hcd);
if (hcd->state != HC_STATE_SUSPENDED ||
xhci->shared_hcd->state != HC_STATE_SUSPENDED) {
dev_dbg(dev, "%s: HC state is not suspended!\n", __func__);
return -EAGAIN;
}
retval = xhci_suspend(xhci, 0);
if (retval < 0)
dev_err(dev, "%s: cannot stop xHC\n", __func__);
pm_runtime_put_sync(exynos_xhci->dev->parent);
exynos_drd_put(pdev);
return retval;
}
开发者ID:tamirda,项目名称:T805_PhoeniX_Kernel_Lollipop,代码行数:36,代码来源:xhci-exynos.c
示例12: abe_mixer_enable_mono
int abe_mixer_enable_mono(struct omap_abe *abe, int id, int enable)
{
int mixer;
switch (id) {
case MIX_DL1_MONO:
mixer = MIXDL1;
break;
case MIX_DL2_MONO:
mixer = MIXDL2;
break;
case MIX_AUDUL_MONO:
mixer = MIXAUDUL;
break;
default:
return -EINVAL;
}
abe_dsp_pm_get(abe);
omap_aess_mono_mixer(abe->aess, mixer, enable);
pm_runtime_put_sync(abe->dev);
return 0;
}
开发者ID:koh523,项目名称:kernel-pandaboard-ES-RevB3,代码行数:24,代码来源:omap-abe-mixer.c
示例13: p3_disable_clk
static int p3_disable_clk(struct p3_dev *p3_device)
{
int ret_val = 0;
//unsigned short clock = 0;
struct spi_device *spidev = NULL;
struct s3c64xx_spi_driver_data *sdd = NULL;
if (!p3_device->enabled_clk) {
P3_ERR_MSG("%s - clock was not enabled!\n", __func__);
return ret_val;
}
spin_lock_irq(&p3_device->ese_spi_lock);
spidev = spi_dev_get(p3_device->spi);
spin_unlock_irq(&p3_device->ese_spi_lock);
if (spidev == NULL) {
P3_ERR_MSG("%s - Failed to get spi dev!\n", __func__);
return -1;
}
sdd = spi_master_get_devdata(spidev->master);
if (!sdd){
P3_ERR_MSG("%s - Failed to get spi dev.\n", __func__);
return -EFAULT;
}
p3_device->enabled_clk = false;
pm_runtime_put_sync(&sdd->pdev->dev); /* Disable clock */
spi_dev_put(spidev);
#ifdef FEATURE_ESE_WAKELOCK
if (wake_lock_active(&p3_device->ese_lock))
wake_unlock(&p3_device->ese_lock);
#endif
return ret_val;
}
开发者ID:MikeForeskin,项目名称:Vindicator-S6,代码行数:36,代码来源:ese_p3.c
示例14: decon_disable
static void decon_disable(struct exynos_drm_crtc *crtc)
{
struct decon_context *ctx = crtc->ctx;
int i;
if (test_bit(BIT_SUSPENDED, &ctx->flags))
return;
/*
* We need to make sure that all windows are disabled before we
* suspend that connector. Otherwise we might try to scan from
* a destroyed buffer later.
*/
for (i = ctx->first_win; i < WINDOWS_NR; i++)
decon_disable_plane(crtc, &ctx->planes[i]);
decon_swreset(ctx);
clear_bit(BIT_CLKS_ENABLED, &ctx->flags);
pm_runtime_put_sync(ctx->dev);
set_bit(BIT_SUSPENDED, &ctx->flags);
}
开发者ID:BigeyeDestroyer,项目名称:linux,代码行数:24,代码来源:exynos5433_drm_decon.c
示例15: platform_get_drvdata
struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
{
struct msm_drm_private *priv = dev->dev_private;
struct platform_device *pdev = priv->gpu_pdev;
struct msm_gpu *gpu = platform_get_drvdata(priv->gpu_pdev);
int ret;
if (!gpu) {
dev_err(dev->dev, "no adreno device\n");
return NULL;
}
pm_runtime_get_sync(&pdev->dev);
mutex_lock(&dev->struct_mutex);
ret = msm_gpu_hw_init(gpu);
mutex_unlock(&dev->struct_mutex);
pm_runtime_put_sync(&pdev->dev);
if (ret) {
dev_err(dev->dev, "gpu hw init failed: %d\n", ret);
return NULL;
}
return gpu;
}
开发者ID:MaxKellermann,项目名称:linux,代码行数:24,代码来源:adreno_device.c
示例16: abe_mixer_set_equ_profile
int abe_mixer_set_equ_profile(struct omap_abe *abe,
unsigned int id, unsigned int profile)
{
struct omap_aess_equ equ_params;
int len;
if (id >= abe->hdr.num_equ)
return -EINVAL;
if (profile >= abe->equ.texts[id].count)
return -EINVAL;
len = abe->equ.texts[id].coeff;
equ_params.equ_length = len;
memcpy(equ_params.coef.type1, abe->equ.equ[id] + profile * len,
len * sizeof(u32));
abe->equ.profile[id] = profile;
abe_dsp_pm_get(abe);
omap_aess_write_equalizer(abe->aess, id + 1, (struct omap_aess_equ *)&equ_params);
pm_runtime_put_sync(abe->dev);
return 0;
}
开发者ID:koh523,项目名称:kernel-pandaboard-ES-RevB3,代码行数:24,代码来源:omap-abe-mixer.c
示例17: omap_usbhs_init
static void omap_usbhs_init(struct device *dev)
{
struct usbhs_hcd_omap *omap = dev_get_drvdata(dev);
unsigned reg;
dev_dbg(dev, "starting TI HSUSB Controller\n");
pm_runtime_get_sync(dev);
reg = usbhs_read(omap->uhh_base, OMAP_UHH_HOSTCONFIG);
/* setup ULPI bypass and burst configurations */
reg |= (OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN
| OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN
| OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN);
reg |= OMAP4_UHH_HOSTCONFIG_APP_START_CLK;
reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN;
switch (omap->usbhs_rev) {
case OMAP_USBHS_REV1:
reg = omap_usbhs_rev1_hostconfig(omap, reg);
break;
case OMAP_USBHS_REV2:
reg = omap_usbhs_rev2_hostconfig(omap, reg);
break;
default: /* newer revisions */
reg = omap_usbhs_rev2_hostconfig(omap, reg);
break;
}
usbhs_write(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg);
dev_dbg(dev, "UHH setup done, uhh_hostconfig=%x\n", reg);
pm_runtime_put_sync(dev);
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:36,代码来源:omap-usb-host.c
示例18: smies_disable_by_fimd
int smies_disable_by_fimd(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct s5p_smies_device *smies = platform_get_drvdata(pdev);
dev_dbg(dev, "%s +\n", __func__);
mutex_lock(&smies->mutex);
if(smies->state == SMIES_ENABLED) {
smies_set_update_reg_mask(smies, SMIES_MASK_ON);
smies_run(smies, 0);
smies_set_update_reg_mask(smies, SMIES_MASK_OFF);
smies_set_path(smies, 0);
smies->state = SMIES_DISABLED;
pm_runtime_put_sync(smies->dev);
}
mutex_unlock(&smies->mutex);
dev_dbg(dev, "%s -\n", __func__);
return 0;
}
开发者ID:aramos1988,项目名称:Android_b2_Kernel,代码行数:24,代码来源:s5p_smies.c
示例19: omap2_mcbsp_set_clks_src
int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
{
struct clk *fck_src;
const char *src;
int r;
if (fck_src_id == MCBSP_CLKS_PAD_SRC)
src = "pad_fck";
else if (fck_src_id == MCBSP_CLKS_PRCM_SRC)
src = "prcm_fck";
else
return -EINVAL;
fck_src = clk_get(mcbsp->dev, src);
if (IS_ERR(fck_src)) {
dev_err(mcbsp->dev, "CLKS: could not clk_get() %s\n", src);
return -EINVAL;
}
pm_runtime_put_sync(mcbsp->dev);
r = clk_set_parent(mcbsp->fclk, fck_src);
if (r) {
dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n",
src);
clk_put(fck_src);
return r;
}
pm_runtime_get_sync(mcbsp->dev);
clk_put(fck_src);
return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:36,代码来源:mcbsp.c
示例20: msm_shutdown
static void msm_shutdown(struct uart_port *port)
{
struct msm_port *msm_port = UART_TO_MSM(port);
clk_enable(msm_port->clk);
msm_port->imr = 0;
msm_write(port, 0, UART_IMR); /* disable interrupts */
clk_disable(msm_port->clk);
free_irq(port->irq, port);
#ifdef CONFIG_SERIAL_MSM_RX_WAKEUP
if (use_low_power_wakeup(msm_port)) {
set_irq_wake(msm_port->wakeup.irq, 0);
free_irq(msm_port->wakeup.irq, msm_port);
}
#endif
#ifndef CONFIG_PM_RUNTIME
msm_deinit_clock(port);
#endif
pm_runtime_put_sync(port->dev);
}
开发者ID:R-N,项目名称:boston-2.6.32.x,代码行数:24,代码来源:msm_serial.c
注:本文中的pm_runtime_put_sync函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论