All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs
@ 2021-09-23 19:49 Mark Brown
  2021-09-23 19:49 ` [PATCH v1 1/3] rtc: ds1302: Add SPI ID table Mark Brown
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mark Brown @ 2021-09-23 19:49 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, 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 this series
adds SPI IDs where they aren't provided for a given modalias.

Mark Brown (3):
  rtc: ds1302: Add SPI ID table
  rtc: ds1390: Add SPI ID table
  rtc: pcf2123: Add SPI ID table

 drivers/rtc/rtc-ds1302.c  | 7 +++++++
 drivers/rtc/rtc-ds1390.c  | 7 +++++++
 drivers/rtc/rtc-pcf2123.c | 9 +++++++++
 3 files changed, 23 insertions(+)


base-commit: e73f0f0ee7541171d89f2e2491130c7771ba58d3
-- 
2.20.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v1 1/3] rtc: ds1302: Add SPI ID table
  2021-09-23 19:49 [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Mark Brown
@ 2021-09-23 19:49 ` Mark Brown
  2021-09-23 19:49 ` [PATCH v1 2/3] rtc: ds1390: " Mark Brown
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-09-23 19:49 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, 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 an id_table listing the
SPI IDs for everything.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/rtc/rtc-ds1302.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/rtc/rtc-ds1302.c b/drivers/rtc/rtc-ds1302.c
index b3de6d2e680a..2f83adef966e 100644
--- a/drivers/rtc/rtc-ds1302.c
+++ b/drivers/rtc/rtc-ds1302.c
@@ -199,11 +199,18 @@ static const struct of_device_id ds1302_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, ds1302_dt_ids);
 #endif
 
+static const struct spi_device_id ds1302_spi_ids[] = {
+	{ .name = "ds1302", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(spi, ds1302_spi_ids);
+
 static struct spi_driver ds1302_driver = {
 	.driver.name	= "rtc-ds1302",
 	.driver.of_match_table = of_match_ptr(ds1302_dt_ids),
 	.probe		= ds1302_probe,
 	.remove		= ds1302_remove,
+	.id_table	= ds1302_spi_ids,
 };
 
 module_spi_driver(ds1302_driver);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v1 2/3] rtc: ds1390: Add SPI ID table
  2021-09-23 19:49 [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Mark Brown
  2021-09-23 19:49 ` [PATCH v1 1/3] rtc: ds1302: Add SPI ID table Mark Brown
@ 2021-09-23 19:49 ` Mark Brown
  2021-09-23 19:49 ` [PATCH v1 3/3] rtc: pcf2123: " Mark Brown
  2021-09-25 21:29 ` [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Alexandre Belloni
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-09-23 19:49 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, 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 an id_table listing the
SPI IDs for everything.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/rtc/rtc-ds1390.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index 66fc8617d07e..93ce72b9ae59 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -219,12 +219,19 @@ static const struct of_device_id ds1390_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ds1390_of_match);
 
+static const struct spi_device_id ds1390_spi_ids[] = {
+	{ .name = "ds1390" },
+	{}
+};
+MODULE_DEVICE_TABLE(spi, ds1390_spi_ids);
+
 static struct spi_driver ds1390_driver = {
 	.driver = {
 		.name	= "rtc-ds1390",
 		.of_match_table = of_match_ptr(ds1390_of_match),
 	},
 	.probe	= ds1390_probe,
+	.id_table = ds1390_spi_ids,
 };
 
 module_spi_driver(ds1390_driver);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v1 3/3] rtc: pcf2123: Add SPI ID table
  2021-09-23 19:49 [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Mark Brown
  2021-09-23 19:49 ` [PATCH v1 1/3] rtc: ds1302: Add SPI ID table Mark Brown
  2021-09-23 19:49 ` [PATCH v1 2/3] rtc: ds1390: " Mark Brown
@ 2021-09-23 19:49 ` Mark Brown
  2021-09-25 21:29 ` [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Alexandre Belloni
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2021-09-23 19:49 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: linux-rtc, 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 an id_table listing the
SPI IDs for everything.

Fixes: 96c8395e2166 ("spi: Revert modalias changes")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/rtc/rtc-pcf2123.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c
index 0f58cac81d8c..7473e6c8a183 100644
--- a/drivers/rtc/rtc-pcf2123.c
+++ b/drivers/rtc/rtc-pcf2123.c
@@ -451,12 +451,21 @@ static const struct of_device_id pcf2123_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, pcf2123_dt_ids);
 #endif
 
+static const struct spi_device_id pcf2123_spi_ids[] = {
+	{ .name = "pcf2123", },
+	{ .name = "rv2123", },
+	{ .name = "rtc-pcf2123", },
+	{ /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(spi, pcf2123_spi_ids);
+
 static struct spi_driver pcf2123_driver = {
 	.driver	= {
 			.name	= "rtc-pcf2123",
 			.of_match_table = of_match_ptr(pcf2123_dt_ids),
 	},
 	.probe	= pcf2123_probe,
+	.id_table = pcf2123_spi_ids,
 };
 
 module_spi_driver(pcf2123_driver);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs
  2021-09-23 19:49 [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Mark Brown
                   ` (2 preceding siblings ...)
  2021-09-23 19:49 ` [PATCH v1 3/3] rtc: pcf2123: " Mark Brown
@ 2021-09-25 21:29 ` Alexandre Belloni
  3 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2021-09-25 21:29 UTC (permalink / raw)
  To: Alessandro Zummo, Mark Brown; +Cc: Alexandre Belloni, linux-rtc

On Thu, 23 Sep 2021 20:49:19 +0100, Mark Brown wrote:
> 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 this series
> adds SPI IDs where they aren't provided for a given modalias.
> 
> Mark Brown (3):
>   rtc: ds1302: Add SPI ID table
>   rtc: ds1390: Add SPI ID table
>   rtc: pcf2123: Add SPI ID table
> 
> [...]

Applied, thanks!

[1/3] rtc: ds1302: Add SPI ID table
      commit: 8719a17613e0233d707eb22e1645d217594631ef
[2/3] rtc: ds1390: Add SPI ID table
      commit: da87639d6312afb8855717c791768bf2d4ca8ac8
[3/3] rtc: pcf2123: Add SPI ID table
      commit: 5f84478e14aa8b43a4ea85d2e091931741947749

Best regards,
-- 
Alexandre Belloni <alexandre.belloni@bootlin.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-25 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 19:49 [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Mark Brown
2021-09-23 19:49 ` [PATCH v1 1/3] rtc: ds1302: Add SPI ID table Mark Brown
2021-09-23 19:49 ` [PATCH v1 2/3] rtc: ds1390: " Mark Brown
2021-09-23 19:49 ` [PATCH v1 3/3] rtc: pcf2123: " Mark Brown
2021-09-25 21:29 ` [PATCH v1 0/3] rtc: Ensure DT compatibles have SPI device IDs Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.