Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2274163rwb; Fri, 11 Nov 2022 07:17:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf46LXVSRyFGN/EZ/XS5/nUyFIDGtEyGzoFjDef7mncHr3pUux82TSBHYhfzPkXOxLX/7wdl X-Received: by 2002:a17:906:654a:b0:78d:e645:9f7d with SMTP id u10-20020a170906654a00b0078de6459f7dmr2036505ejn.572.1668179872684; Fri, 11 Nov 2022 07:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668179872; cv=none; d=google.com; s=arc-20160816; b=U2zXvllUulsFaQbAjNPNe/KBNa/i4Xy3Ocl6e04T7+s4gmFQqSt8iWzVd+0SN+Vf1o tJV1zqffHWrYKxaS/32ar7XwEDvv13ppDSwgewxI9ZGjYoMSrJBqt4BQPPJzatXtX+SH vJQq8fNUw0kq3fp+vUuUb1/j3YseAjLY67WODtIGDfJH3sa0h8l7IcIUzXpXuL2bLoAs 1BoXCJSJq1VMZnLopaqdEpW1HQAYUNENCMM5pM7uXV3+flUaeV5pPkivRCV7a3Wr5FQS cQ0ump1CQAjUkvq/OlyLMC6ZCmx6A2hGTF4Fd87Dnhht/XW+xWb9+fCbSsh+Z+SHVZpl WTnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5f5WgwUHk615VrXXF8OwuJhFTW4m51G3jdhDcbEz7pI=; b=q3Zg4r7Icr3+/PjiH2Em9ENpmI2VTsWERbPLIKyuwNAzr+xnGjLYKD6mF+h+HAdD4W VI0cv7wsTlNYTXR+usxJjoETZq2wR0jDsYP2RocRR4cKp9Z2OdTrCAyhC9Qy7FYFkpzO jtJSi+PFuoM4YR4EajEk7otVMSA8fYxSOPbVqMYoNPAIxgeqHnyxrhSgS+MAokjAJDJg 5dccta890CYSReMg5aB+OPPLBLndJMetc/8za7CHzA5t0JAtVAe21gu1dTllcco7AfWm IYW0e7fHNU1mSI0e7P7dRkYD9NrdhHH+6rk2rACvkx4HW6pF9aeX/JTTK+UGTSNU7dT/ 91Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ncvCid2O; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb17-20020a170907961100b007827639faffsi2276604ejc.760.2022.11.11.07.17.29; Fri, 11 Nov 2022 07:17:52 -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=@linaro.org header.s=google header.b=ncvCid2O; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234116AbiKKOXJ (ORCPT + 92 others); Fri, 11 Nov 2022 09:23:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234127AbiKKOWt (ORCPT ); Fri, 11 Nov 2022 09:22:49 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5802391D9 for ; Fri, 11 Nov 2022 06:21:15 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id u24so7785706edd.13 for ; Fri, 11 Nov 2022 06:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=5f5WgwUHk615VrXXF8OwuJhFTW4m51G3jdhDcbEz7pI=; b=ncvCid2Ov/aPU2Q65PojXr6z/3uchstyo8Zz2ye/1T7kjNwsJw9FvuG/Pfvy0WVmpG 3h9mBVAgham73/Aa5lEQfJNpfP+fGimP+LM9R8g25zzNprDnT5K73gsIQiXmYMkzpsbI Hwf7d3SqmwKqRz+A9UNz4aY0jfnisoKAs72iK0qWOcErFY2vkTmr7gzIAYmvo5MTiygd yaGFPvVjWG69zR9RWXO4eIun/Fe+eMrZ73T2yd7FC3wVc8+a9ka5YO9O/h3SClxESUbe HVm6j9PxV3N7gJ1t90VCJXY1DuylkRU+ArPE5V/tcu2Kz1ScJeFknVY9GaR+p1e0QHyj P4vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=5f5WgwUHk615VrXXF8OwuJhFTW4m51G3jdhDcbEz7pI=; b=HCSU4ag1iLuTiL8CGGAhsWuarVhHAsyEQx2fVCCDlwelsUjlkllWjFxDvBX6qUYByr EjQir2l0U1pq7qy7Dk0zd556kZ2O4A5e1v0VAlzel1HNwfSUVCPVQ++Qeig8MADS5i8A pAEsB+r3ChIRWMQsY570HqXhz54UrweIhhM6L2UkaDlC6RgyXUa9LMINjDRcnxIaj/v0 uxTTkA018EBGU8S84Y6xwBGM2EUEdxVBxQ8sVbfiFlOx2nzcm8g3Ulx0MnL260xmLgMe cnctUYNaZjkepT2iNDS9kqdkVlXurZQWi5TvGBYAjIhaWCxkEYor7+DpClW8saiH0uFz aN8A== X-Gm-Message-State: ANoB5pmg7gE4xBYT9/r0e22/SU1pm/N4CbC8RRj4GMkyVdwCRAFaZ69F OOZxyJpuoSgVe2oVYYH/yPcsaUMX8pB46bW/Afgzkw== X-Received: by 2002:a50:d65d:0:b0:463:bc31:2604 with SMTP id c29-20020a50d65d000000b00463bc312604mr1673694edj.32.1668176474382; Fri, 11 Nov 2022 06:21:14 -0800 (PST) MIME-Version: 1.0 References: <20221111113732.461881-1-thierry.reding@gmail.com> In-Reply-To: <20221111113732.461881-1-thierry.reding@gmail.com> From: Linus Walleij Date: Fri, 11 Nov 2022 15:21:03 +0100 Message-ID: Subject: Re: [PATCH] gpiolib: of: Use correct fwnode for DT-probed chips To: Thierry Reding Cc: Bartosz Golaszewski , Andy Shevchenko , Dmitry Torokhov , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Szyprowski Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Fri, Nov 11, 2022 at 12:37 PM 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 Reviewed-by: Linus Walleij Yours, Linus Walleij