From patchwork Mon Jan 23 20:48:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 92274 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1408419qgi; Mon, 23 Jan 2017 12:49:04 -0800 (PST) X-Received: by 10.84.171.195 with SMTP id l61mr45557083plb.84.1485204544566; Mon, 23 Jan 2017 12:49:04 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5si16680513pgf.209.2017.01.23.12.49.04; Mon, 23 Jan 2017 12:49:04 -0800 (PST) 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; 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 S1751691AbdAWUs7 (ORCPT + 7 others); Mon, 23 Jan 2017 15:48:59 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:33289 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbdAWUs5 (ORCPT ); Mon, 23 Jan 2017 15:48:57 -0500 Received: by mail-pg0-f54.google.com with SMTP id 204so47879804pge.0 for ; Mon, 23 Jan 2017 12:48:57 -0800 (PST) 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=jN9uW6vO7fZgpUrj/RYCqT5gzW41hafz/MKcIK4IrVY=; b=F+iU4jAaHiikxvp5neoKdfO5JeP7Xs6MSjzQA2BR56fV8OzdTjeRaDgRSqhB3IS1tK XxKELwvVApc+1nozDomQiPllAZ2w7LrpPmxIGeBY7h8fdWA2Bvzjbry2udOf2XGo67Ej w2moRdRC/BNdPdqai9P/R965rerJzd+mnvrQ8= 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=jN9uW6vO7fZgpUrj/RYCqT5gzW41hafz/MKcIK4IrVY=; b=HwVygpt+cAxvwrGrB3/DFGWxKvdWQQbjDjJspzV6EGi12zQvQ62K61wfPuDH67j/mn PA2ckD7kK8fG/b/gPqnFUaXKnPxMuh7sSrYIxOB0xo8jnMkBYqGS3GdUAbnE28EKMC/E /M2okJbgZDCG/d9tj7vzmBXUXcS9qylj5D08FpchHlkZqXOYkS3ZeWBbfNoEdB85eJYT B2iqZ113zIAXQ55F907UK+t+oRF5HgnOqqUiRHR6JZpB5b4xu5B0B4J49PHzAG/XHS6K cbA8hSzIQ6Gmv5gdiiAt+cty/3nYgd6F/s6fxuOMdHBtn6pA7nN5X41T+CNrwOowOF80 mEKA== X-Gm-Message-State: AIkVDXLjleWBPKmQX0u8GhbpSVU4EnrKeXzQtaBybIg1Y6QKm3R1TIqwXAIF9IUW6Bb0oVTK X-Received: by 10.98.152.218 with SMTP id d87mr33824265pfk.17.1485204536659; Mon, 23 Jan 2017 12:48:56 -0800 (PST) Received: from localhost.localdomain (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id l12sm38935728pfj.37.2017.01.23.12.48.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Jan 2017 12:48:56 -0800 (PST) From: Stephen Boyd To: Rob Herring , Frank Rowand Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, Pantelis Antoniou , Mark Brown Subject: [PATCH v3 3/3] gpio: Support gpio nexus dt bindings Date: Mon, 23 Jan 2017 12:48:51 -0800 Message-Id: <20170123204851.12808-4-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.10.0.297.gf6727b0 In-Reply-To: <20170123204851.12808-1-stephen.boyd@linaro.org> References: <20170123204851.12808-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.10.0.297.gf6727b0 -- 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 92b185f19232..17bca36d4ebb 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);