<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.thinkwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Code%2Fibm_acpi-extra-thermal.patch</id>
	<title>Code/ibm acpi-extra-thermal.patch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.thinkwiki.org/w/index.php?action=history&amp;feed=atom&amp;title=Code%2Fibm_acpi-extra-thermal.patch"/>
	<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Code/ibm_acpi-extra-thermal.patch&amp;action=history"/>
	<updated>2026-05-11T10:33:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.12</generator>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Code/ibm_acpi-extra-thermal.patch&amp;diff=62550&amp;oldid=prev</id>
		<title>ThinkGNU: Put patch in &lt;pre&gt; block</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Code/ibm_acpi-extra-thermal.patch&amp;diff=62550&amp;oldid=prev"/>
		<updated>2025-04-11T07:27:02Z</updated>

		<summary type="html">&lt;p&gt;Put patch in &amp;lt;pre&amp;gt; block&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:27, 11 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--- a/drivers/acpi/ibm_acpi.c&amp;#160;  2006-03-20 06:53:29.000000000 +0100&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--- a/drivers/acpi/ibm_acpi.c&amp;#160;  2006-03-20 06:53:29.000000000 +0100&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+++ b/drivers/acpi/ibm_acpi.c&amp;#160;  2006-07-19 01:55:52.000000000 +0200&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;+++ b/drivers/acpi/ibm_acpi.c&amp;#160;  2006-07-19 01:55:52.000000000 +0200&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l59&quot; &gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 60:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; 	return len;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; 	return len;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1thinkwiki:diff::1.12:old-23797:rev-62550 --&gt;
&lt;/table&gt;</summary>
		<author><name>ThinkGNU</name></author>
		
	</entry>
	<entry>
		<id>https://www.thinkwiki.org/w/index.php?title=Code/ibm_acpi-extra-thermal.patch&amp;diff=23797&amp;oldid=prev</id>
		<title>Thinker: copies from http://pastebin.ca/91872</title>
		<link rel="alternate" type="text/html" href="https://www.thinkwiki.org/w/index.php?title=Code/ibm_acpi-extra-thermal.patch&amp;diff=23797&amp;oldid=prev"/>
		<updated>2006-07-26T23:50:22Z</updated>

		<summary type="html">&lt;p&gt;copies from http://pastebin.ca/91872&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--- a/drivers/acpi/ibm_acpi.c   2006-03-20 06:53:29.000000000 +0100&lt;br /&gt;
+++ b/drivers/acpi/ibm_acpi.c   2006-07-19 01:55:52.000000000 +0200&lt;br /&gt;
@@ -1229,28 +1229,46 @@ static int thermal_read(char *p)&lt;br /&gt;
 	if (!thermal_tmp_supported)&lt;br /&gt;
 		len += sprintf(p + len, &amp;quot;temperatures:\tnot supported\n&amp;quot;);&lt;br /&gt;
 	else {&lt;br /&gt;
-		int i, t;&lt;br /&gt;
+		int i;&lt;br /&gt;
 		char tmpi[] = &amp;quot;TMPi&amp;quot;;&lt;br /&gt;
-		s8 tmp[8];&lt;br /&gt;
+		/* &lt;br /&gt;
+		 * A few ThinkPads (e.g. R52, T43) have 3 unnamed sensors. We&lt;br /&gt;
+		 * want their values as well.&lt;br /&gt;
+		 */&lt;br /&gt;
+		static const size_t named_count = 8;&lt;br /&gt;
+		static const size_t unnamed_count = 3;&lt;br /&gt;
+		static const size_t unnamed_addresses[] = { 0xC0, 0xC1, 0xC2 };&lt;br /&gt;
+		static const size_t total_count = named_count + unnamed_count;&lt;br /&gt;
+		s8 tmp[total_count];&lt;br /&gt;
 &lt;br /&gt;
 		if (thermal_updt_supported)&lt;br /&gt;
 			if (!acpi_evalf(ec_handle, NULL, &amp;quot;UPDT&amp;quot;, &amp;quot;v&amp;quot;))&lt;br /&gt;
 				return -EIO;&lt;br /&gt;
 &lt;br /&gt;
-		for (i = 0; i &amp;lt; 8; i++) {&lt;br /&gt;
+		for (i = 0; i &amp;lt; named_count; i++) {&lt;br /&gt;
+			int t;&lt;br /&gt;
 			tmpi[3] = '0' + i;&lt;br /&gt;
 			if (!acpi_evalf(ec_handle, &amp;amp;t, tmpi, &amp;quot;d&amp;quot;))&lt;br /&gt;
 				return -EIO;&lt;br /&gt;
-			if (thermal_updt_supported)&lt;br /&gt;
-				tmp[i] = (t - 2732 + 5) / 10;&lt;br /&gt;
-			else&lt;br /&gt;
-				tmp[i] = t;&lt;br /&gt;
+			tmp[i] = (s8)t;&lt;br /&gt;
 		}&lt;br /&gt;
 &lt;br /&gt;
-		len += sprintf(p + len,&lt;br /&gt;
-			       &amp;quot;temperatures:\t%d %d %d %d %d %d %d %d\n&amp;quot;,&lt;br /&gt;
-			       tmp[0], tmp[1], tmp[2], tmp[3],&lt;br /&gt;
-			       tmp[4], tmp[5], tmp[6], tmp[7]);&lt;br /&gt;
+		for (i = 0; i &amp;lt; unnamed_count; ++i) {&lt;br /&gt;
+			size_t address = unnamed_addresses[i];&lt;br /&gt;
+			u8 t;&lt;br /&gt;
+			if (!acpi_ec_read(address, &amp;amp;t))&lt;br /&gt;
+				return -EIO;&lt;br /&gt;
+			tmp[i+named_count] = (s8)t;&lt;br /&gt;
+		}&lt;br /&gt;
+&lt;br /&gt;
+		len += sprintf(p + len, &amp;quot;temperatures:\t&amp;quot; );&lt;br /&gt;
+		for (i = 0; i &amp;lt; total_count; ++i) {&lt;br /&gt;
+			int value = thermal_updt_supported &lt;br /&gt;
+			          ? (tmp[i] - 2732 + 5) / 10&lt;br /&gt;
+			          : tmp[i];&lt;br /&gt;
+			len += sprintf(p + len, &amp;quot;%d%c&amp;quot;, value,&lt;br /&gt;
+			               i == total_count - 1 ? '\n' : ' ');&lt;br /&gt;
+		}&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	return len;&lt;/div&gt;</summary>
		<author><name>Thinker</name></author>
		
	</entry>
</feed>