mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Sean Rhodes <sean@starlabs.systems>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Hans de Goede" <hansg@kernel.org>,
	"Corentin Chary" <corentin.chary@gmail.com>,
	"Luke D. Jones" <luke@ljones.dev>,
	"Denis Benato" <denis.benato@linux.dev>,
	"Prasanth Ksr" <prasanth.ksr@dell.com>,
	"Jorge Lopez" <jorge.lopez2@hp.com>,
	"Mark Pearson" <mpearson-lenovo@squebb.ca>,
	"Derek J. Clark" <derekjohn.clark@gmail.com>,
	"Joshua Grisham" <josh@joshuagrisham.com>,
	"Will Deacon" <will@kernel.org>,
	"Douglas Anderson" <dianders@chromium.org>,
	"Kiryl Shutsemau (Meta)" <kas@kernel.org>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Chen-Yu Tsai" <wenst@chromium.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	platform-driver-x86@vger.kernel.org, Dell.Client.Kernel@dell.com,
	"Tzung-Bi Shih" <tzungbi@kernel.org>,
	"Brian Norris" <briannorris@chromium.org>,
	"Julius Werner" <jwerner@chromium.org>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>,
	"Titouan Ameline de Cadeville" <titouan.ameline@gmail.com>,
	"Laxman Acharya Padhya" <acharyalaxman8848@gmail.com>,
	"Yidi Lin" <yidilin@google.com>, "Kees Cook" <kees@kernel.org>,
	"Takashi Sakamoto" <o-takashi@sakamocchi.jp>,
	chrome-platform@lists.linux.dev,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Eric Biggers" <ebiggers@kernel.org>,
	"Luca Weiss" <luca.weiss@fairphone.com>,
	"Michal Simek" <michal.simek@amd.com>,
	"Sven Peter" <sven@kernel.org>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Linus Walleij" <linusw@kernel.org>,
	"Drew Fustini" <fustini@kernel.org>,
	linux-arm-kernel@lists.infradead.org, soc@lists.linux.dev
Subject: Re: [PATCH v14 1/5] firmware: Move firmware attributes class helper
Date: Tue, 29 Sep 2026 12:39:37 +0300 (EEST)	[thread overview]
Message-ID: <fd08c30b-c28f-2bac-f70f-143970de9a13@linux.intel.com> (raw)
In-Reply-To: <5682c2228fa4a784d3953664b56a06e0dd9ccdef.1788284852.git.sean@starlabs.systems>

[-- Attachment #1: Type: text/plain, Size: 10429 bytes --]

On Tue, 1 Sep 2026, Sean Rhodes wrote:

> Move the firmware attributes class helper from drivers/platform/x86 to
> drivers/firmware and expose its class declaration through a public Linux
> header.
> 
> The helper is not x86-specific. Keeping it in drivers/firmware lets
> coreboot firmware drivers use the standard firmware-attributes ABI without
> living under platform/x86.
> 
> Replace the affected drivers' relative helper includes directly with the
> new public header.
> 
> Suggested-by: Derek J. Clark <derekjohn.clark@gmail.com>
> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
> Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
> Tested-by: Oliver Lin <oliver@liuxiaozhen.dev>
> Signed-off-by: Sean Rhodes <sean@starlabs.systems>
> ---
>  MAINTAINERS                                               | 8 ++++++++
>  drivers/firmware/Kconfig                                  | 3 +++
>  drivers/firmware/Makefile                                 | 1 +
>  .../x86 => firmware}/firmware_attributes_class.c          | 2 +-
>  drivers/platform/x86/Kconfig                              | 3 ---
>  drivers/platform/x86/Makefile                             | 2 --
>  drivers/platform/x86/asus-armoury.c                       | 2 +-
>  drivers/platform/x86/dell/dell-wmi-sysman/sysman.c        | 2 +-
>  drivers/platform/x86/hp/hp-bioscfg/bioscfg.c              | 2 +-
>  drivers/platform/x86/lenovo/think-lmi.c                   | 2 +-
>  drivers/platform/x86/lenovo/wmi-other.c                   | 2 +-
>  drivers/platform/x86/samsung-galaxybook.c                 | 2 +-
>  .../linux/firmware_attributes.h                           | 6 +++---
>  13 files changed, 22 insertions(+), 15 deletions(-)
>  rename drivers/{platform/x86 => firmware}/firmware_attributes_class.c (94%)
>  rename drivers/platform/x86/firmware_attributes_class.h => include/linux/firmware_attributes.h (60%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4dfc1fb14ef7..a8048eaf49e5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10181,6 +10181,14 @@ F:	include/linux/firewire.h
>  F:	include/uapi/linux/firewire*.h
>  F:	tools/firewire/
>  
> +FIRMWARE ATTRIBUTES CLASS
> +M:	Hans de Goede <hansg@kernel.org>
> +M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> +L:	platform-driver-x86@vger.kernel.org
> +S:	Maintained
> +F:	drivers/firmware/firmware_attributes_class.c
> +F:	include/linux/firmware_attributes.h
> +
>  FIRMWARE FRAMEWORK FOR ARMV8-A
>  M:	Sudeep Holla <sudeep.holla@kernel.org>
>  L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
> diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig
> index b7cc11e4fbfa..35dd6d422caf 100644
> --- a/drivers/firmware/Kconfig
> +++ b/drivers/firmware/Kconfig
> @@ -8,6 +8,9 @@ menu "Firmware Drivers"
>  
>  source "drivers/firmware/arm_scmi/Kconfig"
>  
> +config FW_ATTR_CLASS
> +	tristate
> +
>  config ARM_SCPI_PROTOCOL
>  	tristate "ARM System Control and Power Interface (SCPI) Message Protocol"
>  	depends on ARM || ARM64 || COMPILE_TEST
> diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
> index be46f1e1dc77..0e1e1b92a486 100644
> --- a/drivers/firmware/Makefile
> +++ b/drivers/firmware/Makefile
> @@ -17,6 +17,7 @@ obj-$(CONFIG_FIRMWARE_MEMMAP)	+= memmap.o
>  obj-$(CONFIG_MTK_ADSP_IPC)	+= mtk-adsp-ipc.o
>  obj-$(CONFIG_RASPBERRYPI_FIRMWARE) += raspberrypi.o
>  obj-$(CONFIG_FW_CFG_SYSFS)	+= qemu_fw_cfg.o
> +obj-$(CONFIG_FW_ATTR_CLASS)	+= firmware_attributes_class.o
>  obj-$(CONFIG_SYSFB)		+= sysfb.o
>  obj-$(CONFIG_SYSFB_SIMPLEFB)	+= sysfb_simplefb.o
>  obj-$(CONFIG_TH1520_AON_PROTOCOL) += thead,th1520-aon.o
> diff --git a/drivers/platform/x86/firmware_attributes_class.c b/drivers/firmware/firmware_attributes_class.c
> similarity index 94%
> rename from drivers/platform/x86/firmware_attributes_class.c
> rename to drivers/firmware/firmware_attributes_class.c
> index 736e96c186d9..503ecc288086 100644
> --- a/drivers/platform/x86/firmware_attributes_class.c
> +++ b/drivers/firmware/firmware_attributes_class.c
> @@ -3,7 +3,7 @@
>  /* Firmware attributes class helper module */
>  
>  #include <linux/module.h>
> -#include "firmware_attributes_class.h"
> +#include <linux/firmware_attributes.h>
>  
>  const struct class firmware_attributes_class = {
>  	.name = "firmware-attributes",
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 957034f39e4e..4851bf45157d 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -925,9 +925,6 @@ config DASHARO_ACPI
>  
>  source "drivers/platform/x86/x86-android-tablets/Kconfig"
>  
> -config FW_ATTR_CLASS
> -	tristate
> -
>  config INTEL_IMR
>  	bool "Intel Isolated Memory Region support"
>  	depends on X86_INTEL_QUARK && IOSF_MBI
> diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
> index 872ac3842391..cab20a4145e3 100644
> --- a/drivers/platform/x86/Makefile
> +++ b/drivers/platform/x86/Makefile
> @@ -63,8 +63,6 @@ obj-$(CONFIG_X86_PLATFORM_DRIVERS_HP)	+= hp/
>  # Hewlett Packard Enterprise
>  obj-$(CONFIG_UV_SYSFS)       += uv_sysfs.o
>  
> -obj-$(CONFIG_FW_ATTR_CLASS)	+= firmware_attributes_class.o
> -
>  # IBM Thinkpad (before 2005)
>  obj-$(CONFIG_IBM_RTL)		+= ibm_rtl.o
>  obj-$(CONFIG_SENSORS_HDAPS)	+= hdaps.o
> diff --git a/drivers/platform/x86/asus-armoury.c b/drivers/platform/x86/asus-armoury.c
> index 93d9665717af..fb382de5b57b 100644
> --- a/drivers/platform/x86/asus-armoury.c
> +++ b/drivers/platform/x86/asus-armoury.c
> @@ -21,6 +21,7 @@
>  #include <linux/dmi.h>
>  #include <linux/err.h>
>  #include <linux/errno.h>
> +#include <linux/firmware_attributes.h>
>  #include <linux/fs.h>
>  #include <linux/kernel.h>
>  #include <linux/kmod.h>
> @@ -35,7 +36,6 @@
>  #include <linux/sysfs.h>
>  
>  #include "asus-armoury.h"
> -#include "firmware_attributes_class.h"
>  
>  #define ASUS_NB_WMI_EVENT_GUID "0B3CBB35-E3C2-45ED-91C2-4C5A6D195D1C"
>  
> diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> index ab46a023cc34..ae89670f73b4 100644
> --- a/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> +++ b/drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
> @@ -10,13 +10,13 @@
>  #include <linux/align.h>
>  #include <linux/fs.h>
>  #include <linux/dmi.h>
> +#include <linux/firmware_attributes.h>
>  #include <linux/module.h>
>  #include <linux/kernel.h>
>  #include <linux/string.h>
>  #include <linux/sysfs.h>
>  #include <linux/wmi.h>
>  #include "dell-wmi-sysman.h"
> -#include "../../firmware_attributes_class.h"
>  
>  #define MAX_TYPES  4
>  #include <linux/nls.h>
> diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
> index 309634c1cc20..d5a2d0963bbf 100644
> --- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
> +++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
> @@ -7,6 +7,7 @@
>  
>  #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
>  
> +#include <linux/firmware_attributes.h>
>  #include <linux/fs.h>
>  #include <linux/module.h>
>  #include <linux/kernel.h>
> @@ -14,7 +15,6 @@
>  #include <linux/string.h>
>  #include <linux/wmi.h>
>  #include "bioscfg.h"
> -#include "../../firmware_attributes_class.h"
>  #include <linux/nls.h>
>  #include <linux/errno.h>
>  
> diff --git a/drivers/platform/x86/lenovo/think-lmi.c b/drivers/platform/x86/lenovo/think-lmi.c
> index a0e3fa766e37..ebfc6182986e 100644
> --- a/drivers/platform/x86/lenovo/think-lmi.c
> +++ b/drivers/platform/x86/lenovo/think-lmi.c
> @@ -14,13 +14,13 @@
>  #include <linux/acpi.h>
>  #include <linux/array_size.h>
>  #include <linux/errno.h>
> +#include <linux/firmware_attributes.h>
>  #include <linux/fs.h>
>  #include <linux/mutex.h>
>  #include <linux/string_helpers.h>
>  #include <linux/types.h>
>  #include <linux/dmi.h>
>  #include <linux/wmi.h>
> -#include "../firmware_attributes_class.h"
>  #include "think-lmi.h"
>  
>  static bool debug_support;
> diff --git a/drivers/platform/x86/lenovo/wmi-other.c b/drivers/platform/x86/lenovo/wmi-other.c
> index fbb32bf404f2..b175971bb308 100644
> --- a/drivers/platform/x86/lenovo/wmi-other.c
> +++ b/drivers/platform/x86/lenovo/wmi-other.c
> @@ -33,6 +33,7 @@
>  #include <linux/container_of.h>
>  #include <linux/device.h>
>  #include <linux/export.h>
> +#include <linux/firmware_attributes.h>
>  #include <linux/gfp_types.h>
>  #include <linux/hwmon.h>
>  #include <linux/idr.h>
> @@ -50,7 +51,6 @@
>  #include "wmi-capdata.h"
>  #include "wmi-events.h"
>  #include "wmi-helpers.h"
> -#include "../firmware_attributes_class.h"
>  
>  #define LENOVO_OTHER_MODE_GUID "DC2A8805-3A8C-41BA-A6F7-092E0089CD3B"
>  
> diff --git a/drivers/platform/x86/samsung-galaxybook.c b/drivers/platform/x86/samsung-galaxybook.c
> index 99f72b204a51..88ef11004ad0 100644
> --- a/drivers/platform/x86/samsung-galaxybook.c
> +++ b/drivers/platform/x86/samsung-galaxybook.c
> @@ -14,6 +14,7 @@
>  #include <linux/acpi.h>
>  #include <linux/bits.h>
>  #include <linux/err.h>
> +#include <linux/firmware_attributes.h>
>  #include <linux/i8042.h>
>  #include <linux/init.h>
>  #include <linux/input.h>
> @@ -28,7 +29,6 @@
>  #include <linux/uuid.h>
>  #include <linux/workqueue.h>
>  #include <acpi/battery.h>
> -#include "firmware_attributes_class.h"
>  
>  #define DRIVER_NAME "samsung-galaxybook"
>  
> diff --git a/drivers/platform/x86/firmware_attributes_class.h b/include/linux/firmware_attributes.h
> similarity index 60%
> rename from drivers/platform/x86/firmware_attributes_class.h
> rename to include/linux/firmware_attributes.h
> index d27abe54fcf9..d4026ba1fcc2 100644
> --- a/drivers/platform/x86/firmware_attributes_class.h
> +++ b/include/linux/firmware_attributes.h
> @@ -2,11 +2,11 @@
>  
>  /* Firmware attributes class helper module */
>  
> -#ifndef FW_ATTR_CLASS_H
> -#define FW_ATTR_CLASS_H
> +#ifndef _LINUX_FIRMWARE_ATTRIBUTES_H
> +#define _LINUX_FIRMWARE_ATTRIBUTES_H
>  
>  #include <linux/device/class.h>
>  
>  extern const struct class firmware_attributes_class;
>  
> -#endif /* FW_ATTR_CLASS_H */
> +#endif /* _LINUX_FIRMWARE_ATTRIBUTES_H */

Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.

  parent reply	other threads:[~2026-09-29  9:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 17:48 [PATCH v14 0/5] coreboot CFR firmware attributes Sean Rhodes
2026-09-01 17:48 ` [PATCH v14 1/5] firmware: Move firmware attributes class helper Sean Rhodes
2026-09-02 10:14   ` Tzung-Bi Shih
2026-09-29  9:39   ` Ilpo Järvinen [this message]
2026-09-01 17:48 ` [PATCH v14 2/5] firmware: Rename google firmware directory to coreboot Sean Rhodes
2026-09-01 17:48 ` [PATCH v14 3/5] drm/sysfb: Update coreboot framebuffer Kconfig symbol Sean Rhodes
2026-09-04  9:10   ` Thomas Zimmermann
2026-09-01 17:48 ` [PATCH v14 4/5] firmware: coreboot: Add CFR firmware attributes driver Sean Rhodes
2026-09-01 17:48 ` [PATCH v14 5/5] arm64: defconfig: Update coreboot firmware symbols Sean Rhodes
2026-09-02 10:01 ` (subset) [PATCH v14 0/5] coreboot CFR firmware attributes Tzung-Bi Shih
2026-09-02 10:01   ` Sean Rhodes
2026-09-16 21:43     ` Sean Rhodes

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=fd08c30b-c28f-2bac-f70f-143970de9a13@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=Dell.Client.Kernel@dell.com \
    --cc=acharyalaxman8848@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andersson@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=briannorris@chromium.org \
    --cc=chenhuacai@kernel.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=corentin.chary@gmail.com \
    --cc=dakr@kernel.org \
    --cc=denis.benato@linux.dev \
    --cc=derekjohn.clark@gmail.com \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ebiggers@kernel.org \
    --cc=fustini@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=hansg@kernel.org \
    --cc=javierm@redhat.com \
    --cc=jorge.lopez2@hp.com \
    --cc=josh@joshuagrisham.com \
    --cc=jwerner@chromium.org \
    --cc=kas@kernel.org \
    --cc=kees@kernel.org \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=luke@ljones.dev \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michal.simek@amd.com \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=mripard@kernel.org \
    --cc=o-takashi@sakamocchi.jp \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=prasanth.ksr@dell.com \
    --cc=sean@starlabs.systems \
    --cc=simona@ffwll.ch \
    --cc=soc@lists.linux.dev \
    --cc=sven@kernel.org \
    --cc=titouan.ameline@gmail.com \
    --cc=tzimmermann@suse.de \
    --cc=tzungbi@kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=wenst@chromium.org \
    --cc=will@kernel.org \
    --cc=yidilin@google.com \
    /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

all inboxes | Powered by JetHome®