From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3FBFC433F5 for ; Thu, 2 Dec 2021 10:59:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357096AbhLBLCY (ORCPT ); Thu, 2 Dec 2021 06:02:24 -0500 Received: from mga14.intel.com ([192.55.52.115]:57432 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357088AbhLBLCU (ORCPT ); Thu, 2 Dec 2021 06:02:20 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10185"; a="236913759" X-IronPort-AV: E=Sophos;i="5.87,281,1631602800"; d="scan'208";a="236913759" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2021 02:58:58 -0800 X-IronPort-AV: E=Sophos;i="5.87,281,1631602800"; d="scan'208";a="677622974" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2021 02:58:55 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1msjmU-001Me9-H0; Thu, 02 Dec 2021 12:57:38 +0200 Date: Thu, 2 Dec 2021 12:57:38 +0200 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Kent Gibson , Linus Walleij , Shuah Khan , Geert Uytterhoeven , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , linux-kselftest@vger.kernel.org Subject: Re: [PATCH v11 2/6] gpiolib: allow to specify the firmware node in struct gpio_chip Message-ID: References: <20211130154127.12272-1-brgl@bgdev.pl> <20211130154127.12272-3-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, Dec 01, 2021 at 02:11:28PM +0100, Bartosz Golaszewski wrote: > On Tue, Nov 30, 2021 at 10:04 PM Bartosz Golaszewski wrote: ... > Let me maybe rephrase the problem: currently, for GPIO devices > instantiating multiple banks created outside of the OF or ACPI > frameworks (e.g. instantiated manually and configured using a > hierarchy of software nodes with a single parent swnode and a number > of child swnodes representing the children), it is impossible to > assign firmware nodes other than the one representing the top GPIO > device to the gpiochip child devices. > > In fact if we want to drop the OF APIs entirely from gpiolib - this > would be the right first step as for gpio-sim it actually replaces the > gc->of_node = some_of_node; assignment that OF-based drivers do for > sub-nodes defining banks and it does work with device-tree (I verified > that too) thanks to the fwnode abstraction layer. In exchange of acknowledgements I confirm that I understood the issue you are describing. What I still don't like is this band-aid:ish approach. What we really need is to replace of_node by fwnode in GPIO library once for all. But it can be done later after your simulation series (or before, i.o.w. independently), hence I propose to update TODO and do it separately. -- With Best Regards, Andy Shevchenko