From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: kernel@collabora.com,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
chrome-platform@lists.linux.dev,
"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
"Brian Norris" <briannorris@chromium.org>,
"Julius Werner" <jwerner@chromium.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 6/7] firmware: google: framebuffer: Add to module device table
Date: Fri, 12 Jan 2024 10:18:35 -0300 [thread overview]
Message-ID: <20240112131857.900734-7-nfraprado@collabora.com> (raw)
In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com>
Create an id table and add it to the module device table to allow the
framebuffer driver to be automatically loaded when a matching device is
found.
Suggested-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Changes in v2:
- Added this commit
drivers/firmware/google/framebuffer-coreboot.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/firmware/google/framebuffer-coreboot.c b/drivers/firmware/google/framebuffer-coreboot.c
index 5c84bbebfef8..b33e9c6f97d7 100644
--- a/drivers/firmware/google/framebuffer-coreboot.c
+++ b/drivers/firmware/google/framebuffer-coreboot.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/platform_data/simplefb.h>
#include <linux/platform_device.h>
@@ -80,6 +81,12 @@ static void framebuffer_remove(struct coreboot_device *dev)
platform_device_unregister(pdev);
}
+static const struct coreboot_device_id framebuffer_ids[] = {
+ { .tag = CB_TAG_FRAMEBUFFER },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(coreboot, framebuffer_ids);
+
static struct coreboot_driver framebuffer_driver = {
.probe = framebuffer_probe,
.remove = framebuffer_remove,
--
2.43.0
next prev parent reply other threads:[~2024-01-12 13:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 13:18 [PATCH v2 0/7] Allow coreboot modules to autoload and enable cbmem in the arm64 defconfig Nícolas F. R. A. Prado
2024-01-12 13:18 ` [PATCH v2 1/7] firmware: coreboot: Generate modalias uevent for devices Nícolas F. R. A. Prado
2024-01-12 13:18 ` [PATCH v2 2/7] firmware: coreboot: Generate aliases for coreboot modules Nícolas F. R. A. Prado
2024-01-14 17:09 ` Andy Shevchenko
2024-01-23 22:06 ` Brian Norris
2024-01-30 23:51 ` Greg Kroah-Hartman
2024-01-31 0:01 ` Brian Norris
2024-01-31 0:23 ` Greg Kroah-Hartman
2024-02-01 22:45 ` Nícolas F. R. A. Prado
2024-02-02 2:21 ` Greg Kroah-Hartman
2024-02-06 20:53 ` Nícolas F. R. A. Prado
2024-01-12 13:18 ` [PATCH v2 3/7] firmware: google: cbmem: Add to module device table Nícolas F. R. A. Prado
2024-01-12 13:18 ` [PATCH v2 4/7] firmware: google: vpd: " Nícolas F. R. A. Prado
2024-01-12 13:18 ` [PATCH v2 5/7] firmware: google: memconsole: " Nícolas F. R. A. Prado
2024-01-12 13:18 ` Nícolas F. R. A. Prado [this message]
2024-01-12 13:18 ` [PATCH v2 7/7] arm64: defconfig: Enable support for cbmem entries in the coreboot table Nícolas F. R. A. Prado
2024-01-17 10:29 ` [PATCH v2 0/7] Allow coreboot modules to autoload and enable cbmem in the arm64 defconfig AngeloGioacchino Del Regno
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=20240112131857.900734-7-nfraprado@collabora.com \
--to=nfraprado@collabora.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=briannorris@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=jwerner@chromium.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tzungbi@kernel.org \
/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