mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
drivers: cec: add T186 support for cec
Bug 200148417 Change-Id: I4a57303097c0687c903f284504df10930924f1ae Signed-off-by: Mitch Luban <mluban@nvidia.com> Reviewed-on: http://git-master/r/840657 Reviewed-on: http://git-master/r/1164148 (cherry picked from commit be0d9f8be8a19525c2e4794d08f0932bc53128ee)
This commit is contained in:
committed by
Prafull Suryawanshi
parent
42e7733cc7
commit
ec2330c577
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* drivers/misc/tegra-cec/tegra_cec.c
|
* drivers/misc/tegra-cec/tegra_cec.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012-2015, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2012-2016, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
@@ -419,6 +419,9 @@ static int tegra_cec_probe(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
struct tegra_cec *cec;
|
struct tegra_cec *cec;
|
||||||
struct resource *res;
|
struct resource *res;
|
||||||
|
#if defined(CONFIG_TEGRA_DISPLAY)
|
||||||
|
struct device_node *np = pdev->dev->of_node;
|
||||||
|
#endif
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
cec = devm_kzalloc(&pdev->dev, sizeof(struct tegra_cec), GFP_KERNEL);
|
cec = devm_kzalloc(&pdev->dev, sizeof(struct tegra_cec), GFP_KERNEL);
|
||||||
@@ -467,7 +470,12 @@ static int tegra_cec_probe(struct platform_device *pdev)
|
|||||||
atomic_set(&cec->init_done, 0);
|
atomic_set(&cec->init_done, 0);
|
||||||
mutex_init(&cec->tx_lock);
|
mutex_init(&cec->tx_lock);
|
||||||
|
|
||||||
|
#if defined(CONFIG_TEGRA_DISPLAY)
|
||||||
|
if (np)
|
||||||
|
cec->clk = of_clk_get_by_name(np, "cec");
|
||||||
|
#else
|
||||||
cec->clk = clk_get(&pdev->dev, "cec");
|
cec->clk = clk_get(&pdev->dev, "cec");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (IS_ERR_OR_NULL(cec->clk)) {
|
if (IS_ERR_OR_NULL(cec->clk)) {
|
||||||
dev_err(&pdev->dev, "can't get clock for CEC\n");
|
dev_err(&pdev->dev, "can't get clock for CEC\n");
|
||||||
@@ -475,7 +483,7 @@ static int tegra_cec_probe(struct platform_device *pdev)
|
|||||||
goto clk_error;
|
goto clk_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
clk_enable(cec->clk);
|
clk_prepare_enable(cec->clk);
|
||||||
|
|
||||||
/* set context info. */
|
/* set context info. */
|
||||||
cec->dev = &pdev->dev;
|
cec->dev = &pdev->dev;
|
||||||
@@ -586,6 +594,7 @@ static struct of_device_id tegra_cec_of_match[] = {
|
|||||||
{ .compatible = "nvidia,tegra114-cec", },
|
{ .compatible = "nvidia,tegra114-cec", },
|
||||||
{ .compatible = "nvidia,tegra124-cec", },
|
{ .compatible = "nvidia,tegra124-cec", },
|
||||||
{ .compatible = "nvidia,tegra210-cec", },
|
{ .compatible = "nvidia,tegra210-cec", },
|
||||||
|
{ .compatible = "nvidia,tegra186-cec", },
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user