mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: "Daniel Scally" <djrscally@gmail.com>,
	"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Linus Walleij" <linusw@kernel.org>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	linux-acpi@vger.kernel.org, driver-core@lists.linux.dev,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH 1/4] software node: support automatic secondary fwnode assignment
Date: Fri, 20 Mar 2026 09:36:26 +0200	[thread overview]
Message-ID: <abz4-iKFBsPIJb7F@ashevche-desk.local> (raw)
In-Reply-To: <20260319-baytrail-real-swnode-v1-1-75f2264ae49f@oss.qualcomm.com>

On Thu, Mar 19, 2026 at 05:10:54PM +0100, Bartosz Golaszewski wrote:
> Provide a structure and a set of functions allowing to set up automatic
> secondary firmware node assignment for platform devices. It uses
> a behind-the-scenes bus notifier for a group of named software nodes. It
> will wait for bus events and when a device is added, it will check its
> name against the software node's name and - on match - assign the
> software node as the secondary firmware node of the device's *real*
> firmware node.

...

> +/**
> + * software_node_register_auto_secondary() - set up automatic assignment of
> + *                                           secondary firmware nodes
> + * @auto_sec: Context data to use.
> + *
> + * NOTE: All software nodes passed in @auto_sec must be named.

> + * Returns:

Is it with 's' in other kernel-doc? The official is "Return", the 's' variant
is supported, but not documented.

> + * 0 on success, negative error number on failure.

The Return section must be last in the kernel-doc description. This is documented.

> + * This registers the software node group passed in @auto_sec and sets up
> + * automatic assignment of them as secondary firmware nodes of real nodes
> + * attached to appropriate devices on the bus specified in @auto_sec. The
> + * software nodes must be named and their names must be the same as the
> + * devices they should reference. The assignment happens when the device is
> + * first added to the bus.
> + */

...

> +/**
> + * struct software_node_auto_secondary - context data for automatic secondary
> + *                                       fwnode assignment
> + * @nb: Private bus notifier data - don't use

Mark it with __private then.

> + * @node_group: NULL-terminated array of software node addresses
> + * @bus: Bus on which to wait for devices

If bus is not compiled into kernel, this optionally has to support NULL
in the code (I haven't checked the code, though).

> + */
> +struct software_node_auto_secondary {
> +	struct notifier_block nb;

	struct notifier_block __private nb;

> +	const struct software_node * const *node_group;
> +	const struct bus_type *bus;
> +};

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-03-20  7:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 16:10 [PATCH 0/4] platform/x86: x86-android-tablets: use real firmware node references with intel drivers Bartosz Golaszewski
2026-03-19 16:10 ` [PATCH 1/4] software node: support automatic secondary fwnode assignment Bartosz Golaszewski
2026-03-20  7:36   ` Andy Shevchenko [this message]
2026-03-23 15:23     ` Bartosz Golaszewski
2026-03-19 16:10 ` [PATCH 2/4] pinctrl: intel: expose software nodes for baytrail GPIO devices Bartosz Golaszewski
2026-03-20 10:38   ` Andy Shevchenko
2026-03-20 10:39     ` Andy Shevchenko
2026-03-23 15:28     ` Bartosz Golaszewski
2026-03-23 17:05       ` Andy Shevchenko
2026-03-19 16:10 ` [PATCH 3/4] pinctrl: intel: expose software nodes for cherryiew " Bartosz Golaszewski
2026-03-19 16:10 ` [PATCH 4/4] platform/x86: x86-android-tablets: enable fwnode matching of GPIO chips Bartosz Golaszewski
2026-03-20  1:49 ` [PATCH 0/4] platform/x86: x86-android-tablets: use real firmware node references with intel drivers Dmitry Torokhov
2026-03-20 20:33   ` Bartosz Golaszewski
2026-03-21  7:01     ` Dmitry Torokhov
2026-03-23 11:40       ` Bartosz Golaszewski
2026-03-23 22:01         ` Dmitry Torokhov

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=abz4-iKFBsPIJb7F@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=dakr@kernel.org \
    --cc=djrscally@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linusw@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sakari.ailus@linux.intel.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

Powered by JetHome