
22 Oct
2015
22 Oct
'15
11:18 p.m.
On Thu, Oct 22, 2015 at 7:15 PM, Jagan Teki jteki@openedev.com wrote:
#define MXS_SPI_MAX_TIMEOUT 1000000 #define MXS_SPI_PORT_OFFSET 0x2000 -#define MXS_SSP_CHIPSELECT_MASK 0x00300000 +#define MXS_SSP_CHIPSELECT_MASK GENMASK(21, 20)
Does this really improve the code?
GENMASK will simplificate the bit masking and most of drivers in Linux start using this along with BIT for bit shifting.
Most drivers?
In mainline kernel:
git grep GENMASK drivers/spi/ | wc -l 2
No, this is not most drivers ;-)