Skip to content

Commit

Permalink
mfd: sprd: Add SPI device ID table
Browse files Browse the repository at this point in the history
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: 96c8395 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Baolin Wang <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
broonie authored and Lee Jones committed Nov 5, 2021
1 parent d5fa859 commit c5c7f06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/mfd/sprd-sc27xx-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,20 @@ 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",
.of_match_table = sprd_pmic_match,
.pm = &sprd_pmic_pm_ops,
},
.probe = sprd_pmic_probe,
.id_table = sprd_pmic_spi_ids,
};

static int __init sprd_pmic_init(void)
Expand Down

0 comments on commit c5c7f06

Please sign in to comment.