linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Moritz Fischer <mdf@kernel.org>
To: linux-fpga@vger.kernel.org, Moritz Fischer <mdf@kernel.org>,
	Tom Rix <trix@redhat.com>
Cc: moritzf@google.com, Xu Yilun <yilun.xu@intel.com>,
	Wu Hao <hao.wu@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mark Brown <broonie@kernel.org>
Subject: [PATCH] fpga: ice40-spi: Add SPI device ID table
Date: Tue, 28 Sep 2021 08:02:27 -0700	[thread overview]
Message-ID: <20210927134403.32328-1-broonie@kernel.org> (raw)
Message-ID: <20210928150227.Gbqae6bnZTx9fi1XdFfF9nw78Wn51fekvtbUcA1_hN4@z> (raw)
In-Reply-To: <20210928150227.22275-1-mdf@kernel.org>

From: Mark Brown <broonie@kernel.org>

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 ID table.

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

diff --git a/drivers/fpga/ice40-spi.c b/drivers/fpga/ice40-spi.c
index 69dec5af23c3..029d3cdb918d 100644
--- a/drivers/fpga/ice40-spi.c
+++ b/drivers/fpga/ice40-spi.c
@@ -192,12 +192,19 @@ static const struct of_device_id ice40_fpga_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, ice40_fpga_of_match);
 
+static const struct spi_device_id ice40_fpga_spi_ids[] = {
+	{ .name = "ice40-fpga-mgr", },
+	{},
+};
+MODULE_DEVICE_TABLE(spi, ice40_fpga_spi_ids);
+
 static struct spi_driver ice40_fpga_driver = {
 	.probe = ice40_fpga_probe,
 	.driver = {
 		.name = "ice40spi",
 		.of_match_table = of_match_ptr(ice40_fpga_of_match),
 	},
+	.id_table = ice40_fpga_spi_ids,
 };
 
 module_spi_driver(ice40_fpga_driver);
-- 
2.20.1

  parent reply	other threads:[~2021-09-28 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-28 15:02 [PATCH 1/2] MAINTAINERS: Add Hao and Yilun as maintainers Moritz Fischer
2021-09-28 15:02 ` [PATCH 2/2] MAINTAINERS: Drop outdated FPGA Manager website Moritz Fischer
2021-10-02 14:49   ` Xu Yilun
2021-10-02 16:09     ` Moritz Fischer
     [not found] ` <20210928150227.Gbqae6bnZTx9fi1XdFfF9nw78Wn51fekvtbUcA1_hN4@z>
2021-09-28 15:02   ` Moritz Fischer [this message]
2021-09-27 21:03     ` [PATCH] fpga: ice40-spi: Add SPI device ID table Moritz Fischer
2021-09-28 15:05     ` Moritz Fischer
2021-09-28 15:28 ` [PATCH 1/2] MAINTAINERS: Add Hao and Yilun as maintainers Greg Kroah-Hartman
2021-09-29  0:42   ` Xu Yilun
2021-09-29  1:04     ` Wu, Hao
2021-10-01  3:35       ` Moritz Fischer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210927134403.32328-1-broonie@kernel.org \
    --to=mdf@kernel.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=moritzf@google.com \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).