All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: spi-mux: Add module info needed for autoloading
@ 2021-07-21  9:53 Uwe Kleine-König
  2021-07-22 17:09 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2021-07-21  9:53 UTC (permalink / raw)
  To: Peter Rosin, Mark Brown; +Cc: linux-spi, kernel

With the spi device table udev can autoload the spi-mux module in
the presence of an spi-mux device.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/spi/spi-mux.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/spi/spi-mux.c b/drivers/spi/spi-mux.c
index 37dfc6e82804..9708b7827ff7 100644
--- a/drivers/spi/spi-mux.c
+++ b/drivers/spi/spi-mux.c
@@ -167,10 +167,17 @@ static int spi_mux_probe(struct spi_device *spi)
 	return ret;
 }
 
+static const struct spi_device_id spi_mux_id[] = {
+	{ "spi-mux" },
+	{ }
+};
+MODULE_DEVICE_TABLE(spi, spi_mux_id);
+
 static const struct of_device_id spi_mux_of_match[] = {
 	{ .compatible = "spi-mux" },
 	{ }
 };
+MODULE_DEVICE_TABLE(of, spi_mux_of_match);
 
 static struct spi_driver spi_mux_driver = {
 	.probe  = spi_mux_probe,
@@ -178,6 +185,7 @@ static struct spi_driver spi_mux_driver = {
 		.name   = "spi-mux",
 		.of_match_table = spi_mux_of_match,
 	},
+	.id_table = spi_mux_id,
 };
 
 module_spi_driver(spi_mux_driver);
-- 
2.30.2


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

* Re: [PATCH] spi: spi-mux: Add module info needed for autoloading
  2021-07-21  9:53 [PATCH] spi: spi-mux: Add module info needed for autoloading Uwe Kleine-König
@ 2021-07-22 17:09 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-07-22 17:09 UTC (permalink / raw)
  To: Uwe Kleine-König, Peter Rosin; +Cc: Mark Brown, kernel, linux-spi

On Wed, 21 Jul 2021 11:53:21 +0200, Uwe Kleine-König wrote:
> With the spi device table udev can autoload the spi-mux module in
> the presence of an spi-mux device.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: spi-mux: Add module info needed for autoloading
      commit: 1d5ccab95f06675a269f4cb223a1e3f6d1ebef42

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2021-07-22 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21  9:53 [PATCH] spi: spi-mux: Add module info needed for autoloading Uwe Kleine-König
2021-07-22 17:09 ` Mark Brown

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.