From: Stanislav Aleksandrov <lightofmysoul@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Nurettin Bolucu <Nurettin.Bolucu@analog.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Stanislav Aleksandrov <lightofmysoul@gmail.com>
Subject: [PATCH 2/3] hwmon: (max31760) Leave standby mode at probe
Date: Sun, 08 Nov 2026 03:59:54 +0000 [thread overview]
Message-ID: <20261108-max31760-fixes-v1-2-a61450463059@gmail.com> (raw)
In-Reply-To: <20261108-max31760-fixes-v1-0-a61450463059@gmail.com>
The driver never clears the standby bit (CR2_STBY) during probe.
While max31760_resume() clears this bit on resume, probe only
configured CR2_ALERTS.
If the chip was left in standby (for example, by boot firmware or a
previously running OS before a warm reboot), it remains in standby:
temperature sensing, fan speed counting, and PWM output are halted.
This occurs on the Samsung Galaxy XR, where the bootloader places the
chip in standby during boot.
Clear CR2_STBY alongside setting CR2_ALERTS in probe.
Fixes: 38b04ad02d0d ("drivers: hwmon: Add max31760 fan speed controller driver")
Signed-off-by: Stanislav Aleksandrov <lightofmysoul@gmail.com>
---
drivers/hwmon/max31760.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/max31760.c b/drivers/hwmon/max31760.c
index e3d86dc4257e..e967555a21af 100644
--- a/drivers/hwmon/max31760.c
+++ b/drivers/hwmon/max31760.c
@@ -533,8 +533,9 @@ static int max31760_probe(struct i2c_client *client)
dev_set_drvdata(dev, state);
- /* Set alert output to comparator mode */
- ret = regmap_set_bits(state->regmap, REG_CR2, CR2_ALERTS);
+ /* Leave standby mode, set alert output to comparator mode */
+ ret = regmap_update_bits(state->regmap, REG_CR2, CR2_STBY | CR2_ALERTS,
+ CR2_ALERTS);
if (ret)
return dev_err_probe(dev, ret, "cannot write register\n");
--
2.55.0
next prev parent reply other threads:[~2026-11-08 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 3:59 [PATCH 0/3] hwmon: (max31760) Fix local limits, standby and the initial fan speed Stanislav Aleksandrov
2026-11-08 3:59 ` [PATCH 1/3] hwmon: (max31760) Fix the local temperature limit registers Stanislav Aleksandrov
2026-11-08 3:59 ` Stanislav Aleksandrov [this message]
2026-11-08 3:59 ` [PATCH 3/3] hwmon: (max31760) Report 0 RPM before the first fan speed measurement Stanislav Aleksandrov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261108-max31760-fixes-v1-2-a61450463059@gmail.com \
--to=lightofmysoul@gmail.com \
--cc=Nurettin.Bolucu@analog.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®