]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
spi/bitbang: add support for SPI_MASTER_NO_{TX, RX} modes
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 30 Jun 2010 20:27:32 +0000 (14:27 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Sun, 4 Jul 2010 04:45:44 +0000 (22:45 -0600)
commit04bb2a031cf95b34b7432dd47b318a932a895b4c
treed5c831a56c01b4a357450abae47f1afe8d61de34
parent5c2818cdfad1973ede3dcd2a8709620a192f8385
spi/bitbang: add support for SPI_MASTER_NO_{TX, RX} modes

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 <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/spi_bitbang_txrx.h
drivers/spi/spi_butterfly.c
drivers/spi/spi_gpio.c
drivers/spi/spi_lm70llp.c
drivers/spi/spi_s3c24xx_gpio.c
drivers/spi/spi_sh_sci.c