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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat,  3 May 2014 19:59:25 +0200
From:	Peter Feuerer <peter@...e.net>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Peter Feuerer <peter@...e.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andreas Mohr <andi@...as.de>, Borislav Petkov <bp@...e.de>,
	Javi Merino <javi.merino@....com>
Subject: [PATCH v3 5/6] acerhdf: added critical trip point

added critical trip point which represents the temperature limit.

Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andreas Mohr <andi@...as.de>
Cc: Borislav Petkov <bp@...e.de>
Cc: Javi Merino <javi.merino@....com>
Signed-off-by: Peter Feuerer <peter@...e.net>
---
 drivers/platform/x86/acerhdf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index afaa849..bc10260 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -444,6 +444,8 @@ static int acerhdf_get_trip_type(struct thermal_zone_device *thermal, int trip,
 {
 	if (trip == 0)
 		*type = THERMAL_TRIP_ACTIVE;
+	if (trip == 1)
+		*type = THERMAL_TRIP_CRITICAL;
 
 	return 0;
 }
@@ -462,6 +464,8 @@ static int acerhdf_get_trip_temp(struct thermal_zone_device *thermal, int trip,
 {
 	if (trip == 0)
 		*temp = fanon;
+	else if (trip == 1)
+		*temp = ACERHDF_TEMP_CRIT;
 
 	return 0;
 }
@@ -712,7 +716,7 @@ static int acerhdf_register_thermal(void)
 	if (IS_ERR(cl_dev))
 		return -EINVAL;
 
-	thz_dev = thermal_zone_device_register("acerhdf", 1, 0, NULL,
+	thz_dev = thermal_zone_device_register("acerhdf", 2, 0, NULL,
 					      &acerhdf_dev_ops,
 					      &acerhdf_zone_params, 0,
 					      (kernelmode) ? interval*1000 : 0);
-- 
1.9.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ