Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1120045pxb; Thu, 4 Mar 2021 03:58:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLvZmskdSaSpMJ7R6/sEOhRjlGtdKkrKGD8VNn07S3uFeHveLZozeIS4QbiZf05GAhNXCX X-Received: by 2002:a05:6402:26c9:: with SMTP id x9mr57195edd.322.1614859096159; Thu, 04 Mar 2021 03:58:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614859096; cv=none; d=google.com; s=arc-20160816; b=fE/MJL/BTkNzNEVecf0Oel5fhsdVrwK20XknXnXj3OxEWlodgPIIje3x49oag3P2Rz W82mXdz6yShKbWJ4TVkBsjcPXVt30lUSVuNjc3kwm5omRBp8qUe+daafnfv3Zwi9kNIg RxQTGXAOvxs+yQTTbyrOBaBkzHhyhq4GiA0GyJDvkpgwSV+vaX7bmfO/2p5SwxFPH8C8 2MbuGaMJ2IezspvrDiCwTKU7Ri8jHHL5q5/n20INNkj2d2ftpS6HEPqzMdSa1+CE9b83 rDJc9aa7vAhHvHfHUnFzDSmNqEA5Gm5GceodjwaV+07UoCc72T9dZncgPXX29JPzQgF3 L4cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=3tg9/2YH88B53ii3tFImN3rADlNo36/ozFOz8uqRXwI=; b=MRyseGXYjbMJa0hkY4akLq64ZIxqlX6hqcjRB84Cnnw9M43g3iWbOEmzOZEJPAePZE ocauzEoAMAt1b7MICA5JhRWOC+8bMCC0vpEGCwOUtSiGMs7O72u67TLWKWOXhBKQYS4/ 6EziQTl9Ft3JjpnWf+HRkGJtnRmHG4yO8eLAekhTErxhpzSGJpsi+6UowipwCVUidU2+ Mf0YazKXx34pjIXmh/OEad/abqeT9Z1jmMmVE6ktFlZ1lI5XvXuqu4EeKG7quZ68p1fo z4mpqWAsuAAaeKEDDlgvLG8Erun1IdUDO87tLp5qUckGoq1BT2l9DQODR9fwYfkXA6DO K8+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Fn6DrK1x; 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 b25si8143845edx.341.2021.03.04.03.57.51; Thu, 04 Mar 2021 03:58:16 -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=@walle.cc header.s=mail2016061301 header.b=Fn6DrK1x; 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 S1386302AbhCCSO1 (ORCPT + 99 others); Wed, 3 Mar 2021 13:14:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384311AbhCCPmG (ORCPT ); Wed, 3 Mar 2021 10:42:06 -0500 Received: from ssl.serverraum.org (ssl.serverraum.org [IPv6:2a01:4f8:151:8464::1:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F98DC061761; Wed, 3 Mar 2021 07:39:12 -0800 (PST) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 48FAE2223A; Wed, 3 Mar 2021 16:39:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1614785948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3tg9/2YH88B53ii3tFImN3rADlNo36/ozFOz8uqRXwI=; b=Fn6DrK1xAp2SF5XU/kuySfh9K2VMKZXKhSDOv1F+37YhnZ3Q4BzysP3D38yIgLC8O2K8m3 bHxFXdHSGVfPO7ApAhPQrexFuRrXwutwTEQl5G1iBDjbfVPmvrHo5UxOydWJsInUEJfixt sAz9wGwBZlgYQ9jvr8N+JDSoLyhDt6A= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 03 Mar 2021 16:39:08 +0100 From: Michael Walle To: Linus Walleij Cc: =?UTF-8?Q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , Rob Herring , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list , Jonas Gorski , Necip Fazil Yildiran , "open list:GPIO SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kernel@vger.kernel.org, Linux ARM Subject: Re: [PATCH v3 01/14] gpio: regmap: set gpio_chip of_node In-Reply-To: References: <20210303142310.6371-1-noltari@gmail.com> <20210303142310.6371-2-noltari@gmail.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-03-03 16:27, schrieb Linus Walleij: > On Wed, Mar 3, 2021 at 3:23 PM Álvaro Fernández Rojas > wrote: > >> This is needed for properly registering gpio regmap as a child of a >> regmap >> pin controller. >> >> Signed-off-by: Álvaro Fernández Rojas >> --- >> v3: introduce patch needed for properly parsing gpio-ranges. > > Oops a little bug. I suggest that I merge this into the pinctrl tree > together with the rest of the patches when we are done with review. Ha, I've just debugged this because it puzzled me why it was working for me. I was about to suggesting using the following instead: chip->of_node = config->of_node ?: dev_of_node(config->parent); It turns out this is already done in of_gpio_dev_init(): https://elixir.bootlin.com/linux/v5.12-rc1/source/drivers/gpio/gpiolib-of.c#L1043 So config->of_node is still optional. But I'm not sure if we should add the line above for clarity in gpio-regmap.c. -michael