static void __exit mic_exit(void) { /* Close endpoints related to reverse registration */ acptboot_exit(); #ifdef USE_VCONSOLE micvcons_destroy(mic_data.dd_numdevs); #endif pci_unregister_driver(&mic_lindata.dd_pcidriver); micpm_uninit(); /* Uninit data structures for PM disconnect */ micpm_disconn_uninit(mic_data.dd_numdevs + 1); #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,34)) pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, "mic"); #endif micscif_kmem_cache_destroy(); vmcore_exit(); micveth_exit(); micscif_destroy(); ramoops_exit(); device_destroy(mic_lindata.dd_class, mic_lindata.dd_dev + 1); device_destroy(mic_lindata.dd_class, mic_lindata.dd_dev); class_destroy(mic_lindata.dd_class); cdev_del(&mic_lindata.dd_cdev); unregister_chrdev_region(mic_lindata.dd_dev, MAX_DLDR_MINORS); unregister_pm_notifier(&mic_pm_notifer); return; }
static int dtv_remove(struct platform_device *pdev) { pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ , "dtv"); pm_runtime_disable(&pdev->dev); return 0; }
static int __init mddi_driver_init(void) { int ret; mddi_clk = clk_get(NULL, "mddi_clk"); if (IS_ERR(mddi_clk)) { printk(KERN_ERR "can't find mddi_clk \n"); return PTR_ERR(mddi_clk); } #ifdef CONFIG_SHLCDC_BOARD pm_qos_add_requirement(PM_QOS_SYSTEM_BUS_FREQ, "mddi", 117000); #endif clk_enable(mddi_clk); ret = mddi_register_driver(); if (ret) { clk_disable(mddi_clk); #ifdef CONFIG_SHLCDC_BOARD pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, "mddi"); #endif clk_put(mddi_clk); printk(KERN_ERR "mddi_register_driver() failed!\n"); return ret; } mddi_init(); return ret; }
static int __init ehci_msm_probe(struct platform_device *pdev) { struct usb_hcd *hcd; struct resource *res; struct msm_usb_host_platform_data *pdata; int retval; struct msmusb_hcd *mhcd; hcd = usb_create_hcd(&msm_hc_driver, &pdev->dev, dev_name(&pdev->dev)); if (!hcd) return -ENOMEM; hcd->irq = platform_get_irq(pdev, 0); if (hcd->irq < 0) { usb_put_hcd(hcd); return hcd->irq; } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) { usb_put_hcd(hcd); return -ENODEV; } hcd->rsrc_start = res->start; hcd->rsrc_len = resource_size(res); mhcd = hcd_to_mhcd(hcd); spin_lock_init(&mhcd->lock); mhcd->in_lpm = 0; mhcd->running = 0; device_init_wakeup(&pdev->dev, 1); pdata = pdev->dev.platform_data; if (PHY_TYPE(pdata->phy_info) == USB_PHY_UNDEFINED) { usb_put_hcd(hcd); return -ENODEV; } hcd->power_budget = pdata->power_budget; mhcd->pdata = pdata; INIT_WORK(&mhcd->lpm_exit_work, usb_lpm_exit_w); wake_lock_init(&mhcd->wlock, WAKE_LOCK_SUSPEND, dev_name(&pdev->dev)); pm_qos_add_requirement(PM_QOS_SYSTEM_BUS_FREQ, (char *)dev_name(&pdev->dev), PM_QOS_DEFAULT_VALUE); retval = msm_xusb_init_host(mhcd); if (retval < 0) { usb_put_hcd(hcd); wake_lock_destroy(&mhcd->wlock); pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, (char *) dev_name(&pdev->dev)); } return retval; }
void release_axi_qos(void) { if (axi_qos_requested) { pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ , "msm_camera"); CDBG("%s: release successful\n", __func__); axi_qos_requested = 0; msleep(5); } }
static int usb_free(struct usb_info *ui, int ret) { INFO("usb_free(%d)\n", ret); if (ui->xceiv) otg_put_transceiver(ui->xceiv); if (ui->chg_init) ui->chg_init(0); if (ui->irq) free_irq(ui->irq, 0); if (ui->pool) dma_pool_destroy(ui->pool); if (ui->dma) dma_free_coherent(&ui->pdev->dev, 4096, ui->buf, ui->dma); kfree(ui); pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, DRIVER_NAME); pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, DRIVER_NAME); return ret; }
int msm_gemini_platform_clk_disable(void) { clk_disable(jpeg_clk); clk_put(jpeg_clk); jpeg_clk = NULL; clk_disable(jpeg_pclk); clk_put(jpeg_pclk); jpeg_pclk = NULL; pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, "msm_gemini"); return 0; }
u32 res_trk_power_down(void) { VCDRES_MSG_LOW("clk_regime_rail_disable"); #ifdef AXI_CLK_SCALING VCDRES_MSG_MED("\n res_trk_power_down()::" "Calling AXI remove requirement\n"); pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, MSM_AXI_QOS_NAME); #endif #ifdef USE_RES_TRACKER VCDRES_MSG_MED("\n res_trk_power_down():: Calling " "vid_c_disable_pwr_rail()\n"); return vid_c_disable_pwr_rail(); #endif return TRUE; }
static int __exit ehci_msm_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); struct msmusb_hcd *mhcd = hcd_to_mhcd(hcd); int retval = 0; device_init_wakeup(&pdev->dev, 0); msm_hsusb_request_host((void *)mhcd, REQUEST_STOP); msm_xusb_uninit_host(mhcd); usb_put_hcd(hcd); retval = msm_xusb_rpc_close(mhcd); wake_lock_destroy(&mhcd->wlock); pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, (char *) dev_name(&pdev->dev)); return retval; }
static int msm_i2c_remove(struct platform_device *pdev) { struct msm_i2c_dev *dev = platform_get_drvdata(pdev); struct resource *mem; platform_set_drvdata(pdev, NULL); pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, "msm_i2c"); free_irq(dev->irq, dev); i2c_del_adapter(&dev->adap_pri); clk_disable(dev->clk); clk_put(dev->clk); iounmap(dev->base); kfree(dev); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); release_mem_region(mem->start, (mem->end - mem->start) + 1); return 0; }
void kgsl_pwrctrl_close(struct kgsl_device *device) { struct kgsl_pwrctrl *pwr = &device->pwrctrl; int i; KGSL_PWR_INFO(device, "close device %d\n", device->id); unregister_early_suspend(&device->display_off); if (pwr->interrupt_num > 0) { if (pwr->have_irq) { free_irq(pwr->interrupt_num, NULL); pwr->have_irq = 0; } pwr->interrupt_num = 0; } clk_put(pwr->ebi1_clk); pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, "kgsl_3d"); pwr->pcl = 0; if (pwr->gpu_reg) { regulator_put(pwr->gpu_reg); pwr->gpu_reg = NULL; } for (i = 1; i < KGSL_MAX_CLKS; i++) if (pwr->grp_clks[i]) { clk_put(pwr->grp_clks[i]); pwr->grp_clks[i] = NULL; } pwr->grp_clks[0] = NULL; pwr->power_flags = 0; }
static int __exit ehci_msm_remove(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); struct msmusb_hcd *mhcd = hcd_to_mhcd(hcd); int retval = 0; device_init_wakeup(&pdev->dev, 0); msm_hsusb_request_host(mhcd, REQUEST_STOP); if (mhcd->xceiv && mhcd->xceiv->set_host) mhcd->xceiv->set_host(mhcd->xceiv, NULL); msm_otg_put_transceiver(mhcd->xceiv); iounmap(hcd->regs); usb_put_hcd(hcd); retval = msm_xusb_rpc_close(mhcd); clk_put(mhcd->clk); clk_put(mhcd->pclk); wake_lock_destroy(&mhcd->wlock); pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, pdev->dev.bus_id); return retval; }
static int lcdc_remove(struct platform_device *pdev) { pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ , "lcdc"); return 0; }
void release_axi_qos(void) { pm_qos_remove_requirement(PM_QOS_SYSTEM_BUS_FREQ, MSM_AXI_QOS_NAME); }