Linux Documentation
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Nicolae-Daniel Deaconescu <Nicolae-daniel.Deaconescu@analog.com>
Cc: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Michael Hennerich" <michael.hennerich@analog.com>,
	"Trevor Gamblin" <tgamblin@baylibre.com>,
	"Joshua Crofts" <crofts@kernel.org>,
	"Sergiu Cuciurean" <sergiu.cuciurean@analog.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-pwm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 6/6] iio: adc: ad7625: add LTC2387 and ADAQ2387x support
Date: Sat, 21 Nov 2026 23:48:34 +0000	[thread overview]
Message-ID: <20261121234834.2f6cc9bf@jic23-hlaptop> (raw)
In-Reply-To: <20261119112437.197306-7-Nicolae-daniel.Deaconescu@analog.com>

On Thu, 19 Nov 2026 13:24:20 +0200
Nicolae-Daniel Deaconescu <Nicolae-daniel.Deaconescu@analog.com> wrote:

> From: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
> 
> Add the LTC2387-16, LTC2387-18, ADAQ23875, ADAQ23876 and ADAQ23878 as chip
> data of this driver. The same two PWMs and IIO backend are used to read
> from them. See the binding patch for how they differ from the existing
> parts.
> 
> The CLK burst of a conversion starts at least t_FIRSTCLK after its CNV and
> ends at most t_LASTCLK after the next CNV, so the sampling period is raised
> until the burst fits, instead of being clamped to 10 MSPS. Waveforms are
> built in whole PWM steps, read with pwm_get_waveform_step_might_sleep().
> 
> The scale is divided by the gain of the ADAQ front end.
> 
> Add new maintainer entries.
> 
> Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
> Co-developed-by: Nicolae-Daniel Deaconescu <Nicolae-daniel.Deaconescu@analog.com>
> Signed-off-by: Nicolae-Daniel Deaconescu <Nicolae-daniel.Deaconescu@analog.com>


> diff --git a/drivers/iio/adc/ad7625.c b/drivers/iio/adc/ad7625.c
> index 127441050687..8ddd18e45c8a 100644
> --- a/drivers/iio/adc/ad7625.c
> +++ b/drivers/iio/adc/ad7625.c
One minor thing inline. Looks to be a good shape. Thanks

Jonathan


> @@ -498,8 +822,40 @@ static int devm_ad7625_pwm_get(struct device *dev,
>  	return 0;
>  }
>  
> +static int devm_ad7625_listed_regulator_setup(struct device *dev,
> +					      struct ad7625_state *st)
> +{
> +	int ret;
> +
> +	ret = devm_regulator_bulk_get_enable(dev, st->info->num_supplies,
> +					     st->info->supplies);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "failed to enable supplies\n");
> +
> +	/* VS- of the ADAQ modules is left out if it is tied to ground. */
> +	ret = devm_regulator_get_enable_optional(dev, "vs-n");
Does it hurt to just a non optional call here?
You'll get a stub regulator that will do nothing. That seems to make
little difference vs carefully handling the not present case.

The optional stuff only really comes into its own when we want
to do something else instead. It doesn't matter if we are ignoring
the lack of presence.

> +	if (ret && ret != -ENODEV)
> +		return dev_err_probe(dev, ret, "failed to enable VS-\n");
> +
> +	ret = devm_regulator_get_enable_read_voltage(dev, "ref");
> +	if (ret == -ENODEV) {
> +		/* Without ref-supply the internal reference is used. */
> +		st->vref_mv = AD7625_INTERNAL_REF_MV;
> +		return 0;
> +	}
> +	if (ret < 0)
> +		return dev_err_probe(dev, ret, "failed to get REF voltage\n");
> +
> +	st->vref_mv = ret / (MICRO / MILLI);
> +
> +	return 0;
> +}



      reply	other threads:[~2026-11-21 23:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 11:24 [PATCH v4 0/6] iio: adc: ad7625: add LTC2387 and ADAQ2387x support Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 1/6] pwm: core: add pwm_get_waveform_step_might_sleep() Nicolae-Daniel Deaconescu
2026-11-21 23:35   ` Jonathan Cameron
2026-11-19 11:24 ` [PATCH v4 2/6] pwm: axi-pwmgen: report the waveform step Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 3/6] iio: adc: ad7625: fix sampling frequency handling Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 4/6] iio: adc: ad7625: move initial mode setup Nicolae-Daniel Deaconescu
2026-11-21 23:40   ` Jonathan Cameron
2026-11-19 11:24 ` [PATCH v4 5/6] dt-bindings: iio: adc: add adi,ltc2387 Nicolae-Daniel Deaconescu
2026-11-19 11:24 ` [PATCH v4 6/6] iio: adc: ad7625: add LTC2387 and ADAQ2387x support Nicolae-Daniel Deaconescu
2026-11-21 23:48   ` Jonathan Cameron [this message]

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=20261121234834.2f6cc9bf@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=Nicolae-daniel.Deaconescu@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=crofts@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=sergiu.cuciurean@analog.com \
    --cc=tgamblin@baylibre.com \
    --cc=ukleinek@kernel.org \
    /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