Devicetree
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: "Cosmin Tanislav" <cosmin-gabriel.tanislav.xa@renesas.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Magnus Damm" <magnus.damm@gmail.com>,
	linux-iio@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Prabhakar <prabhakar.csengg+renesas@gmail.com>,
	"Biju Das" <biju.das.jz@bp.renesas.com>,
	"Fabrizio Castro" <fabrizio.castro.jz@renesas.com>,
	"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v2 2/8] iio: adc: rzt2h: Wait for the analog part to stop after a forced stop
Date: Tue, 13 Oct 2026 17:55:24 +0300	[thread overview]
Message-ID: <as5GXPcMKe-CBLXK@ashevche-desk.local> (raw)
In-Reply-To: <20261009184122.1378797-3-prabhakar.mahadev-lad.rj@bp.renesas.com>

On Fri, Oct 09, 2026 at 07:41:16PM +0100, Prabhakar wrote:

> When ADCSR.ADST is cleared to forcibly stop a conversion, the analog part
> of the A/D converter can take up to 2 ADCLK cycles to stop operating.
> 
> Wait for the write to ADCSR to complete and allow the analog part to stop
> before reconfiguring or restarting the converter.

...

> +	/*
> +	 * When a conversion is forcibly stopped, the analog part of the A/D
> +	 * converter takes up to 2 ADCLK cycles to stop operating. Read back
> +	 * ADCSR to make sure the write has reached the hardware before
> +	 * starting the delay.
> +	 */
> +	readw(adc->base + RZT2H_ADCSR_REG);
> +	ndelay(DIV_ROUND_UP(RZT2H_ADC_STOP_CYCLES * NSEC_PER_SEC,
> +			    adc->adclk_rate));

A single line (84 characters) is okay in this case.

	ndelay(DIV_ROUND_UP(RZT2H_ADC_STOP_CYCLES * NSEC_PER_SEC, adc->adclk_rate));

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-10-13 14:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 18:41 [PATCH v2 0/8] Add ADC driver support for RZ/V2H(P) and RZ/V2N SoCs Prabhakar
2026-10-09 18:41 ` [PATCH v2 1/8] dt-bindings: iio: adc: renesas,r9a09g077-adc: Add RZ/V2H(P) and RZ/V2N support Prabhakar
2026-10-12 21:07   ` Conor Dooley
2026-10-09 18:41 ` [PATCH v2 2/8] iio: adc: rzt2h: Wait for the analog part to stop after a forced stop Prabhakar
2026-10-13 14:55   ` Andy Shevchenko [this message]
2026-10-09 18:41 ` [PATCH v2 3/8] iio: adc: rzt2h: Add chip-specific configuration Prabhakar
2026-10-09 18:41 ` [PATCH v2 4/8] iio: adc: rzt2h: Add optional reset support Prabhakar
2026-10-09 18:53   ` sashiko-bot
2026-10-09 18:41 ` [PATCH v2 5/8] iio: adc: rzt2h: Prepare for SoCs without sample state registers Prabhakar
2026-10-09 18:41 ` [PATCH v2 6/8] iio: adc: rzt2h: Prepare for SoCs with different ADC info Prabhakar
2026-10-09 18:41 ` [PATCH v2 7/8] iio: adc: rzt2h: Use scan type for ADC scale Prabhakar
2026-10-09 18:41 ` [PATCH v2 8/8] iio: adc: rzt2h: Add support for RZ/V2H(P) SoC Prabhakar
2026-10-09 19:02   ` sashiko-bot
2026-10-13 13:34     ` Lad, Prabhakar
2026-10-12  6:36   ` Biju Das
2026-10-13 11:53     ` Lad, Prabhakar
2026-10-13 15:16   ` Andy Shevchenko

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=as5GXPcMKe-CBLXK@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=cosmin-gabriel.tanislav.xa@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=p.zabel@pengutronix.de \
    --cc=prabhakar.csengg+renesas@gmail.com \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@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