04 Jul, 2010

1 commit

  • This patch adds a new flags argument to bitbang_txrx_be_cpha0 and
    bitbang_txrx_be_cpha1 transfer functions. This enables support for
    SPI_MASTER_NO_{TX,RX} transfer modes. The change should have no impact
    on speed of the existing drivers. bitbank_txrx_* functions are usually
    inlined into the drivers. When the argument is equal to constant zero,
    the optimizer would be able to eliminate the dead code (flags checks)
    easily. Tested on ARM and GCC 4.4.x and in all cases the checks were
    eliminated in the inlined function.

    Reviewed-by: Kyungmin Park
    Signed-off-by: Marek Szyprowski
    Acked-by: David Brownell
    Signed-off-by: Grant Likely

    Marek Szyprowski
     

25 May, 2010

1 commit

  • A number of files in drivers/spi fail checkincludes.pl due to the double
    include of .

    The first include is needed to get the struct spi_bitbang definition and
    the spi_bitbang_* function prototypes.

    The second include happens after defining EXPAND_BITBANG_TXRX to get the
    inlined bitbang_txrx_* utility functions.

    The header is also included by a number of other
    spi drivers, as well as some arch/ code, in order to use struct spi_bitbang
    and the associated functions.

    To fix the double include, and remove any potential confusion about it, move
    the inlined bitbang_txrx_* functions to a new private header in drivers/spi
    and also remove the need to define EXPAND_BITBANG_TXRX.

    Signed-off-by: H Hartley Sweeten
    Signed-off-by: Grant Likely

    hartleys