Message ID | 20231025133027.524152-7-m.majewski2@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 27BCCC0032E for <linux-arm-kernel@archiver.kernel.org>; Wed, 25 Oct 2023 13:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:References: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=WLZTTrbjBVQwwPqJRNaCTmmK2slv/QZBFdMOsVnjT7g=; b=pEX9cj/z+hKMAY 1hCPfl3BLe+gc2WrkpEvTQ5fiaRx3ojahZKrSsXt0yXQvCIr4jEiLxNwNgUGZnaSRylRLQ5YGUZJw S0hAjWqWByo4JzWQK6erB+uX+nYhAG6fzFzTczq/+qg6LgrWfjd/nHIu+xKhynMJT88ApFYNf2BbB 6/C5XDftEAWjmAsENL1WkFaDErXwY4txWfzOG7FXsnjFlW1k0MuqHdufIA9jZuvSguMUwanq1LtTW qkWJpQ0FHmgWYxxnS1hkVHO/HfZzh6MHI5bgt2IdDl1BY/nm+IcZU6TUS3R8IGakc4e0GSIko88qb tiitB7qpcb6/r3HusRZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvdz4-00CPX9-2r; Wed, 25 Oct 2023 13:31:42 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvdyL-00CPCB-2r for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 13:30:59 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20231025133056euoutp022f65c0dde21916a1f1d243db082db1ca~RXOEtKmO51189611896euoutp02a for <linux-arm-kernel@lists.infradead.org>; Wed, 25 Oct 2023 13:30:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20231025133056euoutp022f65c0dde21916a1f1d243db082db1ca~RXOEtKmO51189611896euoutp02a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1698240656; bh=dXf9wUUf5w5y7OBV4KeN+1ChCSvq94K/h1PmwKd1DP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W1xZYTZLCJE9PX4xThAgbQjNA4E4u5wbvXzcojQ+zPPDgRAcDh5vHAvQ9aIjDkf9u DmQny275+1MaGNyTRpeWT6P1g8j8GHtBoi4Mh4NhHHkYsR9Ct+34CucxDT13PTHtdM mRRFsK26CRBf0fL0di+1qBWqgcSuDnzmJ74xXtWI= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20231025133056eucas1p1a2adf2d26aadcbaf08cef52eeb4cec47~RXOEKnNpU1622416224eucas1p1c; Wed, 25 Oct 2023 13:30:56 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id BE.0B.37758.F8819356; Wed, 25 Oct 2023 14:30:56 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20231025133055eucas1p13779e9c86720bf460c12b28c6d830f2a~RXODnVXLp1383513835eucas1p1n; Wed, 25 Oct 2023 13:30:55 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231025133055eusmtrp118dc2d78f39781360c357af53597bfe6~RXODmrwpP0869708697eusmtrp1_; Wed, 25 Oct 2023 13:30:55 +0000 (GMT) X-AuditID: cbfec7f5-815ff7000002937e-68-6539188f47c1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 35.A8.10549.F8819356; Wed, 25 Oct 2023 14:30:55 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20231025133054eusmtip20ca3122846fae9c23e3274de6df353cb~RXOCxF0RM1587515875eusmtip2C; Wed, 25 Oct 2023 13:30:54 +0000 (GMT) From: Mateusz Majewski <m.majewski2@samsung.com> To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Mateusz Majewski <m.majewski2@samsung.com>, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>, Alim Akhtar <alim.akhtar@samsung.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Marek Szyprowski <m.szyprowski@samsung.com>, Lukasz Luba <lukasz.luba@arm.com> Subject: [PATCH v4 6/8] thermal: exynos: stop using the threshold mechanism on Exynos 4210 Date: Wed, 25 Oct 2023 15:30:25 +0200 Message-ID: <20231025133027.524152-7-m.majewski2@samsung.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231025133027.524152-1-m.majewski2@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBKsWRmVeSWpSXmKPExsWy7djPc7oTJCxTDV4tYbR4MG8bm8Xh+RUW Ux8+YbP4vuU6k8W8z7IWe19vZbf4dqWDyWLT42usFpd3zWGz+Nx7hNFixvl9TBYLm1rYLSYe m8xssfbIXXaLuV+mMls8edjH5iDgsWbeGkaPnbPusnss3vOSyWPTqk42jzvX9rB5bF5S79G3 ZRWjx+dNcgEcUVw2Kak5mWWpRfp2CVwZf858YytYyV8x8eVktgbGdzxdjJwcEgImEofnv2Lu YuTiEBJYwShx88pTNgjnC6PEtYn7GCGcz4wSf1+/ZYJpufL7JTtEYjmjxMt1u6FaWpkkVq5s ZASpYhMwkHjwZhk7iC0i0MooMbNJHaSIWeArs8TV1/OZQRLCAjES5+/NB2tgEVCV2NmxFKyB V8BWYv6ppVDr5CX2LPoOZnMK2En0Hr/OBlEjKHFy5hMWEJsZqKZ562ywLyQEujklljesZYVo dpE4e/Y2C4QtLPHq+BZ2CFtG4vTkHqh4vsSMze+BbA4gu0Li7kEvCNNa4uMZZhCTWUBTYv0u fYhiR4nHn5qgivkkbrwVhDiAT2LStunMEGFeiY42IYhqVYnjeyYxQ9jSEk9abjNBlHhIPGxl ncCoOAvJJ7OQfDILYe0CRuZVjOKppcW56anFxnmp5XrFibnFpXnpesn5uZsYgYnt9L/jX3cw rnj1Ue8QIxMH4yFGCQ5mJRHeSB+LVCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8qinyqUIC6Ykl qdmpqQWpRTBZJg5OqQamdZfVdfx9m/5rftqz1ZTzyJStmhGzfk8LaPK0iMq4djG+Rn/51Ase 9bPP1CrmdalFJ5rKt3IWCmZkMCxu0as0djp5gs1advafut7wTtV14p9t/wcKvGjaISV+9lBw d8UmxXeeiV8duVdytTm8avq0+8h7XQuLfx9jniwO6rnF/KRg3+ULOsctPgard//c+Wf3GZ/W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IRnmO+dPvUFUzxRzt7BnP/6tq9JimVZwuP9acfmcTVNZjh33fi1m WTmvIYMx+fajrgI5iUzr7MWJzBmP2tn/Bt6QyF7veb/b1cxDS+vjAdVrC9/F3C6qyijw27N6 bWie9/Kd98rFQrexN+ydaPVu8tpvbpIzKsV8i2cqau3UkwibUzLv2VHLJ8WRd5VYijMSDbWY i4oTAdmYmvpMAwAA X-CMS-MailID: 20231025133055eucas1p13779e9c86720bf460c12b28c6d830f2a X-Msg-Generator: CA X-RootMTR: 20231025133055eucas1p13779e9c86720bf460c12b28c6d830f2a X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20231025133055eucas1p13779e9c86720bf460c12b28c6d830f2a References: <20231025133027.524152-1-m.majewski2@samsung.com> <CGME20231025133055eucas1p13779e9c86720bf460c12b28c6d830f2a@eucas1p1.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_063058_201743_26AB6EC0 X-CRM114-Status: GOOD ( 18.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Improve Exynos thermal driver
|
expand
|
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 3bdcbab7466f..d918bf6d5359 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -343,20 +343,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on) static void exynos4210_tmu_set_trip_temp(struct exynos_tmu_data *data, int trip_id, u8 temp) { - struct thermal_trip trip; - u8 ref, th_code; - - if (thermal_zone_get_trip(data->tzd, 0, &trip)) - return; - - ref = trip.temperature / MCELSIUS; - - if (trip_id == 0) { - th_code = temp_to_code(data, ref); - writeb(th_code, data->base + EXYNOS4210_TMU_REG_THRESHOLD_TEMP); - } - - temp -= ref; + temp = temp_to_code(data, temp); writeb(temp, data->base + EXYNOS4210_TMU_REG_TRIG_LEVEL0 + trip_id * 4); } @@ -371,6 +358,8 @@ static void exynos4210_tmu_initialize(struct platform_device *pdev) struct exynos_tmu_data *data = platform_get_drvdata(pdev); sanitize_temp_error(data, readl(data->base + EXYNOS_TMU_REG_TRIMINFO)); + + writeb(0, data->base + EXYNOS4210_TMU_REG_THRESHOLD_TEMP); } static void exynos4412_tmu_set_trip_temp(struct exynos_tmu_data *data,