Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1609266pxb; Thu, 4 Mar 2021 16:15:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwT7jpH/+4fPdP8eFmy88eefnbjndqWTX/z23h7WSuMZlvD+1tfFJbixGj3ztijhWox9tvV X-Received: by 2002:a05:6e02:1411:: with SMTP id n17mr5923743ilo.61.1614903322683; Thu, 04 Mar 2021 16:15:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614903322; cv=none; d=google.com; s=arc-20160816; b=TgQVj83QYIZMy6hoTkigqT/VpvbU0XI8M6ZJ8DZTy4ZReYp6cJzfxvspOEPGVgiHXT aDC7G9dkouPKY1kvZT831B/HLDXJ7BI0iS9+FIVgK0gPzZuPCF51jFMZqjDwbyBI5NG4 u0QrDaFpiMqJ8FFzHobU/3XCcA2vxi1BYbsEcsWf5dq0Fih+egVdI4v/nRjdMrQszuEh 27SmUfYKIU2+NzaquuZ0obuxcQpQFidSHeusovh/pkgu+sGIG3M43N8lFVv+wTQO98LI DxCNMGbcjgMs5HRDDNfgQ9bYdDnrxURKRZMPQVJUBgUDpEUcB0JrTs45NCtsfC0YGHmo ErdA== 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=uBQZCQZDsL0gD5zlxULHLohvlBLpfne+0pPqWhHZD10=; b=b/mek/QcgRDF9CM7FpyGeFSi5bnr3IlvmmfAWdjmiVV/3wIbsgV7rnWoq3Zws6FpWS m2CliKis2ajntIa2btwJs/N6M4Jnk3W+48nvBZyJMvvGgDW2MnQrverwI3Jtlk6O3a2z xTK5sitDmC117Utxlf0MrdDlzdsvgTMHZgV+0N5TzS8DSqAbIsQwtWoBcoJ7ZRnQbjgP ib2bX1pojlyX6+NiKpcbzkgjAqpnIacyZRTNiXBseTjiqtazTW8gRzpCjC/UK60+Yz2W iCE9QfPFaD4296yv9ip1sVkrDAKjzWqOhScF65U6bin0l0uObcm/UjrUwAaFSW3YNbOo ljWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lSLrx85E; 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 w11si717492ilu.96.2021.03.04.16.15.09; Thu, 04 Mar 2021 16:15:22 -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=lSLrx85E; 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 S232386AbhCDPZk (ORCPT + 99 others); Thu, 4 Mar 2021 10:25:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232105AbhCDPZh (ORCPT ); Thu, 4 Mar 2021 10:25:37 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E148C061574; Thu, 4 Mar 2021 07:24:57 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id u187so8403838wmg.4; Thu, 04 Mar 2021 07:24:57 -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=uBQZCQZDsL0gD5zlxULHLohvlBLpfne+0pPqWhHZD10=; b=lSLrx85E1+KwzESpfJy0Q1SADQDy92Onk4okcGhHqBeziZ9YOLo73cLrmDge5In3nG 22QLoynVmnki8nwei5QIoiijJFMTSo60FSikjaRQ3U6oe6/Vq84BvX9mctHXPI4Gd2j0 QoCYqm3OyjlwVPlk/WIyTjQA3D2hMiG0p/gf1qWHpBdaLzPilNRJAIBPw6sXQzNzvE+d RUiYDIIRCVMxMBLk4YZzCsVKbmWW7gateebeQRYLdI/MOn65Al3aGxYQ7ikgPuSPJ56W PLFHmfuEajk3whl4IesmjGNiypLbRtbGlrTaPbFLTHQ4QEjqgUDMyyXbfVfBTnY80qrW zJ3Q== 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=uBQZCQZDsL0gD5zlxULHLohvlBLpfne+0pPqWhHZD10=; b=ihUv9HJdsov5tQzYT+vxC+L4Uo/IBSc9ndXCv5F+mAahVSx70VYrP62fUZ1NvsCDAx zH+C7heL71sTCuXCyctbJ90FtrsDCDXoidbL3rlsqfv1vN7HU9ag2ziDO3hZE4/Qs9AY cjGNNJDHH3IPufa0FMfBc8+Resoc0C+8jLyjNNoxTHFMe0GvfcIFWHnzemEVCwiqdEM+ 6ImgS9g53zJlvUFuH2CJrtg0hLyI/62wEaZklNq5QS62zyh35pwtdZiS7HBwsZXaCBGp CrD03HjfHXmpwAmFhSAeVCq5CWkC4gKmJElSo3u3sh3U41jSEPb3mGinq2ljfYwUBugE X9JQ== X-Gm-Message-State: AOAM530uEHuDYa4aIuM17pUJOATV4ugJkqKskgQjX/iM6lTDZUenX7UK YFmBicO1wMbSZvGT0WuhNpk= X-Received: by 2002:a1c:c904:: with SMTP id f4mr4610263wmb.14.1614871495755; Thu, 04 Mar 2021 07:24:55 -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 w25sm10007668wmc.42.2021.03.04.07.24.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Mar 2021 07:24:55 -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 v4 02/15] gpio: regmap: set gpio_chip of_node From: =?utf-8?Q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= In-Reply-To: Date: Thu, 4 Mar 2021 16:24:55 +0100 Cc: Linus Walleij , Rob Herring , Michael Walle , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list , Jonas Gorski , Necip Fazil Yildiran , "open list:GPIO SUBSYSTEM" , devicetree , Linux Kernel Mailing List , linux-arm Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: <0504ADC2-0DD5-4E9E-B7DF-353B4EBAB6B4@gmail.com> References: <20210304085710.7128-1-noltari@gmail.com> <20210304085710.7128-3-noltari@gmail.com> <9A8A595D-2556-4493-AA96-41A3C3E39292@gmail.com> To: Andy Shevchenko X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, > El 4 mar 2021, a las 16:17, Andy Shevchenko = escribi=C3=B3: >=20 > On Thu, Mar 4, 2021 at 5:06 PM =C3=81lvaro Fern=C3=A1ndez Rojas = wrote: >>> El 4 mar 2021, a las 11:35, Andy Shevchenko = escribi=C3=B3: >>> On Thu, Mar 4, 2021 at 10:57 AM =C3=81lvaro Fern=C3=A1ndez Rojas >>> wrote: >=20 >>>> + * @of_node: (Optional) The device node >>>=20 >>>> + struct device_node *of_node; >>>=20 >>> Can we use fwnode from day 1, please? >>=20 >> Could you explain this? I haven=E2=80=99t dealt with fwnode never :$ >> BTW, this is done to fix this check when parsing gpio ranges: >> = https://github.com/torvalds/linux/blob/f69d02e37a85645aa90d18cacfff36dba37= 0f797/drivers/gpio/gpiolib-of.c#L933-L934 >=20 > Use struct fwnode_handle pointer instead of OF-specific one. But is that compatible with the current gpiolib-of code? :$ >=20 > Also here is the question, why do you need to have that field in the > regmap config structure and can't simply use the parent's fwnode? > Also I'm puzzled why it's not working w/o this patch: GPIO library > effectively assigns parent's fwnode (okay, of_node right now). Because gpio regmap a child node of the pin controller, which is the one = probed (gpio regmap is probed from the pin controller). Therefore the parent=E2=80=99s fwnode is useless, since the correct = gpio_chip node is the child's one (we have pin-ranges declared in the = child node, referencing the parent pinctrl node). >=20 > --=20 > With Best Regards, > Andy Shevchenko Best regards, =C3=81lvaro.=