Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp2288317rdd; Fri, 12 Jan 2024 05:21:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKa1CXLiSvrm8/Sf/BAZCfmQehCsTkjA+/1Ss43vhvMEExla694Z0SnZ1YhOrD6Go9jcAt X-Received: by 2002:aa7:c69a:0:b0:558:9a77:63ec with SMTP id n26-20020aa7c69a000000b005589a7763ecmr646254edq.47.1705065695519; Fri, 12 Jan 2024 05:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705065695; cv=none; d=google.com; s=arc-20160816; b=EHhs9njW5gjvDYXWwbEA7Ns7xm8ZnlFGi08rFeSpqU0H4wFikyIKx7x9qVSnEVICKw DWBP9cy3OVGtjEWzGGvi7JrHJ+dmb+NPTNB3L6DaLXkKpHFquzZOmucuh7rrP7+H3XCQ o21GJylss+TUufdCr6uklM84E2vjlV8qEAaav3Ozc/DosGvGKbMnpMmMdo9RTtRkbZ4l W1jO3PYXgFUNmC9roPpzZqOkjbJ3ZV1loMt3JCKy7o5T0SVghVs5b4gHpIkgm9KvTi++ EdQZPEj1X3T81ZixGGKqP2Xdw29v9xlTFtuIHyeP1S9HxbkL4gbjQsi20L/cwUFB4qgz 00eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ecZO+NgY4B1qYhZEaKmVVTet3V7wKVhziPGxqjkt5Pw=; fh=/y8dwzMSpztNb1FQx4918QuGkjkLYbBMAO8cMYUQygc=; b=OFHUTQWY/HGwDVORPlMBkZNohY4RWh/DgzF4QzjBCUhCEzjspQ0dhzOvdGd9ZXyxBL /2Z7YE2HS04KkbaPY1uXVmJBfv40TEmSA/FnEJDHlgCtSh0LRY3hk6NcfLz50iaEM7NO oAeqMj6hZDh17ctG5XBKXhIuIjmVcjlXJ2TXBCwx6tcjopFrObPaJSlzAhQOLTa5ubKS hwLImpCLTpO4r6I+bQ1R8Fl+bT114bYCvuE8k//GFB1TGs/O6bxx+0xoCaRKx6SXrPPh FIVgA2seDaqXqn7eimEPcmnuhxI0OwkkmSMl6I/cUHV38X3BptJCnnAbb7/eHWXGWmff L1MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nBq3PbDy; spf=pass (google.com: domain of linux-kernel+bounces-24681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24681-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id fi7-20020a056402550700b005534721633esi1437541edb.154.2024.01.12.05.21.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 05:21:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=nBq3PbDy; spf=pass (google.com: domain of linux-kernel+bounces-24681-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24681-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 45C9D1F2159C for ; Fri, 12 Jan 2024 13:21:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 021DD6D1B8; Fri, 12 Jan 2024 13:21:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="nBq3PbDy" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32ABE6D1A8 for ; Fri, 12 Jan 2024 13:21:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705065674; bh=L+28NgGOIiCoYRdT/O15SQx+OK5WNhSsQoOnP70V+rE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nBq3PbDy9JluN0ABov4e5gHyDfO1sVRroFlx7r4gUxjxDcW697MV7/glA4Gc5wekN aCyiXzLcivCObF0Hb6Ovw/30z2prfulK6/ACxJpSw6753CYzeEYC763Ds3xwaasjVs NYeux67OafiJt9ChjzFbcrJ8/ZjXMkiOG8PiU3eV6ZNXt8N25ou5EK7ej6WprCrR3e UMWv+QBiDFd9WwC6aOyjkmvIidjt5mVSzSNm3DJf2XJQscd8rUFg1PKfqxf+qyxavE nQ8pfuAXgicJP5jCBwDzXZvb1tbDNW0+F2UX0CIMT3DeRIR6rqgaDlx1LZenboqtUZ 5l/MEP1Gd0kkg== Received: from localhost.localdomain (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madrid.collaboradmins.com (Postfix) with ESMTPSA id B540E3782031; Fri, 12 Jan 2024 13:21:11 +0000 (UTC) From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Tzung-Bi Shih Cc: kernel@collabora.com, AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Brian Norris , Julius Werner , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/7] firmware: coreboot: Generate modalias uevent for devices Date: Fri, 12 Jan 2024 10:18:30 -0300 Message-ID: <20240112131857.900734-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240112131857.900734-1-nfraprado@collabora.com> References: <20240112131857.900734-1-nfraprado@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generate a modalias uevent for devices in the coreboot bus to allow userspace to automatically load the corresponding modules. Acked-by: Brian Norris Signed-off-by: NĂ­colas F. R. A. Prado --- (no changes since v1) drivers/firmware/google/coreboot_table.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- 2.43.0