From patchwork Wed Dec 7 16:24:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 13067327 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 795BAC63707 for ; Wed, 7 Dec 2022 16:25:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230048AbiLGQZB (ORCPT ); Wed, 7 Dec 2022 11:25:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbiLGQYw (ORCPT ); Wed, 7 Dec 2022 11:24:52 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E5C05E9C7; Wed, 7 Dec 2022 08:24:51 -0800 (PST) Received: (Authenticated sender: herve.codina@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id F06204000B; Wed, 7 Dec 2022 16:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1670430290; 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=MS5FcYqq6lphv5bSGh7WZDJt7IC7M73R256NubizXec=; b=levzMiiyqvZQw+FrML4b35QComxkhyuxLis/u7chs95b8evzNvM/txYKoRR88FjyHyh7yr w74g39KZIsvnA6YPFrvvR1wwpNpxm98DI10XS6S54C5aonZ+2kHKrEEHk3ktQ9hL4Ii4e+ Sg6KAhmrdv99JClWCFSCSXeSn2XPq6KykcbyS8tdgMf1F0wHNsaAjx3VlNwfrkVPJHd8L7 L0sCI3tsi4j7iXw5rolDoqsmD3v1/zJ2YKMMEhyqdZvaO7T6zZ9V0y7slzGymqbizvgkI3 ytSi/VWzIbsYuNf0ciSpXMR3U1buaRHTrdc0WK1qO82aByrvJt9eEjyzdTBNKA== From: Herve Codina To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Herve Codina , Greg Kroah-Hartman , Magnus Damm , Gareth Williams Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Thomas Petazzoni , Miquel Raynal Subject: [PATCH v3 4/9] of: property: fw_devlink: Add support for "depends-on" Date: Wed, 7 Dec 2022 17:24:30 +0100 Message-Id: <20221207162435.1001782-5-herve.codina@bootlin.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221207162435.1001782-1-herve.codina@bootlin.com> References: <20221207162435.1001782-1-herve.codina@bootlin.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The generic "depends-on" property expresses a simple functionnal dependency. The "depends-on" consumer must be available before the "depends-on" provider. Handling "depends-on" as a fw_devlink matches this dependency in a generic way. Signed-off-by: Herve Codina --- drivers/of/property.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/of/property.c b/drivers/of/property.c index 134cfc980b70..e96678d78f6a 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1324,6 +1324,7 @@ DEFINE_SIMPLE_PROP(pwms, "pwms", "#pwm-cells") DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells") DEFINE_SIMPLE_PROP(leds, "leds", NULL) DEFINE_SIMPLE_PROP(backlight, "backlight", NULL) +DEFINE_SIMPLE_PROP(depends_on, "depends-on", NULL) DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") @@ -1417,6 +1418,7 @@ static const struct supplier_bindings of_supplier_bindings[] = { { .parse_prop = parse_regulators, }, { .parse_prop = parse_gpio, }, { .parse_prop = parse_gpios, }, + { .parse_prop = parse_depends_on, }, {} };