Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2627087rdb; Mon, 12 Feb 2024 10:42:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXyGuSsIMaDI8gqNSyrHRf3x/lIEVBkv7pH/lRVO/guDoPmzEbIewGKQ3u9JAgrY/Aq1WJNgG71Xt12fiO24WG9EEYtPow58vq5crTQCQ== X-Google-Smtp-Source: AGHT+IH8OGwBvxOThJ7zaQRrpRYMVQneNXyIAayFvabVIcynanUAG4f9+c8WUohZ0jRk9c1vWkdC X-Received: by 2002:a05:6870:548e:b0:218:a81f:f893 with SMTP id f14-20020a056870548e00b00218a81ff893mr8691263oan.30.1707763370940; Mon, 12 Feb 2024 10:42:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707763370; cv=pass; d=google.com; s=arc-20160816; b=YIsxTbfuVpOsYUMDFpuBreIiKLGpYrT0xAMy+152c6ZK92Bo3KZVXFR2tQ0e54B3k3 B2uAMb5dewTH6h0nLsKQItCdMXyelf7fa90GcVkjYVY3ylL1/DDdhrnTb1n70qSSXxWF 4NKShnD01auneGWSiXdRMVmVIkjUZQewhO6AAeJhyea0HA5Th8dGzwJ6a2q/v7TQEnN5 oCNgi9zWCrpQ0JP01YG/+ZcwtT3lXZJQKpcHOyZLSJMc7CNYW3eMHTb/KBqF0gd3095l e0LURHu53sHJst3kFezFrHL6b+dodsIGCSg9eyqa1SM7AdP8tCYlw6CwHQ7JWCu3uCYH H+vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=qJ9BAfTEHUYsBR82jgQXCHJtBKONbaGbUj7R5mBp7Sw=; fh=Q5Ud1106RzYDNR91B+QJGWjLCL3U+hLwqqZ26Xagq1g=; b=z41kJsC21DEVvJUIATYckvO4ZwyEF375vMVg2Ef+NxZwKujhMSObr7snGGxzZqYiw0 gbOYykzN7CWkjhp21yqE2sHXPyIEIQbSjF8AxGCXuDlT4prVzitFD2zi7PIaH9GH8Ggw x9GEcvEIlFrkONqZFEpPKYi6mBqrcK/S4osybAbzKl8nfg+f2MCkrTe3JmlgUBytKO+9 b+/LN9lI9jTTPxB9P7s5WcvXWi25nnVj03N4Ckza3/6NqyGY9yaDilZPuqMKshG/NGaV g4FJvsFj+Vkz+Hs222CbCLoQvay0Z7mz8FJgBIkjsXoMkcWgcxxOGbACjELPQQvjT2f5 JLPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-wireless+bounces-3473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3473-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCW4ti/9cAODsRnt/aB6JFDfHYjfPrjb+5m935mDDkZRgxzDHECixl06Eh5igAfuD0Lb3bwwUT6Ttsrzp0+d00e8zNit40KADKGUGTwwrA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id he7-20020a05622a600700b0042c760c746esi959128qtb.168.2024.02.12.10.42.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 10:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-wireless+bounces-3473-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3473-linux.lists.archive=gmail.com@vger.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 ADCE81C21406 for ; Mon, 12 Feb 2024 18:42:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7255045013; Mon, 12 Feb 2024 18:42:34 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) (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 D23CF3FE36; Mon, 12 Feb 2024 18:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.96.170.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707763354; cv=none; b=c8ZZycxkYQ+g0ZOla0f+i8uiNngM8E4elzkdP1UMKwJDh+xrjQlxfIzbQ0KbBKz1QBlsK01KFeECRxmsCNWTKzws4EN0am3Tx/MkXP0W8D7P9zThemKQQHsB45MweeWNFBjY9E+NqW3iw/5UolNfqylCvK4zGRivSaJMGjPRPyg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707763354; c=relaxed/simple; bh=L3NRX4YCC5wAmVuFoBGeSlDkUFlbjD5+xbxslNXvKy0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OJUkBZLxTH+lo/cDoOv3pgz0wnyWw2ycPO1VqOtY1LiwGwFrkzb0Z9bX9te75zH++AY0RQ4whXlJopHSM8fyy8LtcyqCwUZb+7ZwWIxoEeuac54owHBwQSQxbqXDEV6vJecfNjdcTJyJLMITNS/JjRreDRd5Li9IAogg/ektEMs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net; spf=pass smtp.mailfrom=rjwysocki.net; arc=none smtp.client-ip=79.96.170.134 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rjwysocki.net Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.4.0) id 0f78f23c5a53093c; Mon, 12 Feb 2024 19:42:29 +0100 Received: from kreacher.localnet (unknown [195.136.19.94]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cloudserver094114.home.pl (Postfix) with ESMTPSA id 9385C669CF2; Mon, 12 Feb 2024 19:42:28 +0100 (CET) From: "Rafael J. Wysocki" To: Linux PM Cc: Lukasz Luba , LKML , Daniel Lezcano , Stanislaw Gruszka , Srinivas Pandruvada , Zhang Rui , netdev@vger.kernel.org, Ido Schimmel , Petr Machata , Miri Korenblit , linux-wireless@vger.kernel.org, Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Manaf Meethalavalappu Pallikunhi Subject: [PATCH v2 8/9] thermal: of: Set THERMAL_TRIP_FLAG_RW_TEMP directly Date: Mon, 12 Feb 2024 19:40:34 +0100 Message-ID: <9235101.CDJkKcVGEf@kreacher> In-Reply-To: <6017196.lOV4Wx5bFT@kreacher> References: <6017196.lOV4Wx5bFT@kreacher> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudefgdduudegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdffueeitdfgvddtudegueejtdffteetgeefkeffvdeftddttdeuhfegfedvjefhnecukfhppeduleehrddufeeirdduledrleegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelhedrudefiedrudelrdelgedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepudeipdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhukhgrshiirdhluhgsrgesrghrmhdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtohepshht rghnihhslhgrfidrghhruhhsiihkrgeslhhinhhugidrihhnthgvlhdrtghomhdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=16 Fuz1=16 Fuz2=16 From: Rafael J. Wysocki It is now possible to flag trip points with THERMAL_TRIP_FLAG_RW_TEMP to allow their temperature to be set from user space via sysfs instead of using a nonzero writable trips mask during thermal zone registration, so make the OF thermal code do that. No intentional functional impact. Note that this change is requisite for dropping the mask argument from thermal_zone_device_register_with_trips() going forward. Signed-off-by: Rafael J. Wysocki --- v1 -> v2: Rename trip flag (Stanislaw). --- drivers/thermal/thermal_of.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Index: linux-pm/drivers/thermal/thermal_of.c =================================================================== --- linux-pm.orig/drivers/thermal/thermal_of.c +++ linux-pm/drivers/thermal/thermal_of.c @@ -117,6 +117,8 @@ static int thermal_of_populate_trip(stru return ret; } + trip->flags = THERMAL_TRIP_FLAG_RW_TEMP; + return 0; } @@ -477,7 +479,7 @@ static struct thermal_zone_device *therm struct device_node *np; const char *action; int delay, pdelay; - int ntrips, mask; + int ntrips; int ret; of_ops = kmemdup(ops, sizeof(*ops), GFP_KERNEL); @@ -510,15 +512,13 @@ static struct thermal_zone_device *therm of_ops->bind = thermal_of_bind; of_ops->unbind = thermal_of_unbind; - mask = GENMASK_ULL((ntrips) - 1, 0); - ret = of_property_read_string(np, "critical-action", &action); if (!ret) if (!of_ops->critical && !strcasecmp(action, "reboot")) of_ops->critical = thermal_zone_device_critical_reboot; tz = thermal_zone_device_register_with_trips(np->name, trips, ntrips, - mask, data, of_ops, &tzp, + 0, data, of_ops, &tzp, pdelay, delay); if (IS_ERR(tz)) { ret = PTR_ERR(tz);