linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: "Nuno Sá" <nuno.sa@analog.com>,
	broonie@kernel.org, eric@anholt.net,
	"Martin Sperl" <kernel@martin.sperl.org>,
	"Lukas Wunner" <lukas@wunner.de>
Cc: f.fainelli@gmail.com, rjui@broadcom.com, sbranden@broadcom.com,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org
Subject: Re: [PATCH] spi: spi-bcm2835.c: Fix 3-wire mode
Date: Fri, 28 Jun 2019 17:23:54 +0200	[thread overview]
Message-ID: <1b932c61-982b-aae0-1fef-3c574e7d17eb@gmx.net> (raw)
In-Reply-To: <20190628123023.4696-1-nuno.sa@analog.com>

Hi Nuno,

Am 28.06.19 um 14:30 schrieb Nuno Sá:
> As stated in
> https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md,
> one of rx or tx buffer's must be null. However, if DMA is enabled, the
> driver sets the SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX on the
> controller flags. Hence, the spi core will provide dummy buffers even if
> one of the buffers was set to null by the device driver. Thus, the
> communication with the 3-wire device fails.
>
> This patch uses the prepare_message callback to look for the device mode
> and sets/clears the SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_MUST_TX on a
> per spi message basis. It also assumes that DMA is not supported on
> half-duplex devices.
>
> Signed-off-by: Nuno Sá <nuno.sa@analog.com>

i never tested the 3-wire mode. Could you please describe your test setup?

@Martin, @Lukas Are you fine with this patch?


  reply	other threads:[~2019-06-28 15:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 12:30 [PATCH] spi: spi-bcm2835.c: Fix 3-wire mode Nuno Sá
2019-06-28 15:23 ` Stefan Wahren [this message]
2019-06-28 19:00   ` Lukas Wunner
2019-07-01  7:24     ` Sa, Nuno
2019-07-01 11:55       ` Lukas Wunner
2019-07-01 14:21         ` Sa, Nuno
2019-07-03 10:43           ` Lukas Wunner

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=1b932c61-982b-aae0-1fef-3c574e7d17eb@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=broonie@kernel.org \
    --cc=eric@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@martin.sperl.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=nuno.sa@analog.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.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).