From patchwork Mon Jan 23 20:48:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 92273 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1408372qgi; Mon, 23 Jan 2017 12:48:55 -0800 (PST) X-Received: by 10.98.204.83 with SMTP id a80mr34056234pfg.114.1485204535758; Mon, 23 Jan 2017 12:48:55 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si16703116pfo.243.2017.01.23.12.48.55; Mon, 23 Jan 2017 12:48:55 -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 S1751242AbdAWUsy (ORCPT + 7 others); Mon, 23 Jan 2017 15:48:54 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:35149 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbdAWUsx (ORCPT ); Mon, 23 Jan 2017 15:48:53 -0500 Received: by mail-pf0-f175.google.com with SMTP id f144so43812854pfa.2 for ; Mon, 23 Jan 2017 12:48:53 -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; bh=B1nc61T6FoXniNAU72GA0Ji/NUKlFoSipI2f0aLiUPQ=; b=BwnP7jv+sTUNtp+KGC6Aj2KRk1Df0GoRQ/satCQ/uHXgETI4yKUNx243BYlrexEvMv pDvj2whGex5NoWTl+QQrXVjyyf/dzo72xY0MdVnd3+kgwKeS1kdxri6JZFoYqhl7ska4 bUiue008DD7FOUDo81ZYkviW/5fJCp4cFhRPQ= 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; bh=B1nc61T6FoXniNAU72GA0Ji/NUKlFoSipI2f0aLiUPQ=; b=QKIDmm8sxR8y3xaBIr07SXfxiTAXuphFn5ahIFDYj4moFxOJ5UoGu28UAyleh6AevF kHfibp11noNNkIfMEt4AgqgzYavBIKqdGO3unO8iij1cS0/CYiDMuaTSymbHt1vT53oz n73gzRVO3D0g1PGXzVGczKqCC4vgR87ifNvuf0jo9ZeAnr1g5iRvkDzCZuPxT83oeToQ bo4Iyn8NBdFENWSEjCFYRVPxf+P8jCQh+h8MZiszv4BHnO6wcanz/ZDxPfcJmAh4wQeD kNLMEKb0UJ8wE6LVnjGYHkPEojnhE4hHUSCiG4PIkhB49gzAcZ8QxRFmHcFhf4zXzyu7 vw8w== X-Gm-Message-State: AIkVDXJhwyOEod2gs0gSKh9/cROcbOQlXy6VM0+0g9RXZ0USRGhPcFo53VERaZ90EydAXqDS X-Received: by 10.99.160.1 with SMTP id r1mr34731290pge.171.1485204532993; Mon, 23 Jan 2017 12:48:52 -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.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Jan 2017 12:48:52 -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, Linus Walleij , Pantelis Antoniou , Mark Brown Subject: [PATCH v3 0/3] OF phandle nexus support + GPIO nexus Date: Mon, 23 Jan 2017 12:48:48 -0800 Message-Id: <20170123204851.12808-1-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.10.0.297.gf6727b0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This is one small chunk of work related to DT overlays for expansion boards. It would be good to have a way to expose #-cells types of providers through a connector in a standard way. So we introduce a way to make "nexus" nodes for these types of properties to remap the consumer number space to the other side of the connector's number space. It's basically a copy of the interrupt nexus implementation, but without the address space matching design and interrupt-parent walking. The first patch implements a generic method to do this, and the second patch adds a unit test for it. The third patch is more of an example than anything else. It shows how we would modify frameworks to use the new API. Changes since v2: * Picked up Linus' ack on the gpio core patch * Made const stack arrays static (Rob Herring) * Used of_property_read_u32() instead of open coding (Rob Herring) Changes since v1: * Addition of optional pass-thru parameter * Reduction of strings passed to 1 instead of 3 (or 4 now) * Updated gpio patch for the new function signature * Updated test-case for new funciton signature and pass-thru parameter * Updated kernel-doc to be correct and highlighted difference between this API and of_parse_phandle_with_args() Stephen Boyd (3): of: Support parsing phandle argument lists through a nexus node of: unittest: Add phandle remapping test gpio: Support gpio nexus dt bindings drivers/gpio/gpiolib-of.c | 4 +- drivers/of/base.c | 184 ++++++++++++++++++++++++++++ drivers/of/unittest-data/testcases.dts | 11 ++ drivers/of/unittest-data/tests-phandle.dtsi | 25 ++++ drivers/of/unittest.c | 120 ++++++++++++++++++ include/linux/of.h | 12 ++ 6 files changed, 354 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