Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp208808rdg; Tue, 10 Oct 2023 08:10:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0LeHW+UOMVnbvMG9+p1hZlsLu9ztQJf+8nYi/gz01tJFWiWjF6/MVEXAQy7ogtGANIS6k X-Received: by 2002:a05:6e02:160c:b0:351:4dcd:7655 with SMTP id t12-20020a056e02160c00b003514dcd7655mr22113002ilu.31.1696950634001; Tue, 10 Oct 2023 08:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696950633; cv=none; d=google.com; s=arc-20160816; b=G+pasEtk/yIjPBbSMrqTqzGRLSUn+LZ8BM2KLwSkJbeTy0UZQ6Bhc9wnuPluj4aLkh 6fhGdwzhSGpFp6+Y1Fe+gxWvefSRHSCwHT4cSmbL11x414JkWsBqUdo2Gc1Y0fMq/wnq KpiMWJDjT602TVJEip9VpTq3/3oba/m4xY+NV/NGthgc73UH2qcpuJZSw3gnwDBjZrTt 9cv9IxoatWKZNBGC1EBNreNKEzMjylEK1EBY65GExuA1vxvwI52y/U9vjFG6U3vML0hV /N+S/u4yS9wuefKmNr0JKbjjXawBQB1c6y9TVyGU0s3p6ytpOa5BRq7DJGzapX+pd2Im rzJw== 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=bNVRgyFvWum2hRFmlW92z1wg/5s9UkkY7tvKtWeRi8Q=; fh=3xfRBZuMEGn2zDPenmvjdXyWRf0Vc8V4GvoXjZXhlvE=; b=lC3A1mn9ewQgV4R7R1HsGuKbvGXGwEWgmUWuF3obQJ6w1RNYcfhbvJNPzwsNk/34Oo qCaRDThKK1tyy1WEbFgK4oWAS5IfT8TYSRriOgFpc8FAc+pXceuVner2zbnsz8qrTYHc +//kOcEX+m4WTcc38FuZ+tCknlSkr/4XK03wC31kKm/btwEG6+LVDySDuOdi/zYX0ZoI tFn/Z5CapLdQ1fjQ3uW3yjXe9w4p0s3JjwTKbSZkVKOWbbRF5ed/e6cc7AOvhNlSYnK4 jbZxYwhIKojlJRFTi+XR0O9SUNeVjEeDz8h85rmBkMJDOMcu/szJbw4gBGpBrQGZkZ3A Nt2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=SVSLCKj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id k63-20020a638442000000b005702c84e4c2si12078125pgd.508.2023.10.10.08.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 08:10:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=SVSLCKj5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2766281FD9C5; Tue, 10 Oct 2023 08:10:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233242AbjJJPKZ (ORCPT + 99 others); Tue, 10 Oct 2023 11:10:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232771AbjJJPKX (ORCPT ); Tue, 10 Oct 2023 11:10:23 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD99DAF for ; Tue, 10 Oct 2023 08:10:20 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-d9a64ca9cedso689686276.1 for ; Tue, 10 Oct 2023 08:10:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1696950620; x=1697555420; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bNVRgyFvWum2hRFmlW92z1wg/5s9UkkY7tvKtWeRi8Q=; b=SVSLCKj5dikkLNk6DOuRJHon/PhbCOdxZuJBsZD4Y0GPVDcJcDiTRsqmSsKO4VeCPg 3sFgYZ0wL3MXOhi1/jAGpDGQlq7g53JVhK+J34QCeJqxsiucw0O3zIyqrgCKMzxksVin rRsSzRuA0cch3Ipy3RQC5EIqilhjpkXsfWwKD3cX2kL6WcW/mRwCQIuxedkIw4ZzJ9MW CJwXqXUNEVyvUXRq7Pxg3BhEsvPmfwQB+qwW5Ju+Cm9M7jYztfW4bx0TI44udUItWZFX G5VcxkkxP22eMj64OhfAbs6iy8SRebmx7OAl29iQDD0ztKZXDFRmQQ1Gr3TFflBHmFpw P4RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696950620; x=1697555420; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bNVRgyFvWum2hRFmlW92z1wg/5s9UkkY7tvKtWeRi8Q=; b=RvxhnibW4v2/T/QzUuc30Pg+WxvEchuVW4REFCk0wwrMAx3qpGfMAl0KEfFKAzA3a6 VXqRsXdZKeUaoDvZZ2UuNagpcpwrJsmookb2En3Pvidrs1IZtJmudZLY0fz1LBCO3Z9i vXk1HfUTJDiWT7TNOQujQTvL12pCU2+nk1cHtsUmyH/m9LbM+1WwA0oiQhLJpe3zPbTj OZQwHUgULM9PRERXuKQiuIuMdHqidVBKSv7g9NjZP+eqJ3PyNmyPjdLQJMbCUnZuPxKf reoX4AsNs7ARAvvg75sgVXi0000aOASW22XxxoyuRt9mpWKU7YUnjwl632PdV02vMWUy 5MgQ== X-Gm-Message-State: AOJu0YzlKONQ+4xhxjYXs5r0xPy+Vobo3TyccYL49V42WezUkQIFhCH/ 42jyA0YiiaAzN6/McORwCzI56vEMONYY6Ge/GJjNZg== X-Received: by 2002:a25:ac9d:0:b0:d86:53cb:1eee with SMTP id x29-20020a25ac9d000000b00d8653cb1eeemr16293192ybi.2.1696950619976; Tue, 10 Oct 2023 08:10:19 -0700 (PDT) MIME-Version: 1.0 References: <20231009173858.723686-1-dipenp@nvidia.com> In-Reply-To: From: Bartosz Golaszewski Date: Tue, 10 Oct 2023 17:10:08 +0200 Message-ID: Subject: Re: [PATCH 1/1] gpio: tegra186: Set fwnode of the GPIO chip To: Andy Shevchenko Cc: Dipen Patel , linus.walleij@linaro.org, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 10 Oct 2023 08:10:31 -0700 (PDT) X-Spam-Level: ** On Tue, Oct 10, 2023 at 4:25=E2=80=AFPM Andy Shevchenko w= rote: > > On Tue, Oct 10, 2023 at 05:13:42PM +0300, Andy Shevchenko wrote: > > On Tue, Oct 10, 2023 at 04:48:25PM +0300, Andy Shevchenko wrote: > > > On Tue, Oct 10, 2023 at 04:13:19PM +0300, Andy Shevchenko wrote: > > > > On Mon, Oct 09, 2023 at 10:38:58AM -0700, Dipen Patel wrote: > > ... > > > > > > + /* > > > > > + * This is needed for driver using gpio device matching w= here it > > > > > + * has to use gpio_chip fwnode to match the gpio controll= er. > > > > > + */ > > > > > + gpio->gpio.fwnode =3D of_node_to_fwnode(pdev->dev.of_node= ); > > > > > > > > of_node_to_fwnode() is specific to IRQ, in other places we use gene= ric > > > > of_fwnode_handle(). That's why better just to use dev_fwnode(). > > > > > > On the second thought is there any parent assigned? > > > At least I see that in tegra186_gpio_probe(). Are you saying > > > it is not working? Or is it (matching) called _before_ we > > > add a GPIO device? > > > > Okay, I think I got it. There is a function called tegra_gpiochip_match= () > > in drivers/hte/hte-tegra194.c which fails after my patch. Yeah, if prov= ider > > doesn't set fwnode, it can't match. But, since the driver sets the pare= nt > > properly it means that the matching function should be done against the > > device. > > > > Seems to me that in HTE code the matching function is broken. > > I'll send a patch soon. Please, test it. > I'll have you know that if it is about to add any new "#include ../gpio/gpiolib.h", then it's a preemptive NAK from me. :) Bart