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 4C0A0C3A59E for ; Mon, 2 Sep 2019 14:26:51 +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 2295321670 for ; Mon, 2 Sep 2019 14:26:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TTxcDTaR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2295321670 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=q2LDSN4VrJKeZx6/fgfdYJI90EiAQumIXbvje1xKPMI=; b=TTxcDTaRkBcGnf 1Xx3d5Q8obhhnK6L9LjXQBOMvdz1hH5KRMRYc/BmOpwMU7FWW0q5SjgD8s5EqyaHQvZm2kgo/87Fu jsioxnQbRZts7kMDaNMFqi7ooqf9c3SklfwLQgdFgA3mr1MfkU9iufq4U++LuPzBP0VGv5jcooIVd DEGxXYNSbPGuLYNCdNIk3aO+3ZE6WnrrFUjIz3/God5gTX/0yKUfPgCUINH9i0HWk4LzyY0V2qTJX kU87j/92zjBoYhTlDen8MTQ1bTQvTJDWyN0RwlWVxLRouCdIPFbF5lbc0OuO9iXWNScCzSd5wmEQs pb1/HcqtMAua1VcVw3Zw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i4nI6-0001bA-6h; Mon, 02 Sep 2019 14:26:46 +0000 Received: from mail-wr1-f67.google.com ([209.85.221.67]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i4nI2-0001Zq-P7; Mon, 02 Sep 2019 14:26:44 +0000 Received: by mail-wr1-f67.google.com with SMTP id q12so14195051wrj.12; Mon, 02 Sep 2019 07:26:42 -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=ot30V47/iBS0yHDmKdi6h92CwtoqCpzSIGyUdC23LBs=; b=qJVYsIHAMwRGnUhFarPXC69pkig+22F8BH0ZFB7ZSRS9PLDQgZAvPTf+nztAueUt0/ k1RB0WIsk3Tg1G7Nn0yn/uOPcWACGFHnk8C/dU5tbrLeWtYtwZmAMNaf2X4oiGWhd260 N5ALOLrQYTATlCCw7BwXchie6yThMDf7DyD5Eo425aGG9IGub7ak9chD3jFVgId/unco QExyrZ8a+xeUgXYk4nt3H7g3Yfu3mvokcOpa/S0k8ipKUMYOBRXRsHGQvtkHSGiw7ryt x1wSrySmi/mGWPTJpBOXR6TcBILDTql8kyypcP0Di99tOSDWD/gOTg15LATzNA5p22Bk wdTw== X-Gm-Message-State: APjAAAVSIYQ4zTxtZvT4RxqAi0wckispl7g6F8K9+tPZL+CS090tLEUm ppVPZodozu1RVRNphsURHA== X-Google-Smtp-Source: APXvYqwrcoUbjAf10BUlLBhioq2RZCRuSUEHDKWeG20TWt9K0tZHjtvEfqHEbFfZ7g0NKNH+PmgRKg== X-Received: by 2002:a5d:6811:: with SMTP id w17mr1391676wru.181.1567434400948; Mon, 02 Sep 2019 07:26:40 -0700 (PDT) Received: from localhost ([212.187.182.166]) by smtp.gmail.com with ESMTPSA id h125sm33788405wmf.31.2019.09.02.07.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 07:26:40 -0700 (PDT) Date: Mon, 2 Sep 2019 15:26:39 +0100 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: <20190902142639.GA13947@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-20190902_072642_815798_17B90CFA X-CRM114-Status: GOOD ( 15.81 ) 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, Aug 24, 2019 at 03:28:46PM +0200, Uwe Kleine-K=F6nig 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(-) Looks fine to me. I can apply with an ack from the iommu folks on patch = 1. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel