diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-10-20 22:54:21 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-10-21 15:05:45 +0300 |
commit | aea672d054a21782ed8450c75febb6ba3c208ca4 (patch) | |
tree | 652bad507f7519745849996a530c9a20bdcea075 /include/linux/spi/spi.h | |
parent | f74d21829bdcf2f27256f6a8adb1492766f748c7 (diff) | |
download | linux-aea672d054a21782ed8450c75febb6ba3c208ca4.tar.xz |
spi: Introduce spi_get_device_match_data() helper
The proposed spi_get_device_match_data() helper is for retrieving
a driver data associated with the ID in an ID table. First, it tries
to get driver data of the device enumerated by firmware interface
(usually Device Tree or ACPI). If none is found it falls back to
the SPI ID table matching.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221020195421.10482-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi/spi.h')
-rw-r--r-- | include/linux/spi/spi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index fbf8c0d95968..8fe3d0a9d2c9 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -1514,6 +1514,9 @@ extern void spi_unregister_device(struct spi_device *spi); extern const struct spi_device_id * spi_get_device_id(const struct spi_device *sdev); +extern const void * +spi_get_device_match_data(const struct spi_device *sdev); + static inline bool spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer) { |