Linux Hardware Monitor development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Qingshuang Fu" <fffsqian@163.com>
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v4] hwmon: (ads7828) Fix external VREF regulator handling
Date: Wed, 05 Aug 2026 06:23:28 +0000	[thread overview]
Message-ID: <20260805062329.3162A1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260805061645.1331652-1-fffsqian@163.com>

> From: Qingshuang Fu <fuqingshuang@kylinos.cn>
> 
> The driver currently has two issues with the external VREF regulator
> handling in ads7828_probe():
> 
> 1. All errors from devm_regulator_get_optional() are ignored, causing the
>    driver to incorrectly fall back to internal VREF even for transient
>    errors like -EPROBE_DEFER or genuine failures like -ENOMEM.
> 
> 2. The external regulator is never enabled. The driver calls
>    regulator_get_voltage() without first calling regulator_enable(),
>    so the VREF pin may remain unpowered if the regulator is not
>    configured as always-on.
> 
> Fix both issues by switching to devm_regulator_get_enable_read_voltage(),
> which handles regulator get, enable, and voltage read in one call.
> Only -ENODEV (no regulator specified in device tree) should trigger the
> fallback to internal VREF. All other errors are propagated to the caller.
> 
> Fixes: a8ddfea09566 ("hwmon: (ads7828) Accept optional parameters from device tree")
> Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260805061645.1331652-1-fffsqian@163.com?part=1


  reply	other threads:[~2026-08-05  6:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05  6:16 [PATCH v4] hwmon: (ads7828) Fix external VREF regulator handling Qingshuang Fu
2026-08-05  6:23 ` sashiko-bot [this message]
2026-08-05 14:52 ` Guenter Roeck

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=20260805062329.3162A1F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=fffsqian@163.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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