<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/hwmon/nct7802.c, branch linux-4.4.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-01-29T09:21:52+00:00</updated>
<entry>
<title>hwmon: (nct7802) Fix voltage limits to wrong registers</title>
<updated>2020-01-29T09:21:52+00:00</updated>
<author>
<name>Gilles Buloz</name>
<email>gilles.buloz@kontron.com</email>
</author>
<published>2019-11-27T17:09:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=31710ab4b2d0c66fdcaba87f8cdb0fe4f88e3bb8'/>
<id>urn:sha1:31710ab4b2d0c66fdcaba87f8cdb0fe4f88e3bb8</id>
<content type='text'>
commit 7713e62c8623c54dac88d1fa724aa487a38c3efb upstream.

in0 thresholds are written to the in2 thresholds registers
in2 thresholds to in3 thresholds
in3 thresholds to in4 thresholds
in4 thresholds to in0 thresholds

Signed-off-by: Gilles Buloz &lt;gilles.buloz@kontron.com&gt;
Link: https://lore.kernel.org/r/5de0f509.rc0oEvPOMjbfPW1w%gilles.buloz@kontron.com
Fixes: 3434f3783580 ("hwmon: Driver for Nuvoton NCT7802Y")
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: (nct7802) Fix wrong detection of in4 presence</title>
<updated>2019-08-25T08:52:52+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2019-07-26T15:00:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f4bf0665a8c3653986f24c5eaf1387af0ffb7a3b'/>
<id>urn:sha1:f4bf0665a8c3653986f24c5eaf1387af0ffb7a3b</id>
<content type='text'>
commit 38ada2f406a9b81fb1249c5c9227fa657e7d5671 upstream.

The code to detect if in4 is present is wrong; if in4 is not present,
the in4_input sysfs attribute is still present.

In detail:

- Ihen RTD3_MD=11 (VSEN3 present), everything is as expected (no bug).
- If we have RTD3_MD!=11 (no VSEN3), we unexpectedly have a in4_input
  file under /sys and the "sensors" command displays in4_input.
  But as expected, we have no in4_min, in4_max, in4_alarm, in4_beep.

Fix is_visible function to detect and report in4_input visibility
as expected.

Reported-by: Gilles Buloz &lt;Gilles.Buloz@kontron.com&gt;
Cc: Gilles Buloz &lt;Gilles.Buloz@kontron.com&gt;
Cc: stable@vger.kernel.org
Fixes: 3434f37835804 ("hwmon: Driver for Nuvoton NCT7802Y")
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: (nct7802) Fix overflows seen when writing into limit attributes</title>
<updated>2017-01-12T10:22:48+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2016-12-05T02:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fd504f52916025708a19c214d65f8d96036f53e1'/>
<id>urn:sha1:fd504f52916025708a19c214d65f8d96036f53e1</id>
<content type='text'>
commit c0d04e9112ad59d73f23f3b0f6726c5e798dfcbf upstream.

Fix overflows seen when writing voltage and temperature limit attributes.

The value passed to DIV_ROUND_CLOSEST() needs to be clamped, and the
value parameter passed to nct7802_write_fan_min() is an unsigned long.

Also, writing values larger than 2700000 into a fan limit attribute results
in writing 0 into the chip's limit registers. The exact behavior when
writing this value is unspecified. For consistency, report a limit of
1350000 if the chip register reads 0. This may be wrong, and the chip
behavior should be verified with the actual chip, but it is better than
reporting a value of 0 (which, when written, results in writing a value
of 0x1fff into the chip register).

Fixes: 3434f3783580 ("hwmon: Driver for Nuvoton NCT7802Y")
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&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: (nct7802) Add auto_point attributes</title>
<updated>2015-08-09T20:44:27+00:00</updated>
<author>
<name>Constantine Shulyupin</name>
<email>const@MakeLinux.com</email>
</author>
<published>2015-07-27T22:01:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c6e8f6ba89c59270db223284d47e3c928c6fbfc'/>
<id>urn:sha1:1c6e8f6ba89c59270db223284d47e3c928c6fbfc</id>
<content type='text'>
Introduced REG_PWM, pwm[1..3]_auto_point[1..5]_temp,
pwm[1..3]_auto_point[1..5]_pwm, nct7802_auto_point_attrs,
nct7802_auto_point_group, updated nct7802_regmap_is_volatile

Signed-off-by: Constantine Shulyupin &lt;const@MakeLinux.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct7802) Add pwmX_enable attribute</title>
<updated>2015-08-09T20:44:26+00:00</updated>
<author>
<name>Constantine Shulyupin</name>
<email>const@MakeLinux.com</email>
</author>
<published>2015-07-07T21:40:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5102f022688ccd59b1fe4efc8a46ec3aca02dfc5'/>
<id>urn:sha1:5102f022688ccd59b1fe4efc8a46ec3aca02dfc5</id>
<content type='text'>
Introduced REG_SMARTFAN_EN, SMARTFAN_EN_SHIFT, pwmX_enable,
show_pwm_enable, store_pwm_enable.

Signed-off-by: Constantine Shulyupin &lt;const@MakeLinux.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct7802) Add pwm mode attributes</title>
<updated>2015-08-09T20:44:25+00:00</updated>
<author>
<name>Constantine Shulyupin</name>
<email>const@MakeLinux.com</email>
</author>
<published>2015-07-04T22:41:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=876420e05a0fda4801c0a0de67e9bbe9831dffee'/>
<id>urn:sha1:876420e05a0fda4801c0a0de67e9bbe9831dffee</id>
<content type='text'>
Introduced: show_pwm_mode, pwm1_mode, pwm2_mode, pwm2_mode

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct7802) Add pwm control</title>
<updated>2015-08-09T20:44:25+00:00</updated>
<author>
<name>Constantine Shulyupin</name>
<email>const@MakeLinux.com</email>
</author>
<published>2015-07-04T18:49:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea33597c6f9862d7b926bdb9c3ac25012f307dd5'/>
<id>urn:sha1:ea33597c6f9862d7b926bdb9c3ac25012f307dd5</id>
<content type='text'>
Added fan output control registers.
Modes of operation are PWM (default) and DC.

Introduced show_pwm, store_pwm, nct7802_pwm_attrs, nct7802_pwm_group.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct7802) add temperature sensor type attribute</title>
<updated>2015-08-09T20:44:25+00:00</updated>
<author>
<name>Constantine Shulyupin</name>
<email>const@MakeLinux.com</email>
</author>
<published>2015-07-01T06:52:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fcdc5739dce03d8050ebfa7153412c2efcdee94f'/>
<id>urn:sha1:fcdc5739dce03d8050ebfa7153412c2efcdee94f</id>
<content type='text'>
Sensor type:
3 diode (current mode), MD=1
4 thermistor, MD=2

Reference:
Nuvoton Hardware Monitoring IC NCT7802Y
7.2.32 Mode Selection Register
Location : Index 22h

Signed-off-by: Constantine Shulyupin &lt;const@MakeLinux.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct7802) Fix integer overflow seen when writing voltage limits</title>
<updated>2015-07-30T03:06:50+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2015-07-04T20:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9200bc4c28cd8992eb5379345abd6b4f0c93df16'/>
<id>urn:sha1:9200bc4c28cd8992eb5379345abd6b4f0c93df16</id>
<content type='text'>
Writing a large value into a voltage limit attribute can result
in an overflow due to an auto-conversion from unsigned long to
unsigned int.

Cc: Constantine Shulyupin &lt;const@MakeLinux.com&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: stable@vger.kernel.org # v4.1+
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (nct7802) fix visibility of temp3</title>
<updated>2015-07-01T20:56:27+00:00</updated>
<author>
<name>Constantine Shulyupin</name>
<email>const@ctera.com</email>
</author>
<published>2015-06-26T14:47:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56172d81a9bc37a69b95dd627b8d48135c9c7b31'/>
<id>urn:sha1:56172d81a9bc37a69b95dd627b8d48135c9c7b31</id>
<content type='text'>
Excerpt from datasheet:
7.2.32 Mode Selection Register
RTD3_MD : 00=Closed , 01=Reserved , 10=Thermistor mode , 11=Voltage sense

Show temp3 only in Thermistor mode

Cc: stable@vger.kernel.org # v3.19+
Signed-off-by: Constantine Shulyupin &lt;const@MakeLinux.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
