From patchwork Wed Jan 17 19:03:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13522117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 65FCFC47422 for ; Wed, 17 Jan 2024 19:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XT8H/07sC6WFpcRZK+foHe6a9HLbyi9uwhnswYxGonQ=; b=2u6PzEB59Vl6wE PzycuTRD6TjZhg6o2VF6rkjMwwQ4LphEpj5CMzWHc5u4v4ibNJTmdZLKo9N/EZM0U/hfUxX8iJfCd 1cqmYrujuuvB5bQGMI2CN3dy09CgAScUf+Ch3TKj7xPsal22LqKuSWyXbuzEBnNmC6PXhe+T5WJZ0 zo/KiJGLGb1OZ2uwaj0+CZH5vQNTlD6YnHtGn5m6MF2nc3Vpc4X5UpdGCQ4voTI7y6ksDxOxrrxOB ucQ30Nvt3p1KiZJuOuko8TOLnJBr2wy7TLRopV3pzTFHVXBzPQFODbRsErYcYwLxT7YAtXaeKwmLq NhnJCXR4LThhn/qJrItA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQBEb-000RMc-2M; Wed, 17 Jan 2024 19:05:57 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQBEZ-000RLd-01 for linux-arm-kernel@lists.infradead.org; Wed, 17 Jan 2024 19:05:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1705518352; bh=+oH4EJn5sUeFLh47JfQVauFBQi5fBhiUE512d5N7kvA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=3mnn8/XzjgRV1yrJ/b0Bpm/qJbxf1HJflc3HSRevLRGcD9H1U+Ce3fwTb+l8Zkrmh 5NuxGp1EfTM/lzvqF+GqpNEuINU5oIotPcGQeBygv86q6ra+vwW3hCEyp+lU3OEiW3 pa2Kph7RhoRy7rAJ2dePc1+8MI8Fkqi+ge0nqRdLqMjDWGv5UViLhTgmxvcLkL7wKV lqwywWw1tFai/KHSQqVsq0bARuIqLDtPI8YpQSRSiv0zTZXMRJNsPlumyCMLoEViTR l786E/N96/lOKdR/os3q9AD58zgFDOMI2TvsGtytN9kFu/ZFCmLsXvJgc70YnVYGIo ZXP4l9e61jYfA== Received: from [192.168.0.47] (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 AE9B73782033; Wed, 17 Jan 2024 19:05:47 +0000 (UTC) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Date: Wed, 17 Jan 2024 16:03:22 -0300 Subject: [PATCH v3 1/4] firmware: coreboot: Generate modalias uevent for devices MIME-Version: 1.0 Message-Id: <20240117-coreboot-mod-defconfig-v3-1-049565a27bba@collabora.com> References: <20240117-coreboot-mod-defconfig-v3-0-049565a27bba@collabora.com> In-Reply-To: <20240117-coreboot-mod-defconfig-v3-0-049565a27bba@collabora.com> To: Tzung-Bi Shih Cc: Arnd Bergmann , Brian Norris , Julius Werner , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Catalin Marinas , Will Deacon , AngeloGioacchino Del Regno , Andy Shevchenko , kernel@collabora.com, chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_110555_171847_D6B2836D X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Generate a modalias uevent for devices in the coreboot bus to allow userspace to automatically load the corresponding modules. Acked-by: Brian Norris Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: NĂ­colas F. R. A. Prado --- 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)