spi: uapi: unify SPI modes into a single spi.h header
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Mon, 21 Dec 2020 15:29:34 +0000 (17:29 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 28 Dec 2020 14:21:30 +0000 (14:21 +0000)
commitf7005142dacea1769fba0152c493aaa61b33205c
tree640fdce7f32b2266c059993e75bcca7214347854
parent22a6d41c871225bdd269a80fe04236071f429e2b
spi: uapi: unify SPI modes into a single spi.h header

This change moves all the SPI mode bits into a separate 'spi.h' header in
uAPI. This is meant to re-use these definitions inside the kernel as well
as export them to userspace (via uAPI).

The SPI mode definitions have usually been duplicated between between
'include/linux/spi/spi.h' and 'include/uapi/linux/spi/spidev.h', so
whenever adding a new entry, this would need to be put in both headers.

They've been moved from 'include/linux/spi/spi.h', since that seems a bit
more complete; the bits have descriptions and there is the SPI_MODE_X_MASK.

This change also does a conversion of these bitfields to _BITUL() macro.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20201221152936.53873-1-alexandru.ardelean@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/spi/spi.h
include/uapi/linux/spi/spi.h [new file with mode: 0644]
include/uapi/linux/spi/spidev.h