diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2021-09-28 17:30:35 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2021-11-05 14:40:26 +0000 |
commit | 3f65555c417c9c2eee235a137b5e5088a65439e4 (patch) | |
tree | acaf25f81e11a4044602f35104821d9973af1387 /drivers/mfd/arizona-spi.c | |
parent | 239f2bb14128ce6393d9330f595fe8c6db99dc50 (diff) | |
download | linux-stable-3f65555c417c9c2eee235a137b5e5088a65439e4.tar.gz linux-stable-3f65555c417c9c2eee235a137b5e5088a65439e4.tar.bz2 linux-stable-3f65555c417c9c2eee235a137b5e5088a65439e4.zip |
mfd: arizona: Split of_match table into I2C and SPI versions
The Arizona driver has both some devices which only have an I2C
interface and some which only have a SPI interface. Currently both of
these share an of_match table, but this means inapproriate compatibles
are available for each interface. Tidy this up by creating a table for
each interface listing only the appropriate compatibles.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210928163035.23960-1-ckeepax@opensource.cirrus.com
Diffstat (limited to 'drivers/mfd/arizona-spi.c')
-rw-r--r-- | drivers/mfd/arizona-spi.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c index aa1d6f94ae53..9fe06dda3782 100644 --- a/drivers/mfd/arizona-spi.c +++ b/drivers/mfd/arizona-spi.c @@ -225,11 +225,22 @@ static const struct spi_device_id arizona_spi_ids[] = { }; MODULE_DEVICE_TABLE(spi, arizona_spi_ids); +#ifdef CONFIG_OF +const struct of_device_id arizona_spi_of_match[] = { + { .compatible = "wlf,wm5102", .data = (void *)WM5102 }, + { .compatible = "wlf,wm5110", .data = (void *)WM5110 }, + { .compatible = "wlf,wm8280", .data = (void *)WM8280 }, + { .compatible = "wlf,wm1831", .data = (void *)WM1831 }, + { .compatible = "cirrus,cs47l24", .data = (void *)CS47L24 }, + {}, +}; +#endif + static struct spi_driver arizona_spi_driver = { .driver = { .name = "arizona", .pm = &arizona_pm_ops, - .of_match_table = of_match_ptr(arizona_of_match), + .of_match_table = of_match_ptr(arizona_spi_of_match), .acpi_match_table = ACPI_PTR(arizona_acpi_match), }, .probe = arizona_spi_probe, |