From patchwork Fri Jul 19 12:08:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Majewski X-Patchwork-Id: 13737251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7D54C3DA59 for ; Fri, 19 Jul 2024 12:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: Content-Transfer-Encoding:MIME-Version:In-Reply-To:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vpkrpEnmEeMaFik8gd0x3hxK8VWARpcSqM6nm7oQyaU=; b=G5WRaX3Knu+cQgYZEg/NSolyBC K2jwUfroYd7ykw6lPBt2JvcTM1CV2WcmQVaJbMFRBg9eXRb21EakyzGqOuAvs31nxLIdhYGSLXZzT 6UTyK+AuZsZzM5SNdhw3/0PVk8t4biMgwAMVo6qQ5tjJMXZ66li2j/oiaMudpD1gX8ZJseBtf1ftL C+6bo2yg6BNAgY3LiEMavJseZcjniFsDegnLXurjviMhReIhLPU77XxWdwgj3tdMC0/wz6ZfmgDIe FIgiDxqJ0P3tn3sTll8g+RhRKH+8fNhXLmro4UwfYyhDzdCIU7VfDL5VsjiyOeOTz4i46U3xnv1g5 llOMZFwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUmSB-00000002b52-1vLl; Fri, 19 Jul 2024 12:11:15 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sUmQo-00000002aZQ-2L1R for linux-arm-kernel@lists.infradead.org; Fri, 19 Jul 2024 12:09:54 +0000 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240719120946euoutp0205ebd08a4a645f9692e2fe1bc823fb6b~jm-tscQVk2292422924euoutp02l for ; Fri, 19 Jul 2024 12:09:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240719120946euoutp0205ebd08a4a645f9692e2fe1bc823fb6b~jm-tscQVk2292422924euoutp02l DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1721390986; bh=vpkrpEnmEeMaFik8gd0x3hxK8VWARpcSqM6nm7oQyaU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HwT/Vo2Sf0IHxfOTEFdTRWS/L0yO3pFwJNK25KQzEL/YrHQL8WMvM5TXzJgvXF2Yj QuX64y7gCjFV9P21kH9GwEzLBBFIjzfnRXVZI0PgqrLA4+CLWlSmewVPu6n/sT/FHm Ciksv6WaQnCHFiMRNun8PEH0sicVepma7hwtqhz4= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20240719120946eucas1p19396f95d8fa006fb7ce82e03381a58f8~jm-tT4Skv2886728867eucas1p1N; Fri, 19 Jul 2024 12:09:46 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 87.81.09620.A875A966; Fri, 19 Jul 2024 13:09:46 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240719120945eucas1p16058905c95c92840679831ae3383a67a~jm-s7QLFA0450904509eucas1p1h; Fri, 19 Jul 2024 12:09:45 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240719120945eusmtrp10f6e5e1aa5c8885eb92426bc84ed2ea5~jm-s6V9rd0596405964eusmtrp1Y; Fri, 19 Jul 2024 12:09:45 +0000 (GMT) X-AuditID: cbfec7f5-d31ff70000002594-fc-669a578a9c8c Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 83.EF.09010.9875A966; Fri, 19 Jul 2024 13:09:45 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240719120945eusmtip1cb678cde0b3c8309247f1c6180a476c6~jm-sEoZ0r1464214642eusmtip1K; Fri, 19 Jul 2024 12:09:44 +0000 (GMT) From: Mateusz Majewski To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Mateusz Majewski , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Conor Dooley , Alim Akhtar Subject: [PATCH 2/6] drivers/thermal/exynos: use tmu_temp_mask consistently Date: Fri, 19 Jul 2024 14:08:46 +0200 Message-ID: <20240719120853.1924771-3-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240719120853.1924771-1-m.majewski2@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCKsWRmVeSWpSXmKPExsWy7djP87pd4bPSDGb/5bN4MG8bm8X3LdeZ LNbsPcdkMe+zrMX8I+dYLc6f38BusenxNVaLy7vmsFl87j3CaDHj/D4mi4VNLewWE49NZraY +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 20240719120945eucas1p16058905c95c92840679831ae3383a67a X-Msg-Generator: CA X-RootMTR: 20240719120945eucas1p16058905c95c92840679831ae3383a67a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240719120945eucas1p16058905c95c92840679831ae3383a67a References: <20240719120853.1924771-1-m.majewski2@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240719_050951_270907_3B856E79 X-CRM114-Status: GOOD ( 13.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some of the usages in sanitize_temp_error were missed, probably because the boards being used never actually exceeded 255 in their trimming information. This is needed for Exynos 850 support, which uses 9-bit temperature codes. Signed-off-by: Mateusz Majewski --- drivers/thermal/samsung/exynos_tmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 9b7ca93a72f1..61606a9b9a00 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -237,17 +237,17 @@ static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info) data->temp_error1 = trim_info & tmu_temp_mask; data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK); + tmu_temp_mask); if (!data->temp_error1 || (data->min_efuse_value > data->temp_error1) || (data->temp_error1 > data->max_efuse_value)) - data->temp_error1 = data->efuse_value & EXYNOS_TMU_TEMP_MASK; + data->temp_error1 = data->efuse_value & tmu_temp_mask; if (!data->temp_error2) data->temp_error2 = (data->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK; + tmu_temp_mask; } static int exynos_tmu_initialize(struct platform_device *pdev)