From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 E628D21CC4D; Tue, 21 Oct 2025 06:54:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761029670; cv=none; b=LALN2nFeNylHJwdX1ZSeQnSSRCEPMii0GlRulHCeU9SfceIZZdX7HX2oxHedriIppewv+SyCFLMphdqFGo49nWTtPWdf9JmeUNLfUuVxpVkQCAfAzmnN5jjBcWKzDQD669r+4O9cOFzZG6btIHI6Qug79+FMb3R5XU21KrndzEY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761029670; c=relaxed/simple; bh=vkMgVinL1FWJax5SX3F9UQ4Nigg3RGZN5Nl0dik2QxU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nUG1Wh7NgOx5Qhiy80VXPJFoWGvihjyGxb8MF0QVifkCbIDWaKGMZoxbSnqYGLRSLUxs3e1IZJoB2+5YxK8vcqI9LAqIb+Q2vPqvVX6fbFwjs6pAOTxsg3rEMl5MAPCzJ+KGOUWMft9HrDI9nlzYLgkb0k4x+owo5N3gEYXApRQ= 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=XzFP7tjr; arc=none smtp.client-ip=198.175.65.10 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="XzFP7tjr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761029669; x=1792565669; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=vkMgVinL1FWJax5SX3F9UQ4Nigg3RGZN5Nl0dik2QxU=; b=XzFP7tjr+BKXep8frvdSEPFCaW6WDg0HnpF7OTofmSzAzVl3SKtCYZ1V udTihOs6PfoZvCBG52CoicyF7/+7seA2Ylz9o4Kcj6YTvKN1hsDlsuxA8 o5OkdByhvHAyaYZuP1Djtu9ir/LtE/KYkMQIXvf3fBUhNJv8iC6a2WwRT Qakkatbde2rMKh+Ye+0ZYjAN/HHyUs6Qedl6xJzYl2K7VeorFjY940tbe QjYOZGavIwRt/PBtWr2XXTnwFW/nvpleNilQPTfLZRoJuYUkirCSlPueg SB758d0RsuJ1PO52JlzFZzHdHZQIsuKozUpDxCNCNuAjrptpxuSGFdOfE g==; X-CSE-ConnectionGUID: 2pXPLhm2QEa5ZqYeqr0uDQ== X-CSE-MsgGUID: j0XHH7wLQjyxCXNpFXBk2w== X-IronPort-AV: E=McAfee;i="6800,10657,11586"; a="80588517" X-IronPort-AV: E=Sophos;i="6.19,244,1754982000"; d="scan'208";a="80588517" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2025 23:54:28 -0700 X-CSE-ConnectionGUID: tYWKjjtsTyam8fPAp6flPw== X-CSE-MsgGUID: w/bwCdy6Qvil0IP3vj40Uw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,244,1754982000"; d="scan'208";a="183999477" Received: from egrumbac-mobl6.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.245.134]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2025 23:54:25 -0700 Received: from kekkonen.localdomain (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 861E411FCC3; Tue, 21 Oct 2025 09:54:22 +0300 (EEST) Date: Tue, 21 Oct 2025 09:54:22 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: Sakari Ailus To: Bartosz Golaszewski Cc: Andy Shevchenko , Linus Walleij , Daniel Scally , Heikki Krogerus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Philipp Zabel , Krzysztof Kozlowski , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 3/9] software node: allow referencing firmware nodes Message-ID: References: <20251006-reset-gpios-swnodes-v1-0-6d3325b9af42@linaro.org> <20251006-reset-gpios-swnodes-v1-3-6d3325b9af42@linaro.org> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hi Bartosz, Andy, On Mon, Oct 20, 2025 at 01:26:59PM +0200, Bartosz Golaszewski wrote: > On Mon, Oct 20, 2025 at 12:05 PM Andy Shevchenko > wrote: > > > > > > > > > > Can't we always have an fwnode reference? > > > > > > Unfortunately no. A const struct software_node is not yet a full > > > fwnode, it's just a template that becomes an actual firmware node when > > > it's registered with the swnode framework. However in order to allow > > > creating a graph of software nodes before we register them, we need a > > > way to reference those templates and then look them up internally in > > > swnode code. > > > > Strange that you need this way. The IPU3 bridge driver (that creates a graph of > > fwnodes at run-time for being consumed by the respective parts of v4l2 > > framework) IIRC has no such issue. Why your case is different? > > > > From what I can tell the ipu-bridge driver only references software > nodes (as struct software_node) from other software nodes. I need to > reference ANY implementation of firmware node from a software node. Yes, the IPU bridge only references software nodes. I might use two distinct pointers instead of an union and an integer field that tells which type is the right one. I don't expect more such cases here; it's either a software node or an fwnode handle (ACPI or OF node). -- Regards, Sakari Ailus