mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
misc: tegra-cec: fix power domains API for cec
use generic APIs tegra_unpowergate_partition() and tegra_powergate_partition() to unpowergate DISP power domain needed for CEC without enabling disp clocks so that display pll clocks are disabled in idle state even though DISP partition is awake. Bug 1810989 Change-Id: I37428b9012729a4458724314732f80a571057fd6 Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com> Reviewed-on: http://git-master/r/1317241 (cherry picked from commit dffb3d3b5fb67cb6920fdbfc72cd3d6c37f0061c)
This commit is contained in:
committed by
Jon Hunter
parent
5eb6b0d864
commit
9b22ee78d3
@@ -41,7 +41,6 @@
|
|||||||
#include <soc/tegra/tegra_powergate.h>
|
#include <soc/tegra/tegra_powergate.h>
|
||||||
#include "tegra_cec.h"
|
#include "tegra_cec.h"
|
||||||
|
|
||||||
#include "../../../../display/drivers/video/tegra/dc/dc_priv.h"
|
|
||||||
#include "../../../../display/drivers/video/tegra/dc/dc.h"
|
#include "../../../../display/drivers/video/tegra/dc/dc.h"
|
||||||
|
|
||||||
#define LOGICAL_ADDRESS_RESERVED2 0xD
|
#define LOGICAL_ADDRESS_RESERVED2 0xD
|
||||||
@@ -563,7 +562,7 @@ static int tegra_cec_probe(struct platform_device *pdev)
|
|||||||
mutex_init(&cec->recovery_lock);
|
mutex_init(&cec->recovery_lock);
|
||||||
|
|
||||||
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
||||||
ret = tegra_nvdisp_unpowergate_partition(cec->soc->powergate_id);
|
ret = tegra_unpowergate_partition(cec->soc->powergate_id);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "Fail to unpowergate DISP: %d.\n", ret);
|
dev_err(&pdev->dev, "Fail to unpowergate DISP: %d.\n", ret);
|
||||||
goto clk_error;
|
goto clk_error;
|
||||||
@@ -653,7 +652,7 @@ cec_error:
|
|||||||
clk_disable(cec->clk);
|
clk_disable(cec->clk);
|
||||||
clk_put(cec->clk);
|
clk_put(cec->clk);
|
||||||
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
||||||
tegra_nvdisp_powergate_partition(cec->soc->powergate_id);
|
tegra_powergate_partition(cec->soc->powergate_id);
|
||||||
#endif
|
#endif
|
||||||
clk_error:
|
clk_error:
|
||||||
return ret;
|
return ret;
|
||||||
@@ -666,7 +665,7 @@ static int tegra_cec_remove(struct platform_device *pdev)
|
|||||||
clk_disable(cec->clk);
|
clk_disable(cec->clk);
|
||||||
clk_put(cec->clk);
|
clk_put(cec->clk);
|
||||||
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
||||||
tegra_nvdisp_powergate_partition(cec->soc->powergate_id);
|
tegra_powergate_partition(cec->soc->powergate_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
misc_deregister(&cec->misc_dev);
|
misc_deregister(&cec->misc_dev);
|
||||||
@@ -693,7 +692,7 @@ static int tegra_cec_suspend(struct platform_device *pdev, pm_message_t state)
|
|||||||
|
|
||||||
clk_disable(cec->clk);
|
clk_disable(cec->clk);
|
||||||
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
||||||
tegra_nvdisp_powergate_partition(cec->soc->powergate_id);
|
tegra_powergate_partition(cec->soc->powergate_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dev_notice(&pdev->dev, "suspended\n");
|
dev_notice(&pdev->dev, "suspended\n");
|
||||||
@@ -707,7 +706,7 @@ static int tegra_cec_resume(struct platform_device *pdev)
|
|||||||
dev_notice(&pdev->dev, "Resuming\n");
|
dev_notice(&pdev->dev, "Resuming\n");
|
||||||
|
|
||||||
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
#if defined(CONFIG_TEGRA_NVDISPLAY) && defined(CONFIG_TEGRA_POWERGATE)
|
||||||
tegra_nvdisp_unpowergate_partition(cec->soc->powergate_id);
|
tegra_unpowergate_partition(cec->soc->powergate_id);
|
||||||
#endif
|
#endif
|
||||||
clk_enable(cec->clk);
|
clk_enable(cec->clk);
|
||||||
schedule_work(&cec->work);
|
schedule_work(&cec->work);
|
||||||
|
|||||||
Reference in New Issue
Block a user