misc: tegra-cec: add T194 CEC device

Bug 2039509
Bug 200375853

Change-Id: Iebe1956a94cbf0209b11ad8c66d8fc5b7335549a
Signed-off-by: Chun Xu <chunx@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1641039
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Chun Xu
2017-12-27 03:20:05 -08:00
committed by Jon Hunter
parent 56a1728ed5
commit c2f7dac806

View File

@@ -1,7 +1,7 @@
/* /*
* drivers/misc/tegra-cec/tegra_cec.c * drivers/misc/tegra-cec/tegra_cec.c
* *
* Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2012-2018, 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,
@@ -32,6 +32,7 @@
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/version.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
@@ -350,7 +351,7 @@ static int tegra_cec_send_one_touch_play(struct tegra_cec *cec)
res = tegra_dc_get_source_physical_address(phy_address); res = tegra_dc_get_source_physical_address(phy_address);
if (res) { if (res) {
dev_warn(cec->dev, "Can't find physical addresse.\n"); dev_notice(cec->dev, "Can't find physical addresse.\n");
return res; return res;
} }
@@ -739,9 +740,19 @@ static struct tegra_cec_soc tegra186_soc_data = {
.powergate_id = TEGRA186_POWER_DOMAIN_DISP, .powergate_id = TEGRA186_POWER_DOMAIN_DISP,
}; };
static struct tegra_cec_soc tegra194_soc_data = {
// temporary WAR to get 4.4 builds working
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
.powergate_id = TEGRA186_POWER_DOMAIN_DISP,
#else
.powergate_id = TEGRA194_POWER_DOMAIN_DISP,
#endif
};
static struct of_device_id tegra_cec_of_match[] = { static struct of_device_id tegra_cec_of_match[] = {
{ .compatible = "nvidia,tegra210-cec", .data = &tegra210_soc_data }, { .compatible = "nvidia,tegra210-cec", .data = &tegra210_soc_data },
{ .compatible = "nvidia,tegra186-cec", .data = &tegra186_soc_data }, { .compatible = "nvidia,tegra186-cec", .data = &tegra186_soc_data },
{ .compatible = "nvidia,tegra194-cec", .data = &tegra194_soc_data },
{}, {},
}; };