diff options
author | Mark Brown <broonie@kernel.org> | 2021-09-21 20:21:49 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-09-22 13:23:33 +0100 |
commit | 5fa6863ba69265cb7e45567d12614790ff26bd56 (patch) | |
tree | 32ecf93f86d382ee8d94f61560eeb15459c89464 /drivers/media | |
parent | f1e5ecc5b7cc9d91ce975680a2f1f84b235f7e07 (diff) |
spi: Check we have a spi_device_id for each DT compatible
Currently for SPI devices we use the spi_device_id for module autoloading
even on systems using device tree, meaning that listing a compatible string
in the of_match_table isn't enough to have the module for a SPI driver
autoloaded.
We attempted to fix this by generating OF based modaliases for devices
instantiated from DT in 3ce6c9e2617e ("spi: add of_device_uevent_modalias
support") but this meant we no longer reported spi_device_id based aliases
which broke drivers such as spi-nor which don't list all the compatible
strings they support directly for DT, and in at least that case it's not
super practical to do so given the very large number of compatibles
needed, much larger than the number spi_device_ids due to vendor strings.
As a result fell back to using spi_device_id based modalises.
Try to close the gap by printing a warning when a SPI driver has a DT
compatible that won't be matched as a SPI device ID with the goal of having
drivers provide both. Given fallback compatibles this check is going to be
excessive but it should be robust which is probably more important here.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210921192149.50740-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/media')
0 files changed, 0 insertions, 0 deletions