Message ID | 1525943800-14095-2-git-send-email-djw@t-chip.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C03586028E for <patchwork-linux-rockchip@patchwork.kernel.org>; Thu, 10 May 2018 09:19:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF3A2289B6 for <patchwork-linux-rockchip@patchwork.kernel.org>; Thu, 10 May 2018 09:19:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0E162890F; Thu, 10 May 2018 09:19:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 27CA22890F for <patchwork-linux-rockchip@patchwork.kernel.org>; Thu, 10 May 2018 09:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0V+pKSnlnXvO/3IF3PrjZnqpJeBGLJqsvjbLVofJhuE=; b=Ywlu0bDgS1A/xqOzFwQzXoiMyG 1HPKGwPelkjbyAdacuIh7I+88Z0hDhTGYKAGfdGZuhrplXt+k0/MdjrmMTIY64p9PBwU2uAbR3YMf BSyj75CalIXlhZwefJXXvTseNhS+uB40Su5gvuNp9WYMPX89Xsfp4XkfhJfcTKbZut3hOUJ9v1g+5 D3PG+jLWuJC+VRBC0FaYzkjM2Yhq08QtgqpM5n+tTDSs+dHC4qQ8PoGkT8YR6DuFIf8Yxi/Prx51+ dMuyMNtkGwgxeYvNtSt5jo1V8qv6nYE7ftBdBgG9+B1wPZwkgwTU/IhEOQO3aj/wu/WduTbJKe+aS WGCbHqDQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGhjO-0002i1-Uw; Thu, 10 May 2018 09:19:22 +0000 Received: from regular1.263xmail.com ([211.150.99.133]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGhhx-0001zx-Om for linux-rockchip@lists.infradead.org; Thu, 10 May 2018 09:18:02 +0000 Received: from djw?t-chip.com.cn (unknown [192.168.167.12]) by regular1.263xmail.com (Postfix) with ESMTP id 4F46D91FB; Thu, 10 May 2018 17:17:37 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id B79743C8; Thu, 10 May 2018 17:17:37 +0800 (CST) X-RL-SENDER: djw@t-chip.com.cn X-FST-TO: linux-rockchip@lists.infradead.org X-SENDER-IP: 59.33.101.82 X-LOGIN-NAME: djw@t-chip.com.cn X-UNIQUE-TAG: <5475be979ad0cd213b161e09e3967b9f> X-ATTACHMENT-NUM: 0 X-SENDER: djw@t-chip.com.cn X-DNS-TYPE: 7 Received: from unknown (82.101.33.59.broad.zs.gd.dynamic.163data.com.cn [59.33.101.82]) by smtp.263.net (Postfix) whith SMTP id 26450HM4DNR; Thu, 10 May 2018 17:17:38 +0800 (CST) From: djw@t-chip.com.cn To: linux-rockchip@lists.infradead.org Subject: [PATCH v1 1/5] gpio: syscon: allow fetching syscon from parent node Date: Thu, 10 May 2018 17:16:36 +0800 Message-Id: <1525943800-14095-2-git-send-email-djw@t-chip.com.cn> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525943800-14095-1-git-send-email-djw@t-chip.com.cn> References: <1525943800-14095-1-git-send-email-djw@t-chip.com.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180510_021754_082577_E72B6E17 X-CRM114-Status: GOOD ( 11.38 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms <linux-rockchip.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-rockchip/> List-Post: <mailto:linux-rockchip@lists.infradead.org> List-Help: <mailto:linux-rockchip-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-rockchip>, <mailto:linux-rockchip-request@lists.infradead.org?subject=subscribe> Cc: Wayne Chou <zxf@t-chip.com.cn>, Heiko Stuebner <heiko@sntech.de>, Linus Walleij <linus.walleij@linaro.org>, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Levin Du <djw@t-chip.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" <linux-rockchip-bounces@lists.infradead.org> Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpio/gpio-syscon.c b/drivers/gpio/gpio-syscon.c index 537cec7..7325b86 100644 --- a/drivers/gpio/gpio-syscon.c +++ b/drivers/gpio/gpio-syscon.c @@ -205,6 +205,8 @@ static int syscon_gpio_probe(struct platform_device *pdev) } else { priv->syscon = syscon_regmap_lookup_by_phandle(np, "gpio,syscon-dev"); + if (IS_ERR(priv->syscon) && np->parent) + priv->syscon = syscon_node_to_regmap(np->parent); if (IS_ERR(priv->syscon)) return PTR_ERR(priv->syscon);