spi: Introduce spi_get_device_match_data() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 20 Oct 2022 19:54:21 +0000 (22:54 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 21 Oct 2022 12:05:45 +0000 (13:05 +0100)
commitaea672d054a21782ed8450c75febb6ba3c208ca4
tree652bad507f7519745849996a530c9a20bdcea075
parentf74d21829bdcf2f27256f6a8adb1492766f748c7
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>
drivers/spi/spi.c
include/linux/spi/spi.h