<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/hwmon/max31790.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-02-11T21:43:08Z</updated>
<entry>
<title>hwmon: Remove I2C_CLASS_HWMON from drivers w/o detect() and address_list</title>
<updated>2024-02-11T21:43:08Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2024-01-27T15:02:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7b631d798716bba5cf1499caf62c548c7905439'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>hwmon: Switch i2c drivers back to use .probe()</title>
<updated>2023-06-08T13:41:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-05-05T13:17:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1975d167869ef03102771d6267582623d6e07058'/>
<id>urn:sha1:1975d167869ef03102771d6267582623d6e07058</id>
<content type='text'>
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230505131718.1210071-1-u.kleine-koenig@pengutronix.de
[groeck: Added missing change in pmbus/acbel-fsg032.c]
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: max31790: constify pointers to hwmon_channel_info</title>
<updated>2023-04-19T14:08:37Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2023-04-06T20:30:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=822ce415baa4f46e0c8fe03944ccd1bcee199583'/>
<id>urn:sha1:822ce415baa4f46e0c8fe03944ccd1bcee199583</id>
<content type='text'>
Statically allocated array of pointed to hwmon_channel_info can be made
const for safety.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (max31790) add fanN_enable</title>
<updated>2022-09-19T13:17:05Z</updated>
<author>
<name>Justin Ledford</name>
</author>
<published>2022-08-29T19:59:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b38279e1a3f10c8046761b9732dccbfed78d614'/>
<id>urn:sha1:5b38279e1a3f10c8046761b9732dccbfed78d614</id>
<content type='text'>
The MAX31790 has a tach input enable bit in each fan's configuration
register. This is only enabled by the driver if RPM mode is selected,
but the driver doesn't provide a way to independently enable tachometer
input regardless of the regulator mode.

By adding the fanN_enable sysfs files, we can decouple the tach input
from the regulator mode. Also update the documentation.

Signed-off-by: Justin Ledford &lt;justinledford@google.com&gt;
Link: https://lore.kernel.org/r/20220829195930.2521755-1-justinledford@google.com
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
<entry>
<title>hwmon: (max31790) Detect and report zero fan speed</title>
<updated>2021-06-17T11:21:46Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2021-05-26T15:40:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1814c4e84de2a89d1c2e1e9bbd241240561075a4'/>
<id>urn:sha1:1814c4e84de2a89d1c2e1e9bbd241240561075a4</id>
<content type='text'>
If a fan is not running or not connected, of if fan monitoring is disabled,
the fan count register returns a fixed value of 0xffe0. So far this is then
translated to a RPM value larger than 0. Since this is misleading and does
not really make much sense, report a fan RPM of 0 in this situation.

Cc: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Cc: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Link: https://lore.kernel.org/r/20210526154022.3223012-7-linux@roeck-us.net
</content>
</entry>
<entry>
<title>hwmon: (max31790) Clear fan fault after reporting it</title>
<updated>2021-06-17T11:21:46Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2021-05-26T15:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2013607b85f03ff24a5a19933705905a1b324a31'/>
<id>urn:sha1:2013607b85f03ff24a5a19933705905a1b324a31</id>
<content type='text'>
Fault bits in MAX31790 are sticky and have to be cleared explicitly.
A write operation into either the 'Target Duty Cycle' register or the
'Target Count' register is necessary to clear a fault.

At the same time, we can never clear cached fault status values before
reading them because the companion fault status for any given fan is
cleared as well when clearing a fault.

Cc: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Cc: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Link: https://lore.kernel.org/r/20210526154022.3223012-6-linux@roeck-us.net
</content>
</entry>
<entry>
<title>hwmon: (max31790) Fix pwmX_enable attributes</title>
<updated>2021-06-17T11:21:46Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2021-05-26T15:40:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=148c847c9e5a54b99850617bf9c143af9a344f92'/>
<id>urn:sha1:148c847c9e5a54b99850617bf9c143af9a344f92</id>
<content type='text'>
pwmX_enable supports three possible values:

0: Fan control disabled. Duty cycle is fixed to 0%
1: Fan control enabled, pwm mode. Duty cycle is determined by
   values written into Target Duty Cycle registers.
2: Fan control enabled, rpm mode
   Duty cycle is adjusted such that fan speed matches
   the values in Target Count registers

The current code does not do this; instead, it mixes pwm control
configuration with fan speed monitoring configuration. Worse, it
reports that pwm control would be disabled (pwmX_enable==0) when
it is in fact enabled in pwm mode. Part of the problem may be that
the chip sets the "TACH input enable" bit on its own whenever the
mode bit is set to RPM mode, but that doesn't mean that "TACH input
enable" accurately reflects the pwm mode.

Fix it up and only handle pwm control with the pwmX_enable attributes.
In the documentation, clarify that disabling pwm control (pwmX_enable=0)
sets the pwm duty cycle to 0%. In the code, explain why TACH_INPUT_EN
is set together with RPM_MODE.

While at it, only update the configuration register if the configuration
has changed, and only update the cached configuration if updating the
chip configuration was successful.

Cc: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Cc: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Reviewed-by: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Link: https://lore.kernel.org/r/20210526154022.3223012-4-linux@roeck-us.net
</content>
</entry>
<entry>
<title>hwmon: (max31790) Report correct current pwm duty cycles</title>
<updated>2021-06-17T11:21:45Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2021-05-26T15:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=897f6339893b741a5d68ae8e2475df65946041c2'/>
<id>urn:sha1:897f6339893b741a5d68ae8e2475df65946041c2</id>
<content type='text'>
The MAX31790 has two sets of registers for pwm duty cycles, one to request
a duty cycle and one to read the actual current duty cycle. Both do not
have to be the same.

When reporting the pwm duty cycle to the user, the actual pwm duty cycle
from pwm duty cycle registers needs to be reported. When setting it, the
pwm target duty cycle needs to be written. Since we don't know the actual
pwm duty cycle after a target pwm duty cycle has been written, set the
valid flag to false to indicate that actual pwm duty cycle should be read
from the chip instead of using cached values.

Cc: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Cc: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Tested-by: Václav Kubernát &lt;kubernat@ceesnet.cz&gt;
Reviewed-by: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Link: https://lore.kernel.org/r/20210526154022.3223012-3-linux@roeck-us.net
</content>
</entry>
<entry>
<title>hwmon: (max31790) Fix fan speed reporting for fan7..12</title>
<updated>2021-06-17T11:21:45Z</updated>
<author>
<name>Guenter Roeck</name>
</author>
<published>2021-05-26T15:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbbf244f0515af3472084f22b6213121b4a63835'/>
<id>urn:sha1:cbbf244f0515af3472084f22b6213121b4a63835</id>
<content type='text'>
Fans 7..12 do not have their own set of configuration registers.
So far the code ignored that and read beyond the end of the configuration
register range to get the tachometer period. This resulted in more or less
random fan speed values for those fans.

The datasheet is quite vague when it comes to defining the tachometer
period for fans 7..12. Experiments confirm that the period is the same
for both fans associated with a given set of configuration registers.

Fixes: 54187ff9d766 ("hwmon: (max31790) Convert to use new hwmon registration API")
Fixes: 195a4b4298a7 ("hwmon: Driver for Maxim MAX31790")
Cc: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Reviewed-by: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Cc: Václav Kubernát &lt;kubernat@cesnet.cz&gt;
Reviewed-by: Jan Kundrát &lt;jan.kundrat@cesnet.cz&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20210526154022.3223012-2-linux@roeck-us.net
</content>
</entry>
<entry>
<title>hwmon: use simple i2c probe function</title>
<updated>2020-09-23T16:42:39Z</updated>
<author>
<name>Stephen Kitt</name>
</author>
<published>2020-08-13T16:02:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6748703856d461f8cd62b72ebca51040e06cb310'/>
<id>urn:sha1:6748703856d461f8cd62b72ebca51040e06cb310</id>
<content type='text'>
Many hwmon drivers don't use the id information provided by the old
i2c probe function, and the remainder can easily be adapted to the new
form ("probe_new") by calling i2c_match_id explicitly.

This avoids scanning the identifier tables during probes.

Drivers which didn't use the id are converted as-is; drivers which did
are modified as follows:

* if the information in i2c_client is sufficient, that's used instead
  (client-&gt;name);
* anything else is handled by calling i2c_match_id() with the same
  level of error-handling (if any) as before.

A few drivers aren't included in this patch because they have a
different set of maintainers. They will be covered by other patches.

Signed-off-by: Stephen Kitt &lt;steve@sk2.org&gt;
Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
</entry>
</feed>
