Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1676566pxb; Mon, 8 Mar 2021 03:46:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyugF/TSKrWeDquT4YtKZdWUoBq5+eWk8WsZ1eMZK174H79K4nal8dekQ1rLeUzcFjyfsbo X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr14403696ejw.47.1615203995041; Mon, 08 Mar 2021 03:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615203995; cv=none; d=google.com; s=arc-20160816; b=mDR+EG2Hgmh1KWqVT6QrC++02H555DPqmyqVH4tw3GO0MW63zYXlOPHCgtFoJyvfgm klba4NPUnhYVUt1CYAiYCslZ9AYJWBNbHTnuWCU7W6Bo/o1ZDcMjSqIX9kBKm1Q5QEQj 9RoAqlhUxpsLdVnTRJRwztRN0HzOXJn+1G6a9CsZo6UnekYOKwHDzRt2mqAa/PrChttZ Ap6/0O3jWNqq7aZlMw/kJrcn+zfpK3J5TsZ/dQFaIBkavjKyu+ch5eWRt7NgYXH/AfL5 ntaA34NNWBv1+HcaTqTcx4GSPvAVFChQ4EJ+ivBTuTbYTYHTLnmAAulR2tWhmrdtBZsW ok9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=DcfUBNkE8lwqMsVJPN9VFCwjgHs5XCQtIKMYMGpnMaI=; b=FYhyFY4wWj024g0f3eiG92Cx4hf1P4HxQpzrhj1Gh6EcB5o+3y/qnnDu6h2x0DS5O4 HK6rZS/zMKH5k2mbksF9pN0ogWqtoLoRjg1po5iNVU+dHjnimuSA1tkFT5+MuuEh/aIB 6PrkgmlGEmYbTVlATgFvpW22ChmIxReij/tm9n7py1e7ll54AxFaVHbIftjmDQiWTzRp HZj0XHRXD+ZYtfd20uCGLkOx9p+AzEckEzK/+IhIPEZL+28LoFtkzapzajKSLi7/QrBj Dp3BDcR968HhNGFPGTdeht+jGEP4TtfmyNfY7S/l9JGNPOsuTwSoQG1igmpw0UeLMwJK OcKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b18si6433910edr.358.2021.03.08.03.46.12; Mon, 08 Mar 2021 03:46:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229821AbhCHLpL (ORCPT + 99 others); Mon, 8 Mar 2021 06:45:11 -0500 Received: from mga12.intel.com ([192.55.52.136]:50435 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbhCHLpK (ORCPT ); Mon, 8 Mar 2021 06:45:10 -0500 IronPort-SDR: zMLxAtgMNZTdZYY5WHzhjgk4eahQIj3cxWZ8BRXI3FddeJ4DWrzKyzCRjH+Syn5cDHR8nSyMbW f63hEZ9RX+Sg== X-IronPort-AV: E=McAfee;i="6000,8403,9916"; a="167283889" X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="167283889" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 03:45:10 -0800 IronPort-SDR: lnUJFFXJ6/McTO6eNQriqJBp7TBvHjcQbyf9rXe9zb9M61dzhj4ClGP6Wj1daydc9wc72yPJVe 4Lowz5WDtg6w== X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="508900360" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 03:45:08 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1lJEJu-00Ao5j-9c; Mon, 08 Mar 2021 13:45:06 +0200 Date: Mon, 8 Mar 2021 13:45:06 +0200 From: Andy Shevchenko To: Bartosz Golaszewski Cc: linux-gpio , LKML , Linus Walleij , Marek Vasut , Roman Guskov Subject: Re: [PATCH v1 1/1] gpiolib: Read "gpio-line-names" from a firmware node Message-ID: References: <20210305120240.42830-1-andriy.shevchenko@linux.intel.com> 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-kernel@vger.kernel.org On Sun, Mar 07, 2021 at 06:14:49PM +0200, Andy Shevchenko wrote: > On Sun, Mar 7, 2021 at 4:22 PM Bartosz Golaszewski > wrote: > > On Fri, Mar 5, 2021 at 1:02 PM Andy Shevchenko > > wrote: > > > > > > On STM32MP1, the GPIO banks are subnodes of pin-controller@50002000, > > > see arch/arm/boot/dts/stm32mp151.dtsi. The driver for > > > pin-controller@50002000 is in drivers/pinctrl/stm32/pinctrl-stm32.c > > > and iterates over all of its DT subnodes when registering each GPIO > > > bank gpiochip. Each gpiochip has: > > > > > > - gpio_chip.parent = dev, > > > where dev is the device node of the pin controller > > > - gpio_chip.of_node = np, > > > which is the OF node of the GPIO bank > > > > > > Therefore, dev_fwnode(chip->parent) != of_fwnode_handle(chip.of_node), > > > i.e. pin-controller@50002000 != pin-controller@50002000/gpio@5000*000. > > > > > > The original code behaved correctly, as it extracted the "gpio-line-names" > > > from of_fwnode_handle(chip.of_node) = pin-controller@50002000/gpio@5000*000. > > > > > > To achieve the same behaviour, read property from the firmware node. ... > > Did you run the OF unit tests on this? The check for the parent dev > > was added after a bug was reported that was only triggered in unit > > tests. > > Parent is not used anymore. But I can run unittests next week (or if > you know that they are failing now, can you please show the failure?). For the record: [ 40.587868] ### dt-test ### end of unittest - 190 passed, 0 failed If you have tests failed, we need more information about what line fails, etc. -- With Best Regards, Andy Shevchenko