Linux userland API discussions
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Cheng Ming Lin <linchengming884@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	 linux-spi@vger.kernel.org, linux-api@vger.kernel.org,
	 alvinzhou@mxic.com.tw
Subject: Re: [PATCH 0/2] spi: spidev: Allow userspace to request DTR transfers
Date: Mon, 30 Nov 2026 09:36:33 +0100	[thread overview]
Message-ID: <87se0i3ecu.fsf@bootlin.com> (raw)
In-Reply-To: <20261130054931.2441438-1-chengminglin@mxic.com.tw> (Cheng Ming Lin's message of "Mon, 30 Nov 2026 13:49:29 +0800")

On 30/11/2026 at 13:49:29 +08, Cheng Ming Lin <linchengming884@gmail.com> wrote:

> The SPI core can perform Double Transfer Rate transfers through
> spi_transfer.dtr_mode on controllers advertising dtr_caps, but there
> is currently no way for userspace to request them through spidev.
>
> The first patch turns the last padding byte of struct spi_ioc_transfer
> into a flags field and adds SPI_IOC_XFER_DTR to set dtr_mode on the
> corresponding transfer. The struct size and layout are unchanged.
>
> The second patch adds a matching -x/--dtr option to spidev_test.

I don't know much this backend, but looks fine, besides the fact that we
are naturally running out of extra bytes in the structure.

Maybe you mentioned it, but it is worth repeating that these padding
bytes are expected to be 0 already.

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

      parent reply	other threads:[~2026-11-30  8:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  5:49 [PATCH 0/2] spi: spidev: Allow userspace to request DTR transfers Cheng Ming Lin
2026-11-30  5:49 ` [PATCH 1/2] " Cheng Ming Lin
2026-11-30  5:49 ` [PATCH 2/2] spi: spidev_test: Add an option " Cheng Ming Lin
2026-11-30  8:36 ` Miquel Raynal [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=87se0i3ecu.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=alvinzhou@mxic.com.tw \
    --cc=broonie@kernel.org \
    --cc=linchengming884@gmail.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-spi@vger.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