From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 99C28335555 for ; Fri, 20 Mar 2026 07:36:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773992193; cv=none; b=NBOVyfyVvjdhVvlYucUpQwjKh6ndNLfGVe5IFDOK4hrTLNGh5Ond2dXECczSQ7phhnBREdkjvmU5qyaOZNGjOHRlTsolJrKjZtw2Fq6LK8otnz6BBJ4E7dpYLwn8gEZf9Qnm2d3B7AC6VfgSuWfFQVcCa2shkUFfccLwIq8JQxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773992193; c=relaxed/simple; bh=aVjU9vB3deYFYEQRjHDO84MBFFxZKuFsTsm53223WNA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Rf7+vU6YrG8CtYe+u3wVlqxxvQj0CTZkxk/v8Div9wiwAMnduwtoZbDqFxBh5k2xXnGxLdhMEfQEZ5BjQLpeZ/qr8D+hp5O2V4gvB73aYENAngVKUxCs6yW/KvShPg5152B1GX2aptFsvoUvTmnbb7GRYZbPgOdpixsC+CVMkV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=dhmq5CEC; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dhmq5CEC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773992192; x=1805528192; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aVjU9vB3deYFYEQRjHDO84MBFFxZKuFsTsm53223WNA=; b=dhmq5CECdkNpALjdO83vnn6RNZ+OklnryFtJxElzOWCrUeVkd5ojR0C9 0OAWFYT9O9Xnrn3BCn+IOT5Os6u+XxP4zjuk8Xu3HCz43WTEf57YvF1D6 VVuttKFYVxpdSkYEp3bhXrSVxebq8WHoqiXZQaLdXdXeqA7Bupu5e+yb+ JnczT3tIgap81ASRKeuIA9+zNgV211dtkgpJYZlarCjI21vudiwOx2UP8 MU63jBebL5b4U340HhQhQ4s3dVx/YCQJ+CUIclsq1CHOtRqD4lOtQEgB7 VH72i9BWWM2r3tE6YRDqcLwM8Skfx0Fi2Gd2A0743+s3DCaDNxHtLGl/q A==; X-CSE-ConnectionGUID: R1mmMxbtT3yTmtMpuqKkTA== X-CSE-MsgGUID: zspHPwN+QLSnZmbHE7EyVw== X-IronPort-AV: E=McAfee;i="6800,10657,11734"; a="74088780" X-IronPort-AV: E=Sophos;i="6.23,130,1770624000"; d="scan'208";a="74088780" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2026 00:36:32 -0700 X-CSE-ConnectionGUID: 246dr+i8QaGlyKrDOOi8Ng== X-CSE-MsgGUID: QY4qFbXSSC6smiTJxZajVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,130,1770624000"; d="scan'208";a="218590930" Received: from egrumbac-mobl6.ger.corp.intel.com (HELO localhost) ([10.245.245.40]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2026 00:36:28 -0700 Date: Fri, 20 Mar 2026 09:36:26 +0200 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Mika Westerberg , Andy Shevchenko , Linus Walleij , Hans de Goede , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Dmitry Torokhov , 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 Message-ID: References: <20260319-baytrail-real-swnode-v1-0-75f2264ae49f@oss.qualcomm.com> <20260319-baytrail-real-swnode-v1-1-75f2264ae49f@oss.qualcomm.com> Precedence: bulk X-Mailing-List: driver-core@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260319-baytrail-real-swnode-v1-1-75f2264ae49f@oss.qualcomm.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo 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