<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hwmon/max31827.c, branch v7.0-rc2</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>hwmon: (max31827) Rely on subsystem locking</title>
<updated>2025-10-15T18:02:43+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2025-06-09T18:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e1c4d5db9a87a437f44ddc87032ef043e6511577'/>
<id>e1c4d5db9a87a437f44ddc87032ef043e6511577</id>
<content type='text'>
Attribute access is now serialized in the hardware monitoring core,
so locking in the driver code is no longer necessary. Drop it.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Attribute access is now serialized in the hardware monitoring core,
so locking in the driver code is no longer necessary. Drop it.

Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (max31827) use sysfs_emit() in temp1_resolution_show()</title>
<updated>2025-07-20T23:38:34+00:00</updated>
<author>
<name>Khaled Elnaggar</name>
<email>khaledelnaggarlinux@gmail.com</email>
</author>
<published>2025-07-12T13:14:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d1eb9fe14e73dc2ca47fd3c2f9f3c8753e33b774'/>
<id>d1eb9fe14e73dc2ca47fd3c2f9f3c8753e33b774</id>
<content type='text'>
Replace scnprintf() with sysfs_emit() in temp1_resolution_show(),
as recommended in Documentation/filesystems/sysfs.rst: show() callbacks
should use sysfs_emit() or sysfs_emit_at() to format values returned to
userspace.

Signed-off-by: Khaled Elnaggar &lt;khaledelnaggarlinux@gmail.com&gt;
Link: https://lore.kernel.org/r/20250712131447.326995-1-khaledelnaggarlinux@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace scnprintf() with sysfs_emit() in temp1_resolution_show(),
as recommended in Documentation/filesystems/sysfs.rst: show() callbacks
should use sysfs_emit() or sysfs_emit_at() to format values returned to
userspace.

Signed-off-by: Khaled Elnaggar &lt;khaledelnaggarlinux@gmail.com&gt;
Link: https://lore.kernel.org/r/20250712131447.326995-1-khaledelnaggarlinux@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (pmbus/max31827) Explain why enum chips must not start with 0</title>
<updated>2024-06-11T14:25:03+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2024-06-07T13:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=138d45d96758db803b50761297f3331c9170bc87'/>
<id>138d45d96758db803b50761297f3331c9170bc87</id>
<content type='text'>
If a driver calls device_get_match_data(), the .data pointer in its id
data structures must not be NULL/0 because device_get_match_data()
returns NULL if an entry is not found. Explain that in a comment to avoid
confusion why this is required in this driver but not in other drivers.

Cc: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Acked-by: Nuno Sa &lt;nuno.sa@analog.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>
If a driver calls device_get_match_data(), the .data pointer in its id
data structures must not be NULL/0 because device_get_match_data()
returns NULL if an entry is not found. Explain that in a comment to avoid
confusion why this is required in this driver but not in other drivers.

Cc: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Acked-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (max31827) Add PEC support</title>
<updated>2024-06-04T03:26:31+00:00</updated>
<author>
<name>Radu Sabau</name>
<email>radu.sabau@analog.com</email>
</author>
<published>2024-05-31T08:46:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5124d9acf3af50bcc6d0958db4fecb3c2f13f8ed'/>
<id>5124d9acf3af50bcc6d0958db4fecb3c2f13f8ed</id>
<content type='text'>
Add PEC support using the hwmon core infrastructure.

Signed-off-by: Radu Sabau &lt;radu.sabau@analog.com&gt;
Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Link: https://lore.kernel.org/r/20240531084645.12935-2-radu.sabau@analog.com
[groeck: Adjusted subject; simplified description]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add PEC support using the hwmon core infrastructure.

Signed-off-by: Radu Sabau &lt;radu.sabau@analog.com&gt;
Reviewed-by: Nuno Sa &lt;nuno.sa@analog.com&gt;
Link: https://lore.kernel.org/r/20240531084645.12935-2-radu.sabau@analog.com
[groeck: Adjusted subject; simplified description]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: Remove I2C_CLASS_HWMON from drivers w/o detect() and address_list</title>
<updated>2024-02-11T21:43:08+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2024-01-27T15:02:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e7b631d798716bba5cf1499caf62c548c7905439'/>
<id>e7b631d798716bba5cf1499caf62c548c7905439</id>
<content type='text'>
Class-based I2C probing requires detect() and address_list to be
set in the I2C client driver, see checks in i2c_detect().
It's misleading to declare I2C_CLASS_HWMON support if this
precondition isn't met.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Link: https://lore.kernel.org/r/75747c6a-d414-4b07-8f66-5a5cdddc3c36@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Class-based I2C probing requires detect() and address_list to be
set in the I2C client driver, see checks in i2c_detect().
It's misleading to declare I2C_CLASS_HWMON support if this
precondition isn't met.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Link: https://lore.kernel.org/r/75747c6a-d414-4b07-8f66-5a5cdddc3c36@gmail.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (max31827) Add custom attribute for resolution</title>
<updated>2023-12-11T14:42:58+00:00</updated>
<author>
<name>Daniel Matyas</name>
<email>daniel.matyas@analog.com</email>
</author>
<published>2023-10-31T18:21:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=29a9ac6414abd634e7f460a250b70a452d9a04b9'/>
<id>29a9ac6414abd634e7f460a250b70a452d9a04b9</id>
<content type='text'>
Added custom channel-specific (temp1) attribute for resolution. The wait
time for a conversion in one-shot mode (enable = 0) depends on the
resolution.

When resolution is 12-bit, the conversion time is 140ms, but the minimum
update_interval is 125ms. Handled this problem by waiting an additional
15ms (125ms + 15ms = 140ms).

Added 'mask' parameter to the shutdown_write() function. Now it can
either write or update bits, depending on the value of mask. This is
needed, because for alarms a write is necessary, but for resolution only
the resolution bits should be updated.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-5-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added custom channel-specific (temp1) attribute for resolution. The wait
time for a conversion in one-shot mode (enable = 0) depends on the
resolution.

When resolution is 12-bit, the conversion time is 140ms, but the minimum
update_interval is 125ms. Handled this problem by waiting an additional
15ms (125ms + 15ms = 140ms).

Added 'mask' parameter to the shutdown_write() function. Now it can
either write or update bits, depending on the value of mask. This is
needed, because for alarms a write is necessary, but for resolution only
the resolution bits should be updated.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-5-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (max31827) Return closest value in update_interval</title>
<updated>2023-12-11T14:42:54+00:00</updated>
<author>
<name>Daniel Matyas</name>
<email>daniel.matyas@analog.com</email>
</author>
<published>2023-10-31T18:21:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=64176bde4645686590bb0e5efcbcd18497ee4389'/>
<id>64176bde4645686590bb0e5efcbcd18497ee4389</id>
<content type='text'>
When user writes a value to update_interval which does not match the
possible values, instead of returning invalid error, return the closest
value.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-4-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When user writes a value to update_interval which does not match the
possible values, instead of returning invalid error, return the closest
value.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-4-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (max31827) Update bits with shutdown_write()</title>
<updated>2023-12-11T14:42:50+00:00</updated>
<author>
<name>Daniel Matyas</name>
<email>daniel.matyas@analog.com</email>
</author>
<published>2023-10-31T18:21:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8a0806df46b62e88793cab0035da477092bda09a'/>
<id>8a0806df46b62e88793cab0035da477092bda09a</id>
<content type='text'>
Added 'mask' parameter to the shutdown_write() function. Now it can
either write or update bits, depending on the value of mask. This is
needed, because for alarms a write is necessary, but for resolution only
the resolution bits should be updated.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-3-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added 'mask' parameter to the shutdown_write() function. Now it can
either write or update bits, depending on the value of mask. This is
needed, because for alarms a write is necessary, but for resolution only
the resolution bits should be updated.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-3-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (max31827) Add support for max31828 and max31829</title>
<updated>2023-12-11T14:42:40+00:00</updated>
<author>
<name>Daniel Matyas</name>
<email>daniel.matyas@analog.com</email>
</author>
<published>2023-10-31T18:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cbeb1d2acf5d28debbe710dff6357c859eee061a'/>
<id>cbeb1d2acf5d28debbe710dff6357c859eee061a</id>
<content type='text'>
Created of_match_table and id_table entries for max31828 and max31829.

When adi,flt-q and/or adi,alrm-pol are not mentioned,
the default configuration is loaded based on the type of the chip.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-2-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Created of_match_table and id_table entries for max31828 and max31829.

When adi,flt-q and/or adi,alrm-pol are not mentioned,
the default configuration is loaded based on the type of the chip.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-2-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (max31827) Handle new properties from the devicetree</title>
<updated>2023-12-11T14:42:36+00:00</updated>
<author>
<name>Daniel Matyas</name>
<email>daniel.matyas@analog.com</email>
</author>
<published>2023-10-31T18:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=88548710d2aed71677f7594a78219bf081d4297f'/>
<id>88548710d2aed71677f7594a78219bf081d4297f</id>
<content type='text'>
Used fwnode to retrieve data from the devicetree in the init_client
function.

If the uint32 properties are not present, the default values are used
for max31827 chip.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-1-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Used fwnode to retrieve data from the devicetree in the init_client
function.

If the uint32 properties are not present, the default values are used
for max31827 chip.

Signed-off-by: Daniel Matyas &lt;daniel.matyas@analog.com&gt;
Link: https://lore.kernel.org/r/20231031182158.124608-1-daniel.matyas@analog.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
