Skip to contentSkip to conversation

input: ariel-pwrbutton: Add SPI device ID table

PATCH Applied Mark Brown 2 participants 2 messages Sep 27, 2021 – Oct 2, 2021

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 input: ariel-pwrbutton: 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")
---
 drivers/input/misc/ariel-pwrbutton.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/input/misc/ariel-pwrbutton.c +7 -0
index 17bbaac8b80c..cdc80715b5fd 100644
@@ -149,12 +149,19 @@ static const struct of_device_id ariel_pwrbutton_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ariel_pwrbutton_of_match);
 
+static const struct spi_device_id ariel_pwrbutton_spi_ids[] = {
+	{ .name = "wyse-ariel-ec-input" },
+	{ }
+};
+MODULE_DEVICE_TABLE(spi, ariel_pwrbutton_spi_ids);
+
 static struct spi_driver ariel_pwrbutton_driver = {
 	.driver = {
 		.name = "dell-wyse-ariel-ec-input",
 		.of_match_table = ariel_pwrbutton_of_match,
 	},
 	.probe = ariel_pwrbutton_probe,
+	.id_table = ariel_pwrbutton_spi_ids,
 };
 module_spi_driver(ariel_pwrbutton_driver);
 
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 7 lines · Mark Brown

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")

Applied, thank you.

Signature · 1 line
Dmitry