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: 813510 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E93912FB31 for ; Fri, 19 Jul 2024 12:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721390997; cv=none; b=fDbvCSaOBZPHJJMGh9WPDzWIJpfmgqj7Gc+BguZ79CwnH9T6mKQzF6d+4V+crIJ/1fMXgRh8m3nRDEvYFcbvSPt+SihGqViL70cRnIMyE737psGB47sICDZV0OtbL4WG42KPpciL0Wzf8ga42fQZ9ySswVP6KOUdtmHX+/iM7gA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721390997; c=relaxed/simple; bh=BFN3rmh75N5S4hD0Ue1CL+TfLuFH4oAujI9DOxMtYv8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=CaxvRTdxv413XvnsyWd1MooUWykYgG/IPnwqgnGpqsbmS78psHYoJ+WWh2TfoR829JRn230mzfRZJgs7hphhGh4q0uv7tJ53CWOqsb4cxRsiZtdggkKRSzRv7pLAXRymWlLu92deLGcM95Kx7yYCVi5+23vGzNUxjTPRbZq6Yn4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=HwT/Vo2S; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="HwT/Vo2S" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240719120946euoutp013562c6009b8b4ebc1c4558e62301855d~jm-tvye2k1221712217euoutp01W for ; Fri, 19 Jul 2024 12:09:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240719120946euoutp013562c6009b8b4ebc1c4558e62301855d~jm-tvye2k1221712217euoutp01W 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> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCKsWRmVeSWpSXmKPExsWy7djP87pd4bPSDGb/5bN4MG8bm8X3LdeZ LNbsPcdkMe+zrMX8I+dYLc6f38BusenxNVaLy7vmsFl87j3CaDHj/D4mi4VNLewWE49N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MailID: 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> 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)