aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/sprd-sc27xx-spi.c
diff options
context:
space:
mode:
authorMark Brown2021-09-24 15:33:47 +0100
committerLee Jones2021-11-05 14:40:25 +0000
commitc5c7f0677107052060037583b9c8c15d818afb04 (patch)
treecbf148b8b9c297d41f50f39cf89558bcbac81478 /drivers/mfd/sprd-sc27xx-spi.c
parentd5fa8592b773f4da2b04e7333cd37efec5e4ca43 (diff)
mfd: sprd: Add SPI device ID table
Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding a SPI device ID table. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Baolin Wang <baolin.wang7@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20210924143347.14721-4-broonie@kernel.org
Diffstat (limited to 'drivers/mfd/sprd-sc27xx-spi.c')
-rw-r--r--drivers/mfd/sprd-sc27xx-spi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
index 57fb2445720f..55d2c31bdfb2 100644
--- a/drivers/mfd/sprd-sc27xx-spi.c
+++ b/drivers/mfd/sprd-sc27xx-spi.c
@@ -246,6 +246,12 @@ static const struct of_device_id sprd_pmic_match[] = {
};
MODULE_DEVICE_TABLE(of, sprd_pmic_match);
+static const struct spi_device_id sprd_pmic_spi_ids[] = {
+ { .name = "sc2731", .driver_data = (unsigned long)&sc2731_data },
+ {},
+};
+MODULE_DEVICE_TABLE(spi, sprd_pmic_spi_ids);
+
static struct spi_driver sprd_pmic_driver = {
.driver = {
.name = "sc27xx-pmic",
@@ -253,6 +259,7 @@ static struct spi_driver sprd_pmic_driver = {
.pm = &sprd_pmic_pm_ops,
},
.probe = sprd_pmic_probe,
+ .id_table = sprd_pmic_spi_ids,
};
static int __init sprd_pmic_init(void)