<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hwmon, branch v3.18.100</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.100</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.100'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-02-07T19:07:55+00:00</updated>
<entry>
<title>hwmon: (pmbus) Use 64bit math for DIRECT format values</title>
<updated>2018-02-07T19:07:55+00:00</updated>
<author>
<name>Robert Lippert</name>
<email>roblip@gmail.com</email>
</author>
<published>2017-11-27T23:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d395c1bb7f92d2bd37a47f28659f49394acf93e6'/>
<id>urn:sha1:d395c1bb7f92d2bd37a47f28659f49394acf93e6</id>
<content type='text'>
[ Upstream commit bd467e4eababe4c04272c1e646f066db02734c79 ]

Power values in the 100s of watt range can easily blow past
32bit math limits when processing everything in microwatts.

Use 64bit math instead to avoid these issues on common 32bit ARM
BMC platforms.

Fixes: 442aba78728e ("hwmon: PMBus device driver")
Signed-off-by: Robert Lippert &lt;rlippert@google.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (asus_atk0110) fix uninitialized data access</title>
<updated>2017-12-25T13:20:07+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-03-23T15:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a21b0e491956e34b61d14503ae8edf989a343741'/>
<id>urn:sha1:a21b0e491956e34b61d14503ae8edf989a343741</id>
<content type='text'>
[ Upstream commit a2125d02443e9a4e68bcfd9f8004fa23239e8329 ]

The latest gcc-7 snapshot adds a warning to point out that when
atk_read_value_old or atk_read_value_new fails, we copy
uninitialized data into sensor-&gt;cached_value:

drivers/hwmon/asus_atk0110.c: In function 'atk_input_show':
drivers/hwmon/asus_atk0110.c:651:26: error: 'value' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Adding an error check avoids this. All versions of the driver
are affected.

Fixes: 2c03d07ad54d ("hwmon: Add Asus ATK0110 support")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Luca Tettamanti &lt;kronos.it@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (gl520sm) Fix overflows and crash seen when writing into limit attributes</title>
<updated>2017-10-08T08:11:19+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-12-27T22:15:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f905dad52252c1858327ae9ebed3692f24ee312a'/>
<id>urn:sha1:f905dad52252c1858327ae9ebed3692f24ee312a</id>
<content type='text'>
[ Upstream commit 87cdfa9d60f4f40e6d71b04b10b36d9df3c89282 ]

Writes into limit attributes can overflow due to multplications and
additions with unbound input values. Writing into fan limit attributes
can result in a crash with a division by zero if very large values are
written and the fan divider is larger than 1.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated</title>
<updated>2016-07-12T12:47:23+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-03-26T19:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=83fb7b879d1bf33c7c42151cd8fdd1d9490a46b7'/>
<id>urn:sha1:83fb7b879d1bf33c7c42151cd8fdd1d9490a46b7</id>
<content type='text'>
[ Upstream commit 3c2e2266a5bd2d1cef258e6e54dca1d99946379f ]

arm:pxa_defconfig can result in the following crash if the max1111 driver
is not instantiated.

Unhandled fault: page domain fault (0x01b) at 0x00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: : 1b [#1] PREEMPT ARM
Modules linked in:
CPU: 0 PID: 300 Comm: kworker/0:1 Not tainted 4.5.0-01301-g1701f680407c #10
Hardware name: SHARP Akita
Workqueue: events sharpsl_charge_toggle
task: c390a000 ti: c391e000 task.ti: c391e000
PC is at max1111_read_channel+0x20/0x30
LR is at sharpsl_pm_pxa_read_max1111+0x2c/0x3c
pc : [&lt;c03aaab0&gt;]    lr : [&lt;c0024b50&gt;]    psr: 20000013
...
[&lt;c03aaab0&gt;] (max1111_read_channel) from [&lt;c0024b50&gt;]
					(sharpsl_pm_pxa_read_max1111+0x2c/0x3c)
[&lt;c0024b50&gt;] (sharpsl_pm_pxa_read_max1111) from [&lt;c00262e0&gt;]
					(spitzpm_read_devdata+0x5c/0xc4)
[&lt;c00262e0&gt;] (spitzpm_read_devdata) from [&lt;c0024094&gt;]
					(sharpsl_check_battery_temp+0x78/0x110)
[&lt;c0024094&gt;] (sharpsl_check_battery_temp) from [&lt;c0024f9c&gt;]
					(sharpsl_charge_toggle+0x48/0x110)
[&lt;c0024f9c&gt;] (sharpsl_charge_toggle) from [&lt;c004429c&gt;]
					(process_one_work+0x14c/0x48c)
[&lt;c004429c&gt;] (process_one_work) from [&lt;c0044618&gt;] (worker_thread+0x3c/0x5d4)
[&lt;c0044618&gt;] (worker_thread) from [&lt;c004a238&gt;] (kthread+0xd0/0xec)
[&lt;c004a238&gt;] (kthread) from [&lt;c000a670&gt;] (ret_from_fork+0x14/0x24)

This can occur because the SPI controller driver (SPI_PXA2XX) is built as
module and thus not necessarily loaded. While building SPI_PXA2XX into the
kernel would make the problem disappear, it appears prudent to ensure that
the driver is instantiated before accessing its data structures.

Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (ads1015) Handle negative conversion values correctly</title>
<updated>2016-03-08T02:30:06+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2016-02-18T13:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ebc9c5351f659b6be3e2e1fed3e058ec9cb8e3d'/>
<id>urn:sha1:9ebc9c5351f659b6be3e2e1fed3e058ec9cb8e3d</id>
<content type='text'>
[ Upstream commit acc146943957d7418a6846f06e029b2c5e87e0d5 ]

Make the divisor signed as DIV_ROUND_CLOSEST is undefined for negative
dividends when the divisor is unsigned.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips</title>
<updated>2015-10-28T02:13:00+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-08-31T23:13:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dbea835ae741fe3956027d77afc204c9c09e1c00'/>
<id>urn:sha1:dbea835ae741fe3956027d77afc204c9c09e1c00</id>
<content type='text'>
[ Upstream commit 728d29400488d54974d3317fe8a232b45fdb42ee ]

The STEP_UP_TIME and STEP_DOWN_TIME registers are swapped for all chips but
NCT6775.

Reported-by: Grazvydas Ignotas &lt;notasas@gmail.com&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (mcp3021) Fix broken output scaling</title>
<updated>2015-07-05T14:12:56+00:00</updated>
<author>
<name>Stevens, Nick</name>
<email>Nick.Stevens@digi.com</email>
</author>
<published>2015-07-01T16:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=90606a14b76f0c601238afe1274b92b44f95b0bf'/>
<id>urn:sha1:90606a14b76f0c601238afe1274b92b44f95b0bf</id>
<content type='text'>
[ Upstream commit 347d7e45bd09ce09cbc30d5cea9de377eb22f55c ]

The mcp3021 scaling code is dividing the VDD (full-scale) value in
millivolts by the A2D resolution to obtain the scaling factor. When VDD
is 3300mV (the standard value) and the resolution is 12-bit (4096
divisions), the result is a scale factor of 3300/4096, which is always
one.  Effectively, the raw A2D reading is always being returned because
no scaling is applied.

This patch fixes the issue and simplifies the register-to-volts
calculation, removing the unneeded "output_scale" struct member.

Signed-off-by: Nick Stevens &lt;Nick.Stevens@digi.com&gt;
Cc: stable@vger.kernel.org # v3.10+
[Guenter Roeck: Dropped unnecessary value check]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;

Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct6683) Add missing sysfs attribute initialization</title>
<updated>2015-06-09T18:31:42+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-05-28T16:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab673124ce097c0eb9a9e6691ebd41eb0d0225ba'/>
<id>urn:sha1:ab673124ce097c0eb9a9e6691ebd41eb0d0225ba</id>
<content type='text'>
[ Upstream commit c7bd6dc320b85445b6b36a0aff41f929210027c7 ]

The following error message is seen when loading the nct6683 driver
with DEBUG_LOCK_ALLOC enabled.

BUG: key ffff88040b2f0030 not in .data!
------------[ cut here ]------------
WARNING: CPU: 0 PID: 186 at kernel/locking/lockdep.c:2988
				lockdep_init_map+0x469/0x630()
DEBUG_LOCKS_WARN_ON(1)

Caused by a missing call to sysfs_attr_init() when initializing
sysfs attributes.

Reported-by: Alexey Orishko &lt;alexey.orishko@gmail.com&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: stable@vger.kernel.org # v3.18+
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct6775) Add missing sysfs attribute initialization</title>
<updated>2015-06-09T18:31:42+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-05-28T16:08:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f46267a4b26ad38dd0a2f6473c1eaacf3fdf75fd'/>
<id>urn:sha1:f46267a4b26ad38dd0a2f6473c1eaacf3fdf75fd</id>
<content type='text'>
[ Upstream commit 1b63bf617206ff35b93c57c67bbe067ac735a85a ]

The following error message is seen when loading the nct6775 driver
with DEBUG_LOCK_ALLOC enabled.

BUG: key ffff88040b2f0030 not in .data!
------------[ cut here ]------------
WARNING: CPU: 0 PID: 186 at kernel/locking/lockdep.c:2988
				lockdep_init_map+0x469/0x630()
DEBUG_LOCKS_WARN_ON(1)

Caused by a missing call to sysfs_attr_init() when initializing
sysfs attributes.

Reported-by: Alexey Orishko &lt;alexey.orishko@gmail.com&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: stable@vger.kernel.org # v3.12+
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE</title>
<updated>2015-06-09T17:43:55+00:00</updated>
<author>
<name>Chris Lesiak</name>
<email>chris.lesiak@licor.com</email>
</author>
<published>2015-05-26T20:40:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2439971a06cb72e5c0bc0cdf33701a79fbb2c8d8'/>
<id>urn:sha1:2439971a06cb72e5c0bc0cdf33701a79fbb2c8d8</id>
<content type='text'>
[ Upstream commit adba657533bdd255f7b78bc8a324091f46b294cd ]

When configured via device tree, the associated iio device needs to be
measuring voltage for the conversion to resistance to be correct.
Return -EINVAL if that is not the case.

Signed-off-by: Chris Lesiak &lt;chris.lesiak@licor.com&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
</feed>
