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 C838DEB64D9 for ; Thu, 15 Jun 2023 02:54:25 +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:MIME-Version:References: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=YhjvDycEYcKOUC3c/xQG4sscBQo8t50bcEiFpkU+/As=; b=XVjfLvX88O+HeR t8ntAeK6ZCNOJw6lQ4GdSHppDHM8IN0CCMA/dcpvCzkHiVj3VyIIdQbhmRn58Wj+jtb9onBWt1NUT k5pNPE56abjRtWZ8Yv4tKqiq86GfcCoipn3hpX+IFHZg6Q64AAGsWogoFaNDTywS3hJl6YVxMN8wN KdRrcRxYbLR7P+r6G9eU0k7IR+8JWtFQn9WpWRlZue6emFvo0vknteasiMNRezW+VL6tYcTFS/npd 4OsveslgwEcR1dLaotZvP/+NByEhcToeFaeK405l7nRqhDI63dJcNSkOkVdjpaiqDz4SAqNfCsgBN LujOtsRGCFoFYJTTnMzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9d7c-00DPrr-2L; Thu, 15 Jun 2023 02:54:04 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9d7a-00DPr8-0d for linux-arm-kernel@lists.infradead.org; Thu, 15 Jun 2023 02:54:03 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id DA1D6ECD8E; Wed, 14 Jun 2023 19:53:27 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1TuKSNZEzzml; Wed, 14 Jun 2023 19:53:27 -0700 (PDT) From: Sebastian Krzyszkowiak DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=puri.sm; s=comms; t=1686797607; bh=W6yGQPaKblXM6pB5IEmuGlSyN4iL12QpXtqEw0PdKVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JEsa9H0hkL1veqdXruONDggfIJB7rY2gXThff1FpaS71jzXtY3dcIvZ8NNCvewIkd 5gTe2UN11dC257p7AINUDKZqP02lW7PZwd2wkxYLHNQOEOWi4WQ4taKJFMjGKNXCmw Da0IsCerX894BVP3rYuYEJcA7rpgFpG9diWKDaDqQ7E1ql6ryzHOeQICElTlLpIAek 31o0bMxAgn2S9q55GBYE9JbeAWmzvqoiqT1jGXYQkrSN7P4CFG5K/7ER/+TbVyjqor dE+BIOuwYyb74kojIvdKnkNDRt3xancNmi8yTMXtf7obEQo/PTcV1yGhutBYoY+DDw ZXFJt4xw7UdXQ== To: Daniel Lezcano , Peng Fan , "rafael@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , Peng Fan Cc: "amitk@kernel.org" , "rui.zhang@intel.com" , "andrew.smirnov@gmail.com" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kernel@pengutronix.de" , "festevam@gmail.com" , dl-linux-imx , "linux-arm-kernel@lists.infradead.org" , Alice Guo Subject: Re: [PATCH 2/3] thermal: qoriq_thermal: only enable supported sensors Date: Thu, 15 Jun 2023 04:53:17 +0200 Message-ID: <4844567.31r3eYUQgx@pliszka> In-Reply-To: <2e57d14a-214e-c3e0-e011-e804ce8c9b39@oss.nxp.com> References: <20230516083746.63436-1-peng.fan@oss.nxp.com> <507b5daa-73e7-8d21-4f73-c56f88c6bf77@linaro.org> <2e57d14a-214e-c3e0-e011-e804ce8c9b39@oss.nxp.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_195402_241840_E700ACEB X-CRM114-Status: GOOD ( 12.81 ) 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 On czwartek, 15 czerwca 2023 04:29:01 CEST Peng Fan wrote: > On 6/8/2023 3:10 AM, Daniel Lezcano wrote: > > > > [...] > > > > Ok, I misunderstood. I thought that was for failing registered thermal > > zone. > > > > Would enabling the site in ops->change_mode do the trick ? > > No. ops->change_mode not able to do the trick. > > devm_thermal_of_zone_register->thermal_zone_device_enable > ->thermal_zone_device_set_mode->__thermal_zone_device_update.part.0 > ->__thermal_zone_get_temp > > The thermal_zone_device_set_mode will call change_mode, if return > fail here, the thermal zone will fail to be registered. > > Thanks, > Peng. I think the idea is not to return a failure in ops->change_mode, but to move enabling the site in REGS_TMR/REGS_V2_TMSR register from qoriq_tmu_register_tmu_zone to ops->change_mode. This way the site will be enabled only for actually existing thermal zones, since those not described in the device tree won't reach thermal_zone_device_enable. S. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel