From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8048AC4CEC8 for ; Fri, 13 Sep 2019 21:58:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 559E421479 for ; Fri, 13 Sep 2019 21:58:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Wow59saq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 559E421479 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CechNZyfaHnLA15W4kkvo2MQ2jZ2h8dNU+N7sNKb0Os=; b=Wow59saq6x+nYR ynPUVpGhmzkJnCxyxUsizy2XIyzJwP1ZHui5y8i8N2i8Wlc7JNVLkXuKCyKmsCXnU3HTrabMJ+Rqk sszMkjujLJAimLE6vwIcXq85QJCKOfOL6b7kGdNWIDgpCs8hOs9ujPhC+w2V40MzDi9eWQBiG1UXq wMWl5zxjOvfNyoeeDZ+XVeE1gl+QBVFdHjOvOMbgohPUYmxFjG9LWzNhjPQ36BKiCcXjEJZIRwEXd 6j1ASB2QUlf9S1B/F+1QfXzh0MHvKLFwAx6M3Z6Lfzjf1r59Aykt9p+JT5/6jpYAQeRXVlVIyz+AU FfznhFqP8sD9Ok6Y/kDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i8ta4-00077N-Lj; Fri, 13 Sep 2019 21:58:16 +0000 Received: from mail-oi1-f195.google.com ([209.85.167.195]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1i8ta0-00075h-BT; Fri, 13 Sep 2019 21:58:13 +0000 Received: by mail-oi1-f195.google.com with SMTP id w144so3910509oia.6; Fri, 13 Sep 2019 14:58:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=AQ3PXKKEYAPpTNJc/PTOp8Ob+kx8WcDFX3XJj1y+xiY=; b=PtDFfACV1nfQYbgKbGBPqASqnkORZyMpCtCBHYpqwUQpbzg1qmQqRo6GzHvU8uz5XQ K+LJY/rlfYYTbxXHFMtWrqqwrN1Ab08RX+MP32TEOYvV9CAxfCpiHscHy57BckgxmInO cGzFIma5f9hwRWC+fpmvxgB7cNHAf5vRzcdaEa7V+/W3ypEEgvmGOxqaaU6x1ZPifsKZ cS2I9dCppO/4ZK1qMmxOqeRQZEIPp/t/SpwySa9WSgHmSa2u37btIauzq3ZPxm1yWihJ AfKiizJn3E9oz0gpVWEuIz6j0Gni0DyN0umaO1EeFlN7a7Fh/q8iBT0q87UOSggIP59P n/7g== X-Gm-Message-State: APjAAAWPFpy8lCRfEyqoBWq4j7Kq3dEXAUNV0y3b2eyjZfDnz0xFGX/1 w4jrtqT82KcbEhK/DFReSw== X-Google-Smtp-Source: APXvYqwcvObB3Yb/Y4El/uikyKAQB52Tnw3hLnBRUoI7ZLHlgxb3ip7OrKPwaxSV60bB8sfAR8RFlA== X-Received: by 2002:a05:6808:b19:: with SMTP id s25mr5498975oij.126.1568411890436; Fri, 13 Sep 2019 14:58:10 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id 34sm11938701ots.47.2019.09.13.14.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2019 14:58:09 -0700 (PDT) Date: Fri, 13 Sep 2019 16:58:09 -0500 From: Rob Herring To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH v1 2/2] of: Let of_for_each_phandle fallback to non-negative cell_count Message-ID: <20190913215809.GA11833@bogus> References: <20190824132846.8589-1-u.kleine-koenig@pengutronix.de> <20190824132846.8589-2-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190824132846.8589-2-u.kleine-koenig@pengutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190913_145812_395572_C5FD9DEF X-CRM114-Status: GOOD ( 13.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Will Deacon , Joerg Roedel , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, kernel@pengutronix.de, Matthias Brugger , Frank Rowand , linux-arm-kernel@lists.infradead.org, Robin Murphy Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 24 Aug 2019 15:28:46 +0200, =3D?UTF-8?q?Uwe=3D20Kleine-K=3DC3=3DB6n= ig?=3D wrote: > Referencing device tree nodes from a property allows to pass arguments. > This is for example used for referencing gpios. This looks as follows: > = > gpio_ctrl: gpio-controller { > #gpio-cells =3D <2> > ... > } > = > someothernode { > gpios =3D <&gpio_ctrl 5 0 &gpio_ctrl 3 0>; > ... > } > = > To know the number of arguments this must be either fixed, or the > referenced node is checked for a $cells_name (here: "#gpio-cells") > property and with this information the start of the second reference can > be determined. > = > Currently regulators are referenced with no additional arguments. To > allow some optional arguments without having to change all referenced > nodes this change introduces a way to specify a default cell_count. So > when a phandle is parsed we check for the $cells_name property and use > it as before if present. If it is not present we fall back to > cells_count if non-negative and only fail if cells_count is smaller than > zero. > = > Signed-off-by: Uwe Kleine-K=F6nig > --- > drivers/of/base.c | 25 +++++++++++++++++-------- > 1 file changed, 17 insertions(+), 8 deletions(-) > = Applied both patches, thanks. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel