]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit17911b2a6e433f161e49fe1c09bd784f153a9a54
tree640fdce7f32b2266c059993e75bcca7214347854
parenta8663770bf4569f9d9bfa36b6b1e66ef813041e1
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