lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1876832.atdPhlSkOF@kreacher>
Date: Fri, 09 Feb 2024 15:11:35 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Linux PM <linux-pm@...r.kernel.org>
Cc: Lukasz Luba <lukasz.luba@....com>, LKML <linux-kernel@...r.kernel.org>,
 Daniel Lezcano <daniel.lezcano@...aro.org>,
 Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>,
 Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
 Zhang Rui <rui.zhang@...el.com>, netdev@...r.kernel.org,
 Ido Schimmel <idosch@...dia.com>, Petr Machata <petrm@...dia.com>,
 Miri Korenblit <miriam.rachel.korenblit@...el.com>,
 linux-wireless@...r.kernel.org, Shawn Guo <shawnguo@...nel.org>,
 Sascha Hauer <s.hauer@...gutronix.de>,
 Pengutronix Kernel Team <kernel@...gutronix.de>,
 Manaf Meethalavalappu Pallikunhi <quic_manafm@...cinc.com>
Subject: [PATCH v1 7/9] thermal: imx: Set THERMAL_TRIP_WRITABLE_TEMP directly

From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

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 <rafael.j.wysocki@...el.com>
---
 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);




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ