From patchwork Fri Feb 9 14:11:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 198908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp887419dyd; Fri, 9 Feb 2024 06:25:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqRyeeiA+N7PhDwus7pSCb70t0D60kxtb66Y9i4eIConOoJpZarRwd1DNVxZfQ8yhoDBZQ X-Received: by 2002:a17:90a:bb95:b0:296:25d0:3bf2 with SMTP id v21-20020a17090abb9500b0029625d03bf2mr1543742pjr.6.1707488701099; Fri, 09 Feb 2024 06:25:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707488701; cv=pass; d=google.com; s=arc-20160816; b=un6W3izcIV+nBgwNy7+lCzCSLyRew1p29HZYw1gTqKcVAd5ttvDA0jzmqNyYe5gd/t FsUt+QJnUPiikRK42f7wJhjT2jHaOxqr7WL/hXVV46MmBvXiCyoKPoUzHCY1rn2gXbF0 rHgM7B8F7p1/1L2tQuM3RZjDy+I4Ef43PWH2myi5milyYjcn6ffteIzzCMm5yjc7CszC Dk82eyTPkBBTsNwT7MBKoS/6kKvoUVqRGD7d2i/RmaW8Ny7T84DzR071eGda090CTWw2 /cv4SsGxAKUm78XgTz2SgwhY+Fu/Bmrj9j4NBRjRmKjw4YeUhK5yI+U0M7mqbM2KWpyl /jAA== 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=EnAKdqX/HOFIasl6bT7Gj4SkUKS+CIUD/eN7YjnlkKg=; fh=8vh71qxAuhiVG06QHt5M7k6RQKo7CqUDc+NgKTiYHAk=; b=K7GmGCx1n4XlZ9sEvzaY9HZfQN2aBhJFkaF/dD0B8R61iZXoW4VUX4t232BwXLCdsg MtzzhgvCM1JjbthpFZuKKb03KtW+HFhRPiUGPcbBhwZXsdxknPKGfwLpW5zKTu0/IjY9 U0EpAAX8kDOCbwEHOIpMphJc1ONBnQ1JENFCfCgswXM8AolsNmJ8DeG0aNApAK587/Sx o+RgK41quAXcFEEhSWSLJUxxijjQjXkMUCfKoinNdm0PQBSWrI8MgppKRNyJgYqT0cVD /Z9ddCZCWzxcl4Yc2/6gosfHxvpKuBhybWO0PpV1Oijazs6LJX5saJDA3fyG3/qEmxOQ 4YtA==; 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-kernel+bounces-59434-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59434-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUJnMvWjNLJxdNnjBZOL+pJE31Yu6qw5bEIvzJcfoBWdoZ/4ZfG+0jSuS93ezkfiZ08b910dTLZe1DAvggbRdfnTbU3dQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id qa5-20020a17090b4fc500b00296421430c4si1774875pjb.109.2024.02.09.06.25.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 06:25:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59434-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=rjwysocki.net); spf=pass (google.com: domain of linux-kernel+bounces-59434-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59434-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2E00A284BA2 for ; Fri, 9 Feb 2024 14:18:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55EF478669; Fri, 9 Feb 2024 14:14:49 +0000 (UTC) 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 E812A4EB4E; Fri, 9 Feb 2024 14:14:44 +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=1707488087; cv=none; b=jS9qgeNcc2ZO9zGNElYyfwG7QVqz6CkCQyBUea8eWp0gb4rTiooDMuHYq5pcBVqSMmonZqOZnJIJqhQWDyE6onUA32fFg/7c/6Ph6SK7waVN6ikCraNROVJIbFxAmsgP41wxKsHAgXma286o2qJqoCyzuls+RmkOsRXloD3c6Uw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707488087; c=relaxed/simple; bh=z2NqA3M75BY0RdOVHbZES1UzBP+LkWRriEpfg2cwIXc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MarBvxwh9xNzG76uuMJ+jnKtnKEzUdMggpxdUr/2j8XJK+jSvC1W2ExPC6hLoeBA47UjBfy+5WngQQ4LOAvjLPhgpY6QlhLpnJlXDsQBlRRbSnBVtIKhuMpsQR5wQWYDginwKE43cBojQRJvHGS46yRsrUWyhYgTRtF53R6FGFA= 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 4107c00f6cba97a2; Fri, 9 Feb 2024 15:14:42 +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 59C75669C4D; Fri, 9 Feb 2024 15:14:42 +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 v1 7/9] thermal: imx: Set THERMAL_TRIP_WRITABLE_TEMP directly Date: Fri, 09 Feb 2024 15:11:35 +0100 Message-ID: <1876832.atdPhlSkOF@kreacher> In-Reply-To: <3232442.5fSG56mABF@kreacher> References: <3232442.5fSG56mABF@kreacher> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CLIENT-IP: 195.136.19.94 X-CLIENT-HOSTNAME: 195.136.19.94 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrtdeigdeitdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvffeuiedtgfdvtddugeeujedtffetteegfeekffdvfedttddtuefhgeefvdejhfenucfkphepudelhedrudefiedrudelrdelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleehrddufeeirdduledrleegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeduiedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehluhhkrghsiidrlhhusggrsegrrhhmrdgtohhmpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrghdprhgtphhtthhopehsthgr nhhishhlrgifrdhgrhhushiikhgrsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=16 Fuz1=16 Fuz2=16 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790431672362527934 X-GMAIL-MSGID: 1790431672362527934 From: Rafael J. Wysocki It is now possible to flag trip points with THERMAL_TRIP_WRITABLE_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 imx 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 --- drivers/thermal/imx_thermal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: linux-pm/drivers/thermal/imx_thermal.c =================================================================== --- linux-pm.orig/drivers/thermal/imx_thermal.c +++ linux-pm/drivers/thermal/imx_thermal.c @@ -115,7 +115,8 @@ struct thermal_soc_data { }; static struct thermal_trip trips[] = { - [IMX_TRIP_PASSIVE] = { .type = THERMAL_TRIP_PASSIVE }, + [IMX_TRIP_PASSIVE] = { .type = THERMAL_TRIP_PASSIVE, + .flags = THERMAL_TRIP_WRITABLE_TEMP }, [IMX_TRIP_CRITICAL] = { .type = THERMAL_TRIP_CRITICAL }, }; @@ -699,7 +700,7 @@ static int imx_thermal_probe(struct plat data->tz = thermal_zone_device_register_with_trips("imx_thermal_zone", trips, ARRAY_SIZE(trips), - BIT(IMX_TRIP_PASSIVE), data, + 0, data, &imx_tz_ops, NULL, IMX_PASSIVE_DELAY, IMX_POLLING_DELAY);