From nobody Thu Apr 2 22:59:59 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F121C54EE9 for ; Tue, 20 Sep 2022 10:32:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230055AbiITKcD (ORCPT ); Tue, 20 Sep 2022 06:32:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbiITKbV (ORCPT ); Tue, 20 Sep 2022 06:31:21 -0400 Received: from mail-m11875.qiye.163.com (mail-m11875.qiye.163.com [115.236.118.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C9D16F275 for ; Tue, 20 Sep 2022 03:31:20 -0700 (PDT) Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m11875.qiye.163.com (Hmail) with ESMTPA id 0A3B8280B96; Tue, 20 Sep 2022 18:31:18 +0800 (CST) From: Jianqun Xu To: linus.walleij@linaro.org, heiko@sntech.de, brgl@bgdev.pl, andriy.shevchenko@linux.intel.com Cc: robert.moore@intel.com, robh@kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, lenb@kernel.org, rafael@kernel.org, Jianqun Xu Subject: [PATCH 11/20] gpio/rockchip: add of_node for gpiochip Date: Tue, 20 Sep 2022 18:30:59 +0800 Message-Id: <20220920103108.23074-12-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920103108.23074-1-jay.xu@rock-chips.com> References: <20220920103108.23074-1-jay.xu@rock-chips.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJSktLSjdXWS1ZQUlXWQ8JGhUIEh9ZQVkaTh9KVk4eQkxKS01CQ00fSlUTARMWGhIXJB QOD1lXWRgSC1lBWU5DVUlJVUxVSkpPWVdZFhoPEhUdFFlBWU9LSFVKSktITkhVSktLVUtZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NAw6Eio6FT0sCBwhPQpLLx9D SS0KCjNVSlVKTU1ITU1CQ0xDQ0lLVTMWGhIXVREaAlUDDjsJFBgQVhgTEgsIVRgUFkVZV1kSC1lB WU5DVUlJVUxVSkpPWVdZCAFZQUlLTUw3Bg++ X-HM-Tid: 0a835a73be182eb1kusn0a3b8280b96 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The Rockchip GPIO driver will probe before pinctrl and has no parent dt node, lack of the of_node will cause the driver probe failure. Signed-off-by: Jianqun Xu --- drivers/gpio/gpio-rockchip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index b294ef009daf..e36cdbd4bbef 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -588,6 +588,10 @@ static int rockchip_gpiolib_register(struct rockchip_p= in_bank *bank) if (!gc->label) return -ENOMEM; =20 +#ifdef CONFIG_OF_GPIO + gc->of_node =3D of_node_get(bank->dev->of_node); +#endif + ret =3D gpiochip_add_data(gc, bank); if (ret) { dev_err(bank->dev, "failed to add gpiochip %s, %d\n", --=20 2.25.1