linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: [PATCH] staging: fbtft: add spi_device_id table
Date: Sat, 27 Nov 2021 23:20:36 +0100	[thread overview]
Message-ID: <aadbd32c-c0ab-4c8a-c590-3334f736f224@gmail.com> (raw)

After 5fa6863ba692 ("spi: Check we have a spi_device_id for each DT
compatible") we need the following to make the SPI core happy.

Works for me with a SH1106-based OLED display.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/staging/fbtft/fbtft.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 6869f3603..3f1fbdd48 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -307,12 +307,19 @@ static const struct of_device_id dt_ids[] = {                              \
 									   \
 MODULE_DEVICE_TABLE(of, dt_ids);                                           \
 									   \
+static const struct spi_device_id spi_ids[] = {                            \
+	{ .name = _compatible },					   \
+	{},                                                                \
+};                                                                         \
+									   \
+MODULE_DEVICE_TABLE(spi, spi_ids);					   \
 									   \
 static struct spi_driver fbtft_driver_spi_driver = {                       \
 	.driver = {                                                        \
 		.name   = _name,                                           \
 		.of_match_table = dt_ids,                                  \
 	},                                                                 \
+	.id_table = spi_ids,						   \
 	.probe  = fbtft_driver_probe_spi,                                  \
 	.remove = fbtft_driver_remove_spi,                                 \
 };                                                                         \
-- 
2.34.0


             reply	other threads:[~2021-11-27 22:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-27 22:20 Heiner Kallweit [this message]
2021-11-30  8:16 ` [PATCH] staging: fbtft: add spi_device_id table Geert Uytterhoeven
2021-11-30 20:22   ` Heiner Kallweit

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=aadbd32c-c0ab-4c8a-c590-3334f736f224@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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).