Re: [PATCH 2/4] spi: gpio: Fix reading for 3WIRE

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

 



On Mon, Sep 03, 2018 at 11:50:33PM +0200, Linus Walleij wrote:
> If he GPIO bitbanged host is registered using just one line,
> MISO, naturally the DT parser will flag the host as
> SPI_MASTER_NO_RX.
> 
> This makes the GPIO SPI driver assign word transfer functions
> that enforce the SPI master flags SPI_MASTER_NO_RX (or
> SPI_MASTER_NO_TX) to the flags on each call down to the
> inlined bitbang functions such as bitbang_txrx_be_cpha0().

No, this is at completely the wrong abstraction level and is not going
to help with maintainability at all.  If devices that can recieve data
are being marked as not having that capability that's obviously not
desirable and is the thing that should be fixed, trying to contort
around it in individual drivers is just going to lead to fragility later
on if someone writes other code looks at the flag and trusts it to be
accurate.  We should instead fix the code that sets the flags to take
account of three wire support.

Attachment: signature.asc
Description: PGP signature


[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