Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1383240pxb; Thu, 4 Mar 2021 09:54:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZrWiUj+j14ZvMOPvrYyw2CzwbxyvZlPOnfrIrSWoo2/fKeDqxqmvTCbG3IilK3ZDvSi15 X-Received: by 2002:a17:906:894:: with SMTP id n20mr5541077eje.57.1614880497593; Thu, 04 Mar 2021 09:54:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614880497; cv=none; d=google.com; s=arc-20160816; b=iuNmGLq20m5pye2IfCBuQVZL8j2syz7tf0XmpP/Th0fyo0m073u1PyqQ+pnfI7fjg0 +nf7hcOBEotFW0diCTzHZ61wfXgEtaDizsdecR6iKWV2Bbj1TG3S52nTnKaQnky60Vxk EGyjniEb9A52Dif7vBXQ9xzWmagUmsdQnq/Fyb9QVANagMG1RNhffQwN8u1pzmAW3Rza kgYtSGptzTHn8hzsjEUzDrdTL6+eQl+xnCluONNuvIFx1bgPwFIKih6urtzCHku6l5++ 5u64vmuR/TKEsc8IuRtTeXgCSzO43PESlba63uh3p4y1Fa1D+I5mu4Af5WLfNN4Bcd5U 61WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=sxVbtoQsXQDe11hhOz1TVuXTQQ5ZkWtO1kophxoFGFc=; b=xmbb9OajDVpDjGz4EO+3VKGGdJWNWEwQ9LBiexvluUGeLX443Z5I2mFP4Tj3rsr8aG +YU/StOkw3pCz6b/gtgVkDHTS9J8EnjCIaAM6Zr4QR15KLZBRm569mbZaGdRfcgVE9Lo 5fN7N3vgGgVWW0Fy8cZdQXnm7Ht1GWREdZEgcv8lXnZMaCACREvOHE5Gh0kH+d/liMBk PX/edOVN0BkZwed1+LveJAwW96bcIVOrhxVqzOG9RltHLltg8AReqQGScEoSrETs1mmB fS7KaWiQSN/2FkNUURBK690JFwjvJrjP5U6KTvNblF11tCpvZ/o9K4xeUGuWwyqIoG5e w41g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pAQF62og; 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 zd21si15193919ejb.634.2021.03.04.09.54.34; Thu, 04 Mar 2021 09:54:57 -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=pAQF62og; 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 S234205AbhCDPSp (ORCPT + 99 others); Thu, 4 Mar 2021 10:18:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233598AbhCDPSR (ORCPT ); Thu, 4 Mar 2021 10:18:17 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 785AFC061574; Thu, 4 Mar 2021 07:17:37 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id x24so1922984pfn.5; Thu, 04 Mar 2021 07:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=sxVbtoQsXQDe11hhOz1TVuXTQQ5ZkWtO1kophxoFGFc=; b=pAQF62ogIOlgEnkywomfkpQyDH2eSFebRZ2yVqdaCKteJC9+By8P/aNx8Je8tR4s3J X2dWPesN7WpIdzpjQKW695pXK7vVYqIx/znPXcZQPalsOxArp4VZzBpfwzUgbaGQYDNF aY1o797QUQnkiv+vUZ3hVjsLJY3qw7GPlV7zAOZceU38bBjSXPOyPpLGpRPJCssz91xa BCzoe5rlzxRGrTt6MNujTgpOUytKS7Bp7ZTvFxLn4nkTl4LpfZVwqlJko3vyjiq+inQh 4o9maxL/B4K3kdCjRD6QOM+W6/6B+tkSJHlewaBMno0E/vDrFK1bXNDzoVhsk777T2jP 1Kiw== 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:content-transfer-encoding; bh=sxVbtoQsXQDe11hhOz1TVuXTQQ5ZkWtO1kophxoFGFc=; b=fN3E/MulGtYgmqrEbdSTefkYGbI1fMUKg0Xfa3cmGxovOu/znXiC3Pdz7gIFiYvWsZ Wuyy6FPkPBgPPMFBFUXD3mv/87PAmkRSS0nW2UCr6egYjTOOdm23fkeRKw33S2f6g+N5 Xa4EKjCGJ3b+lZFr9gdFoi4UdRgcfWSOBP7JnCfo9zjs4oAGDY2A0I6GfSdQWM7M3UFm /HO5sx6WXHuibqUFDYP/u2icx8IFpd9sD48WIWqV4/YSMKguI5+6MC2WQoqB0gTHqsbC jTkr0L3GnKLRyE/TExtoa21Vy3v6LVhv8p5dHya+UulypAxv1cR4+IDoIXldbiBXe2tP YJuQ== X-Gm-Message-State: AOAM533pzsaKGeM9G5oHopjbfOOx7KrWsSBHMGiTg93fdga6OppO5Pr/ BzNVCfHB7gKEkF3IYXyZ+BYhNIMuG4F3OklBY6w= X-Received: by 2002:a65:4c08:: with SMTP id u8mr3969555pgq.203.1614871056923; Thu, 04 Mar 2021 07:17:36 -0800 (PST) MIME-Version: 1.0 References: <20210304085710.7128-1-noltari@gmail.com> <20210304085710.7128-3-noltari@gmail.com> <9A8A595D-2556-4493-AA96-41A3C3E39292@gmail.com> In-Reply-To: <9A8A595D-2556-4493-AA96-41A3C3E39292@gmail.com> From: Andy Shevchenko Date: Thu, 4 Mar 2021 17:17:20 +0200 Message-ID: Subject: Re: [PATCH v4 02/15] gpio: regmap: set gpio_chip of_node To: =?UTF-8?B?w4FsdmFybyBGZXJuw6FuZGV6IFJvamFz?= 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-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: > >> + * @of_node: (Optional) The device node > > > >> + struct device_node *of_node; > > > > Can we use fwnode from day 1, please? > > 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/f69d02e37a85645aa90d18cacfff36dba3= 70f797/drivers/gpio/gpiolib-of.c#L933-L934 Use struct fwnode_handle pointer instead of OF-specific one. 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). --=20 With Best Regards, Andy Shevchenko