diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2010-06-30 16:27:32 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-04 00:45:44 -0400 |
commit | 04bb2a031cf95b34b7432dd47b318a932a895b4c (patch) | |
tree | d5c831a56c01b4a357450abae47f1afe8d61de34 /drivers/spi/spi_lm70llp.c | |
parent | 5c2818cdfad1973ede3dcd2a8709620a192f8385 (diff) |
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>
Diffstat (limited to 'drivers/spi/spi_lm70llp.c')
-rw-r--r-- | drivers/spi/spi_lm70llp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi_lm70llp.c b/drivers/spi/spi_lm70llp.c index 86fb7b5993db..7746a41ab6d6 100644 --- a/drivers/spi/spi_lm70llp.c +++ b/drivers/spi/spi_lm70llp.c | |||
@@ -191,7 +191,7 @@ static void lm70_chipselect(struct spi_device *spi, int value) | |||
191 | */ | 191 | */ |
192 | static u32 lm70_txrx(struct spi_device *spi, unsigned nsecs, u32 word, u8 bits) | 192 | static u32 lm70_txrx(struct spi_device *spi, unsigned nsecs, u32 word, u8 bits) |
193 | { | 193 | { |
194 | return bitbang_txrx_be_cpha0(spi, nsecs, 0, word, bits); | 194 | return bitbang_txrx_be_cpha0(spi, nsecs, 0, 0, word, bits); |
195 | } | 195 | } |
196 | 196 | ||
197 | static void spi_lm70llp_attach(struct parport *p) | 197 | static void spi_lm70llp_attach(struct parport *p) |