Received: by 10.223.176.5 with SMTP id f5csp807631wra; Tue, 30 Jan 2018 20:04:56 -0800 (PST) X-Google-Smtp-Source: AH8x224wk8IqehIVTMn/laHEnoTbgdsRctVTn7LOyX2coUuR6fpDzYFwaKxJ6iM8HunyDo+vYgxX X-Received: by 10.99.170.73 with SMTP id x9mr25573437pgo.393.1517371496370; Tue, 30 Jan 2018 20:04:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517371496; cv=none; d=google.com; s=arc-20160816; b=PUTI/SNLdl5Imqmm6DUICm0JqTLPO70yfWF/+FuYEM8UMf93kmr5lJjpQ3S0RUvqYp oOw2wwV0g/LWe8F0SQpvyleUH8uT4R1NYj01/i33nrigo6bws2n76DELrb/E88Y+4Gaq 5K2VWZzzV0q8vzPhCSCPe5VDhVGEHbt/SU2qCvg/WZIcGH3UOI1dFwj59LFWRAy9qFVw ULxKzR8L2BacSLzdWgr+SY4fvspdAIJjh3rDHKmskveqKtg8onUo8jdg4zE/Q9Dc7B4a 8Qyd9F4irCCV+oBcB0DwFUhmn0+QTcHhFu8FWqO7ARUYcdTe+pYhTfHTIakFCwt9Zol8 ioCA== 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=xo1pIR1xvBvDy/Pi7Idp95Txk3h0Vvmdq3pnieCBYpI=; b=ZBQdVNNxCrGuhN/ehndPiVoGeNZT90XDi5j5+WsJ2rhj36qqyxWUG3NCgp0F0xR77I lZaDEa0z2j2SkJJagaDrGIUz2QEp6kOkNS/zVj+LXQQfy31cgJgwSJSYkXf974e72e72 oPxCljOR6qWlgyfpFGKEwunAHzwSqwY4cN2ASbelbYYnGftQndjDZmMyvmgdfQMYDCI3 aUBYomz05EmTwJMp5HhVvUsCfhxnYkXBLtQuiFNPRdEu8sfqcHQX/sBJTQwW5bzny8E9 9yITzrhaX4WbkNhLdZwFo77Tj5uyPCkoPEYUt1EEs/o99yHeMUYb6Aujm6bi8jcH/yek DrOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bKFCnZal; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5-v6si2907978plo.32.2018.01.30.20.04.41; Tue, 30 Jan 2018 20:04:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bKFCnZal; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S932085AbeAaCgo (ORCPT + 99 others); Tue, 30 Jan 2018 21:36:44 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:44583 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753451AbeAaCgf (ORCPT ); Tue, 30 Jan 2018 21:36:35 -0500 Received: by mail-pf0-f194.google.com with SMTP id 17so9652708pfw.11 for ; Tue, 30 Jan 2018 18:36:34 -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=xo1pIR1xvBvDy/Pi7Idp95Txk3h0Vvmdq3pnieCBYpI=; b=bKFCnZal/oAqamBCP0C2MwVt66KKRCliQ9Iv0/elfCkdMPue+xMBjNOrOctj4RDwni 9zwr5qmtooLQIJgNi7ejdkcDLijAB1VCe0X0SfHXJHk/6FeexYsWvh01cTxASFv6mwTy LL6tP1RCw9+KO+9KKKGdXJQ2FOe28QNft4oQk= 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=xo1pIR1xvBvDy/Pi7Idp95Txk3h0Vvmdq3pnieCBYpI=; b=bFVyeSz+2q5kVaEARKrSXoGeqqWqV5Eli0e3YccNEJ3+KcSB+sMfSJaxTaCPt4vu5D 4V/G5tDSxzc/Adj/LpqgbTVDz/HDZCYVWzD+a1YT8KRhc6O1whWiQfceK9smkDlonVAE 064m533YeCHZqhO5GN4Tou0Gtbq2rL1et4AL2Ebv96n4PeKsR5QuyVjLzbjVPYo1Dsiq HL/JJ8XmQI+F5CeK59HoiRSHv0DpHqMoocYcsX+OaWQ6arxPTla+bThoGNXUQyFY+caM F2rozoUcKNB/kmN5xIh+WKzc32+GlCTUsUc83/4RiF1+k7KQY7eDUc8/gKHoZT05VN87 mG1g== X-Gm-Message-State: AKwxytdRmVFr9pRAGjaO4wQCiYJiPsRaZOx+c/3dXm2dV/lVhqEkE/Fi vUcAklcoJNwcMQmIFve4GEvUhQ== X-Received: by 2002:a17:902:42a5:: with SMTP id h34-v6mr26274614pld.265.1517366194486; Tue, 30 Jan 2018 18:36:34 -0800 (PST) Received: from localhost.localdomain (pat_11.qualcomm.com. [192.35.156.11]) by smtp.gmail.com with ESMTPSA id z2sm24126828pgz.22.2018.01.30.18.36.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jan 2018 18:36:34 -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, Russell King - ARM Linux , devicetree-spec@vger.kernel.org, Pantelis Antoniou , Mark Brown Subject: [PATCH v5 4/4] gpio: Support gpio nexus dt bindings Date: Tue, 30 Jan 2018 18:36:18 -0800 Message-Id: <20180131023618.14292-5-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.14.GIT In-Reply-To: <20180131023618.14292-1-stephen.boyd@linaro.org> References: <20180131023618.14292-1-stephen.boyd@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 72a0695d2ac3..09217a87e7ff 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 '%pOF[%d]'\n", __func__, propname, np, index); -- 2.14.GIT