diff options
author | John Crispin <john@openwrt.org> | 2013-08-14 18:15:15 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-08-14 18:15:15 +0000 |
commit | 9e5b0cc19cebf6ed876c7eace13b887b46e518c0 (patch) | |
tree | f246f12adca3e91f5e3708e97c7a4add05cc0ce3 /target/linux/ramips/patches-3.10/0120-spi-introduce-macros-to-set-bits_per_word_mask.patch | |
parent | 2864fb107f00531df0b114d52334d3e00fa5d6c2 (diff) | |
download | mtk-20170518-9e5b0cc19cebf6ed876c7eace13b887b46e518c0.zip mtk-20170518-9e5b0cc19cebf6ed876c7eace13b887b46e518c0.tar.gz mtk-20170518-9e5b0cc19cebf6ed876c7eace13b887b46e518c0.tar.bz2 |
ramips: update v3.10 patches
Sync the patches with those sent upstream for v3.12.
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37778
Diffstat (limited to 'target/linux/ramips/patches-3.10/0120-spi-introduce-macros-to-set-bits_per_word_mask.patch')
-rw-r--r-- | target/linux/ramips/patches-3.10/0120-spi-introduce-macros-to-set-bits_per_word_mask.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.10/0120-spi-introduce-macros-to-set-bits_per_word_mask.patch b/target/linux/ramips/patches-3.10/0120-spi-introduce-macros-to-set-bits_per_word_mask.patch new file mode 100644 index 0000000..a163d49 --- /dev/null +++ b/target/linux/ramips/patches-3.10/0120-spi-introduce-macros-to-set-bits_per_word_mask.patch @@ -0,0 +1,29 @@ +From 2922a8de996956893bb98e4aa91be9774c958336 Mon Sep 17 00:00:00 2001 +From: Stephen Warren <swarren@wwwdotorg.org> +Date: Tue, 21 May 2013 20:36:34 -0600 +Subject: [PATCH] spi: introduce macros to set bits_per_word_mask + +Introduce two macros to make setting up spi_master.bits_per_word_mask +easier, and avoid mistakes like writing BIT(n) instead of BIT(n - 1). + +SPI_BPW_MASK is for a single supported value of bits_per_word_mask. + +SPI_BPW_RANGE_MASK represents a contiguous set of bit lengths. + +Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> +Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> +--- + include/linux/spi/spi.h | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/include/linux/spi/spi.h ++++ b/include/linux/spi/spi.h +@@ -308,6 +308,8 @@ 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_BPW_RANGE_MASK(min, max) ((BIT(max) - 1) - (BIT(min) - 1)) + + /* other constraints relevant to this driver */ + u16 flags; |