Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp610352rdb; Thu, 1 Feb 2024 20:19:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsa0rXV/mgRaM0ObQyBGSsCznPYlslfpuRHcNP/f3o+32JN1yLrUVMM6hnrttBz3URu+gK X-Received: by 2002:a81:af26:0:b0:604:6f5:488c with SMTP id n38-20020a81af26000000b0060406f5488cmr4849550ywh.2.1706847570720; Thu, 01 Feb 2024 20:19:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706847570; cv=pass; d=google.com; s=arc-20160816; b=PYerzP2RXoAVQIu76D0rVqcdTNI+O8RmhssNpold2OEGU1jfc6h5fiSH35eeOzDRE9 2cZdSPkBAtMxYjSSVBJ8wIH+A97wrD4j5xrKsyKLdtQ0MCkjHjo1544OF5gWY0Qw7BN/ /zhsGAG4OEzGPUNXU11HPnXPKvyfoJMD4COb3vgmLQB71suUIo1bhiZxD9rw1yswQkbK cVTdIx4m4n/7yj+64m/U8aR63Lai0Dg7UfseBaTFU8dwOxWKH+O77mETyh3oUGhU/1K2 AMPqrf9TnuLpaVI4ZiUeK9y4GaLDlvWVKPGueKy59XowOWzOx+C7Tj0GVAOwOs28ejCu AMjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CeBZKiF3lQtmHfBBWdXNzVx5e5tazxfbVRtXnhOgZtY=; fh=a+PA5Z1QlHq8rSUWhSvWQbuPp7jQ3fNKzPpoffwY6ZU=; b=o74wjCzPUAO5bhQQRH8hIdrmgvvL5XFMBmPLTugePDzsLFYHcnD+1XYVDpomUn42CS 33sIOiTCS63crOxoNVj+KLqRuYAN8919I3pbiiqeMKmy+aC6Q/Hq28nZMZcN+zwwES2l 5E7+D1OQx8oT9sCcm6aKHhAP6nrtTZwT3VxGeRJYX79o2y2fCcSvpOKeJGUOrjviVvym xD4xVqchZq8Q7wL4x5FJyMCqfzTgcMDn8aqPhNFc/qIlprY7rDJ5C3IjjKvfTXqYwtU7 HeJP9FVL89lc9wdOvIx5MO0EYGK3SBTbgwip6D16Yk0mnDTa0M16QsTHCqaahzwyzfI7 k6vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BdbHofBP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVVhN2SCQaND8TW5rExArjHh51WA6+gXss9KrwCeH2cNBQO++tjT7kLWlj6S4VEFtDNbUC8qOazgKt80HQkJjJYUzPxgGiSJTJcdOQp5Q== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c2-20020ac87d82000000b0042bef401386si1101295qtd.556.2024.02.01.20.19.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 20:19:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BdbHofBP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49185-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49185-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5A0BA1C27180 for ; Fri, 2 Feb 2024 04:19:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5317AEAF2; Fri, 2 Feb 2024 04:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BdbHofBP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 73CB3E549; Fri, 2 Feb 2024 04:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706847558; cv=none; b=QJVjo8VdimQXutv89SVeA8o1XzRtUNRinx2f4+idlk9Q4CThEEZFzUe9sHyEbQgibmNIww+odAVtagRGbzt5b8ILlA2FPxq7I6phpZC4JCkilBbbZ1dRQrJElkdnvE/xkCkUt5FTBrQ6LfYQembXspmgJxLx8zYYKcqjaJ3CFDU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706847558; c=relaxed/simple; bh=u3RNVotf+u/sSIA0AiKwHpc1rA1KTzE5j8nZ7SYlHAI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HzN+5sqINoIEHIPtXzkZT8BhOvRgAekr2/m2+5w8yAXRiCtbT/06WMTEoh98TjA6xP1daQARK0h7jVrbKVvUU1eCxcU6Nit5rJ2tabOk10Ye+oA3x+b18W2JvLtkCFlowE9WT+tvpnm7MXx9a+A8UUVoFB5nEtYiDw/JD5bvaoY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BdbHofBP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 138D1C433F1; Fri, 2 Feb 2024 04:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706847557; bh=u3RNVotf+u/sSIA0AiKwHpc1rA1KTzE5j8nZ7SYlHAI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BdbHofBPLyDEKgksKVQoTno6fQlvfLG+5+xg+BtMsxf6FB7rAGYSC1qRH0Ri7mLhN 5HthX6rDsO6bcBWFkavVBT2tKGDlE7E8lUTZph18c2Iv7gOJuQmkuQg9uq29tAEYjA NKKoLQleSTAbMcswFelfOtxekIg7NmgDa0Bw7C1W6HUUOagbqKREp9olWX1O3gkXH/ REFHyQHqdWROlTwnLO2yLwHpj1j5mm1PasAQb1FfoPKE1QEML419yPbsFOiM8ee9h9 K0hETD9jQ5bRq28sFjWu5ypwegPF0WCwsItHs3fWf9u2rqHGJObCnU/+GJWvlw74j4 9cOpw34Pid9Ww== Date: Thu, 1 Feb 2024 22:19:15 -0600 From: Bjorn Andersson To: Konrad Dybcio Cc: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] thermal/of: Assume polling-delay(-passive) 0 when absent Message-ID: References: <20240125-topic-thermal-v1-0-3c9d4dced138@linaro.org> <20240125-topic-thermal-v1-2-3c9d4dced138@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240125-topic-thermal-v1-2-3c9d4dced138@linaro.org> On Thu, Jan 25, 2024 at 01:11:16PM +0100, Konrad Dybcio wrote: > Currently, thermal zones associated with providers that have interrupts > for signaling hot/critical trips are required to set a polling-delay > of 0 to indicate no polling. This feels a bit backwards. > > Change the code such that "no polling delay" also means "no polling". > > Suggested-by: Bjorn Andersson > Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/thermal/thermal_of.c | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c > index 4d6c22e0ed85..61bbd42aa2cb 100644 > --- a/drivers/thermal/thermal_of.c > +++ b/drivers/thermal/thermal_of.c > @@ -225,14 +225,18 @@ static int thermal_of_monitor_init(struct device_node *np, int *delay, int *pdel > int ret; > > ret = of_property_read_u32(np, "polling-delay-passive", pdelay); > - if (ret < 0) { > - pr_err("%pOFn: missing polling-delay-passive property\n", np); > + if (ret == -EINVAL) { > + *pdelay = 0; > + } else if (ret < 0) { > + pr_err("%pOFn: Couldn't get polling-delay-passive: %d\n", np, ret); > return ret; > } > > ret = of_property_read_u32(np, "polling-delay", delay); > - if (ret < 0) { > - pr_err("%pOFn: missing polling-delay property\n", np); > + if (ret == -EINVAL) { > + *delay = 0; > + } else if (ret < 0) { > + pr_err("%pOFn: Couldn't get polling-delay: %d\n", np, ret); > return ret; > } > > > -- > 2.40.1 >