diff options
| author | Mark Brown <broonie@linaro.org> | 2013-06-26 19:20:57 +0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-06-26 19:20:57 +0400 |
| commit | 4581949d522f22d0d9ab710b4a7253754349f5d8 (patch) | |
| tree | 3edb2a2f8d5edcf3e3eda6fcc3a6f8a7e2b9d5f8 /include/linux | |
| parent | 8bce7eb7de8b88ebbf65508fc3a74ee0de9e1727 (diff) | |
| parent | 804ae4380d1e76f5d81272b8a3b765f5e02fe46e (diff) | |
| download | linux-4581949d522f22d0d9ab710b4a7253754349f5d8.tar.xz | |
Merge remote-tracking branch 'spi/topic/bpw' into spi-next
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/spi/spi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 6ff26c8db7b9..28e440be1c07 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -308,6 +308,9 @@ struct spi_master { /* bitmask of supported bits_per_word for transfers */ u32 bits_per_word_mask; +#define SPI_BPW_MASK(bits) BIT((bits) - 1) +#define SPI_BIT_MASK(bits) (((bits) == 32) ? ~0UL : (BIT(bits) - 1)) +#define SPI_BPW_RANGE_MASK(min, max) (SPI_BIT_MASK(max) - SPI_BIT_MASK(min - 1)) /* other constraints relevant to this driver */ u16 flags; |
