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