Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1581391pxb; Thu, 4 Mar 2021 15:24:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+TeF6fgZ/z19JC1qoo07kFdoPWh2HFHgZWWvVmX+BZGgSMNrTW2XF/v+pMgvQnIZ182M/ X-Received: by 2002:a17:906:63c2:: with SMTP id u2mr6583087ejk.346.1614900290930; Thu, 04 Mar 2021 15:24:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614900290; cv=none; d=google.com; s=arc-20160816; b=zKwGjntqFwuM6oQ7u1p3qMQENByNQ1qVj0WJAomnItedYGfAx5PGn3VK4pNv3rehcw kkmzFmwO0KIlPHwTbWckAu0d4KCZcyQHL/83nwtqeIcB9NdLlIWseVfoS6seCL7JNzlQ uBmRZfQXWxXKUZgYk0VBuc8Kwqn5ngUaehbhW5O5cxtOhY6UaspqtCSkm2oDtwMTnrF0 SxrB2uJ1ez74j6BCpPpaLucw/zsIoxFqAUsbrxW+N6ifrNoWDcjF/V/r+IyU2kAEnV/8 97bnQXFPMvsHgtlrT8+PS/Z/Z/DOI8gtWMjRNQ2ceHjORm1DEJLmvLazEUh0ePmh3ZHd 8OKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=+esVDoo5iSfzTZlFC03UaiUxOtwcJzAgay1XsaeRfDM=; b=V4NJsnD4cFvkak+oPnPGSrqT5rul4vUG4gg2brLBm3zhJzN2dqBGqO/gFmPheG2rd5 zbMpIKQy9xECVnc2g/c4X6yoyEEk25iV5FA7xvyL5CHhb0/z7nOlW/opW/0V7P0vX+Nz cLpJme/yXj+NfThTOLZ4hrF5fxwFEcmsRjDPTeSqYoVfhvNUirpnOc6iaYjXfyYSxs8L BbwSvJZIzLPIb09RXj+eIAAuHBelvkA2Sa5utxHjIEzn/vfyaQQ1evBuAFxqd8dmd/+x xOUzPKdrKPgcRUCQwWDWpx0mdCrQ/uVvu8nSkU/j5SsH2EQQZfD1fnsUOkQgPC2nX3ql 9+XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NQzVWHwR; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si535675edd.595.2021.03.04.15.24.27; Thu, 04 Mar 2021 15:24:50 -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=@gmail.com header.s=20161025 header.b=NQzVWHwR; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1578465AbhCCSR1 (ORCPT + 99 others); Wed, 3 Mar 2021 13:17:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234833AbhCCQOm (ORCPT ); Wed, 3 Mar 2021 11:14:42 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A178EC061762; Wed, 3 Mar 2021 08:12:38 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id b18so17812186wrn.6; Wed, 03 Mar 2021 08:12:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+esVDoo5iSfzTZlFC03UaiUxOtwcJzAgay1XsaeRfDM=; b=NQzVWHwRMy6kPKhLvaTEp1qFufAbIAoWBrfM30EGM1hDrGCuGDzuXXmMIKz7Ue3KIJ BfHt5gB0+xLuczBamCKjG8NBbnfiTxxb4C/zKqDSp4UthA7aL3RxoQKMB0T5JGu+uZzD sxG1KFIpvxo1Un428cYIC+LoOizyZTNFVV3cNEUCTHcxvrA8+U3i90Rlu00GYAoTTu/0 0DtTmg0uwOY/c77SvIXPzvkTJTpHYq91ockLDOdmx8IUjxS8BqNjeegkZgQwaYdh73ri 8DBpK8Rgqls/dh+suw125F0ituJCKqsttYbFxD1EXH3hxAdtHKOULJDjoGQIEY3mfTi3 DEyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+esVDoo5iSfzTZlFC03UaiUxOtwcJzAgay1XsaeRfDM=; b=gf7s3joM/YzOPTX/HzWttsGLuEFG8b+odMEmzzB4+CEbXqulA+EdGivvYe3Ka8Qjfp B1djJiwplWCCxTeTkhg1aAONyZkhNd70F520IFLteKl7YPZYk/X/No46nMijoVNcG7nB eCjBUajLXCYjGM8xGyznAe0OUvX7nEffKnFRHDSCkr5wED6ijSKP5d8SuLcm9jPDXXoE VW8tKtTaDoZ4PZWfwm45IYMrK6gUy2fnPMlCJNsJqVftr64c4oJjqPzUR6xz4dD5XSBy sqc75uQAFETpfy/JzAb89fdu2njcY4iY3LuMLMGhdOk/b+RE8Cl5+P3gYKMtE7BWW98P 5V8g== X-Gm-Message-State: AOAM5323MGiNVJVeuFjYCDlCjiMwFiEAAGEh++K/Weg1k9DQ7Fr6wWvv iM4xJJ41NNEAUJ4iQMPn340= X-Received: by 2002:a5d:528f:: with SMTP id c15mr27955555wrv.142.1614787957367; Wed, 03 Mar 2021 08:12:37 -0800 (PST) Received: from macbook-pro-alvaro.lan (170.red-88-1-105.dynamicip.rima-tde.net. [88.1.105.170]) by smtp.gmail.com with ESMTPSA id o13sm37119531wro.15.2021.03.03.08.12.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 08:12:36 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [PATCH v3 01/14] gpio: regmap: set gpio_chip of_node From: =?utf-8?Q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= In-Reply-To: <40403445ae34e822474e5f39be75fd0b@walle.cc> Date: Wed, 3 Mar 2021 17:12:35 +0100 Cc: Rob Herring , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, 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-kernel@lists.infradead.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20210303142310.6371-1-noltari@gmail.com> <20210303142310.6371-2-noltari@gmail.com> <40403445ae34e822474e5f39be75fd0b@walle.cc> To: Michael Walle , Linus Walleij X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Do you want me to send v4 with these changes? Or maybe just this single patch? Best regards, =C3=81lvaro. > El 3 mar 2021, a las 17:08, Michael Walle = escribi=C3=B3: >=20 > Am 2021-03-03 15:22, schrieb =C3=81lvaro Fern=C3=A1ndez Rojas: >> This is needed for properly registering gpio regmap as a child of a = regmap >> pin controller. >> Signed-off-by: =C3=81lvaro Fern=C3=A1ndez Rojas >> --- >> v3: introduce patch needed for properly parsing gpio-ranges. >> drivers/gpio/gpio-regmap.c | 1 + >> include/linux/gpio/regmap.h | 3 +++ >> 2 files changed, 4 insertions(+) >> diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c >> index 5412cb3b0b2a..752ccd780b7d 100644 >> --- a/drivers/gpio/gpio-regmap.c >> +++ b/drivers/gpio/gpio-regmap.c >> @@ -249,6 +249,7 @@ struct gpio_regmap *gpio_regmap_register(const >> struct gpio_regmap_config *config >> chip =3D &gpio->gpio_chip; >> chip->parent =3D config->parent; >> + chip->of_node =3D config->of_node; >=20 > chip->of_node =3D config->of_node ?: dev_of_node(config->parent); >=20 > As mentioned in my previous reply in this thread, for clarity > reasons. >=20 >> chip->base =3D -1; >> chip->ngpio =3D config->ngpio; >> chip->names =3D config->names; >> diff --git a/include/linux/gpio/regmap.h = b/include/linux/gpio/regmap.h >> index ad76f3d0a6ba..f6e638e32d2a 100644 >> --- a/include/linux/gpio/regmap.h >> +++ b/include/linux/gpio/regmap.h >> @@ -4,6 +4,7 @@ >> #define _LINUX_GPIO_REGMAP_H >> struct device; >> +struct device_node; >> struct gpio_regmap; >> struct irq_domain; >> struct regmap; >> @@ -14,6 +15,7 @@ struct regmap; >> /** >> * struct gpio_regmap_config - Description of a generic regmap = gpio_chip. >> * @parent: The parent device >> + * @of_node: The device node >=20 > Please add "(Optional)" and move it below @regmap. This should also > mention that if not supplied parent->of_node is used. >=20 >> * @regmap: The regmap used to access the registers >> * given, the name of the device is used >> * @label: (Optional) Descriptive name for GPIO controller. >> @@ -56,6 +58,7 @@ struct regmap; >> */ >> struct gpio_regmap_config { >> struct device *parent; >> + struct device_node *of_node; >> struct regmap *regmap; >> const char *label; >=20 > With these changes: > Reviewed-by: Michael Walle >=20 > -michael