<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hwmon, branch v4.4.171</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.171'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-12-17T20:55:10+00:00</updated>
<entry>
<title>hwmon: (w83795) temp4_type has writable permission</title>
<updated>2018-12-17T20:55:10+00:00</updated>
<author>
<name>Huacai Chen</name>
<email>chenhc@lemote.com</email>
</author>
<published>2018-11-15T02:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9b45f496f3ee085d6f8439f993124ef94fb13e9'/>
<id>urn:sha1:b9b45f496f3ee085d6f8439f993124ef94fb13e9</id>
<content type='text'>
[ Upstream commit 09aaf6813cfca4c18034fda7a43e68763f34abb1 ]

Both datasheet and comments of store_temp_mode() tell us that temp1~4_type
is writable, so fix it.

Signed-off-by: Yao Wang &lt;wangyao@lemote.com&gt;
Signed-off-by: Huacai Chen &lt;chenhc@lemote.com&gt;
Fixes: 39deb6993e7c (" hwmon: (w83795) Simplify temperature sensor type handling")
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (ina2xx) Fix current value calculation</title>
<updated>2018-12-17T20:55:10+00:00</updated>
<author>
<name>Nicolin Chen</name>
<email>nicoleotsuka@gmail.com</email>
</author>
<published>2018-11-14T03:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=15d8d7246173d11e7b75e34bc0226682468f9a8c'/>
<id>urn:sha1:15d8d7246173d11e7b75e34bc0226682468f9a8c</id>
<content type='text'>
[ Upstream commit 38cd989ee38c16388cde89db5b734f9d55b905f9 ]

The current register (04h) has a sign bit at MSB. The comments
for this calculation also mention that it's a signed register.

However, the regval is unsigned type so result of calculation
turns out to be an incorrect value when current is negative.

This patch simply fixes this by adding a casting to s16.

Fixes: 5d389b125186c ("hwmon: (ina2xx) Make calibration register value fixed")
Signed-off-by: Nicolin Chen &lt;nicoleotsuka@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (ibmpowernv) Remove bogus __init annotations</title>
<updated>2018-11-27T15:08:01+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2018-10-28T17:16:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e255a9e001c2c4b93fbd3c0a755b691cf4dd502f'/>
<id>urn:sha1:e255a9e001c2c4b93fbd3c0a755b691cf4dd502f</id>
<content type='text'>
[ Upstream commit e3e61f01d755188cb6c2dcf5a244b9c0937c258e ]

If gcc decides not to inline make_sensor_label():

    WARNING: vmlinux.o(.text+0x4df549c): Section mismatch in reference from the function .create_device_attrs() to the function .init.text:.make_sensor_label()
    The function .create_device_attrs() references
    the function __init .make_sensor_label().
    This is often because .create_device_attrs lacks a __init
    annotation or the annotation of .make_sensor_label is wrong.

As .probe() can be called after freeing of __init memory, all __init
annotiations in the driver are bogus, and should be removed.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (pmbus) Fix page count auto-detection.</title>
<updated>2018-11-21T08:27:30+00:00</updated>
<author>
<name>Dmitry Bazhenov</name>
<email>bazhenov.dn@gmail.com</email>
</author>
<published>2018-10-15T09:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dff53cf71a7300d2229f8ccb82834156f00a4ea2'/>
<id>urn:sha1:dff53cf71a7300d2229f8ccb82834156f00a4ea2</id>
<content type='text'>
commit e7c6a55606b5c46b449d76588968b4d8caae903f upstream.

Devices with compatible="pmbus" field have zero initial page count,
and pmbus_clear_faults() being called before the page count auto-
detection does not actually clear faults because it depends on the
page count. Non-cleared faults in its turn may fail the subsequent
page count auto-detection.

This patch fixes this problem by calling pmbus_clear_fault_page()
for currently set page and calling pmbus_clear_faults() after the
page count was detected.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Bazhenov &lt;bazhenov.dn@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>hwmon: (adt7475) Make adt7475_read_word() return errors</title>
<updated>2018-10-10T06:52:09+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-08-14T10:07:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55aaf8e0d9cfac87cdac31d6227b7f699a52f63f'/>
<id>urn:sha1:55aaf8e0d9cfac87cdac31d6227b7f699a52f63f</id>
<content type='text'>
[ Upstream commit f196dec6d50abb2e65fb54a0621b2f1b4d922995 ]

The adt7475_read_word() function was meant to return negative error
codes on failure.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Tokunori Ikegami &lt;ikegami@allied-telesis.co.jp&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: (ina2xx) fix sysfs shunt resistor read access</title>
<updated>2018-10-10T06:52:09+00:00</updated>
<author>
<name>Lothar Felten</name>
<email>lothar.felten@gmail.com</email>
</author>
<published>2018-08-14T07:09:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94516f10f3030a2c6640b5e1a845f0ae4395ef4e'/>
<id>urn:sha1:94516f10f3030a2c6640b5e1a845f0ae4395ef4e</id>
<content type='text'>
[ Upstream commit 3ad867001c91657c46dcf6656d52eb6080286fd5 ]

fix the sysfs shunt resistor read access: return the shunt resistor
value, not the calibration register contents.

update email address

Signed-off-by: Lothar Felten &lt;lothar.felten@gmail.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: (pmbus/adm1275) Accept negative page register values</title>
<updated>2018-05-30T05:49:13+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2018-03-11T01:55:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0bd0d4ff703f1143fc57bd1aa677f83413ca152a'/>
<id>urn:sha1:0bd0d4ff703f1143fc57bd1aa677f83413ca152a</id>
<content type='text'>
[ Upstream commit ecb29abd4cb0670c616fb563a078f25d777ce530 ]

A negative page register value means that no page needs to be
selected. This is used by status register read operations and needs
to be accepted. The failure to do so so results in missed status
and limit registers.

Fixes: da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver")
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: (pmbus/max8688) Accept negative page register values</title>
<updated>2018-05-30T05:49:13+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2018-03-11T01:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=770d3eadefb2f0edac7f31d190141629d07df34b'/>
<id>urn:sha1:770d3eadefb2f0edac7f31d190141629d07df34b</id>
<content type='text'>
[ Upstream commit a46f8cd696624ef757be0311eb28f119c36778e8 ]

A negative page register value means that no page needs to be
selected. This is used by status register evaluations and needs
to be accepted.

Fixes: da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver")
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: (nct6775) Fix writing pwmX_mode</title>
<updated>2018-05-30T05:49:10+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2018-03-27T02:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=634ac348e9a4b64a7295d7532ac706304799bc81'/>
<id>urn:sha1:634ac348e9a4b64a7295d7532ac706304799bc81</id>
<content type='text'>
[ Upstream commit 415eb2a1aaa4881cf85bd86c683356fdd8094a23 ]

pwmX_mode is defined in the ABI as 0=DC mode, 1=pwm mode. The chip
register bit is set to 1 for DC mode. This got mixed up, and writing
1 into pwmX_mode resulted in DC mode enabled. Fix it up by using
the ABI definition throughout the driver for consistency.

Fixes: 77eb5b3703d99 ("hwmon: (nct6775) Add support for pwm, pwm_mode, ... ")
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: (ina2xx) Fix access to uninitialized mutex</title>
<updated>2018-04-24T07:32:04+00:00</updated>
<author>
<name>Marek Szyprowski</name>
<email>m.szyprowski@samsung.com</email>
</author>
<published>2018-01-15T13:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=09293a7b610f7a2a145c4dc7bf4315886457d0da'/>
<id>urn:sha1:09293a7b610f7a2a145c4dc7bf4315886457d0da</id>
<content type='text'>
commit 0c4c5860e9983eb3da7a3d73ca987643c3ed034b upstream.

Initialize data-&gt;config_lock mutex before it is used by the driver code.

This fixes following warning on Odroid XU3 boards:

INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc7-next-20180115-00001-gb75575dee3f2 #107
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[&lt;c0111504&gt;] (unwind_backtrace) from [&lt;c010dbec&gt;] (show_stack+0x10/0x14)
[&lt;c010dbec&gt;] (show_stack) from [&lt;c09b3f74&gt;] (dump_stack+0x90/0xc8)
[&lt;c09b3f74&gt;] (dump_stack) from [&lt;c0179528&gt;] (register_lock_class+0x1c0/0x59c)
[&lt;c0179528&gt;] (register_lock_class) from [&lt;c017bd1c&gt;] (__lock_acquire+0x78/0x1850)
[&lt;c017bd1c&gt;] (__lock_acquire) from [&lt;c017de30&gt;] (lock_acquire+0xc8/0x2b8)
[&lt;c017de30&gt;] (lock_acquire) from [&lt;c09ca59c&gt;] (__mutex_lock+0x60/0xa0c)
[&lt;c09ca59c&gt;] (__mutex_lock) from [&lt;c09cafd0&gt;] (mutex_lock_nested+0x1c/0x24)
[&lt;c09cafd0&gt;] (mutex_lock_nested) from [&lt;c068b0d0&gt;] (ina2xx_set_shunt+0x70/0xb0)
[&lt;c068b0d0&gt;] (ina2xx_set_shunt) from [&lt;c068b218&gt;] (ina2xx_probe+0x88/0x1b0)
[&lt;c068b218&gt;] (ina2xx_probe) from [&lt;c0673d90&gt;] (i2c_device_probe+0x1e0/0x2d0)
[&lt;c0673d90&gt;] (i2c_device_probe) from [&lt;c053a268&gt;] (driver_probe_device+0x2b8/0x4a0)
[&lt;c053a268&gt;] (driver_probe_device) from [&lt;c053a54c&gt;] (__driver_attach+0xfc/0x120)
[&lt;c053a54c&gt;] (__driver_attach) from [&lt;c05384cc&gt;] (bus_for_each_dev+0x58/0x7c)
[&lt;c05384cc&gt;] (bus_for_each_dev) from [&lt;c0539590&gt;] (bus_add_driver+0x174/0x250)
[&lt;c0539590&gt;] (bus_add_driver) from [&lt;c053b5e0&gt;] (driver_register+0x78/0xf4)
[&lt;c053b5e0&gt;] (driver_register) from [&lt;c0675ef0&gt;] (i2c_register_driver+0x38/0xa8)
[&lt;c0675ef0&gt;] (i2c_register_driver) from [&lt;c0102b40&gt;] (do_one_initcall+0x48/0x18c)
[&lt;c0102b40&gt;] (do_one_initcall) from [&lt;c0e00df0&gt;] (kernel_init_freeable+0x110/0x1d4)
[&lt;c0e00df0&gt;] (kernel_init_freeable) from [&lt;c09c8120&gt;] (kernel_init+0x8/0x114)
[&lt;c09c8120&gt;] (kernel_init) from [&lt;c01010b4&gt;] (ret_from_fork+0x14/0x20)

Fixes: 5d389b125186 ("hwmon: (ina2xx) Make calibration register value fixed")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
[backport to v4.4.y/v4.9.y: context changes]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
