Skip to contentSkip to conversation

tpm_tis_spi: Add missing SPI ID

PATCH In review Mark Brown 2 participants 2 messages Sep 24, 2021 – Sep 28, 2021

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH v2 1/1 tpm_tis_spi: Add missing SPI ID

In commit c46ed2281bbe ("tpm_tis_spi: add missing SPI device ID entries") we added SPI IDs for all the DT aliases to handle the fact that we always use SPI modaliases to load modules even when probed via DT however the mentioned commit missed that the SPI and OF device ID entries did not match and were different and so DT nodes with compatible "tcg,tpm_tis-spi" will not match. Add an extra ID for tpm_tis-spi rather than just fix the existing one since what's currently there is going to be better for anyone actually using SPI IDs to instantiate.

Fixes c46ed2281bbe ("tpm_tis_spi: add missing SPI device ID entries")
Fixes 96c8395e2166 ("spi: Revert modalias changes")

---

v2:
- Tweak commit message with suggestion from Javier.

 drivers/char/tpm/tpm_tis_spi_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/tpm/tpm_tis_spi_main.c +1 -0
index 54584b4b00d1..aaa59a00eeae 100644
@@ -267,6 +267,7 @@ static const struct spi_device_id tpm_tis_spi_id[] = {
 	{ "st33htpm-spi", (unsigned long)tpm_tis_spi_probe },
 	{ "slb9670", (unsigned long)tpm_tis_spi_probe },
 	{ "tpm_tis_spi", (unsigned long)tpm_tis_spi_probe },
+	{ "tpm_tis-spi", (unsigned long)tpm_tis_spi_probe },
 	{ "cr50", (unsigned long)cr50_spi_probe },
 	{}
 };
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 27 lines · Mark Brown

In commit c46ed2281bbe ("tpm_tis_spi: add missing SPI device ID entries") we added SPI IDs for all the DT aliases to handle the fact that we always use SPI modaliases to load modules even when probed via DT however the mentioned commit missed that the SPI and OF device ID entries did not match and were different and so DT nodes with compatible "tcg,tpm_tis-spi" will not match. Add an extra ID for tpm_tis-spi rather than just fix the existing one since what's currently there is going to be better for anyone actually using SPI IDs to instantiate.

Fixes c46ed2281bbe ("tpm_tis_spi: add missing SPI device ID entries")
Fixes 96c8395e2166 ("spi: Revert modalias changes")

---

v2:
- Tweak commit message with suggestion from Javier.

 drivers/char/tpm/tpm_tis_spi_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/char/tpm/tpm_tis_spi_main.c +0 -0
index 54584b4b00d1..aaa59a00eeae 100644

drivers/char/tpm/tpm_tis_spi_main.c static const struct spi_device_id tpm_tis_spi_id[] = { · line 273

Quoted 7 lines
drivers/char/tpm/tpm_tis_spi_main.c +1 -0
@@ -267,6 +267,7 @@ static const struct spi_device_id tpm_tis_spi_id[] = {
 	{ "st33htpm-spi", (unsigned long)tpm_tis_spi_probe },
 	{ "slb9670", (unsigned long)tpm_tis_spi_probe },
 	{ "tpm_tis_spi", (unsigned long)tpm_tis_spi_probe },
+	{ "tpm_tis-spi", (unsigned long)tpm_tis_spi_probe },
 	{ "cr50", (unsigned long)cr50_spi_probe },
 	{}
 };

I replaced the previous patch with this in my GIT tree.

/Jarkko