diff mbox series

[v3,4/9] of: property: fw_devlink: Add support for "depends-on"

Message ID 20221207162435.1001782-5-herve.codina@bootlin.com
State Changes Requested, archived
Headers show
Series [v3,1/9] dt-bindings: PCI: renesas,pci-rcar-gen2: Add depends-on for RZ/N1 SoC family | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied fail build log

Commit Message

Herve Codina Dec. 7, 2022, 4:24 p.m. UTC
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 <herve.codina@bootlin.com>
---
 drivers/of/property.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

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, },
 	{}
 };