Message ID | 20221206200740.3567551-4-michael@walle.cc |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3026652wrr; Tue, 6 Dec 2022 12:08:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf5W26lvv+u+TpHsZWzX4CLwm6UOJ7IHAVMvQJan2YCFoeGKGbhKXbCEELGv8J1nEoRrmLS/ X-Received: by 2002:a17:902:e94e:b0:186:5613:becf with SMTP id b14-20020a170902e94e00b001865613becfmr60647269pll.46.1670357318029; Tue, 06 Dec 2022 12:08:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670357318; cv=none; d=google.com; s=arc-20160816; b=pDLnEbCrscPQvJbErPbCJOzPu/rBEHLtpVWpCI/GhloaXkIAzt4XDY0TY/Ynl+3wIo pP1V8eOGhlGINj4pa3gIhpXegKj0K8gguf3OC5FjB3Rgq9g+EoFnhHPXlSHEMA2V3CRX LJNJF6zeuepqaA6jraRm7JJCIrUpNGrQLEDCLasgXChn19aQXgwy//hArBl799tDsyPv ChhgybZ9mtUvRxKj1Hc4m/1MrJlUVDqZO5xeYG+KdDdfj9o8nP497Pg/ANc/Nw5j8wx/ PQoozsIAvovIfJ6aHaM0b6qdnrlMoB3DjwvUMjrIkO9IWxmKa8Tv+gvdeoiSnGHZ98aK T7KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jccYpGhRy5gogBWLLHj7E2HN2uMWlo2JC7ssSIFLQtc=; b=oF3SEVkp9KCcA93qBjftlsGJdis59zThb+dzSwujtRKB6qDIrtbm9OYlX3lACoFE3l 5vZ1j8qOg0Pvwd7hMJcJzaess+MYDtQUGTwHTyKB/fD3aMp7TJzCVnD5WfWEQFlSkInC orE0d0kMQfpanqPQpf+C7DfULUR1RyLtwp/w/PbSIpJfN+8L5fxC8t/enkmQVHfhxZVY qKw+o88MH1prxdylXrfiS7OWmljEA5hvr9BHarrOQvrCQ4jP37ZTK3WcSSdE8VrPaOpv 9ILBFP+sTAqq7Nu6LnA5YA98oeFpDI/IxYtI4qn8S9US1HLyjQTWvZfHNC2j2Ern0r19 9kqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=KBD7cnd9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a170902cf1200b00189772559afsi18070785plg.191.2022.12.06.12.08.24; Tue, 06 Dec 2022 12:08:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=KBD7cnd9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229445AbiLFUH7 (ORCPT <rfc822;jaysivo@gmail.com> + 99 others); Tue, 6 Dec 2022 15:07:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbiLFUHv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 6 Dec 2022 15:07:51 -0500 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5736E12745; Tue, 6 Dec 2022 12:07:49 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 5D69C27AA; Tue, 6 Dec 2022 21:07:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1670357267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jccYpGhRy5gogBWLLHj7E2HN2uMWlo2JC7ssSIFLQtc=; b=KBD7cnd9QOSO/57qGehuqF4Cc+qXERoCaSlpkkNU8U3/56TH9CVIMhSNXn3X/SW+LPlt1d YKPbpeU47AaBZvH/Bee9NMJzI7zD/is71U+4YMLqrc2QOzYLkU1eWWBXIrmNTzI5nspuKI vH89q/FjWOSL8MJv8i/mMl/gqmCT9YcHJ4uK/Ufc6LzTH+84QSusG4Pqv0tYnjJ0a88Nqf O8XH7QzR8imcMpibVswnbano7GLtLUqSHkto0cvsRD0npwvxlyzrE6eCq/pFKCdUYKOX2t 9PJ9Y872A6dlBbDzaefu4hiqbZZ5K1febkNV0iFcTK7QD6L86PYiChquMcr1Uw== From: Michael Walle <michael@walle.cc> To: Jonathan Corbet <corbet@lwn.net>, Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Sascha Hauer <s.hauer@pengutronix.de> Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Michael Walle <michael@walle.cc>, Dan Carpenter <error27@gmail.com>, Rob Herring <robh@kernel.org> Subject: [PATCH v5 03/21] of: property: make #.*-cells optional for simple props Date: Tue, 6 Dec 2022 21:07:22 +0100 Message-Id: <20221206200740.3567551-4-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221206200740.3567551-1-michael@walle.cc> References: <20221206200740.3567551-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751496595089294005?= X-GMAIL-MSGID: =?utf-8?q?1751496595089294005?= |
Series |
nvmem: core: introduce NVMEM layouts
|
|
Commit Message
Michael Walle
Dec. 6, 2022, 8:07 p.m. UTC
Sometimes, future bindings for phandles will get additional arguments. Thus the target node of the phandle will need a new #.*-cells property. To be backwards compatible, this needs to be optional. Prepare the DEFINE_SIMPLE_PROPS() to handle the cells name as optional. Signed-off-by: Michael Walle <michael@walle.cc> Tested-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> --- changes since v4: - none changes since v3: - new patch drivers/of/property.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c index 134cfc980b70..3043ca7735db 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1256,8 +1256,8 @@ static struct device_node *parse_suffix_prop_cells(struct device_node *np, if (strcmp_suffix(prop_name, suffix)) return NULL; - if (of_parse_phandle_with_args(np, prop_name, cells_name, index, - &sup_args)) + if (__of_parse_phandle_with_args(np, prop_name, cells_name, 0, index, + &sup_args)) return NULL; return sup_args.np;