From c2f7dac8067b14e03401b0825d24aad98eececc1 Mon Sep 17 00:00:00 2001 From: Chun Xu Date: Wed, 27 Dec 2017 03:20:05 -0800 Subject: [PATCH] misc: tegra-cec: add T194 CEC device Bug 2039509 Bug 200375853 Change-Id: Iebe1956a94cbf0209b11ad8c66d8fc5b7335549a Signed-off-by: Chun Xu Reviewed-on: https://git-master.nvidia.com/r/1641039 Reviewed-by: svc-mobile-coverity Reviewed-by: Naveen Kumar S GVS: Gerrit_Virtual_Submit Reviewed-by: Mitch Luban Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/misc/tegra-cec/tegra_cec.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/misc/tegra-cec/tegra_cec.c b/drivers/misc/tegra-cec/tegra_cec.c index bdad073f..442568f3 100644 --- a/drivers/misc/tegra-cec/tegra_cec.c +++ b/drivers/misc/tegra-cec/tegra_cec.c @@ -1,7 +1,7 @@ /* * 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 * under the terms and conditions of the GNU General Public License, @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -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); if (res) { - dev_warn(cec->dev, "Can't find physical addresse.\n"); + dev_notice(cec->dev, "Can't find physical addresse.\n"); return res; } @@ -739,9 +740,19 @@ static struct tegra_cec_soc tegra186_soc_data = { .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[] = { { .compatible = "nvidia,tegra210-cec", .data = &tegra210_soc_data }, { .compatible = "nvidia,tegra186-cec", .data = &tegra186_soc_data }, + { .compatible = "nvidia,tegra194-cec", .data = &tegra194_soc_data }, {}, };