Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3414037rwb; Sat, 12 Nov 2022 05:23:59 -0800 (PST) X-Google-Smtp-Source: AA0mqf6DMJVNxV0F90DDfmTb97w72Q2waCqaBOP0/9w2e+GbyHQ6yYeTwjXkf6BFbsBN8djJGEom X-Received: by 2002:a17:902:ab49:b0:186:8d46:c3 with SMTP id ij9-20020a170902ab4900b001868d4600c3mr6744482plb.49.1668259438878; Sat, 12 Nov 2022 05:23:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668259438; cv=none; d=google.com; s=arc-20160816; b=Pt0XweVdVxHWDEzpVViARj0iRPY5dQxcqkN6cfAD/1M8tSJ84vg4gQISsibBGTtobT B7Iqt3FbE0Gx6LdyVfejVEQPPhZY5SHFfXJF8ySY0xiTwpa+97ud+uqZiVK8v/eDI1nN ++OfQZ2CZPm0F9i/+rLuN3bgTovrt79nygSFmwef8TdHuKtFb8KtsG9Ko17o4l48Rl/6 uyX/LfNINZ1CI6VBb6bosnfhNWNXyWpdGLhrvKxRadIvBkOw1FRTmL4k2xyRVuiLyRDr tXMbZdq2z76m38euXay/Dq9WK29VuHaBOcDpaq3/GsXuZMJZUAH6Xt8JM3AK/RXumBhk NhAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=XxgZUhoZIdG7gFB84P/XyUiuXQ5Zy1yGT9mDuPve4q4=; b=MNDFRPHyE/qVU4zEaB9bqDFdoj00WnN16gO22YhogLPZONOLAmEkkey72FAsQ14A79 hfuBA/OGjMJLfV/hHVjuhhq0Lh7NcNXLDxfkZlamkbzALY9mLuSjvBIlPfOPUGRJCb+H rd+TVb3885oiZ0qVaBJytxwAUlgrjWIi9uhxQDAS7ybsLeOOfm+w/CYGNu2oxJPQ92GE mFvYMM25dIDyj6zYUfUNnFBmBLVs+Of6tct5jGsijxSLrLa90CendWiamJsOsNoofsqJ rI51MhYSgBFD3NnX7fFVvSWzR+terhNK6NRZ+hR21uuGVNg4q83Ziki8J/PCFHEQSD1c KrTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=g9LoZXUs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w186-20020a6382c3000000b0046f4d395e6dsi4794448pgd.573.2022.11.12.05.23.44; Sat, 12 Nov 2022 05:23:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=g9LoZXUs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234728AbiKLM7v (ORCPT + 91 others); Sat, 12 Nov 2022 07:59:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231814AbiKLM7t (ORCPT ); Sat, 12 Nov 2022 07:59:49 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9284060D6; Sat, 12 Nov 2022 04:59:48 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id f27so18257132eje.1; Sat, 12 Nov 2022 04:59:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=XxgZUhoZIdG7gFB84P/XyUiuXQ5Zy1yGT9mDuPve4q4=; b=g9LoZXUsJS6aWbanCCtLneDMm5qg8qFyIqmFfMOECW8GWEAbhT+gth5JyIAFzF/ZQS 6wMuAypuITkpKGjG3skXvWP3LqHnwrPpMb+6Eax41OCKuBdq+GeXqVL9L1xvCyTKOoPt z+lTogAveyAwtRcEcGPr5QQ4Wrq1gNIX39aAkmAfoA62uQ87X2rLw+cPEuuoQmgVjgjX LNRPaCmzF7JZl6OGlpiD7WmoKzBt7qVuFOuOOxch2tlSn7ji+yGOCJykWxTsG3Dk6rL7 udkVbzx8PCYY/h/U//acchHXYzcOzAQ7utUzhy26orl1kjBE2voH1fiwJx65222Ym3sB +QjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XxgZUhoZIdG7gFB84P/XyUiuXQ5Zy1yGT9mDuPve4q4=; b=zPWAyc9SMux445fFVn4WhA7/HmlnlvbWPR0zPVyuZer+qR7C+CLSum28pgZHw57oxq T8SlSc8DvYpdR03+8Fs+vAryqaz5G/Y/q555U3P9rE7sV+ygGE/+Mz/JkquVVWUwScR3 bWthFetnj57S3/5Vb87KEvIRpquRwR3FVy7zjvdNb3BuJK7Af2zKkTO8o3YPD5BUH7wt PvE70P4QQBukZST3+8NzgNQ2Q2ZalcFnbICBIdMptzyoqoil2IhkLBxpAKSbtxzRpVfc lDRJrCzSvUPctWXsk+hb1foIL7RAvUF/tR6OafU5vS0QYPWE7gry4Q3gIFt5D9Vq4ks1 g8/w== X-Gm-Message-State: ANoB5pnsC3ToANS8UsiYfdjUJioZSVC1mgcJ8VhPj85gwvPDI86FBcOp vdnjDv4C2sMb7zK7J1dQ11YIx/u1pJU= X-Received: by 2002:a17:906:2b57:b0:7ad:b45c:dbe7 with SMTP id b23-20020a1709062b5700b007adb45cdbe7mr4959707ejg.617.1668257986893; Sat, 12 Nov 2022 04:59:46 -0800 (PST) Received: from [192.168.3.32] (dh207-99-143.xnet.hr. [88.207.99.143]) by smtp.gmail.com with ESMTPSA id v19-20020aa7cd53000000b0045bd14e241csm2302900edw.76.2022.11.12.04.59.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 12 Nov 2022 04:59:46 -0800 (PST) Message-ID: <3d1f5b5e-b444-cd9f-e0fb-69f834b0d1d6@gmail.com> Date: Sat, 12 Nov 2022 13:59:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH] gpiolib: of: Use correct fwnode for DT-probed chips To: Thierry Reding , Bartosz Golaszewski , Linus Walleij Cc: Andy Shevchenko , Dmitry Torokhov , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Szyprowski References: <20221111113732.461881-1-thierry.reding@gmail.com> Content-Language: en-US From: Robert Marko In-Reply-To: <20221111113732.461881-1-thierry.reding@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11. 11. 2022. 12:37, Thierry Reding wrote: > From: Thierry Reding > > The OF node store in chip->fwnode is used to explicitly override the FW > node for a GPIO chip. For chips that use the default FW node (i.e. that > of their parent device), this will be NULL and cause the chip not to be > fully registered. > > Instead, use the GPIO device's FW node, which is set to either the node > of the parent device or the explicit override in chip->fwnode. > > Fixes: 8afe82550240 ("gpiolib: of: Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode") > Tested-by: Marek Szyprowski > Signed-off-by: Thierry Reding Hi, I can confirm this fixes the blamed commit on Qualcomm IPQ8074. Tested-by: Robert Marko > --- > drivers/gpio/gpiolib-of.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c > index 4be3c21aa718..55c3712592db 100644 > --- a/drivers/gpio/gpiolib-of.c > +++ b/drivers/gpio/gpiolib-of.c > @@ -1067,7 +1067,7 @@ int of_gpiochip_add(struct gpio_chip *chip) > struct device_node *np; > int ret; > > - np = to_of_node(chip->fwnode); > + np = to_of_node(dev_fwnode(&chip->gpiodev->dev)); > if (!np) > return 0; >