Message ID | 20240111151226.842603-2-nfraprado@collabora.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Allow coreboot modules to autoload and enable cbmem in the arm64 defconfig | expand |
It would have been nice to get the whole series, or at least direct to all the same mailing lists -- specifically, chrome-platform@lists.linux.dev But I found the whole thing eventually. On Thu, Jan 11, 2024 at 12:11:46PM -0300, Nícolas F. R. A. Prado wrote: > Generate a modalias uevent for devices in the coreboot bus to allow > userspace to automatically load the corresponding modules. > > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Acked-by: Brian Norris <briannorris@chromium.org>
On Thu, Jan 11, 2024 at 04:37:10PM -0800, Brian Norris wrote: > It would have been nice to get the whole series, or at least direct to > all the same mailing lists -- specifically, chrome-platform@lists.linux.dev Yeah, that's an artifact of using patman for patch submission... But I'll make sure that list gets the whole series for v2. Thanks, Nícolas
diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c index 2a4469bf1b81..c1b9a9e8e8ed 100644 --- a/drivers/firmware/google/coreboot_table.c +++ b/drivers/firmware/google/coreboot_table.c @@ -53,11 +53,20 @@ static void coreboot_bus_remove(struct device *dev) driver->remove(device); } +static int coreboot_bus_uevent(const struct device *dev, struct kobj_uevent_env *env) +{ + struct coreboot_device *device = CB_DEV(dev); + u32 tag = device->entry.tag; + + return add_uevent_var(env, "MODALIAS=coreboot:t%08X", tag); +} + static struct bus_type coreboot_bus_type = { .name = "coreboot", .match = coreboot_bus_match, .probe = coreboot_bus_probe, .remove = coreboot_bus_remove, + .uevent = coreboot_bus_uevent, }; static void coreboot_device_release(struct device *dev)
Generate a modalias uevent for devices in the coreboot bus to allow userspace to automatically load the corresponding modules. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> --- drivers/firmware/google/coreboot_table.c | 9 +++++++++ 1 file changed, 9 insertions(+)