From patchwork Fri Aug 11 15:42:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 109903 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1080362qge; Fri, 11 Aug 2017 08:43:02 -0700 (PDT) X-Received: by 10.99.111.73 with SMTP id k70mr15714659pgc.8.1502466182654; Fri, 11 Aug 2017 08:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502466182; cv=none; d=google.com; s=arc-20160816; b=UEyTsSXYgbODJTkADmPNRbtqP744vi78zWre1s7piAYnDPf5knRJApO5fK+qG2yUGF 9RHFVUhz14k2wZ2V7PlilLlOKN2y78uhY4eipG2lbap9XA87BK/i4daW+kOCq5QfAhJj 1Ie7kx9qFbVHJRMZsbRVRoGvlxnAICUzbG/sogRqbds4lTluOz2aEsGJzOLarI/BNo7r wQBJ4wNico1YBRU9tIlGkPkp0BtyPSiT9hBnKie/PGKQU4qA1IF2lmwFX42DRqXGsf28 RXzKub/T2ERmGlMAY+an1zJyk860Z2OoaclIxcj0z+0jzSTI5R45dE9cotWGeEygkM/+ IabA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=4GWPNxmtSglbKtRlHGuee2+zCd3tjoiv1/bJR0Io14Y=; b=nShkTMEBT3lYufoeNCfS+oQ9uo5clJSzH7pYpnKIikzuAZyp7NNU99zhM0ZmIAULzK PRQZAGVujDpngygI/x6DJpgricPUIcRtnztCZ8HT7Znq9wfu3gpJc58hjcB/AIJMxGes L21C2++Go/396fpPyhxhHy61SVQpoIMizBxHg1GUbw2rXghH6NhNGlo5yQHuxgbA0pyz pw3cqGzu6V1Hi7oc7HUx82ZVJv3SuUeKSjz1Qp6KZ+FH6uWLL7vBOb9dtrlU97DvNi5/ cQLqExlUjLUWT8xJjgEf11QeDSyJOEETm2PnxKqZe4uNhaQEQvD8BhnjRB+/d7iIbkC6 JD7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VfLQXw1E; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e28si639074pgn.916.2017.08.11.08.43.02; Fri, 11 Aug 2017 08:43:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=VfLQXw1E; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbdHKPnB (ORCPT + 6 others); Fri, 11 Aug 2017 11:43:01 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34840 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753327AbdHKPmo (ORCPT ); Fri, 11 Aug 2017 11:42:44 -0400 Received: by mail-pf0-f173.google.com with SMTP id t86so17310935pfe.2 for ; Fri, 11 Aug 2017 08:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tf6TQk7zcKmNRXS2oIbD00NVHnst7iewPT30yBzzAO8=; b=VfLQXw1ENNn7aKvx4yJP1lbByo3ZFJVC0m1gJy4cYWVo7+zXPwjDMC7A/bp+0Khjf5 jqdmwABi+YOgaeJqEOOId5NV4iurFSDNB06Zz8vmN6iKyXXd4UK7eHVPJ02Ntli2lOjD CjuM8fLR9xHMQ++awaHjC6sR/O37NGe1YAES0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tf6TQk7zcKmNRXS2oIbD00NVHnst7iewPT30yBzzAO8=; b=sfgfbw7AGEQuVxeCfC6ZGhnfxOnJMYV8X6oTSXiJUCQrAa0D/3cvcZiXPvUKsG0kB8 gYfRK4CDOSUHwuGvPHxs3EUzK7C5bn3KHhEXB7YuN/LxPuLqFG2kTF0vUF5oANXGRkm/ /TZNAVXRcdsgA3TXlxhjsvH2DVkWrO8hfGM7OpkJIWnX6oa3wHA+yaj5LOy5pHPrzDHg Gb1Ljo94MOufPts9BP3mEFSD/rfpvLHwr52sRXRG3wXHCJ92W6KHGoD+/+3ALE4q2onD Sywd4H83gzR0kI2QW0hXujtPMG4uDRXKgTY1qNDTIz51bYiJr6jrEi61aoVNUqRBdyHB vuDw== X-Gm-Message-State: AHYfb5iwrX5fCdt6nwPS8TmmBDebFDyE9CCBaY3JF8DLknHrhfzyz27D OhEgEHWn82qqHb8h X-Received: by 10.99.174.78 with SMTP id e14mr15409141pgp.75.1502466163666; Fri, 11 Aug 2017 08:42:43 -0700 (PDT) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id a63sm2351071pfc.165.2017.08.11.08.42.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Aug 2017 08:42:42 -0700 (PDT) From: Stephen Boyd To: Rob Herring , Frank Rowand Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Russell King - ARM Linux , devicetree-spec@vger.kernel.org, Pantelis Antoniou , Mark Brown Subject: [PATCH v4 4/4] gpio: Support gpio nexus dt bindings Date: Fri, 11 Aug 2017 08:42:36 -0700 Message-Id: <20170811154236.12891-5-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.14.GIT In-Reply-To: <20170811154236.12891-1-stephen.boyd@linaro.org> References: <20170811154236.12891-1-stephen.boyd@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Platforms like 96boards have a standardized connector/expansion slot that exposes signals like GPIOs to expansion boards in an SoC agnostic way. We'd like the DT overlays for the expansion boards to be written once without knowledge of the SoC on the other side of the connector. This avoids the unscalable combinatorial explosion of a different DT overlay for each expansion board and SoC pair. Now that we have nexus support in the OF core let's change the function call here that parses the phandle lists of gpios to use the nexus variant. This allows us to remap phandles and their arguments through any number of nexus nodes and end up with the actual gpio provider being used. Cc: Pantelis Antoniou Acked-by: Linus Walleij Cc: Mark Brown Signed-off-by: Stephen Boyd --- drivers/gpio/gpiolib-of.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 54ce8dc58ad0..0d968c758129 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -75,8 +75,8 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, struct gpio_desc *desc; int ret; - ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", index, - &gpiospec); + ret = of_parse_phandle_with_args_map(np, propname, "gpio", index, + &gpiospec); if (ret) { pr_debug("%s: can't parse '%s' property of node '%s[%d]'\n", __func__, propname, np->full_name, index);