qcom-ctrl.c (415d2b3392d7a80903e0f97f051201aa02bf20e9) | qcom-ctrl.c (d003c346bf75f01d240c80000baf2fbf28e53782) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2011-2017, The Linux Foundation 4 */ 5 6#include <linux/irq.h> 7#include <linux/kernel.h> 8#include <linux/init.h> --- 640 unchanged lines hidden (view full) --- 649 650/* 651 * If PM_RUNTIME is not defined, these 2 functions become helper 652 * functions to be called from system suspend/resume. 653 */ 654#ifdef CONFIG_PM 655static int qcom_slim_runtime_suspend(struct device *device) 656{ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2011-2017, The Linux Foundation 4 */ 5 6#include <linux/irq.h> 7#include <linux/kernel.h> 8#include <linux/init.h> --- 640 unchanged lines hidden (view full) --- 649 650/* 651 * If PM_RUNTIME is not defined, these 2 functions become helper 652 * functions to be called from system suspend/resume. 653 */ 654#ifdef CONFIG_PM 655static int qcom_slim_runtime_suspend(struct device *device) 656{ |
657 struct platform_device *pdev = to_platform_device(device); 658 struct qcom_slim_ctrl *ctrl = platform_get_drvdata(pdev); | 657 struct qcom_slim_ctrl *ctrl = dev_get_drvdata(device); |
659 int ret; 660 661 dev_dbg(device, "pm_runtime: suspending...\n"); 662 ret = slim_ctrl_clk_pause(&ctrl->ctrl, false, SLIM_CLK_UNSPECIFIED); 663 if (ret) { 664 dev_err(device, "clk pause not entered:%d", ret); 665 } else { 666 disable_irq(ctrl->irq); 667 clk_disable_unprepare(ctrl->hclk); 668 clk_disable_unprepare(ctrl->rclk); 669 } 670 return ret; 671} 672 673static int qcom_slim_runtime_resume(struct device *device) 674{ | 658 int ret; 659 660 dev_dbg(device, "pm_runtime: suspending...\n"); 661 ret = slim_ctrl_clk_pause(&ctrl->ctrl, false, SLIM_CLK_UNSPECIFIED); 662 if (ret) { 663 dev_err(device, "clk pause not entered:%d", ret); 664 } else { 665 disable_irq(ctrl->irq); 666 clk_disable_unprepare(ctrl->hclk); 667 clk_disable_unprepare(ctrl->rclk); 668 } 669 return ret; 670} 671 672static int qcom_slim_runtime_resume(struct device *device) 673{ |
675 struct platform_device *pdev = to_platform_device(device); 676 struct qcom_slim_ctrl *ctrl = platform_get_drvdata(pdev); | 674 struct qcom_slim_ctrl *ctrl = dev_get_drvdata(device); |
677 int ret = 0; 678 679 dev_dbg(device, "pm_runtime: resuming...\n"); 680 ret = slim_ctrl_clk_pause(&ctrl->ctrl, true, 0); 681 if (ret) 682 dev_err(device, "clk pause not exited:%d", ret); 683 return ret; 684} --- 62 unchanged lines hidden --- | 675 int ret = 0; 676 677 dev_dbg(device, "pm_runtime: resuming...\n"); 678 ret = slim_ctrl_clk_pause(&ctrl->ctrl, true, 0); 679 if (ret) 680 dev_err(device, "clk pause not exited:%d", ret); 681 return ret; 682} --- 62 unchanged lines hidden --- |