Re: [PATCH] spi: spi-bcm2835.c: Fix 3-wire mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>

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

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





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux