mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Weibin Liu <liuwb@xiaopeng.com>
To: broonie@kernel.org
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: ch341: handle transfers without a TX or RX buffer
Date: Tue, 13 Oct 2026 13:43:35 +0800	[thread overview]
Message-ID: <20261013054335.75607-1-liuwb@xiaopeng.com> (raw)
In-Reply-To: <50aa0347-c729-436b-898f-7b6befcac9dc@sirena.org.uk>

Hi Mark,

Thanks for the review.

> Are you sure the actual hardware supports half duplex and the fix isn't
> to set _MUST_RX and _MUST_TX?

It doesn't. The CH341A clocks data in both directions on every
transfer and has no mode to disable a direction; the 4-wire mode has
separate DIN/DOUT pins. So v2 sets SPI_CONTROLLER_MUST_TX |
SPI_CONTROLLER_MUST_RX in probe and drops the driver-side NULL
handling:

	ctrl->flags = SPI_CONTROLLER_MUST_TX | SPI_CONTROLLER_MUST_RX;

Re-ran the gadgetfs + dummy_hcd emulation on top of v2: probe, tx-only,
rx-only and full-duplex transfers all still pass, no splats.

No other changes.

Weibin

  reply	other threads:[~2026-10-13  5:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  8:11 Weibin Liu
2026-09-29 14:40 ` Mark Brown
2026-10-13  5:43   ` Weibin Liu [this message]
2026-10-13  5:43 ` [PATCH v2] " Weibin Liu

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=20261013054335.75607-1-liuwb@xiaopeng.com \
    --to=liuwb@xiaopeng.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®