From mboxrd@z Thu Jan 1 00:00:00 1970 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 84E84C433EF for ; Tue, 17 May 2022 04:38:26 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hr7LYIMCRaVkV2qHt7F2rQ6k+Y+SL32SuGIhO5iFV44=; b=GBzp4wUZzMGo1t LknciJeC9XOysQ3W//ivPWV6jmNFY+ye0+f1AuttHUJjdCW0z61bnLOxDCa8Tu8lBieG+0iDArGSw Flv1FxhXc13ox68VWpzbavXwGUXzYMN02NYmUkNXLUHFgSncLDxpR1tzXROxL2Rn/Ndp3io3dP0g3 3tEbEeeCPLgJZpxCF02u+a1Z/kq0xO0fgpGs13aGqZ2Bx/VWnb95JtJKgFLr/yXceEMXZhY1gmT+p PSl0biY0lkMS4VmEXY+r8fd61HM7IhN8xXu//l0Rh2AoV4/0OJOZfrTm7Cnt7J90JsskcJMTofwsb kR7yUq7VbMPJ2lYACapQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqox5-00BbtP-KS; Tue, 17 May 2022 04:36:55 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqox2-00BbsL-AL for linux-arm-kernel@lists.infradead.org; Tue, 17 May 2022 04:36:54 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nqowm-0006GK-1p; Tue, 17 May 2022 06:36:36 +0200 Message-ID: Date: Tue, 17 May 2022 06:36:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v1] thermal: imx: Make trip point offset configurable Content-Language: en-US To: Francesco Dolcini Cc: Daniel Lezcano , l.stach@pengutronix.de, linux-pm@vger.kernel.org, "Rafael J . Wysocki" , Fabio Estevam , Sascha Hauer , Amit Kucheria , Jon Nettleton , NXP Linux Team , Pengutronix Kernel Team , Shawn Guo , Tim Harvey , linux-arm-kernel@lists.infradead.org References: <20220516190001.147919-1-francesco.dolcini@toradex.com> <92ae0fd5-f827-ae3c-bbef-d551c9fa5b76@pengutronix.de> <20220516191657.GA148058@francesco-nb.int.toradex.com> From: Ahmad Fatoum In-Reply-To: <20220516191657.GA148058@francesco-nb.int.toradex.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220516_213652_408846_A114870E X-CRM114-Status: GOOD ( 24.72 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Francesco, On 16.05.22 21:16, Francesco Dolcini wrote: > On Mon, May 16, 2022 at 09:06:10PM +0200, Ahmad Fatoum wrote: >> On 16.05.22 21:00, Francesco Dolcini wrote: >>> Currently the imx thermal driver has a hardcoded critical temperature >>> value offset of 5 Celsius degrees from the actual SoC maximum >>> temperature. >>> >>> This affects applications and systems designed to be working on this close >>> to the limit, but yet valid, temperature range. >>> >>> Given that there is no single value that will fit all the use cases make >>> the critical trip point offset from the max temperature configurable >>> using a newly added trip_offset module parameter, passive trip point is >>> set to 5 Celsius degrees less than the critical. By default the >>> system behaves exactly as before. >>> >>> Link: https://lore.kernel.org/all/20220420091300.179753-1-francesco.dolcini@toradex.com/ >>> Signed-off-by: Francesco Dolcini >>> --- >>> drivers/thermal/imx_thermal.c | 12 ++++++++---- >>> 1 file changed, 8 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c >>> index 16663373b682..42d1f8a3eccb 100644 >>> --- a/drivers/thermal/imx_thermal.c >>> +++ b/drivers/thermal/imx_thermal.c >>> @@ -86,6 +86,10 @@ enum imx_thermal_trip { >>> #define TEMPMON_IMX6SX 2 >>> #define TEMPMON_IMX7D 3 >>> >>> +static int trip_offset = 5; >>> +module_param(trip_offset, int, 0444); >> >> Is this being r--r--r-- intended? > > Yes, would you expect something more or less strict? > > Daniel was pretty assertive that this is supposed to be a system > property and not something that should be possible to mess around with > [0]. Given this and that trip points are a+r in sysfs this was the most > reasonable solution to me. Said that I do not mind changing > this to 640 or 0440 or ... I just found it odd, but with your explanation, it makes sense to have this a read-only-after-init setting. Thanks for the clarification, Ahmad > > [0] https://lore.kernel.org/all/4de41b5e-1fa6-ece4-9d9a-2656d399b452@linaro.org/ > > Francesco > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel