Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755387AbcCOG7w (ORCPT ); Tue, 15 Mar 2016 02:59:52 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:11918 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754843AbcCOG7o convert rfc822-to-8bit (ORCPT ); Tue, 15 Mar 2016 02:59:44 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Mon, 14 Mar 2016 23:58:57 -0700 Message-ID: <56E7B2E8.8070100@nvidia.com> Date: Tue, 15 Mar 2016 14:59:52 +0800 From: Wei Ni User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Eduardo Valentin CC: , , , , , , , Subject: Re: [PATCH V7 05/12] thermal: tegra: add Tegra210 specific SOC_THERM driver References: <1457665825-29837-1-git-send-email-wni@nvidia.com> <20160314185739.GA1872@localhost.localdomain> In-Reply-To: <20160314185739.GA1872@localhost.localdomain> X-Originating-IP: [10.19.224.146] X-ClientProxiedBy: DRBGMAIL104.nvidia.com (10.18.16.23) To HKMAIL101.nvidia.com (10.18.16.10) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4203 Lines: 111 On 2016年03月15日 02:57, Eduardo Valentin wrote: > * PGP Signed by an unknown key > > On Fri, Mar 11, 2016 at 11:10:25AM +0800, Wei Ni wrote: >> Add Tegra210 specific SOC_THERM driver. >> >> Signed-off-by: Wei Ni >> --- >> drivers/thermal/tegra/Makefile | 1 + >> drivers/thermal/tegra/soctherm-fuse.c | 11 ++ >> drivers/thermal/tegra/soctherm.c | 6 ++ >> drivers/thermal/tegra/soctherm.h | 4 + >> drivers/thermal/tegra/tegra210-soctherm.c | 173 ++++++++++++++++++++++++++++++ > > No Kconfig change? Yes, we doesn't need Kconfig change. As discussed with Thierry in [V1,03/10] thermal: tegra: split tegra_soctherm driver, he said: "I'd like to do this differently to reduce the number of Kconfig symbols. The alternate proposal would be for the TEGRA_SOCTHERM symbol to remain as it is and then build in driver support depending on the selected ARCH_TEGRA_*_SOC options." So we only have "config TEGRA_SOCTHERM" in the Kconfig, and in Makefile, we add tegra-soctherm-$(CONFIG_ARCH_TEGRA_124_SOC) += tegra124-soctherm.o tegra-soctherm-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-soctherm.o > >> 5 files changed, 195 insertions(+) >> create mode 100644 drivers/thermal/tegra/tegra210-soctherm.c >> >> diff --git a/drivers/thermal/tegra/Makefile b/drivers/thermal/tegra/Makefile >> index d5fb15377b97..bf9e028eba28 100644 >> --- a/drivers/thermal/tegra/Makefile >> +++ b/drivers/thermal/tegra/Makefile >> @@ -2,3 +2,4 @@ obj-$(CONFIG_TEGRA_SOCTHERM) += tegra-soctherm.o >> >> tegra-soctherm-y := soctherm.o soctherm-fuse.o >> tegra-soctherm-$(CONFIG_ARCH_TEGRA_124_SOC) += tegra124-soctherm.o >> +tegra-soctherm-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210-soctherm.o >> diff --git a/drivers/thermal/tegra/soctherm-fuse.c b/drivers/thermal/tegra/soctherm-fuse.c >> index 931c299ab0e8..29963180c453 100644 >> --- a/drivers/thermal/tegra/soctherm-fuse.c >> +++ b/drivers/thermal/tegra/soctherm-fuse.c >> @@ -28,7 +28,18 @@ >> #define FUSE_TSENSOR_COMMON 0x180 >> >> /* >> + * Tegra210: Layout of bits in FUSE_TSENSOR_COMMON: >> + * 3 2 1 0 >> + * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 >> + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >> + * | BASE_FT | BASE_CP | SHFT_FT | SHIFT_CP | >> + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >> + * >> * Tegra12x, etc: >> + * In chips prior to Tegra210, this fuse was incorrectly sized as 26 bits, >> + * and didn't hold SHIFT_CP in [31:26]. Therefore these missing six bits >> + * were obtained via the FUSE_SPARE_REALIGNMENT_REG register [5:0]. >> + * >> * FUSE_TSENSOR_COMMON: >> * 3 2 1 0 >> * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 >> diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c >> index f56e5a11384e..52a33760e8e8 100644 >> --- a/drivers/thermal/tegra/soctherm.c >> +++ b/drivers/thermal/tegra/soctherm.c >> @@ -147,6 +147,12 @@ static const struct of_device_id tegra_soctherm_of_match[] = { >> .data = &tegra124_soctherm, >> }, >> #endif >> +#ifdef CONFIG_ARCH_TEGRA_210_SOC >> + { >> + .compatible = "nvidia,tegra210-soctherm", >> + .data = &tegra210_soctherm, >> + }, >> +#endif >> { }, >> }; >> MODULE_DEVICE_TABLE(of, tegra_soctherm_of_match); >> diff --git a/drivers/thermal/tegra/soctherm.h b/drivers/thermal/tegra/soctherm.h >> index f80ee1492ddb..69d317269af1 100644 >> --- a/drivers/thermal/tegra/soctherm.h >> +++ b/drivers/thermal/tegra/soctherm.h >> @@ -106,5 +106,9 @@ int tegra_calc_tsensor_calib(const struct tegra_tsensor *sensor, >> extern const struct tegra_soctherm_soc tegra124_soctherm; >> #endif >> >> +#ifdef CONFIG_ARCH_TEGRA_210_SOC >> +extern const struct tegra_soctherm_soc tegra210_soctherm; >> +#endif > > Is CONFIG_ARCH_TEGRA_210_SOC going to be tristate? > > If only bool, do you need to make the symbol extern? This config is the bool, it already defined in: drivers/soc/tegra/Kconfig > >> -- >> 1.9.1 >> > > * Unknown Key > * 0x7DA4E256 >