public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <Marius.Cristea@microchip.com>
To: <kent@minoris.se>, <jic23@kernel.org>,
	<marcus.folkesson@gmail.com>, <dlechner@baylibre.com>
Cc: <lgirdwood@gmail.com>, <broonie@kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 5/6] iio: adc: mcp3564: use devm_regulator_get_enable_read_voltage()
Date: Wed, 17 Jul 2024 13:02:40 +0000	[thread overview]
Message-ID: <87ea4041b5e5569389a2c5301f41f37340ad25cf.camel@microchip.com> (raw)
In-Reply-To: <20240712-iio-regulator-refactor-round-3-v1-5-835017bae43d@baylibre.com>

Hi David,

   Thank you very much for cleaning up the code.

On Fri, 2024-07-12 at 11:03 -0500, David Lechner wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> This makes use of the new devm_regulator_get_enable_read_voltage()
> helper function to reduce boilerplate code in the MCP3564 ADC driver.
> 
> The error message is slightly changed since there are fewer error
> return paths.
> 
> Setting adc->vref_mv is consolidated into a single place to make the
> logic easier to follow.
> 
> A use_auto_zeroing_ref_attr local variable is added to make it more
> obvious what the difference between the two iio info structures is.
> 

Can we use another name here, instead of "use_auto_zeroing_ref_attr" to
use something like "use_internal_vref_attr". It could be misleading
because the difference between the two part numbers is related to
having or not having the internal voltage reference. If the part has
voltage reference (with the R at the end) and the user want's to use
it, there is an attribute to enable/disable in hardware the
"auto_zeroing_ref".

> The return value of the "Unknown Vref" dev_err_probe() is hard-coded
> to
> -ENODEV instead of ret since it was getting a bit far from where ret
> was set and logically that is the only value it could have.
> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---

Best regards,
Marius

  reply	other threads:[~2024-07-17 13:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 16:03 [PATCH 0/6] iio: use devm_regulator_get_enable_read_voltage round 3 David Lechner
2024-07-12 16:03 ` [PATCH 1/6] iio: dac: mcp4728: rename err to ret in probe function David Lechner
2024-07-12 16:03 ` [PATCH 2/6] iio: dac: mcp4728: use devm_regulator_get_enable_read_voltage() David Lechner
2024-07-12 16:03 ` [PATCH 3/6] iio: dac: mcp4922: " David Lechner
2024-07-12 16:03 ` [PATCH 4/6] iio: dac: mcp4922: drop remove() callback David Lechner
2024-07-12 16:03 ` [PATCH 5/6] iio: adc: mcp3564: use devm_regulator_get_enable_read_voltage() David Lechner
2024-07-17 13:02   ` Marius.Cristea [this message]
2024-07-12 16:03 ` [PATCH 6/6] iio: adc: mcp3911: " David Lechner
2024-07-13  5:48   ` Marcus Folkesson
2024-07-20 12:50 ` [PATCH 0/6] iio: use devm_regulator_get_enable_read_voltage round 3 Jonathan Cameron

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=87ea4041b5e5569389a2c5301f41f37340ad25cf.camel@microchip.com \
    --to=marius.cristea@microchip.com \
    --cc=broonie@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=kent@minoris.se \
    --cc=lgirdwood@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.folkesson@gmail.com \
    /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