<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hwmon/max6697.c, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-08-19T03:31:56Z</updated>
<entry>
<title>hwmon: (max6697) Fix swapped temp{1,8} critical alarms</title>
<updated>2024-08-19T03:31:56Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2024-07-13T19:03:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b52603ed8bdcceb9b8c16d2db7abd19e024fbe2'/>
<id>urn:sha1:6b52603ed8bdcceb9b8c16d2db7abd19e024fbe2</id>
<content type='text'>
[ Upstream commit 1ea3fd1eb9869fcdcbc9c68f9728bfc47b9503f1 ]

The critical alarm bit for the local temperature sensor (temp1) is in
bit 7 of register 0x45 (not bit 6), and the critical alarm bit for remote
temperature sensor 7 (temp8) is in bit 6 (not bit 7).

This only affects MAX6581 since all other chips supported by this driver
do not support those critical alarms.

Fixes: 5372d2d71c46 ("hwmon: Driver for Maxim MAX6697 and compatibles")
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.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: (max6697) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}</title>
<updated>2024-08-19T03:31:56Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2018-12-06T18:54:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a72d79eef89ce242e08edb18f64106374117295'/>
<id>urn:sha1:7a72d79eef89ce242e08edb18f64106374117295</id>
<content type='text'>
[ Upstream commit 740c2f2b86a71ad673f329241ac25cfe647aacd4 ]

Conversion was done done using the coccinelle script at
https://github.com/groeck/coccinelle-patches/raw/master/hwmon/sensor-devattr-w6.cocci

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Stable-dep-of: 1ea3fd1eb986 ("hwmon: (max6697) Fix swapped temp{1,8} critical alarms")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>hwmon: (max6697) Fix underflow when writing limit attributes</title>
<updated>2024-08-19T03:31:56Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2024-07-13T21:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21998f2c68edd4a7922875f34b39ce2bb78fabc0'/>
<id>urn:sha1:21998f2c68edd4a7922875f34b39ce2bb78fabc0</id>
<content type='text'>
[ Upstream commit cbf7467828cd4ec7ceac7a8b5b5ddb2f69f07b0e ]

Using DIV_ROUND_CLOSEST() on an unbound value can result in underflows.
Indeed, module test scripts report:

temp1_max: Suspected underflow: [min=0, read 255000, written -9223372036854775808]
temp1_crit: Suspected underflow: [min=0, read 255000, written -9223372036854775808]

Fix by introducing an extra set of clamping.

Fixes: 5372d2d71c46 ("hwmon: Driver for Maxim MAX6697 and compatibles")
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.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: (max6697) Make sure the OVERT mask is set correctly</title>
<updated>2020-07-09T07:37:10Z</updated>
<author>
<name>Chu Lin</name>
</author>
<published>2020-06-23T22:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbec0023eb85a55f24554b7f2df53ca37deff1b9'/>
<id>urn:sha1:cbec0023eb85a55f24554b7f2df53ca37deff1b9</id>
<content type='text'>
[ Upstream commit 016983d138cbe99a5c0aaae0103ee88f5300beb3 ]

Per the datasheet for max6697, OVERT mask and ALERT mask are different.
For example, the 7th bit of OVERT is the local channel but for alert
mask, the 6th bit is the local channel. Therefore, we can't apply the
same mask for both registers. In addition to that, the max6697 driver
is supposed to be compatibale with different models. I manually went over
all the listed chips and made sure all chip types have the same layout.

Testing;
    mask value of 0x9 should map to 0x44 for ALERT and 0x84 for OVERT.
    I used iotool to read the reg value back to verify. I only tested this
    change on max6581.

Reference:
https://datasheets.maximintegrated.com/en/ds/MAX6581.pdf
https://datasheets.maximintegrated.com/en/ds/MAX6697.pdf
https://datasheets.maximintegrated.com/en/ds/MAX6699.pdf

Signed-off-by: Chu Lin &lt;linchuyuan@google.com&gt;
Fixes: 5372d2d71c46e ("hwmon: Driver for Maxim MAX6697 and compatibles")
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: (max6697) Add OF device ID table</title>
<updated>2017-04-02T14:01:53Z</updated>
<author>
<name>Javier Martinez Canillas</name>
</author>
<published>2017-02-24T13:13:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e427083c3cec46435988f2ee80d643a82ec9e4c'/>
<id>urn:sha1:9e427083c3cec46435988f2ee80d643a82ec9e4c</id>
<content type='text'>
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:&lt;device&gt;.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (max6697) Use of_property_read_bool at appropriate places</title>
<updated>2014-08-04T14:01:40Z</updated>
<author>
<name>Axel Lin</name>
</author>
<published>2014-07-29T15:06:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8de2dcc9a1355f83885d34888b7e6549d9ea6d92'/>
<id>urn:sha1:8de2dcc9a1355f83885d34888b7e6549d9ea6d92</id>
<content type='text'>
This slightly improves readability.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (max6697) fix coccinelle warnings</title>
<updated>2013-10-18T16:11:59Z</updated>
<author>
<name>Fengguang Wu</name>
</author>
<published>2013-09-18T03:54:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4109a7160849604395eda57d6f011c8db3866482'/>
<id>urn:sha1:4109a7160849604395eda57d6f011c8db3866482</id>
<content type='text'>
drivers/hwmon/max6697.c:649:1-3: WARNING: PTR_RET can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: coccinelle/api/ptr_ret.cocci

CC: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (max6697) Convert to use devm_hwmon_device_register_with_groups</title>
<updated>2013-10-13T23:16:28Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2013-09-02T05:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d3735522fb192738d7161865d41688f10983613'/>
<id>urn:sha1:8d3735522fb192738d7161865d41688f10983613</id>
<content type='text'>
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (max6697) fix MAX6581 ideality</title>
<updated>2013-08-03T14:04:50Z</updated>
<author>
<name>Vivien Didelot</name>
</author>
<published>2013-07-30T21:14:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c52add19733eb36d8619713312f5604efef3502'/>
<id>urn:sha1:5c52add19733eb36d8619713312f5604efef3502</id>
<content type='text'>
Without this patch, the values for ideality (register 0x4b) and ideality
selection mask (register 0x4c) are inverted.

Signed-off-by: Vivien Didelot &lt;vivien.didelot@savoirfairelinux.com&gt;
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (max6697) Use is_visible and sysfs_create_group</title>
<updated>2013-04-08T04:16:41Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2013-03-18T13:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6bf44cedab5918bee8e8fea8c7ad187996c8c874'/>
<id>urn:sha1:6bf44cedab5918bee8e8fea8c7ad187996c8c874</id>
<content type='text'>
Simplify the code and reduce its size by using is_visible to determine
valid attributes, and sysfs_create_group to create all of them with
a single call.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
