From nobody Thu Nov 14 04:00:29 2024 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 45644187547 for ; Wed, 11 Sep 2024 12:11: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=1726056717; cv=none; b=NJ7uU4xWtcosLb1gl4zZVMX3gNKIz7tPU2DIagphk57JmbPlJliXRpEbHbLtTfR8sHsVgaHiKaNl5fgT0OFnLRyUfPiTdzcPodmng9JVdI/Rhz8CWxJ5lfvFOAmv45TlvzXbrQG6IHPLWpt8Bfpx1Z+7sgyEuZB2ZMMjRTBRFmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056717; c=relaxed/simple; bh=hwopkNPUqoevD6Cga6bxVg0ViqRZN33dDe39k+TX+PI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=lUz2n4w+Xt+QZqXAve1/99K4B143kZWAmRyuF6kdIYf57e5YXyr5NkiM4wF0x4ZuBn8oKPN1OyXLdUXEwbAcBfZJSftDETeO0/9kyFpXp7P4M5s6FYACbUGjCPf9JeBW5idhJJBZh7hCAZ+GE9z+NMINVqdwXTrids6VH20pnoI= 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=d7HMvBtx; 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="d7HMvBtx" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121153euoutp015fa52e6dbcc547f39ef762fa513a2aaf~0L2_cezqx0990009900euoutp013 for ; Wed, 11 Sep 2024 12:11:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240911121153euoutp015fa52e6dbcc547f39ef762fa513a2aaf~0L2_cezqx0990009900euoutp013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056713; bh=0qS1OvBnHT+CBCcVEJwR8UDgglfjE/IHE9VpcHMT5q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d7HMvBtxIcZ3C+y3lLcfV/va2lV7cZdWaTnDlXu+CAwnJhvZ8uYhqcszX8rzG72KD XyquQ2EC5i8+BjqGL3vDnz92dDr1tWGq+oWKigfsTQ4nllYsXkT8vFSoDTNi5j1tIT mcnL0rTWHYXinyNeZdnqK1WqBuNOMP2V3xqTEsLQ= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240911121153eucas1p2761935111876fbc6971ecfcbedd26222~0L29635n41736617366eucas1p2x; Wed, 11 Sep 2024 12:11:53 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id F3.D1.09624.80981E66; Wed, 11 Sep 2024 13:11:52 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240911121152eucas1p113445ce1ce6b6bd9c8f96322604bf517~0L29bZq2r1386613866eucas1p1o; Wed, 11 Sep 2024 12:11:52 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121152eusmtrp299c699f697c3da3f8e1f2ee01298cafd~0L29aaIrr2708727087eusmtrp2g; Wed, 11 Sep 2024 12:11:52 +0000 (GMT) X-AuditID: cbfec7f2-c11ff70000002598-91-66e18908d101 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 1A.4D.19096.80981E66; Wed, 11 Sep 2024 13:11:52 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121151eusmtip1b27d9ec62e0b7c209798e6802c626127~0L28gF1KN0847908479eusmtip1h; Wed, 11 Sep 2024 12:11:51 +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 , Sam Protsenko , Anand Moon , Marek Szyprowski Subject: [PATCH v4 1/7] drivers/thermal/exynos: use DEFINE_SIMPLE_DEV_PM_OPS Date: Wed, 11 Sep 2024 14:11:24 +0200 Message-ID: <20240911121136.1120026-2-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMKsWRmVeSWpSXmKPExsWy7djPc7ocnQ/TDBbdsLR4MG8bm8X3LdeZ LNbsPcdkMe+zrMX8I+dYLc6f38BusenxNVaLy7vmsFl87j3CaDHj/D4mi3Ubb7FbLGxqYbeY eGwys8XaI3fZLeZ+m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Sg0 Zn2ZosRSnJFoqMVcVJwIACaeMpxYAwAA X-CMS-MailID: 20240911121152eucas1p113445ce1ce6b6bd9c8f96322604bf517 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240911121152eucas1p113445ce1ce6b6bd9c8f96322604bf517 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121152eucas1p113445ce1ce6b6bd9c8f96322604bf517 References: <20240911121136.1120026-1-m.majewski2@samsung.com> SIMPLE_DEV_PM_OPS is deprecated, as noted next to its definition. Signed-off-by: Mateusz Majewski Reviewed-by: Sam Protsenko --- drivers/thermal/samsung/exynos_tmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung= /exynos_tmu.c index 96cffb2c44ba..9b7ca93a72f1 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1150,8 +1150,8 @@ static int exynos_tmu_resume(struct device *dev) return 0; } =20 -static SIMPLE_DEV_PM_OPS(exynos_tmu_pm, - exynos_tmu_suspend, exynos_tmu_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(exynos_tmu_pm, + exynos_tmu_suspend, exynos_tmu_resume); #define EXYNOS_TMU_PM (&exynos_tmu_pm) #else #define EXYNOS_TMU_PM NULL --=20 2.45.2 From nobody Thu Nov 14 04:00:29 2024 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 628D6188A06 for ; Wed, 11 Sep 2024 12:11:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056718; cv=none; b=sCyGZ/ANne06I6BOi77xYuDT5/nKdQviKXrLw+ZUNfG5vJaEEBCvJJU3Tj7QKSFIVEV2SWxsCUlsEKXzX3pQhIgOWoXgSYvhOm/CU6d5L4qvUDVH6Rq/qTTmSIck0lDOXZpLDn6e5ngwjtkCfXFIZXDPMZwDgRF9rwlDMQ7K8zs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056718; c=relaxed/simple; bh=FEDEmbpAYmPOuuRo+RlDglGdJcWvHkw84rfZyKXuWo0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=sq/uGZ879oedAFKkxAyr2G/v56oDgXnXLid0pMq76Mnh1veIFwL8lPDYrd/Z+YCcR6eOWc24ukcK8f5uPMheJYZcH17XVsEGyde302/gyjGqUtvCv3JH5yuu/w0sMd13liEoCB0QtiilzkBI/ENFyGxIeq/ww5xl248lV6XE8dE= 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=GIwkwKp/; arc=none smtp.client-ip=210.118.77.12 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="GIwkwKp/" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121154euoutp02944dc6339492e4b65a127d5828c5c1de~0L2-rgzWj3264732647euoutp02f for ; Wed, 11 Sep 2024 12:11:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240911121154euoutp02944dc6339492e4b65a127d5828c5c1de~0L2-rgzWj3264732647euoutp02f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056714; bh=nvjwVOd+W/1Fy0GOMSwgEOErF159CdYtI3kdur0Gf6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GIwkwKp/OZGhVNI+2PDPIYRSOA1k/TD/DTxp8uDzG7tVeQql2Np8gd7Z+QzqKRnhs 6ux1Z9Pf6JHsKSispYTpN+kA5HYebJtJDX+EK/UUOmCJHUSwnC9t3IlhnQdlzbjfBt wOM4jYv89zRV+cw204xfOKL/RA5HjiU8Bnx4YsXo= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240911121154eucas1p2552975738977fa101ffa3a3c06d5579a~0L2_8pLtA1732517325eucas1p2r; Wed, 11 Sep 2024 12:11:54 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id B0.61.09875.90981E66; Wed, 11 Sep 2024 13:11:54 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4~0L2_Xdqg22858828588eucas1p2o; Wed, 11 Sep 2024 12:11:53 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121153eusmtrp2b14e07e38aec133391ae4431a80287ec~0L2_WRz632688526885eusmtrp2b; Wed, 11 Sep 2024 12:11:53 +0000 (GMT) X-AuditID: cbfec7f4-131ff70000002693-8f-66e18909b265 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 8B.4D.19096.90981E66; Wed, 11 Sep 2024 13:11:53 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121152eusmtip124636a6e621dbf563a9446cfc7e7ca49~0L29Ypa2P3163131631eusmtip19; Wed, 11 Sep 2024 12:11:52 +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 , Sam Protsenko , Anand Moon , Marek Szyprowski Subject: [PATCH v4 2/7] drivers/thermal/exynos: use pm_sleep_ptr instead of conditional compilation Date: Wed, 11 Sep 2024 14:11:25 +0200 Message-ID: <20240911121136.1120026-3-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCKsWRmVeSWpSXmKPExsWy7djP87pcnQ/TDHovM1k8mLeNzeL7lutM Fmv2nmOymPdZ1mL+kXOsFufPb2C32PT4GqvF5V1z2Cw+9x5htJhxfh+TxbqNt9gtFja1sFtM PDaZ2WLtkbvsFnO/TGW2+L9nB7vFk4d9bBbP+/YxOQh5rJm3htFj56y77B6L97xk8ti0qpPN 4861PWwem5fUe/RtWcXo8XmTXABHFJdNSmpOZllqkb5dAlfG2kdHmAseclUcXnyepYGxh7OL kZNDQsBEYlHnXLYuRi4OIYEVjBK/Dp+Ecr4wSvT1fWGGcD4zSiydd5sdpuVa6x+oxHJGieam SWwgCSGBViaJFQeYQGw2AQOJB2+WsYMUiQgsZpRo/PGOFcRhFpjIIrH+TTcjSJWwQKrE5uXX wMayCKhKnL3Qywxi8wrYSXx5uYsFYp28xMU1z8E2cArYS3x/vZwRokZQ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ICJxLXWP8wgtpDAUkaJ rWsMIeLSEoe/TGGHsIUl/lzrYuti5AKqaWaS+LXwHStIgk3AQOLBm2VgRSICyxklNrd7gBQx C8xlkeh8vRosISyQLPG1cy+YzSKgKnH2Qi/YNl4BO4kvL3exQGyQl7i45jkbiM0pYC/x/fVy RoiL7CQ+bjzJClEvKHFy5hOwemag+uats5knMArMQpKahSS1gJFpFaNIamlxbnpusZFecWJu cWleul5yfu4mRmB0bjv2c8sOxpWvPuodYmTiYDzEKMHBrCTC2293L02INyWxsiq1KD++qDQn tfgQoynQ3ROZpUST84HpIa8k3tDMwNTQxMzSwNTSzFhJnJftyvk0IYH0xJLU7NTUgtQimD4m Dk6pBqZdDo0JWX6ObLNvLxf+t+KWzIupd1j7+yzezL7VOimjKemUvrrdy8+hM9MlE6UbxLsb W5/lPlujmzzxraTDtexNojynuPZ4zOyf2iGW93R99T6r9P9MQff2SVsrcV345c6lKhneUKNi Lf++efGblJJ/nrvsClT2vEg8v8T+hX7H3hITD5OjT7uu7WOeMDN/W9Aci0VeIu+PBzw4rnVc zPOj4c8TuvtOnGtZfzOkm+MLg96aKlmmiqsTDHq1LsQ5ctccYzm8wvJHy2SFe+GxS8pMU/5v m7pl5oNJp16aHJh9d4niAX6hXyeluffr7BM9p/WoUa0g5YWXh+g549LaXyoLQg0/3uIpPj71 Q9HGXzxKLMUZiYZazEXFiQCKAhD+VwMAAA== X-CMS-MailID: 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4 References: <20240911121136.1120026-1-m.majewski2@samsung.com> Slightly simpler and nothing is lost if _suspend and _resume functions are built unconditionally. Suggested-by: Anand Moon Reviewed-by: Sam Protsenko Signed-off-by: Mateusz Majewski --- drivers/thermal/samsung/exynos_tmu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung= /exynos_tmu.c index 9b7ca93a72f1..b68e9755c933 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1132,7 +1132,6 @@ static void exynos_tmu_remove(struct platform_device = *pdev) clk_unprepare(data->clk_sec); } =20 -#ifdef CONFIG_PM_SLEEP static int exynos_tmu_suspend(struct device *dev) { exynos_tmu_control(to_platform_device(dev), false); @@ -1152,15 +1151,11 @@ static int exynos_tmu_resume(struct device *dev) =20 static DEFINE_SIMPLE_DEV_PM_OPS(exynos_tmu_pm, exynos_tmu_suspend, exynos_tmu_resume); -#define EXYNOS_TMU_PM (&exynos_tmu_pm) -#else -#define EXYNOS_TMU_PM NULL -#endif =20 static struct platform_driver exynos_tmu_driver =3D { .driver =3D { .name =3D "exynos-tmu", - .pm =3D EXYNOS_TMU_PM, + .pm =3D pm_sleep_ptr(&exynos_tmu_pm), .of_match_table =3D exynos_tmu_match, }, .probe =3D exynos_tmu_probe, --=20 2.45.2 From nobody Thu Nov 14 04:00:29 2024 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 79DCD18E04A for ; Wed, 11 Sep 2024 12:11:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056719; cv=none; b=SBeNceSjM4lWsIKfNiznms+9YHmq/OtJB2SXM6t8beyEN43ugiKcUpRlqnOZfbRHkqnJ2e03yADNZIPgfcHqN2ZZariA5VESPqc4b++zlj0GFntZocaHCM9LacG+wPAfOHepl2p2TZtPMYe4m/RoL56g1XQwEQeDPiK2BwqunSw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056719; c=relaxed/simple; bh=gY3sYk1R8x/s7rHhF9wyEi7cHSsdKFKDg0teFGH3L/o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=LVjBYeI7eqgF+ssC5UEo9+rJN3ENvuYZV4AXOsFQUmsEyWNiLwOSHBtfmXT117ycN7DS1pj65WTkMbrVM8G8DHBgl7P0CE0qiZRjv/bGcJVHiO+ZwzPJeU3SAkK6MsRNpeEMd9BsfBE3/lhX7XeNdnpiQNHVST0CuExp908fbIE= 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=fm0836T9; arc=none smtp.client-ip=210.118.77.12 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="fm0836T9" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121155euoutp027699c8988687fcae64ed26c3ccaf31fd~0L3Ani1Rh0127701277euoutp02L for ; Wed, 11 Sep 2024 12:11:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240911121155euoutp027699c8988687fcae64ed26c3ccaf31fd~0L3Ani1Rh0127701277euoutp02L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056715; bh=NJdZThH/4rVsf6XBL7/98lsA2ZRMGdmDLTG8epuqeXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fm0836T9VLbJbXzXgN7F87AI6oZJtGBQ022ZayU1cBU9iu8NeIN6L9Vkv2bs5TB3z u+mwoYpTwW4Le+EaZ2O6EdfNzC+R+FoB3tyqYQimj2PAty94ZxJBsWPJeYBOVxJ/p7 QmV4KRm39fLr2G5jAx9JQfn24b1vUKIGyzLKeFD0= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20240911121155eucas1p1f1fda5e90a3c7cf15e520430d0564982~0L3ADN0pR1328313283eucas1p1s; Wed, 11 Sep 2024 12:11:55 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id D2.61.09875.B0981E66; Wed, 11 Sep 2024 13:11:55 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240911121154eucas1p1a429a565c446cdd968f565df1ffae42c~0L2-fJYMn2450124501eucas1p1N; Wed, 11 Sep 2024 12:11:54 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121154eusmtrp28d359762649260d33f3c7f8a315fd71e~0L2-eCf6X2688526885eusmtrp2c; Wed, 11 Sep 2024 12:11:54 +0000 (GMT) X-AuditID: cbfec7f4-131ff70000002693-93-66e1890b802d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id DC.4D.19096.A0981E66; Wed, 11 Sep 2024 13:11:54 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121153eusmtip1f4eff36b994b8846f7538e82aadde599~0L2_jbr-E0774607746eusmtip14; Wed, 11 Sep 2024 12:11:53 +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 , Sam Protsenko , Anand Moon , Marek Szyprowski Subject: [PATCH v4 3/7] drivers/thermal/exynos: improve sanitize_temp_error Date: Wed, 11 Sep 2024 14:11:26 +0200 Message-ID: <20240911121136.1120026-4-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrEKsWRmVeSWpSXmKPExsWy7djP87rcnQ/TDH7eZrd4MG8bm8X3LdeZ LNbsPcdkMe+zrMX8I+dYLc6f38BusenxNVaLy7vmsFl87j3CaDHj/D4mi3Ubb7FbLGxqYbeY eGwys8XaI3fZLeZ+mcps8X/PDnaLJw/72Cye9+1jchDyWDNvDaPHzll32T0W73nJ5LFpVSeb x51re9g8Ni+p9+jbsorR4/MmuQCOKC6blNSczLLUIn27BK6Mo4fWMBZc0quY+Og5UwPjCbUu Rk4OCQETidefnzJ2MXJxCAmsYJR41H6OHSQhJPCFUaLzjw9E4jOjxKnv7SwwHS9vvGCDSCxn lDjy/AGU08oksevMM0aQKjYBA4kHb5axgyREBBYzSjT+eMcK4jALTGSRWP+mG6xKWMBb4ujz SawgNouAqsT9y71gO3gF7CR+/vzEBLFPXuLimudsIDangL3E99fLGSFqBCVOznwCVs8MVNO8 dTYzyAIJgfmcEu+2zgYaygHkuEisOJELMUdY4tXxLewQtozE/53zoebnS8zY/J4ForxC4u5B LwjTWuLjGWYQk1lAU2L9Ln2IYkeJyxumsUFU8EnceCsIsZ9PYtK26cwQYV6JjjY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EWcArYS3x/ vZwRYpmdxMeNJ1kh6gUlTs58AtbLDFTfvHU28wRGgVlIUrOQpBYwMq1iFEktLc5Nzy020itO zC0uzUvXS87P3cQIjM5tx35u2cG48tVHvUOMTByMhxglOJiVRHj77e6lCfGmJFZWpRblxxeV 5qQWH2I0Bbp7IrOUaHI+MD3klcQbmhmYGpqYWRqYWpoZK4nzsl05nyYkkJ5YkpqdmlqQWgTT x8TBKdXApD7zem0qA4OU9M/K7vj/su/iYi70xZzobTNN9b5p/1QpbUXoH6c/P+bJya3ODLZ2 tlUP0i/aaSEl/1KeZ4rJ/rzNz5Tq/xj+392+Ys1r60NVX09uu5WUMdF30+KvX153/LecwbzY ryXywpWevt8evSfmHTp+8l/WxnnJ1yrX26WxiZaeSgj85BciKBhwdPe0G5NDiyZUc0p0Totw uMLWwFT79aLaoj8ld7Rn7YgOXFTcVC7tEVpl9fnwthrpdX8enfKas33xe9kzF5ZEF7ew/0r9 p3FjbcF19ZaYR6/iPjH8Ddm96IFw4R3Ob2Ia1vICGx9q7uxKSotLbZrNdjT94O3zyg1SH+PM lir4WS3gUWIpzkg01GIuKk4EADuSQhZXAwAA X-CMS-MailID: 20240911121154eucas1p1a429a565c446cdd968f565df1ffae42c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240911121154eucas1p1a429a565c446cdd968f565df1ffae42c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121154eucas1p1a429a565c446cdd968f565df1ffae42c References: <20240911121136.1120026-1-m.majewski2@samsung.com> There are two minor issues regarding this function. One is that it attempts to calculate the second calibration value even if 1-point trimming is being used; in this case, the calculated value is probably not useful and is never used anyway. Changing this also requires a minor reordering in Exynos5433 initialization function, so that we know which type of trimming is used before we call sanitize_temp_error. The second issue is that the function is not very consistent when it comes to the use of Exynos7-specific parameters. This seems to not be an issue in practice, in part because some of these issues are related to the mentioned calculation of the second calibration value. However, fixing this makes the code a bit less confusing, and will be required for Exynos850 which has 9-bit temperature values and uses 2-point trimming. Signed-off-by: Mateusz Majewski --- v3 -> v4: further reworked to avoid SoC-specific code, instead using SoC-specific parameters inside of exynos_tmu_data (probably different enough to drop R-b). v1 -> v2: reworked to change shift instead of only mask and to also fix the 2-point trimming issue. drivers/thermal/samsung/exynos_tmu.c | 40 ++++++++++++++++++---------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung= /exynos_tmu.c index b68e9755c933..8b1014915c31 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -111,6 +111,7 @@ #define EXYNOS7_TMU_REG_EMUL_CON 0x160 =20 #define EXYNOS7_TMU_TEMP_MASK 0x1ff +#define EXYNOS7_TMU_TEMP_SHIFT 9 #define EXYNOS7_PD_DET_EN_SHIFT 23 #define EXYNOS7_TMU_INTEN_RISE0_SHIFT 0 #define EXYNOS7_EMUL_DATA_SHIFT 7 @@ -152,6 +153,8 @@ enum soc_type { * @max_efuse_value: maximum valid trimming data * @temp_error1: fused value of the first point trim. * @temp_error2: fused value of the second point trim. + * @temp_mask: SoC specific temperature mask + * @temp_85_shift: SoC specific address shift * @gain: gain of amplifier in the positive-TC generator block * 0 < gain <=3D 15 * @reference_voltage: reference voltage of amplifier @@ -182,6 +185,8 @@ struct exynos_tmu_data { u32 min_efuse_value; u32 max_efuse_value; u16 temp_error1, temp_error2; + u16 temp_mask; + int temp_85_shift; u8 gain; u8 reference_voltage; struct thermal_zone_device *tzd; @@ -229,25 +234,26 @@ static int code_to_temp(struct exynos_tmu_data *data,= u16 temp_code) EXYNOS_FIRST_POINT_TRIM; } =20 +/* + * Sanitize sensor calibration values, according to minimum and maximum + * values defined for each SoC. + */ static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_inf= o) { - u16 tmu_temp_mask =3D - (data->soc =3D=3D SOC_ARCH_EXYNOS7) ? EXYNOS7_TMU_TEMP_MASK - : EXYNOS_TMU_TEMP_MASK; - - data->temp_error1 =3D trim_info & tmu_temp_mask; - data->temp_error2 =3D ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK); - + data->temp_error1 =3D trim_info & data->temp_mask; if (!data->temp_error1 || (data->min_efuse_value > data->temp_error1) || (data->temp_error1 > data->max_efuse_value)) - data->temp_error1 =3D data->efuse_value & EXYNOS_TMU_TEMP_MASK; + data->temp_error1 =3D data->efuse_value & data->temp_mask; =20 - if (!data->temp_error2) - data->temp_error2 =3D - (data->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK; + if (data->cal_type =3D=3D TYPE_TWO_POINT_TRIMMING) { + data->temp_error2 =3D (trim_info >> data->temp_85_shift) & + data->temp_mask; + if (!data->temp_error2) + data->temp_error2 =3D + (data->efuse_value >> data->temp_85_shift) & + data->temp_mask; + } } =20 static int exynos_tmu_initialize(struct platform_device *pdev) @@ -510,7 +516,6 @@ static void exynos5433_tmu_initialize(struct platform_d= evice *pdev) int sensor_id, cal_type; =20 trim_info =3D readl(data->base + EXYNOS_TMU_REG_TRIMINFO); - sanitize_temp_error(data, trim_info); =20 /* Read the temperature sensor id */ sensor_id =3D (trim_info & EXYNOS5433_TRIMINFO_SENSOR_ID_MASK) @@ -532,6 +537,8 @@ static void exynos5433_tmu_initialize(struct platform_d= evice *pdev) break; } =20 + sanitize_temp_error(data, trim_info); + dev_info(&pdev->dev, "Calibration type is %d-point calibration\n", cal_type ? 2 : 1); } @@ -876,6 +883,7 @@ static int exynos_map_dt_data(struct platform_device *p= dev) data->tmu_control =3D exynos4210_tmu_control; data->tmu_read =3D exynos4210_tmu_read; data->tmu_clear_irqs =3D exynos4210_tmu_clear_irqs; + data->temp_mask =3D EXYNOS_TMU_TEMP_MASK; data->gain =3D 15; data->reference_voltage =3D 7; data->efuse_value =3D 55; @@ -898,6 +906,7 @@ static int exynos_map_dt_data(struct platform_device *p= dev) data->tmu_read =3D exynos4412_tmu_read; data->tmu_set_emulation =3D exynos4412_tmu_set_emulation; data->tmu_clear_irqs =3D exynos4210_tmu_clear_irqs; + data->temp_mask =3D EXYNOS_TMU_TEMP_MASK; data->gain =3D 8; data->reference_voltage =3D 16; data->efuse_value =3D 55; @@ -919,6 +928,8 @@ static int exynos_map_dt_data(struct platform_device *p= dev) data->tmu_read =3D exynos4412_tmu_read; data->tmu_set_emulation =3D exynos4412_tmu_set_emulation; data->tmu_clear_irqs =3D exynos4210_tmu_clear_irqs; + data->temp_mask =3D EXYNOS_TMU_TEMP_MASK; + data->temp_85_shift =3D EXYNOS_TRIMINFO_85_SHIFT; data->gain =3D 8; if (res.start =3D=3D EXYNOS5433_G3D_BASE) data->reference_voltage =3D 23; @@ -939,6 +950,7 @@ static int exynos_map_dt_data(struct platform_device *p= dev) data->tmu_read =3D exynos7_tmu_read; data->tmu_set_emulation =3D exynos4412_tmu_set_emulation; data->tmu_clear_irqs =3D exynos4210_tmu_clear_irqs; + data->temp_mask =3D EXYNOS7_TMU_TEMP_MASK; data->gain =3D 9; data->reference_voltage =3D 17; data->efuse_value =3D 75; --=20 2.45.2 From nobody Thu Nov 14 04:00:29 2024 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 DB971192D62 for ; Wed, 11 Sep 2024 12:11:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056720; cv=none; b=B5KjP42RpkVfaQVkBXp30jfy0azi5pgPRVDsq9B75lkDJa3KE9BdZuBF93trrgXlQr9YDDq8zKNBgpcka5QuwrQUKeuPkihPdwwbTjO/zICEAi2Jh1aKukchii205uhcbxH65MInnGciwBBpDS0rcV4hwr7XSAY5sTjm2UP2eIc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056720; c=relaxed/simple; bh=ozQqRLSq7IDjYDABSRGssFY6xGkaa/o/USWejNvQnV8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=acJZyxF7iI4e09ODRgHKmJKYGmH9bEaVXo8rW99zavzoUStvgVHlrzLHD4yjF0lJR6qvLV3C0in9NhvM2X+ZNnavHcxoQ8VlOvxcrjrGv58NjoAODb3uEkE7TG2CCqB67ZQ+Tha6/simaSbmZj69qMosfvLj/0uM/4bCHS0/lqM= 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=bulYgyZV; arc=none smtp.client-ip=210.118.77.12 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="bulYgyZV" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121157euoutp02f437e7d3a01500bbfe46939a1f079e06~0L3BuKwQ50204402044euoutp02i for ; Wed, 11 Sep 2024 12:11:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240911121157euoutp02f437e7d3a01500bbfe46939a1f079e06~0L3BuKwQ50204402044euoutp02i DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056717; bh=Y23/WQ9wTzL9cT2j+ezI3cB32JYq7m7BkHPWsCs5IOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bulYgyZVce1V8YvoXr78iLNm5Hg1K+qcUUX3D7xewHyjXk8ABm5y8jvAjFltKzZuC zuFjj4EIACqmJRbmN7BAMdQ2/UD583WC9+9MQDofwnUR7pN6KJo7p0asMUACfz93AF Ip0yhRjbyhlXJsSfuLn+izbE/h6jXEWLxCYyYHso= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240911121156eucas1p20fb94f4f1119dd274889d7e029d9c14c~0L3BL0Iqr2873128731eucas1p2S; Wed, 11 Sep 2024 12:11:56 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id D7.D1.09624.C0981E66; Wed, 11 Sep 2024 13:11:56 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240911121155eucas1p160223d89bff83a89a03c5447252f44a9~0L3AmQ4Yr1357913579eucas1p1s; Wed, 11 Sep 2024 12:11:55 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121155eusmtrp2d48ce6715ada201ca38692c9112d690d~0L3AlEb2u2688526885eusmtrp2e; Wed, 11 Sep 2024 12:11:55 +0000 (GMT) X-AuditID: cbfec7f2-bfbff70000002598-9e-66e1890c2e03 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 7C.E9.14621.B0981E66; Wed, 11 Sep 2024 13:11:55 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121154eusmtip1fb836354b159274484cd7bc4a3684392~0L2-cRo5h0847908479eusmtip1j; Wed, 11 Sep 2024 12:11:54 +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 , Sam Protsenko , Anand Moon , Marek Szyprowski Subject: [PATCH v4 4/7] drivers/thermal/exynos: reuse data->temp_mask in exynos_tmu_update_temp Date: Wed, 11 Sep 2024 14:11:27 +0200 Message-ID: <20240911121136.1120026-5-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCKsWRmVeSWpSXmKPExsWy7djP87o8nQ/TDK5uErN4MG8bm8X3LdeZ LNbsPcdkMe+zrMX8I+dYLc6f38BusenxNVaLy7vmsFl87j3CaDHj/D4mi3Ubb7FbLGxqYbeY eGwys8XaI3fZLeZ+mcps8X/PDnaLJw/72Cye9+1jchDyWDNvDaPHzll32T0W73nJ5LFpVSeb x51re9g8Ni+p9+jbsorR4/MmuQCOKC6blNSczLLUIn27BK6Ma2+2MxUs5Kj4P3MpcwPjB7Yu Rk4OCQETidmvdzN3MXJxCAmsYJT4f/sJK4TzhVFi68ZGRpAqIYHPjBKf1urDdMy7s48Fomg5 o8T27mdQHa1MEvN/PAPrYBMwkHjwZhk7SEJEYDGjROOPd2BVzAITWSTWv+kGqxIWSJTYfOgQ O4jNIqAq0d10CszmFbCTaHq9ihVin7zExTXPwa7lFLCX+P56OSNEjaDEyZlPWEBsZqCa5q2z wb6QEJjNKTHz5Bao91wklly9wgxhC0u8Or6FHcKWkfi/cz4ThJ0vMWPze6BBHEB2hcTdg14Q prXExzPMICazgKbE+l1Q3ztKnDx9lhmigk/ixltBiAP4JCZtmw4V5pXoaBOCqFa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er4RSwl/j+ejkjxEV2 Eh83nmSFqBeUODnzCdilzED1zVtnM09gFJiFJDULSWoBI9MqRpHU0uLc9NxiQ73ixNzi0rx0 veT83E2MwOjcduzn5h2M81591DvEyMTBeIhRgoNZSYS33+5emhBvSmJlVWpRfnxRaU5q8SFG U6C7JzJLiSbnA9NDXkm8oZmBqaGJmaWBqaWZsZI4r9vl82lCAumJJanZqakFqUUwfUwcnFIN THPMJm3JOPHbcqdl/joF6zP7X3/1jr+c7/ouTUS8O6TpaPFzl9dlVsUzw0yZFlmdXSQlIK9w /7WpXLLinfX+Lob2QhM2KoT8Kbpyr8S2SN425mX1C71T5/Qs/bTmftw7NfJuH6vgU+e66+nH 5gerTP1w/FbJtW+Xc7gzn8y4pHhxyd0WO/9VbPGW00o5FdbON/t5pcEu+Uv2natiV7fWLdfq ZK2f9v3tvsLVhkb2m1j0NJwvskbrzl5WuvS6/a+clEV6x99PXzJLX/PqIv3pk87ccU5pP/2j Ii1Lt/e8yPI5kmz6Mvfctb/96HqqHfXptabntNXzE0QjJs2rtowI3tH77Mxiu3aXpXdmFd2L X6nEUpyRaKjFXFScCADG0pz+VwMAAA== X-CMS-MailID: 20240911121155eucas1p160223d89bff83a89a03c5447252f44a9 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240911121155eucas1p160223d89bff83a89a03c5447252f44a9 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121155eucas1p160223d89bff83a89a03c5447252f44a9 References: <20240911121136.1120026-1-m.majewski2@samsung.com> Both the intention and the actual logic is identical, little point in duplicating it. Signed-off-by: Mateusz Majewski --- drivers/thermal/samsung/exynos_tmu.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung= /exynos_tmu.c index 8b1014915c31..9bddf9fd5049 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -357,15 +357,10 @@ static void exynos_tmu_update_bit(struct exynos_tmu_d= ata *data, int reg_off, static void exynos_tmu_update_temp(struct exynos_tmu_data *data, int reg_o= ff, int bit_off, u8 temp) { - u16 tmu_temp_mask; u32 th; =20 - tmu_temp_mask =3D - (data->soc =3D=3D SOC_ARCH_EXYNOS7) ? EXYNOS7_TMU_TEMP_MASK - : EXYNOS_TMU_TEMP_MASK; - th =3D readl(data->base + reg_off); - th &=3D ~(tmu_temp_mask << bit_off); + th &=3D ~(data->temp_mask << bit_off); th |=3D temp_to_code(data, temp) << bit_off; writel(th, data->base + reg_off); } --=20 2.45.2 From nobody Thu Nov 14 04:00:29 2024 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 C3F1C193431 for ; Wed, 11 Sep 2024 12:11:59 +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=1726056721; cv=none; b=oNJBXY5IjICpVDSsINxU7ctgoKjxPo0qsojMpM36WqfiYUgB/ez1WNr0vkLirs9YtNurBk6AGEh290NnZWcmofbmHd4XYJfSM1zQZxSYb8f0T336P2MRLrIhdjmdkeKftI5sBVFzVHJ00eOf/1Jm1/tMQSZDR4PGhI/cYulzhos= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056721; c=relaxed/simple; bh=QYuOvbi3yolBODIX0i/1mxP3qBTmhqEHCAIEx2DAgN8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=oWzn30Gfjdy3vDT2pO++vlgp7h9aDUQ5EevQAke6b2u43RVv2IHpxsJNzVXk52cPKhW8W6CpD4cuKLX2kx6iH5iqcj3I2QEPlXIuFZGEpCqQayFktnXqjFkVISe0SDYtePvPiBFMxaOgt1Jc+5tihsCu0h2u7N/Slq8cFZ7aGk0= 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=UVma+JWN; 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="UVma+JWN" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121158euoutp010e79bd783768f1231ec31a0f95fed1f6~0L3C7eebR0903909039euoutp01h for ; Wed, 11 Sep 2024 12:11:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240911121158euoutp010e79bd783768f1231ec31a0f95fed1f6~0L3C7eebR0903909039euoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056718; bh=a5aoA1DUV1XIYRXDrlemZ2Dc7B1rAnuJ/1tYUrMlhp4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UVma+JWNnQAA8QGUksAY4FyXIm2HMYH/n5+hcXP1eQS+tDe1Jhj0NZOzm+hmr0AzI mkNZL97GQ6yOSktlD+bZA1vYMAAIJjIcGVp5FjIUQ/BLlaUvqywOJwRZpSKU9Y4FfH 7zOOmEt1YXD1dY9cPXdgW9mK9JRJFRvF2z4CRWB0= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240911121158eucas1p282816a798880d1990c3dc3eca36930df~0L3ClV4I62862528625eucas1p25; Wed, 11 Sep 2024 12:11:58 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F4.48.09620.D0981E66; Wed, 11 Sep 2024 13:11:57 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240911121157eucas1p2a8ff398f0f30f141de974763680bb041~0L3BweUzC1735017350eucas1p2p; Wed, 11 Sep 2024 12:11:57 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121157eusmtrp2e855c8a04f0574368ccac78e19b0e260~0L3Bvnbmo2708727087eusmtrp2p; Wed, 11 Sep 2024 12:11:57 +0000 (GMT) X-AuditID: cbfec7f5-d1bff70000002594-84-66e1890d6518 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 0E.E9.14621.D0981E66; Wed, 11 Sep 2024 13:11:57 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121155eusmtip1732f687d82842f00a1e798253f9d46f6~0L3AkkBZy0956609566eusmtip1G; Wed, 11 Sep 2024 12:11:55 +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 , Sam Protsenko , Anand Moon , Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH v4 5/7] dt-bindings: thermal: samsung,exynos: add exynos850-tmu string Date: Wed, 11 Sep 2024 14:11:28 +0200 Message-ID: <20240911121136.1120026-6-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA02SfUwTZxjA9961d9eOuqOY+AxEsLa6LRvoJMsb3JgbcznIEpeYTLNk024c lY0P04ogiQHHRyzB6opIKayKqBDscJRStAOyQldkKEhYbIN2sxsb3zOkMBybY5TTzP9+z/v8 nq/kZUi5TxzJZGQf5rXZ6kwFJRU5PH8NviLTB9K3Li8m4PsWB4UX7V4CW7sGCWwJRuNz7kEx Hhr6hsZd0+00tv16R4xHnHUUDp50I2wa6iZwS+sojeu/KKHxl55KEn/t9tP4q/kqEi93XqPx WMBA4XFDN7EzgrNarIi7bvbTXEPnJMHZmvUUd+9OJ8W1XSzkDPZmxAVtG95nPpS+nsZnZhzh tfFJB6QHl3ovoEMeSX79pI8uQjfpciRhgE0Aj71ihaWMnG1C0GQyiIRgHsHfrUZSCIIIyqrO oyclZ783P040IlgYv0QJQSkBN3o7yJBFsVvh/szl1cZr2QYExx/+IQ4lSLZfBJVXUkMcwe6D +R9/W20rYlXgrRpfLZaxSeCfuiEWxsXAsHWcCrGEfRMWpxuR4IRDf82YSOgZA8XttasrAdso gYUBHyUUvwPHv5sQCRwBU332x2evh+Xr5wiBc8DU9mDFYVY4H/yuVAF3wNxNMoQk+yJcdcYL 8lvw4MxpWjDWgG82XFhgDRgd1aTwLIMTZXLBVkFfp5EUOArGSu4SgsJB/a31p9FG81OXmJ+6 xPz/2POIbEbr+FxdlobXbc/m8+J06ixdbrYm7tOcLBta+XwD//YtXENNU3NxPYhgUA8ChlSs lZ1K+ildLktTHy3gtTn7tbmZvK4HRTEixTqZKi2Gl7Ma9WH+c54/xGufZAlGEllEiAxzlNf2 WsYbPtO2+DO3ZBOjw9Xi94pc7fl1O/d5jLqG3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QamhVE6qnYH1zgsPCK123WX1DyvadtWrvpwZHdrzDeGU2cKnpdX+aoukNjv rr2mqU34+bGTXReE9QT+ie46O1s2YlE+B5vOJe7oQJlVvh3G4fy6nI2KHowd9uXqk/wvmnme +lKW3qKsrD1liuNf1e9BjV4msSe2fvrxpZJBS2x1qkzpo/tfDbTrSu10bzP7rjk/t0s7Xlow ZcECESG/tD6jj2LJIrXbojb/iM59WsxXXVFsvXarXfSL2B9H5+hdWXotdpv3E+bAUAat+bsf xr1bbbvilZXOnLW7fGKW2jUYqc7Z/HYBT1GUw3q9vTmmyTMYJR9rOa9qrjgZ9JJl73u9b69E Nt1rVjixvq1orbsSS3FGoqEWc1FxIgC2kcgKXQMAAA== X-CMS-MailID: 20240911121157eucas1p2a8ff398f0f30f141de974763680bb041 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240911121157eucas1p2a8ff398f0f30f141de974763680bb041 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121157eucas1p2a8ff398f0f30f141de974763680bb041 References: <20240911121136.1120026-1-m.majewski2@samsung.com> Like most of the SoCs, it requires 1 clock and 1 register. Reviewed-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski --- v1 -> v2: make the clock required in Exynos850. .../devicetree/bindings/thermal/samsung,exynos-thermal.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/thermal/samsung,exynos-therm= al.yaml b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.= yaml index 29a08b0729ee..b8c0bb7f4263 100644 --- a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml @@ -27,6 +27,7 @@ properties: - samsung,exynos5420-tmu-ext-triminfo - samsung,exynos5433-tmu - samsung,exynos7-tmu + - samsung,exynos850-tmu =20 clocks: minItems: 1 @@ -131,6 +132,7 @@ allOf: - samsung,exynos5250-tmu - samsung,exynos5260-tmu - samsung,exynos5420-tmu + - samsung,exynos850-tmu then: properties: clocks: --=20 2.45.2 From nobody Thu Nov 14 04:00:29 2024 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 102FF18C91D for ; Wed, 11 Sep 2024 12:12:00 +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=1726056723; cv=none; b=oxSA8W32HIXO13meIvdDkJzjdA6qX1vulo3GK29xFllFq+naQgVva5LWLWUgkgQ79Cg1dmdi/rMMi1fmk4G1uwuAeTpNwYYy2kFIy4lhUZ6AtDgYh7BeUQ6r8Y/YkE0cIeHv8Q1VucQ7VkKPjPfDQQAYkfs4eRxH+dQyBiXrflw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056723; c=relaxed/simple; bh=gNQ2tE7EWB1AI0nO5W0Zynui8PoA6aK9BqaMLy90mPk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=qh3/wKQBP1ceyCOiLHSVObg3PoqZhDme+LlPvMClmKqgxFBtf29dhOTpwJuFO/P9Z/3cW/yno/yjsd2zaIbudjiJgzhqn8/OjA1ukJkRG4B9lzseRnoAb075oq/H+mvcmhqTdmdjh+qEPupneymxx4YtTHSc49swzXsUDciswDM= 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=TSS7trxo; 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="TSS7trxo" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121159euoutp01ed049434ebc5a7e2ce5904cbde630d19~0L3D6b5YL0990209902euoutp01K for ; Wed, 11 Sep 2024 12:11:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240911121159euoutp01ed049434ebc5a7e2ce5904cbde630d19~0L3D6b5YL0990209902euoutp01K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056719; bh=S3zwFMdOfOUMhX015nExx0+RoZXJIo6huLDw+tGPrXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TSS7trxogvcSRL/K5DfeR+xx5ih7zM4vWELgtHBDDMgGQ6n9F++7oPy/AjKCcmchp X8o33ezcW9wY920Ndzwh9rs/4lx5zTzOXkQxq+nMLYMQb/0J5b+mXjXm7vY+S1N0te tey+CGBrnvPCuCHZ/Ku2bxeLGxETCNvwtsvz6wEo= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240911121159eucas1p2e097336e5a263c87eeb3e393e6f09985~0L3Dhem3A2873128731eucas1p2W; Wed, 11 Sep 2024 12:11:59 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 5B.D1.09624.E0981E66; Wed, 11 Sep 2024 13:11:58 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240911121158eucas1p2ab3ec5b5b59351af22c5740e02236b16~0L3Cv561f3175631756eucas1p2L; Wed, 11 Sep 2024 12:11:58 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121158eusmtrp28ab9473e10a4db5afac116835ff782fa~0L3CvL4dj2708727087eusmtrp2q; Wed, 11 Sep 2024 12:11:58 +0000 (GMT) X-AuditID: cbfec7f2-bfbff70000002598-a8-66e1890e1a9e Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id BF.4D.19096.D0981E66; Wed, 11 Sep 2024 13:11:58 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121157eusmtip1882ba911a83418a9736a09c51fae7dc2~0L3BtpZL70674806748eusmtip1I; Wed, 11 Sep 2024 12:11:57 +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 , Sam Protsenko , Anand Moon , Marek Szyprowski Subject: [PATCH v4 6/7] drivers/thermal/exynos: add initial Exynos850 support Date: Wed, 11 Sep 2024 14:11:29 +0200 Message-ID: <20240911121136.1120026-7-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCKsWRmVeSWpSXmKPExsWy7djPc7p8nQ/TDLruGFs8mLeNzeL7lutM Fmv2nmOymPdZ1mL+kXOsFufPb2C32PT4GqvF5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ztA8ttmHV+bbGV5sz61BkC/OKpaXfCvfMb0vY t/33Y1YlluKMREMt5qLiRACJPi8EVgMAAA== X-CMS-MailID: 20240911121158eucas1p2ab3ec5b5b59351af22c5740e02236b16 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240911121158eucas1p2ab3ec5b5b59351af22c5740e02236b16 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121158eucas1p2ab3ec5b5b59351af22c5740e02236b16 References: <20240911121136.1120026-1-m.majewski2@samsung.com> This is loosely adapted from an implementation available at https://gitlab.com/Linaro/96boards/e850-96/kernel/-/blob/android-exynos-4.1= 4-linaro/drivers/thermal/samsung/exynos_tmu.c Some differences from that implementation: - unlike that implementation, we do not use the ACPM mechanism, instead we just access the registers, like we do for other SoCs, - the SoC is supposed to support multiple sensors inside one unit. The vendor implementation uses one kernel device per sensor, we would probably prefer to have one device for all sensors, have #thermal-sensor-cells =3D <1> and so on. We implemented this, but we could not get the extra sensors to work on our hardware so far. This might be due to a misconfiguration and we will probably come back to this, however our implementation only supports a single sensor for now, - the vendor implementation supports disabling CPU cores as a cooling device. We did not attempt to port this, and this would not really fit this driver anyway. Additionally, some differences from the other SoCs supported by this driver: - we do not really constrain the e-fuse information like the other SoCs do (data->{min,max}_efuse_value). In our tests, those values (as well as the raw sensor values) were much higher than in the other SoCs, to the degree that reusing the data->{min,max}_efuse_value from the other SoCs would cause instant critical temperature reset on boot, - this SoC provides more information in the e-fuse data than other SoCs, so we read some values inside exynos850_tmu_initialize instead of hardcoding them in exynos_map_dt_data. Reviewed-by: Sam Protsenko Signed-off-by: Mateusz Majewski --- v3 -> v4: adapted to sanitize_temp_error change. v1 -> v2: rename and reorder some registers, use the correct register offset for EXYNOS850_TMU_REG_AVG_CON, make the clock required, additionally do some minor style changes. drivers/thermal/samsung/exynos_tmu.c | 179 ++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung= /exynos_tmu.c index 9bddf9fd5049..c5769f9b6471 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -117,6 +117,41 @@ #define EXYNOS7_EMUL_DATA_SHIFT 7 #define EXYNOS7_EMUL_DATA_MASK 0x1ff =20 +/* Exynos850 specific registers */ +#define EXYNOS850_TMU_REG_CURRENT_TEMP0_1 0x40 +#define EXYNOS850_TMU_REG_THD_TEMP0_RISE 0x50 +#define EXYNOS850_TMU_REG_THD_TEMP0_FALL 0x60 + +#define EXYNOS850_TMU_TRIMINFO_SHIFT 4 +#define EXYNOS850_TMU_TRIMINFO_OFFSET(n) \ + (EXYNOS_TMU_REG_TRIMINFO + (n) * EXYNOS850_TMU_TRIMINFO_SHIFT) +#define EXYNOS850_TMU_T_TRIM0_SHIFT 18 + +#define EXYNOS850_TMU_REG_CONTROL1 0x24 +#define EXYNOS850_TMU_LPI_MODE_MASK 1 +#define EXYNOS850_TMU_LPI_MODE_SHIFT 10 + +#define EXYNOS850_TMU_REG_COUNTER_VALUE0 0x30 +#define EXYNOS850_TMU_EN_TEMP_SEN_OFF_MASK 0xffff +#define EXYNOS850_TMU_EN_TEMP_SEN_OFF_SHIFT 0 + +#define EXYNOS850_TMU_REG_COUNTER_VALUE1 0x34 +#define EXYNOS850_TMU_CLK_SENSE_ON_MASK 0xffff +#define EXYNOS850_TMU_CLK_SENSE_ON_SHIFT 16 + +#define EXYNOS850_TMU_REG_AVG_CON 0x38 +#define EXYNOS850_TMU_AVG_MODE_MASK 0x7 +#define EXYNOS850_TMU_DEM_ENABLE BIT(4) + +#define EXYNOS850_TMU_REG_TRIM0 0x3c +#define EXYNOS850_TMU_TRIM0_MASK 0xf +#define EXYNOS850_TMU_VBEI_TRIM_SHIFT 8 +#define EXYNOS850_TMU_VREF_TRIM_SHIFT 12 +#define EXYNOS850_TMU_BGRI_TRIM_SHIFT 20 + +#define EXYNOS850_TMU_TEM1051X_SENSE_VALUE 0x028a +#define EXYNOS850_TMU_TEM1456X_SENSE_VALUE 0x0a28 + #define EXYNOS_FIRST_POINT_TRIM 25 #define EXYNOS_SECOND_POINT_TRIM 85 =20 @@ -134,6 +169,7 @@ enum soc_type { SOC_ARCH_EXYNOS5420_TRIMINFO, SOC_ARCH_EXYNOS5433, SOC_ARCH_EXYNOS7, + SOC_ARCH_EXYNOS850, }; =20 /** @@ -584,6 +620,114 @@ static void exynos7_tmu_initialize(struct platform_de= vice *pdev) sanitize_temp_error(data, trim_info); } =20 +static void exynos850_tmu_set_low_temp(struct exynos_tmu_data *data, u8 te= mp) +{ + exynos_tmu_update_temp(data, EXYNOS850_TMU_REG_THD_TEMP0_FALL + 12, 0, + temp); + exynos_tmu_update_bit(data, EXYNOS7_TMU_REG_INTEN, + EXYNOS_TMU_INTEN_FALL0_SHIFT + 0, true); +} + +static void exynos850_tmu_set_high_temp(struct exynos_tmu_data *data, u8 t= emp) +{ + exynos_tmu_update_temp(data, EXYNOS850_TMU_REG_THD_TEMP0_RISE + 12, 16, + temp); + exynos_tmu_update_bit(data, EXYNOS7_TMU_REG_INTEN, + EXYNOS7_TMU_INTEN_RISE0_SHIFT + 1, true); +} + +static void exynos850_tmu_disable_low(struct exynos_tmu_data *data) +{ + exynos_tmu_update_bit(data, EXYNOS7_TMU_REG_INTEN, + EXYNOS_TMU_INTEN_FALL0_SHIFT + 0, false); +} + +static void exynos850_tmu_disable_high(struct exynos_tmu_data *data) +{ + exynos_tmu_update_bit(data, EXYNOS7_TMU_REG_INTEN, + EXYNOS7_TMU_INTEN_RISE0_SHIFT + 1, false); +} + +static void exynos850_tmu_set_crit_temp(struct exynos_tmu_data *data, u8 t= emp) +{ + exynos_tmu_update_temp(data, EXYNOS850_TMU_REG_THD_TEMP0_RISE + 0, 16, + temp); + exynos_tmu_update_bit(data, EXYNOS_TMU_REG_CONTROL, + EXYNOS_TMU_THERM_TRIP_EN_SHIFT, true); + exynos_tmu_update_bit(data, EXYNOS7_TMU_REG_INTEN, + EXYNOS7_TMU_INTEN_RISE0_SHIFT + 7, true); +} + +static void exynos850_tmu_initialize(struct platform_device *pdev) +{ + struct exynos_tmu_data *data =3D platform_get_drvdata(pdev); + u32 cal_type, avg_mode, reg, bgri, vref, vbei; + + reg =3D readl(data->base + EXYNOS850_TMU_TRIMINFO_OFFSET(0)); + cal_type =3D (reg & EXYNOS5433_TRIMINFO_CALIB_SEL_MASK) >> + EXYNOS5433_TRIMINFO_CALIB_SEL_SHIFT; + data->reference_voltage =3D (reg >> EXYNOS850_TMU_T_TRIM0_SHIFT) & + EXYNOS_TMU_REF_VOLTAGE_MASK; + reg =3D readl(data->base + EXYNOS850_TMU_TRIMINFO_OFFSET(1)); + data->gain =3D (reg >> EXYNOS850_TMU_T_TRIM0_SHIFT) & + EXYNOS_TMU_BUF_SLOPE_SEL_MASK; + reg =3D readl(data->base + EXYNOS850_TMU_TRIMINFO_OFFSET(2)); + avg_mode =3D (reg >> EXYNOS850_TMU_T_TRIM0_SHIFT) & + EXYNOS850_TMU_AVG_MODE_MASK; + reg =3D readl(data->base + EXYNOS850_TMU_TRIMINFO_OFFSET(3)); + bgri =3D (reg >> EXYNOS850_TMU_T_TRIM0_SHIFT) & EXYNOS850_TMU_TRIM0_MASK; + reg =3D readl(data->base + EXYNOS850_TMU_TRIMINFO_OFFSET(4)); + vref =3D (reg >> EXYNOS850_TMU_T_TRIM0_SHIFT) & EXYNOS850_TMU_TRIM0_MASK; + reg =3D readl(data->base + EXYNOS850_TMU_TRIMINFO_OFFSET(5)); + vbei =3D (reg >> EXYNOS850_TMU_T_TRIM0_SHIFT) & EXYNOS850_TMU_TRIM0_MASK; + + data->cal_type =3D cal_type =3D=3D EXYNOS5433_TRIMINFO_TWO_POINT_TRIMMING= ? + TYPE_TWO_POINT_TRIMMING : + TYPE_ONE_POINT_TRIMMING; + + reg =3D readl(data->base + EXYNOS850_TMU_TRIMINFO_OFFSET(0)); + sanitize_temp_error(data, reg); + + dev_info(&pdev->dev, "Calibration type is %d-point calibration\n", + cal_type ? 2 : 1); + + reg =3D readl(data->base + EXYNOS850_TMU_REG_AVG_CON); + reg &=3D ~EXYNOS850_TMU_AVG_MODE_MASK; + reg &=3D ~EXYNOS850_TMU_DEM_ENABLE; + if (avg_mode) { + reg |=3D avg_mode; + reg |=3D EXYNOS850_TMU_DEM_ENABLE; + } + writel(reg, data->base + EXYNOS850_TMU_REG_AVG_CON); + + reg =3D readl(data->base + EXYNOS850_TMU_REG_COUNTER_VALUE0); + reg &=3D ~(EXYNOS850_TMU_EN_TEMP_SEN_OFF_MASK + << EXYNOS850_TMU_EN_TEMP_SEN_OFF_SHIFT); + reg |=3D EXYNOS850_TMU_TEM1051X_SENSE_VALUE + << EXYNOS850_TMU_EN_TEMP_SEN_OFF_SHIFT; + writel(reg, data->base + EXYNOS850_TMU_REG_COUNTER_VALUE0); + + reg =3D readl(data->base + EXYNOS850_TMU_REG_COUNTER_VALUE1); + reg &=3D ~(EXYNOS850_TMU_CLK_SENSE_ON_MASK + << EXYNOS850_TMU_CLK_SENSE_ON_SHIFT); + reg |=3D EXYNOS850_TMU_TEM1051X_SENSE_VALUE + << EXYNOS850_TMU_CLK_SENSE_ON_SHIFT; + writel(reg, data->base + EXYNOS850_TMU_REG_COUNTER_VALUE1); + + reg =3D readl(data->base + EXYNOS850_TMU_REG_TRIM0); + reg &=3D ~(EXYNOS850_TMU_TRIM0_MASK << EXYNOS850_TMU_BGRI_TRIM_SHIFT); + reg &=3D ~(EXYNOS850_TMU_TRIM0_MASK << EXYNOS850_TMU_VREF_TRIM_SHIFT); + reg &=3D ~(EXYNOS850_TMU_TRIM0_MASK << EXYNOS850_TMU_VBEI_TRIM_SHIFT); + reg |=3D bgri << EXYNOS850_TMU_BGRI_TRIM_SHIFT; + reg |=3D vref << EXYNOS850_TMU_VREF_TRIM_SHIFT; + reg |=3D vbei << EXYNOS850_TMU_VBEI_TRIM_SHIFT; + writel(reg, data->base + EXYNOS850_TMU_REG_TRIM0); + + reg =3D readl(data->base + EXYNOS850_TMU_REG_CONTROL1); + reg &=3D ~(EXYNOS850_TMU_LPI_MODE_MASK << EXYNOS850_TMU_LPI_MODE_SHIFT); + writel(reg, data->base + EXYNOS850_TMU_REG_CONTROL1); +} + static void exynos4210_tmu_control(struct platform_device *pdev, bool on) { struct exynos_tmu_data *data =3D platform_get_drvdata(pdev); @@ -673,7 +817,8 @@ static u32 get_emul_con_reg(struct exynos_tmu_data *dat= a, unsigned int val, =20 val &=3D ~(EXYNOS_EMUL_TIME_MASK << EXYNOS_EMUL_TIME_SHIFT); val |=3D (EXYNOS_EMUL_TIME << EXYNOS_EMUL_TIME_SHIFT); - if (data->soc =3D=3D SOC_ARCH_EXYNOS7) { + if (data->soc =3D=3D SOC_ARCH_EXYNOS7 || + data->soc =3D=3D SOC_ARCH_EXYNOS850) { val &=3D ~(EXYNOS7_EMUL_DATA_MASK << EXYNOS7_EMUL_DATA_SHIFT); val |=3D (temp_to_code(data, temp) << @@ -703,7 +848,8 @@ static void exynos4412_tmu_set_emulation(struct exynos_= tmu_data *data, emul_con =3D EXYNOS5260_EMUL_CON; else if (data->soc =3D=3D SOC_ARCH_EXYNOS5433) emul_con =3D EXYNOS5433_TMU_EMUL_CON; - else if (data->soc =3D=3D SOC_ARCH_EXYNOS7) + else if (data->soc =3D=3D SOC_ARCH_EXYNOS7 || + data->soc =3D=3D SOC_ARCH_EXYNOS850) emul_con =3D EXYNOS7_TMU_REG_EMUL_CON; else emul_con =3D EXYNOS_EMUL_CON; @@ -758,6 +904,12 @@ static int exynos7_tmu_read(struct exynos_tmu_data *da= ta) EXYNOS7_TMU_TEMP_MASK; } =20 +static int exynos850_tmu_read(struct exynos_tmu_data *data) +{ + return readw(data->base + EXYNOS850_TMU_REG_CURRENT_TEMP0_1) & + EXYNOS7_TMU_TEMP_MASK; +} + static irqreturn_t exynos_tmu_threaded_irq(int irq, void *id) { struct exynos_tmu_data *data =3D id; @@ -784,7 +936,8 @@ static void exynos4210_tmu_clear_irqs(struct exynos_tmu= _data *data) if (data->soc =3D=3D SOC_ARCH_EXYNOS5260) { tmu_intstat =3D EXYNOS5260_TMU_REG_INTSTAT; tmu_intclear =3D EXYNOS5260_TMU_REG_INTCLEAR; - } else if (data->soc =3D=3D SOC_ARCH_EXYNOS7) { + } else if (data->soc =3D=3D SOC_ARCH_EXYNOS7 || + data->soc =3D=3D SOC_ARCH_EXYNOS850) { tmu_intstat =3D EXYNOS7_TMU_REG_INTPEND; tmu_intclear =3D EXYNOS7_TMU_REG_INTPEND; } else if (data->soc =3D=3D SOC_ARCH_EXYNOS5433) { @@ -835,6 +988,9 @@ static const struct of_device_id exynos_tmu_match[] =3D= { }, { .compatible =3D "samsung,exynos7-tmu", .data =3D (const void *)SOC_ARCH_EXYNOS7, + }, { + .compatible =3D "samsung,exynos850-tmu", + .data =3D (const void *)SOC_ARCH_EXYNOS850, }, { }, }; @@ -952,6 +1108,23 @@ static int exynos_map_dt_data(struct platform_device = *pdev) data->min_efuse_value =3D 15; data->max_efuse_value =3D 100; break; + case SOC_ARCH_EXYNOS850: + data->tmu_set_low_temp =3D exynos850_tmu_set_low_temp; + data->tmu_set_high_temp =3D exynos850_tmu_set_high_temp; + data->tmu_disable_low =3D exynos850_tmu_disable_low; + data->tmu_disable_high =3D exynos850_tmu_disable_high; + data->tmu_set_crit_temp =3D exynos850_tmu_set_crit_temp; + data->tmu_initialize =3D exynos850_tmu_initialize; + data->tmu_control =3D exynos4210_tmu_control; + data->tmu_read =3D exynos850_tmu_read; + data->tmu_set_emulation =3D exynos4412_tmu_set_emulation; + data->tmu_clear_irqs =3D exynos4210_tmu_clear_irqs; + data->temp_mask =3D EXYNOS7_TMU_TEMP_MASK; + data->temp_85_shift =3D EXYNOS7_TMU_TEMP_SHIFT; + data->efuse_value =3D 55; + data->min_efuse_value =3D 0; + data->max_efuse_value =3D 511; + break; default: dev_err(&pdev->dev, "Platform not supported\n"); return -EINVAL; --=20 2.45.2 From nobody Thu Nov 14 04:00:29 2024 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (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 B7D4819C56C for ; Wed, 11 Sep 2024 12:12:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056723; cv=none; b=p16hKxFXphi6KRa9r+qV3wPVgDDztTJ5Vnpz7sc7S5uyhulZCHU/yHUbZa1NTAmC6/stLyWVOXTOWLuCNbA4Jfw0VdFA3EAKYOgS+fFZyBHql/sI57VIST4258ws/wA1jCuGvGV3wNW4VrWygORoi7n5wqB0Cr8rZqgNC4ayw3I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056723; c=relaxed/simple; bh=kuHpYla48FL3IoPXA3I3u/L0oNHA2kLHhX+p73plfos=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=h7rsbW69xVCSq58wv6zLss2HHc3pwTIwvvg0mjTvGv+WnanNEE1waRbtM8tu9KfApb5ZYbc5WMjnKzU98Oaa1CbkIPGMhUlQlCeYiLd1GhCjm7IRZ43b/BPr//suzNT3dAsROf7sbHREAn7VCGZdEmZJ+ce+2FYVAARY4Chfvz4= 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=g5+kyYFK; arc=none smtp.client-ip=210.118.77.12 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="g5+kyYFK" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121200euoutp0238958512f8cece9b84808931a539535c~0L3EjKs5g0109201092euoutp02- for ; Wed, 11 Sep 2024 12:12:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240911121200euoutp0238958512f8cece9b84808931a539535c~0L3EjKs5g0109201092euoutp02- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056720; bh=Y0Eg0QBpQbCUuL7P46NlXOmSQkcvzkcL2BjioU95Oh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g5+kyYFKZjkkO7S+uLiYh25SmDmbbO5hncMsJxX1/vja5aRYTJXtTAr7JFOjLBAZZ TgSWDRaD9KhGhZGWfEljMLHVPMGvDXJrLCWIy3d4+KPg+z6mNSPR2gKLsDMrWsCpTR ewebVMmShKW3jyFdkY5HEJFqPW6SsauvRQSGvtoY= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240911121159eucas1p218ace4e87ae9e4ecf30cdf23b6f5e2a0~0L3EIX72E2873128731eucas1p2Y; Wed, 11 Sep 2024 12:11:59 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F7.48.09620.F0981E66; Wed, 11 Sep 2024 13:11:59 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240911121159eucas1p1ecfa41871f21953b49d90c287d121409~0L3DmH--S2500425004eucas1p1E; Wed, 11 Sep 2024 12:11:59 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121159eusmtrp21828e598ebcdf09e9c799a63cc01525c~0L3DlDyHi2708727087eusmtrp2r; Wed, 11 Sep 2024 12:11:59 +0000 (GMT) X-AuditID: cbfec7f5-d31ff70000002594-8b-66e1890f8fd3 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 31.5D.19096.E0981E66; Wed, 11 Sep 2024 13:11:58 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121158eusmtip1eb216979373ba6be7882e3e7022bd6ac~0L3CmHKMU0718707187eusmtip1h; Wed, 11 Sep 2024 12:11:58 +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 , Sam Protsenko , Anand Moon , Marek Szyprowski , Krzysztof Kozlowski Subject: [PATCH v4 7/7] dt-bindings: thermal: samsung,exynos: remove driver-specific information Date: Wed, 11 Sep 2024 14:11:30 +0200 Message-ID: <20240911121136.1120026-8-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOKsWRmVeSWpSXmKPExsWy7djP87r8nQ/TDPZsVrF4MG8bm8X3LdeZ LNbsPcdkMe+zrMX8I+dYLc6f38Busff1VnaLTY+vsVpc3jWHzeJz7xFGixnn9zFZrNt4i91i YVMLu8XEY5OZLdYeuctuMffLVGaL/3t2s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pzkg01GIuKk4EAA3DAb9cAwAA X-CMS-MailID: 20240911121159eucas1p1ecfa41871f21953b49d90c287d121409 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240911121159eucas1p1ecfa41871f21953b49d90c287d121409 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121159eucas1p1ecfa41871f21953b49d90c287d121409 References: <20240911121136.1120026-1-m.majewski2@samsung.com> The number of supported trip points was only limited by the driver implementation at the time, which mapped each trip point defined in the devicetree source file to a hardware trip point. An implementation that does not have this limitation is possible; indeed, that is how the driver works currently. Therefore, this information should be removed from the bindings description, which are meant to be independent of the details of the driver implementation. Reviewed-by: Sam Protsenko Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring (Arm) Signed-off-by: Mateusz Majewski --- v2 -> v3: reword the commit message to be easier to understand in context of dt-bindings. v1 -> v2: remove an unnecessary sentence. .../devicetree/bindings/thermal/samsung,exynos-thermal.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/samsung,exynos-therm= al.yaml b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.= yaml index b8c0bb7f4263..b85b4c420cd3 100644 --- a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml @@ -40,11 +40,7 @@ properties: interrupts: description: | The Exynos TMU supports generating interrupts when reaching given - temperature thresholds. Number of supported thermal trip points depe= nds - on the SoC (only first trip points defined in DT will be configured)= :: - - most of SoC: 4 - - samsung,exynos5433-tmu: 8 - - samsung,exynos7-tmu: 8 + temperature thresholds. maxItems: 1 =20 reg: --=20 2.45.2