Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1724796pxb; Mon, 8 Mar 2021 05:02:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoCo6E/EtAhtGz5qSyHYAwUFIdJvkwr2hszRhI55pjNILu2oGEb08u3U+uI9kIjiXoMwoE X-Received: by 2002:a17:906:c9c2:: with SMTP id hk2mr15011705ejb.244.1615208564097; Mon, 08 Mar 2021 05:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615208564; cv=none; d=google.com; s=arc-20160816; b=qZqom+/JE3QTaFYdN/9nFt0f0JJzbdX+Icxfiwe6EoZjkUaJM+v/5H1c6pn/ouMqM5 Hy7abYdYhB/G6dPF7aP1k28pgRCae0POIITiVpQ0hGoAbF5QBnZpslOXup1Gd2KqflEa xE6Ip6ueTsEgmLta1RwIlTZqcoTdVgGWy6R98DvZpZ3v5kiuWvIOQWI/wJy9qf0lR+Qq mXtv33z5LGxXv/X04spMy12+4/6f4UR74nOvSHltGPwxTWjcTwFu6EvvGyjVLFSUg3KV RUbhTQOJ7yW05isQkYoQ1IBsvqIG/t5eLxhcKv2UP/HLwk7xYQN+TXxJjsddS9mR0W1B DB/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BxrIbdQrEERDsECw1Pxz4mKI8rl4Unw8O8vMcUP1fss=; b=uCli42LoW/ntoDZ5LyoxMqxmlpY5NKBSfZu89Z/rwNEYm+9XYsC1K9Y/NhWC2NoDaK 5OnmL5eHGOtRYlFO7gb+z6rnEJMxRls3PgOhET8I13QHHyxQw3KYq5WNOhB/pIpGcuLH AN6zhnDBx2r1gri+xY9DwqvCSPlTTeUBLHkki7Aej3KIjhdY/GjtsXob+0PdCDy5FGdG ZQ+syp1KN1EA3HIWyZu55B7vl5Mz2TtosZhyL7OEek1VOIwcZ6rawnC3xupsUfYjaUMT aAb/yUBCKB4kvbj/p3Tec1745c4/d3B0L8gXmxcdqEQn8pE6tHbOUNJOJxVG1et8Mc41 51oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=tChVnLzD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jp24si6942706ejb.512.2021.03.08.05.02.20; Mon, 08 Mar 2021 05:02:44 -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; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=tChVnLzD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229573AbhCHNBP (ORCPT + 99 others); Mon, 8 Mar 2021 08:01:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbhCHNAq (ORCPT ); Mon, 8 Mar 2021 08:00:46 -0500 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53884C06175F for ; Mon, 8 Mar 2021 05:00:46 -0800 (PST) Received: by mail-ej1-x635.google.com with SMTP id c10so20163576ejx.9 for ; Mon, 08 Mar 2021 05:00:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BxrIbdQrEERDsECw1Pxz4mKI8rl4Unw8O8vMcUP1fss=; b=tChVnLzDQTI6cmd2uPBBxzR9GbxUnBEeVFc0TfyEkfKutggoBrBoYb4djbecFePSMn 9trY5/gL7A9F9CvCiyfSk8J/6e52HBZHnC06MJiUbAlNiGRDU+JJ0VOI+diMFVGFHrp+ AurURgQ2gN16V8sfHM1y6gU+X5jfd/eQkJlt8uka1uS+9TE9WjHDh2AABgeTngyNPlkV xtaC7TWDdPmLIAUcwnZe0K+a0JS3KTEdu+EezJ7EnEefPoMCN98i4DkvYmZi+HvImcln gzBuaAWwYoh4veFQh6d2+wnRz2fKhAL9aVsiNQbOH0rez0nk1tYwDiq3nmOcgEzs8flS 1jnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BxrIbdQrEERDsECw1Pxz4mKI8rl4Unw8O8vMcUP1fss=; b=Pil7AkmA6dho1D6NLFS6QsYbpwqeHgHtZQxARRkp6mitMQLHGVFEG/6pgjNrQLX5R7 TvIsihz47B6iX4bxjcJ1YgA+fy9NzcbmpGCpJAQfUr0Zt3aQMAOvwM796jes/OOf89VW s6XioEMtZx5JXD90gMnsNrZh69drHtfcOSmzIW4XfeYjZz+tFT4ft4H/urid/O+QH9DJ 9AO0bQiaY+HkRmhAI0eIW0cyre3vREGtIC1CxEvQQuXYaL9zLPCSEKjTGagzk7FmW2L4 yo0pctF0R2u1cEWJDO+F51pEBY9A20JIEYw+YMSIr6uOWfXVaoQg+biv6ujY/TDCScLB e2QA== X-Gm-Message-State: AOAM532wFz+QBbehC32jh3Dw0Sf+UqTY5cxD0N7Jx1Hd8TKrtbGdyjW6 PGkknrB6iDeT+53UuBzExeLG8aqv/6K/hujj9fq1kg== X-Received: by 2002:a17:906:565a:: with SMTP id v26mr15223980ejr.516.1615208444859; Mon, 08 Mar 2021 05:00:44 -0800 (PST) MIME-Version: 1.0 References: <20210305120240.42830-1-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Bartosz Golaszewski Date: Mon, 8 Mar 2021 14:00:33 +0100 Message-ID: Subject: Re: [PATCH v1 1/1] gpiolib: Read "gpio-line-names" from a firmware node To: Andy Shevchenko Cc: linux-gpio , LKML , Linus Walleij , Marek Vasut , Roman Guskov Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 8, 2021 at 12:45 PM Andy Shevchenko wrote: > > 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 > > No it's fine, I just wanted to make sure. Patch applied, thanks! Bartosz