spi: Introduce SPI_INVALID_CS and is_valid_cs()

The SPI core inconsistently uses the marker value for unused chip select
pin. Define a constant (with appropriate type) and introduce is_valid_cs()
helper function to avoid spreading this inconsistency in the future.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://msgid.link/r/20240307150256.3789138-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Andy Shevchenko 2024-03-07 17:01:01 +02:00 • committed by Mark Brown
commit be84be4a35
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0