Linux SPI subsystem development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: "Tim Harvey" <tharvey@gateworks.com>,
	"open list" <linux-kernel@vger.kernel.org>,
	linux-can@vger.kernel.org,
	"Wolfgang Grandegger" <wg@grandegger.com>,
	"Timo Schlüßler" <schluessler@krause.de>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	linux-spi@vger.kernel.org, "Jan Glauber" <jglauber@marvell.com>,
	"Robert Richter" <rrichter@marvell.com>
Subject: Re: [PATCH] can: mcp251x: convert to half-duplex SPI
Date: Mon, 25 May 2020 12:31:06 +0100	[thread overview]
Message-ID: <20200525113106.GB4544@sirena.org.uk> (raw)
In-Reply-To: <e0f641bc-5473-792d-fea9-0a2e81fe1e38@pengutronix.de>

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

On Mon, May 25, 2020 at 01:17:01PM +0200, Marc Kleine-Budde wrote:
> On 5/21/20 10:19 PM, Tim Harvey wrote:

> 
> > Should I be submitting this patch with logic that only does
> > half-duplex if the spi controller doesn't support it (if
> > (spi->controller->flags & SPI_CONTROLLER_HALF_DUPLEX)) or is it
> > acceptable to simply make the driver half-duplex like this for all
> > cases?

> Please make half duplex transfers depending on SPI_CONTROLLER_HALF_DUPLEX as
> most drivers have a considerable overhead at the end of a transfer.

> Most of them wait for a transfer complete interrupt. Which might take longer
> than the actual SPI transfer. Splitting one full duplex read-register transfer
> (which is a write followed by a read) into two half duplex transfers would kill
> performance on full duplex capable controllers.

This isn't something that every individual driver should be doing, such
rewriting should happen in the core so that everything sees the benefit.

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

  reply	other threads:[~2020-05-25 11:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1582655734-20890-1-git-send-email-tharvey@gateworks.com>
     [not found] ` <0ac77abd-0df5-e437-ea46-f6c77f59b81c@pengutronix.de>
     [not found]   ` <CAJ+vNU3vk92_1UnrYH72QgD3-q9Oy9As=jCiup42jzx_2LG9FA@mail.gmail.com>
     [not found]     ` <0b351fe3-8fe9-572f-fd85-e2aed22873e3@pengutronix.de>
     [not found]       ` <7b85e098-b9a9-dd14-203f-100cdf2e703e@pengutronix.de>
2020-05-21 20:19         ` [PATCH] can: mcp251x: convert to half-duplex SPI Tim Harvey
2020-05-21 21:08           ` Mark Brown
2020-05-25 11:17           ` Marc Kleine-Budde
2020-05-25 11:31             ` Mark Brown [this message]
2020-05-25 12:41               ` Marc Kleine-Budde
2020-05-25 12:57                 ` Mark Brown
2020-05-25 13:12                   ` Marc Kleine-Budde
2020-05-25 13:27                     ` Mark Brown

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=20200525113106.GB4544@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jglauber@marvell.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=rrichter@marvell.com \
    --cc=schluessler@krause.de \
    --cc=tharvey@gateworks.com \
    --cc=wg@grandegger.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