<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/hwmon, branch v4.13.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>hwmon: (applesmc) Avoid buffer overruns</title>
<updated>2017-07-15T23:38:56+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2017-07-12T03:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1009ccdc64ee2c8451f76b548589f6b989d13412'/>
<id>1009ccdc64ee2c8451f76b548589f6b989d13412</id>
<content type='text'>
gcc 7.1 complains that the driver uses sprintf() and thus does not validate
the length of output buffers.

drivers/hwmon/applesmc.c: In function 'applesmc_show_fan_position':
drivers/hwmon/applesmc.c:82:21: warning:
	'%d' directive writing between 1 and 5 bytes into a region of size 4

Fix the problem by using scnprintf() instead of sprintf() throughout the
driver. Also explicitly limit the number of supported fans to avoid actual
buffer overruns and thus invalid keys.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc 7.1 complains that the driver uses sprintf() and thus does not validate
the length of output buffers.

drivers/hwmon/applesmc.c: In function 'applesmc_show_fan_position':
drivers/hwmon/applesmc.c:82:21: warning:
	'%d' directive writing between 1 and 5 bytes into a region of size 4

Fix the problem by using scnprintf() instead of sprintf() throughout the
driver. Also explicitly limit the number of supported fans to avoid actual
buffer overruns and thus invalid keys.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (aspeed-pwm-tacho) Poll with short sleeps.</title>
<updated>2017-06-24T15:58:06+00:00</updated>
<author>
<name>Patrick Venture</name>
<email>venture@google.com</email>
</author>
<published>2017-06-24T03:39:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=44b413661b57cbbb7e4c3adf7b087fada42a443e'/>
<id>44b413661b57cbbb7e4c3adf7b087fada42a443e</id>
<content type='text'>
The reference driver polled but mentioned it was possible to sleep
for a computed period to know when it's ready to read.  However, polling
with minimal sleeps is quick and works.  This also improves responsiveness
from the driver.

Testing: tested on ast2400 on quanta-q71l

Signed-off-by: Patrick Venture &lt;venture@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reference driver polled but mentioned it was possible to sleep
for a computed period to know when it's ready to read.  However, polling
with minimal sleeps is quick and works.  This also improves responsiveness
from the driver.

Testing: tested on ast2400 on quanta-q71l

Signed-off-by: Patrick Venture &lt;venture@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (aspeed-pwm-tacho) reduce fan_tach period</title>
<updated>2017-06-24T15:57:42+00:00</updated>
<author>
<name>Patrick Venture</name>
<email>venture@google.com</email>
</author>
<published>2017-06-24T15:39:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ece0c03a9e5f727435d19754411e59c3ae28cbb8'/>
<id>ece0c03a9e5f727435d19754411e59c3ae28cbb8</id>
<content type='text'>
Reduce the fan_tach period such that the fan controller uses a shorter
period to measure the rpm.

The original period of 0x1000 was chosen as a conversative value from the
reference implementation.  Through experimentation on the quanta-q71l
board, I was able to drive the number down which ultimately reduced the
time the controller would use to determine the fan_tach.  This value was
recently tested and accepted downstream on the IBM Zaius board which uses
the ast2500.

Future work: It may be worthwhile as this is a tunable parameter to the
system, to allow overriding it through the device tree.

Testing: Tested on an ast2400 sitting on a quanta-q71l and ast2500 on
power9.

Signed-off-by: Patrick Venture &lt;venture@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduce the fan_tach period such that the fan controller uses a shorter
period to measure the rpm.

The original period of 0x1000 was chosen as a conversative value from the
reference implementation.  Through experimentation on the quanta-q71l
board, I was able to drive the number down which ultimately reduced the
time the controller would use to determine the fan_tach.  This value was
recently tested and accepted downstream on the IBM Zaius board which uses
the ast2500.

Future work: It may be worthwhile as this is a tunable parameter to the
system, to allow overriding it through the device tree.

Testing: Tested on an ast2400 sitting on a quanta-q71l and ast2500 on
power9.

Signed-off-by: Patrick Venture &lt;venture@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (ibmpowernv) Add current(A) sensor</title>
<updated>2017-06-20T20:52:19+00:00</updated>
<author>
<name>Shilpasri G Bhat</name>
<email>shilpa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2017-06-20T05:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3a2b3d37e1eecb75d792db2588b9eb7a471632cd'/>
<id>3a2b3d37e1eecb75d792db2588b9eb7a471632cd</id>
<content type='text'>
This patch exports current(A) sensors in inband sensors copied to
main memory by OCC.

Signed-off-by: Shilpasri G Bhat &lt;shilpa.bhat@linux.vnet.ibm.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch exports current(A) sensors in inband sensors copied to
main memory by OCC.

Signed-off-by: Shilpasri G Bhat &lt;shilpa.bhat@linux.vnet.ibm.com&gt;
Reviewed-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (ibmpowernv) introduce a legacy_compatibles array</title>
<updated>2017-06-20T20:51:45+00:00</updated>
<author>
<name>Cédric Le Goater</name>
<email>clg@kaod.org</email>
</author>
<published>2017-06-20T05:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3ab521601dc0273b553d203f6bd1d02319a011b9'/>
<id>3ab521601dc0273b553d203f6bd1d02319a011b9</id>
<content type='text'>
Today, the type of a PowerNV sensor system is determined with the
"compatible" property for legacy Firmwares and with the "sensor-type"
for newer ones. The same array of strings is used for both to do the
matching and this raises some issue to introduce new sensor types.

Let's introduce two different arrays (legacy and current) to make
things easier for new sensor types.

Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Tested-by: Shilpasri G Bhat &lt;shilpa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Today, the type of a PowerNV sensor system is determined with the
"compatible" property for legacy Firmwares and with the "sensor-type"
for newer ones. The same array of strings is used for both to do the
matching and this raises some issue to introduce new sensor types.

Let's introduce two different arrays (legacy and current) to make
things easier for new sensor types.

Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Tested-by: Shilpasri G Bhat &lt;shilpa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (pwm-fan) Switch to new atomic PWM API</title>
<updated>2017-06-12T00:08:19+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2017-04-24T13:13:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=677252a185a9cf609d650364817d87279ce51df0'/>
<id>677252a185a9cf609d650364817d87279ce51df0</id>
<content type='text'>
Switch pwm-fan driver to new atomic PWM API.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Switch pwm-fan driver to new atomic PWM API.

Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (scpi) Fix the scale of SCP sensor readings</title>
<updated>2017-06-12T00:08:19+00:00</updated>
<author>
<name>Carlo Caione</name>
<email>carlo@endlessm.com</email>
</author>
<published>2017-05-30T09:05:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ccc9b8263d904228e5007cfc206eba3e6bea9f98'/>
<id>ccc9b8263d904228e5007cfc206eba3e6bea9f98</id>
<content type='text'>
The implementation details for SCPI seems to suggest that the sensor
readings must be reported by SCP using a well defined scale
(millidegree Celsius for temperature, millivolts for voltage,
milliamperes for current, microwatts for power and microjoules for
energy).

This is also important for the interaction with other subsystems: for
example both the thermal sub-system and the hwmon sysfs interface expect
the temperature expressed in millidegree Celsius.

Unfortunately since this behaviour is dependent on the firmware
implementation there are cases where the sensor readings are reported
using a different scale. For example in the Amlogic SoCs the
temperature is reported in degree and not millidegree Celsius.

To take into account this discrepancy and fixup the values reported by
SCP a new compatible 'amlogic,meson-gxbb-scpi-sensors' is introduced and
used in this patch by the scpi-hwmon driver to convert the sensor
readings to the expected scale.

Signed-off-by: Carlo Caione &lt;carlo@endlessm.com&gt;
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implementation details for SCPI seems to suggest that the sensor
readings must be reported by SCP using a well defined scale
(millidegree Celsius for temperature, millivolts for voltage,
milliamperes for current, microwatts for power and microjoules for
energy).

This is also important for the interaction with other subsystems: for
example both the thermal sub-system and the hwmon sysfs interface expect
the temperature expressed in millidegree Celsius.

Unfortunately since this behaviour is dependent on the firmware
implementation there are cases where the sensor readings are reported
using a different scale. For example in the Amlogic SoCs the
temperature is reported in degree and not millidegree Celsius.

To take into account this discrepancy and fixup the values reported by
SCP a new compatible 'amlogic,meson-gxbb-scpi-sensors' is introduced and
used in this patch by the scpi-hwmon driver to convert the sensor
readings to the expected scale.

Signed-off-by: Carlo Caione &lt;carlo@endlessm.com&gt;
Acked-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (aspeed-pwm-tacho) Enable both edge measurement.</title>
<updated>2017-06-12T00:08:19+00:00</updated>
<author>
<name>Patrick Venture</name>
<email>venture@google.com</email>
</author>
<published>2017-06-01T14:25:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1e276292bf25d288b645d3026f6c026ac9347061'/>
<id>1e276292bf25d288b645d3026f6c026ac9347061</id>
<content type='text'>
The aspeed-pwm-tacho controller supports measuring the fan tach by using
leading, falling, or both edges.  This change allows the driver to
support either of the three configurations and will appropriately modify
the returned tach data.

If the controller is measuring with both edges it can return a value more
quickly to the requestor.  This version of the driver should still take ~1s
to return with an RPM value per fan, however, it can be tuned faster with
double edge counting enabled than without.

I tested this and found the number returned matched what I expected.

Signed-off-by: Patrick Venture &lt;venture@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The aspeed-pwm-tacho controller supports measuring the fan tach by using
leading, falling, or both edges.  This change allows the driver to
support either of the three configurations and will appropriately modify
the returned tach data.

If the controller is measuring with both edges it can return a value more
quickly to the requestor.  This version of the driver should still take ~1s
to return with an RPM value per fan, however, it can be tuned faster with
double edge counting enabled than without.

I tested this and found the number returned matched what I expected.

Signed-off-by: Patrick Venture &lt;venture@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (ibmpowernv) Add highest/lowest attributes to sensors</title>
<updated>2017-06-12T00:08:19+00:00</updated>
<author>
<name>Shilpasri G Bhat</name>
<email>shilpa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2017-05-29T04:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=996cf5a5e94486113e8b998c4e1ecd9e4933aee8'/>
<id>996cf5a5e94486113e8b998c4e1ecd9e4933aee8</id>
<content type='text'>
OCC provides historical minimum and maximum value for the sensor
readings. This patch exports them as highest and lowest attributes
for the inband sensors copied by OCC to main memory.

Signed-off-by: Shilpasri G Bhat &lt;shilpa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OCC provides historical minimum and maximum value for the sensor
readings. This patch exports them as highest and lowest attributes
for the inband sensors copied by OCC to main memory.

Signed-off-by: Shilpasri G Bhat &lt;shilpa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (pmbus) move header file out of I2C realm</title>
<updated>2017-06-12T00:08:19+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>wsa@the-dreams.de</email>
</author>
<published>2017-05-21T20:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4ba1bb12cf21f4ee4681aee939c4d9d82d6f49f2'/>
<id>4ba1bb12cf21f4ee4681aee939c4d9d82d6f49f2</id>
<content type='text'>
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
include/linux/i2c is not for client devices. Move the header file to a
more appropriate location.

Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
