linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Patrice CHOTARD <patrice.chotard@foss.st.com>
Cc: Pratyush Yadav <p.yadav@ti.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	linux-mtd@lists.infradead.org,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-spi@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, christophe.kerello@foss.st.com
Subject: Re: [PATCH 1/3] spi: spi-mem: add automatic poll status functions
Date: Fri, 30 Apr 2021 16:56:23 +0100	[thread overview]
Message-ID: <20210430155623.GD5981@sirena.org.uk> (raw)
In-Reply-To: <28acedfd-6cd5-a8ad-0182-e61c3c30c27d@foss.st.com>

[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]

On Fri, Apr 30, 2021 at 04:22:34PM +0200, Patrice CHOTARD wrote:
> On 4/26/21 6:51 PM, Mark Brown wrote:
> > On Mon, Apr 26, 2021 at 09:56:12PM +0530, Pratyush Yadav wrote:

> > Is it possible there's some situation where you're waiting for some bits
> > to clear as well?

> Yes, we are waiting STATUS_BUSY bit to be cleared, see patch 2 which is making 
> usage of this API.

Then the inverse question applies - is there no circumstance where we
might be waiting for a bit to be set?

> > We already have the core handling other timeouts.  We don't pass around
> > completions but rather have an API function that the driver has to call
> > when the operation completes, a similar pattern might work here.  Part

> So, if i correctly understood, you make allusion to what is already done
> in SPI core framework with spi_finalize_current_transfer() right ?

Yes, and _current_message().

> > of the thing with those APIs which I'm missing here is that this will
> > just return -EOPNOTSUPP if the driver can't do the delay in hardware, I
> > think it would be cleaner if this API were similar and the core dealt
> > with doing the delay/poll on the CPU.  That way the users don't need to
> > repeat the handling for the offload/non-offload cases.

> Sorry, i didn't catch what you mean here. In PATCH 2, that's the case,
> if spi_mem_poll_status() is not supported, the core is dealing with 
> the delay/poll on the CPU in spinand_wait().

That's in the NAND core, not in spi-mem.  Any other users of spi-mem
will also need to open code stuff.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-04-30 15:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-26 14:39 [PATCH 0/3] MTD: spinand: Add spi_mem_poll_status() support patrice.chotard
2021-04-26 14:39 ` [PATCH 1/3] spi: spi-mem: add automatic poll status functions patrice.chotard
2021-04-26 16:26   ` Pratyush Yadav
2021-04-26 16:51     ` Mark Brown
2021-04-26 17:39       ` Pratyush Yadav
2021-04-30 14:22       ` Patrice CHOTARD
2021-04-30 15:56         ` Mark Brown [this message]
2021-05-05  7:21           ` Patrice CHOTARD
2021-04-30 14:16     ` Patrice CHOTARD
2021-04-30 16:51   ` Boris Brezillon
2021-05-03  8:47     ` Pratyush Yadav
2021-05-03  9:11       ` Boris Brezillon
2021-05-03  9:29         ` Pratyush Yadav
2021-05-03  9:52           ` Boris Brezillon
2021-05-04  7:46             ` Pratyush Yadav
2021-05-05  7:26             ` Patrice CHOTARD
2021-04-30 16:52   ` Boris Brezillon
2021-04-26 14:39 ` [PATCH 2/3] mtd: spinand: use the spi-mem poll status APIs patrice.chotard
2021-04-26 14:39 ` [PATCH 3/3] spi: stm32-qspi: add automatic poll status feature patrice.chotard
2021-04-30 16:53   ` Boris Brezillon

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=20210430155623.GD5981@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=boris.brezillon@collabora.com \
    --cc=christophe.kerello@foss.st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.yadav@ti.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).