From patchwork Fri Aug 11 15:42:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 109901 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1079984qge; Fri, 11 Aug 2017 08:42:46 -0700 (PDT) X-Received: by 10.84.167.2 with SMTP id c2mr17951873plb.366.1502466165900; Fri, 11 Aug 2017 08:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502466165; cv=none; d=google.com; s=arc-20160816; b=VfEZ4bq6Szyt5Xe3F07+4syL+mMsjGj2kRKCIO4wEj626IIuTAN1bUfalPmJgIrXqk vm4E8LXQ4Q9566bDmH3PJJoh+b4RqxUVjbvpM3itWykolBtYend0duirALKkIrJt6Z7Y SVeq9e27mp5m44des6ixtQ+GjqBkEDZ7Q2RDPkldRbG+xVfKu42WxbSDC1m2h3UJfCpI P/J1oK7CsUONaV7dJIyWPwaIW7DiOiQEHV0PXvcVRNsLkE8wGXuMu+xCpV6YHgpv9YeM HtBq7QUVK2O72JDYPlGLZAk02QN8rS97poWASP+/RlaWrKt4gKQ2YmTGzTAan78//W0w ylKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jUQKbEXH+g1s0atfRApr3uoUJp5bhlVLLwAxyUg3df0=; b=QNWYskyIrRPH1CxWGfVrufRpNuRUIHcOnlGTTsZqRBFkVkfpS3Q3BTozjHQNPZ9ZAR /RNSVjODt68DtLnpCg5TDCVivgiyFhkdr+JNyZdNf5Ime2lO0x8wSswfrpO1R6viuIhC E/1KHZ54S9LBAXe4+ni3lrOYJRjqpK9tanNr7Ic486gA+v7FZ+o6Vrw9rpJCxvbKngCY SeATZLwHt6ItEoLkDoUnkLtLHUYRd7k+Dgu2CdbNp+/TaLHByeX4ldfeO+8MZtKJQiqQ vfXwDPniyQrPrAHOf/ThFm/SKmMJA99lProKoZ4V6D5fnsRjuINvQsvW4oJFmHGvSQdM aQWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bWUHmFf9; 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 g6si636516pgf.799.2017.08.11.08.42.45; Fri, 11 Aug 2017 08:42:45 -0700 (PDT) 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=bWUHmFf9; 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 S1753304AbdHKPmm (ORCPT + 25 others); Fri, 11 Aug 2017 11:42:42 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:36408 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752631AbdHKPmi (ORCPT ); Fri, 11 Aug 2017 11:42:38 -0400 Received: by mail-pf0-f171.google.com with SMTP id c28so17262871pfe.3 for ; Fri, 11 Aug 2017 08:42:38 -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; bh=jUQKbEXH+g1s0atfRApr3uoUJp5bhlVLLwAxyUg3df0=; b=bWUHmFf9vQ7FEcgGjTNmeDMk0PXmwtV13CAnlJ8IZXDlFjUUmAMBtCuGw4VNr5+1ON Vj1hVXTl16d2O3uyhuTwwjYw01UdZV7k27wm5w0nfakasVs1YyAUyrbG16pUyxj0tNHn DOX4SDb5EvkJrE475LFSPv+Euq7IAANLUAPBM= 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=jUQKbEXH+g1s0atfRApr3uoUJp5bhlVLLwAxyUg3df0=; b=mWb/l1uaZK++qiEEKylXBLcMTIOJGWNrSvc/aIYu4EIm3wpVY3zjz/UeX1AvP6PfxC iL4ENJVM3AzK4IeOVBDBMsVRwf3v9p1rVWDSWLcoJ/3HJr0G1nIPpjpq0jKy/WqONmib PJlqRv1KMjaLgWO0WJX0wvlEfXMh7ZJa0N9ftn34BWOSqna3orYJwc7VdPgr9EZlQmGi ut/52mCq0PjDEBHFTLCHo0tVdG//ShDTWVQE809VB1vIYu4OJdPxJzJHHsQpicks1e4s xt1IL8w5A0aW6TPU9ukRa7YYPbLrG4oGSwXphKV3pL5AWwGNhR9okWnlIZc3tfwIXIWI R58Q== X-Gm-Message-State: AHYfb5gJniXfr/dy+umT9guPxw7n6dYouj4tvpjF9mrDmMyaugOzcEft jObgEiPjURLH4u1W X-Received: by 10.99.111.134 with SMTP id k128mr15610419pgc.431.1502466158303; Fri, 11 Aug 2017 08:42:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Aug 2017 08:42:37 -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 Subject: [PATCH v4 0/4] OF phandle nexus support + GPIO nexus Date: Fri, 11 Aug 2017 08:42:32 -0700 Message-Id: <20170811154236.12891-1-stephen.boyd@linaro.org> X-Mailer: git-send-email 2.14.GIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a continutation of my phandle remapping/nexus node series from a while ago. I finally got around to writing the documentation in the spec for this, but it's really rough around the edges and could use some review/suggestions to get it into shape. Please review! 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. Changes since v3: * Added devicetree spec patch * Rebased to v4.13-rc1 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): Document nexus nodes/specifier remapping of: Support parsing phandle argument lists through a nexus node of: unittest: Add phandle remapping test gpio: Support gpio nexus dt bindings Kernel: 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(-) Spec: source/devicetree-basics.rst | 208 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) -- 2.7.4