aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/arizona-i2c.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2021-09-28 17:30:35 +0100
committerLee Jones <lee.jones@linaro.org>2021-11-05 14:40:26 +0000
commit3f65555c417c9c2eee235a137b5e5088a65439e4 (patch)
treeacaf25f81e11a4044602f35104821d9973af1387 /drivers/mfd/arizona-i2c.c
parentdt-bindings: mfd: Convert X-Powers AXP binding to a schema (diff)
downloadlinux-dev-3f65555c417c9c2eee235a137b5e5088a65439e4.tar.xz
linux-dev-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-i2c.c')
-rw-r--r--drivers/mfd/arizona-i2c.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/mfd/arizona-i2c.c b/drivers/mfd/arizona-i2c.c
index 5e83b730c4ce..3ed810e81f63 100644
--- a/drivers/mfd/arizona-i2c.c
+++ b/drivers/mfd/arizona-i2c.c
@@ -104,11 +104,23 @@ static const struct i2c_device_id arizona_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, arizona_i2c_id);
+#ifdef CONFIG_OF
+const struct of_device_id arizona_i2c_of_match[] = {
+ { .compatible = "wlf,wm5102", .data = (void *)WM5102 },
+ { .compatible = "wlf,wm5110", .data = (void *)WM5110 },
+ { .compatible = "wlf,wm8280", .data = (void *)WM8280 },
+ { .compatible = "wlf,wm8997", .data = (void *)WM8997 },
+ { .compatible = "wlf,wm8998", .data = (void *)WM8998 },
+ { .compatible = "wlf,wm1814", .data = (void *)WM1814 },
+ {},
+};
+#endif
+
static struct i2c_driver arizona_i2c_driver = {
.driver = {
.name = "arizona",
.pm = &arizona_pm_ops,
- .of_match_table = of_match_ptr(arizona_of_match),
+ .of_match_table = of_match_ptr(arizona_i2c_of_match),
},
.probe = arizona_i2c_probe,
.remove = arizona_i2c_remove,