<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hwmon, branch v3.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>hwmon: (w83627ehf) Fix negative 8-bit temperature values</title>
<updated>2011-10-20T14:17:08+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-10-20T07:06:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=133d324d82e144588939ad25b732b5b6c33b03d9'/>
<id>133d324d82e144588939ad25b732b5b6c33b03d9</id>
<content type='text'>
Since 8-bit temperature values are now handled in 16-bit struct
members, values have to be cast to s8 for negative temperatures to be
properly handled. This is broken since kernel version 2.6.39
(commit bce26c58df86599c9570cee83eac58bdaae760e4.)

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: stable@kernel.org	# 2.6.39+
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since 8-bit temperature values are now handled in 16-bit struct
members, values have to be cast to s8 for negative temperatures to be
properly handled. This is broken since kernel version 2.6.39
(commit bce26c58df86599c9570cee83eac58bdaae760e4.)

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: stable@kernel.org	# 2.6.39+
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (w83627ehf) Properly report thermal diode sensors</title>
<updated>2011-10-13T23:51:29+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-10-13T19:49:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bf164c58e58328c40ebc597a8ac00cc6840f9703'/>
<id>bf164c58e58328c40ebc597a8ac00cc6840f9703</id>
<content type='text'>
The w83627ehf driver is improperly reporting thermal diode sensors as
type 2, instead of 3. This caused "sensors" and possibly other
monitoring tools to report these sensors as "transistor" instead of
"thermal diode".

Furthermore, diode subtype selection (CPU vs. external) is only
supported by the original W83627EHF/EHG. All later models only support
CPU diode type, and some (NCT6776F) don't even have the register in
question so we should avoid reading from it.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The w83627ehf driver is improperly reporting thermal diode sensors as
type 2, instead of 3. This caused "sensors" and possibly other
monitoring tools to report these sensors as "transistor" instead of
"thermal diode".

Furthermore, diode subtype selection (CPU vs. external) is only
supported by the original W83627EHF/EHG. All later models only support
CPU diode type, and some (NCT6776F) don't even have the register in
question so we should avoid reading from it.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Avoid leaving around dangling pointer</title>
<updated>2011-09-28T15:19:21+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>guenter.roeck@ericsson.com</email>
</author>
<published>2011-09-24T22:27:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=20ecb499f64a7e8e7fe03f6098ab25c71b7a6481'/>
<id>20ecb499f64a7e8e7fe03f6098ab25c71b7a6481</id>
<content type='text'>
Storing the struct temp_data pointer allocated from create_core_data()
when returning an error has the potential of leaving around a pointer
to freed memory. Reset it to NULL for error returns.

Reported-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Storing the struct temp_data pointer allocated from create_core_data()
when returning an error has the potential of leaving around a pointer
to freed memory. Reset it to NULL for error returns.

Reported-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Fixup platform device ID change</title>
<updated>2011-09-28T15:19:20+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-09-28T15:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0eb9782ad9b1bd496ba61cd5ea27ccb8db21e885'/>
<id>0eb9782ad9b1bd496ba61cd5ea27ccb8db21e885</id>
<content type='text'>
With recent change "hwmon: (coretemp) don't use kernel assigned CPU
number as platform device ID", the microcode check is now running on
random CPU. Fix that by checking the microcode before creating the
platform device rather than at probe time.

Also avoid calling TO_PHYS_ID(cpu) twice in the same function, it's
expensive.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Jan Beulich &lt;jbeulich@suse.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With recent change "hwmon: (coretemp) don't use kernel assigned CPU
number as platform device ID", the microcode check is now running on
random CPU. Fix that by checking the microcode before creating the
platform device rather than at probe time.

Also avoid calling TO_PHYS_ID(cpu) twice in the same function, it's
expensive.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Jan Beulich &lt;jbeulich@suse.com&gt;
Cc: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) remove struct platform_data * parameter from create_core_data()</title>
<updated>2011-09-23T17:39:11+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2011-09-23T10:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2f1c3db0a6adcfd12d556afa3605d4923658b307'/>
<id>2f1c3db0a6adcfd12d556afa3605d4923658b307</id>
<content type='text'>
The only caller of the function obtained the pointer solely for the
purpose of passing it to this function, while it can be easily
determined from the struct platform_device * parameter also passed.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only caller of the function obtained the pointer solely for the
purpose of passing it to this function, while it can be easily
determined from the struct platform_device * parameter also passed.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) constify static data</title>
<updated>2011-09-23T17:39:10+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2011-09-23T10:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e3204ed3a4a78ca4d10eee8b661b94429bd38da8'/>
<id>e3204ed3a4a78ca4d10eee8b661b94429bd38da8</id>
<content type='text'>
These arrays won't ever be written to, so protect them from
unintentional modification.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These arrays won't ever be written to, so protect them from
unintentional modification.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) don't use kernel assigned CPU number as platform device ID</title>
<updated>2011-09-23T17:38:09+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2011-09-23T10:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b3a242a6e4b8c09dbb466ab7a9d2c724e75faa67'/>
<id>b3a242a6e4b8c09dbb466ab7a9d2c724e75faa67</id>
<content type='text'>
... as that has the potential to conflict with (particularly soft) CPU
hot removal and re-adding.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
[guenter.roeck@ericsson.com: use platform device ID as physical CPU id]
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... as that has the potential to conflict with (particularly soft) CPU
hot removal and re-adding.

Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
[guenter.roeck@ericsson.com: use platform device ID as physical CPU id]
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (ds620) Fix handling of negative temperatures</title>
<updated>2011-09-22T00:25:18+00:00</updated>
<author>
<name>Roland Stigge</name>
<email>stigge@antcom.de</email>
</author>
<published>2011-09-21T17:06:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc41d586e8b4d76164fe7731c1c49be6cc5fc7e6'/>
<id>cc41d586e8b4d76164fe7731c1c49be6cc5fc7e6</id>
<content type='text'>
Signed (negative) temperatures were not handled correctly.

Signed-off-by: Roland Stigge &lt;stigge@antcom.de&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: stable@kernel.org # v2.6.38+
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed (negative) temperatures were not handled correctly.

Signed-off-by: Roland Stigge &lt;stigge@antcom.de&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: stable@kernel.org # v2.6.38+
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (w83791d) rename prototype parameter from 'register' to 'reg'</title>
<updated>2011-09-22T00:25:18+00:00</updated>
<author>
<name>Chris Peterson</name>
<email>cpeterso@cpeterso.com</email>
</author>
<published>2011-09-21T13:52:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7cbe1ceeb6ab2e4bc334b3dab3254d4414b72a23'/>
<id>7cbe1ceeb6ab2e4bc334b3dab3254d4414b72a23</id>
<content type='text'>
gcc -Wextra warns "register is not at beginning of declaration" because the
compiler thinks the parameter has been marked as a 'register' variable, but
the function prototype intended to name the parameter "register" (which is a
reserved keyword).

Signed-off-by: Chris Peterson &lt;cpeterso@cpeterso.com&gt;
Acked-by: Marc Hulsman &lt;m.hulsman@tudelft.nl&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc -Wextra warns "register is not at beginning of declaration" because the
compiler thinks the parameter has been marked as a 'register' variable, but
the function prototype intended to name the parameter "register" (which is a
reserved keyword).

Signed-off-by: Chris Peterson &lt;cpeterso@cpeterso.com&gt;
Acked-by: Marc Hulsman &lt;m.hulsman@tudelft.nl&gt;
Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (coretemp) Don't use threshold registers for tempX_max</title>
<updated>2011-09-22T00:25:18+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>guenter.roeck@ericsson.com</email>
</author>
<published>2011-09-20T04:41:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f4af6fd6e21792ca4deca3d29c113a575594078e'/>
<id>f4af6fd6e21792ca4deca3d29c113a575594078e</id>
<content type='text'>
With commit c814a4c7c4aad795835583344353963a0a673eb0, the meaning of tempX_max
was changed. It no longer returns the value of bits 8:15 of
MSR_IA32_TEMPERATURE_TARGET, but instead returns the value of CPU threshold
register T1. tempX_max_hyst was added to reflect the value of temperature
threshold register T0.

As it turns out, T0 and T1 are used on some systems, presumably by the BIOS.
Also, T0 and T1 don't have a well defined meaning. The thresholds may be used
as upper or lower limits, and it is not guaranteed that T0 &lt;= T1. Thus, the new
attribute mapping does not reflect the actual usage of the threshold registers.
Also, register contents are changed during runtime by an entity other than the
hwmon driver, meaning the values cached by the driver do not reflect actual
register contents.

Revert most of c814a4c7c4aad795835583344353963a0a673eb0 to address the problem.
Support for T0 and T1 will be added back in with a separate commit, using new
attribute names.

Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: Durgadoss R &lt;durgadoss.r@intel.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With commit c814a4c7c4aad795835583344353963a0a673eb0, the meaning of tempX_max
was changed. It no longer returns the value of bits 8:15 of
MSR_IA32_TEMPERATURE_TARGET, but instead returns the value of CPU threshold
register T1. tempX_max_hyst was added to reflect the value of temperature
threshold register T0.

As it turns out, T0 and T1 are used on some systems, presumably by the BIOS.
Also, T0 and T1 don't have a well defined meaning. The thresholds may be used
as upper or lower limits, and it is not guaranteed that T0 &lt;= T1. Thus, the new
attribute mapping does not reflect the actual usage of the threshold registers.
Also, register contents are changed during runtime by an entity other than the
hwmon driver, meaning the values cached by the driver do not reflect actual
register contents.

Revert most of c814a4c7c4aad795835583344353963a0a673eb0 to address the problem.
Support for T0 and T1 will be added back in with a separate commit, using new
attribute names.

Signed-off-by: Guenter Roeck &lt;guenter.roeck@ericsson.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Cc: Durgadoss R &lt;durgadoss.r@intel.com&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
