void nvhost_module_deinit(struct nvhost_module *mod) { int i; nvhost_module_suspend(mod); for (i = 0; i < mod->num_clks; i++) clk_put(mod->clk[i]); }
static int nvhost_suspend(struct nvhost_device *dev, pm_message_t state) { struct nvhost_master *host = nvhost_get_drvdata(dev); int ret = 0; ret = nvhost_module_suspend(host->dev); dev_info(&dev->dev, "suspend status: %d\n", ret); return ret; }
static int nvhost_suspend(struct platform_device *pdev, pm_message_t state) { struct nvhost_master *host = platform_get_drvdata(pdev); int i, ret; dev_info(&pdev->dev, "suspending\n"); for (i = 0; i < host->nb_channels; i++) { ret = nvhost_channel_suspend(&host->channels[i]); if (ret) return ret; } ret = nvhost_module_suspend(&host->mod, true); dev_info(&pdev->dev, "suspend status: %d\n", ret); return ret; }