Patch "of: property: Improve finding the supplier of a remote-endpoint property" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    of: property: Improve finding the supplier of a remote-endpoint property

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     of-property-improve-finding-the-supplier-of-a-remote.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6b4eefe89be8aa5dd7e4194257a32d853e17296d
Author: Saravana Kannan <saravanak@xxxxxxxxxx>
Date:   Tue Feb 6 17:18:01 2024 -0800

    of: property: Improve finding the supplier of a remote-endpoint property
    
    [ Upstream commit 782bfd03c3ae2c0e6e01b661b8e18f1de50357be ]
    
    After commit 4a032827daa8 ("of: property: Simplify of_link_to_phandle()"),
    remote-endpoint properties created a fwnode link from the consumer device
    to the supplier endpoint. This is a tiny bit inefficient (not buggy) when
    trying to create device links or detecting cycles. So, improve this the
    same way we improved finding the consumer of a remote-endpoint property.
    
    Fixes: 4a032827daa8 ("of: property: Simplify of_link_to_phandle()")
    Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240207011803.2637531-3-saravanak@xxxxxxxxxx
    Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 4411a08fccb3..d9b3c8769fa7 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1231,7 +1231,6 @@ DEFINE_SIMPLE_PROP(pinctrl5, "pinctrl-5", NULL)
 DEFINE_SIMPLE_PROP(pinctrl6, "pinctrl-6", NULL)
 DEFINE_SIMPLE_PROP(pinctrl7, "pinctrl-7", NULL)
 DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL)
-DEFINE_SIMPLE_PROP(remote_endpoint, "remote-endpoint", NULL)
 DEFINE_SIMPLE_PROP(pwms, "pwms", "#pwm-cells")
 DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells")
 DEFINE_SIMPLE_PROP(leds, "leds", NULL)
@@ -1296,6 +1295,17 @@ static struct device_node *parse_interrupts(struct device_node *np,
 	return of_irq_parse_one(np, index, &sup_args) ? NULL : sup_args.np;
 }
 
+static struct device_node *parse_remote_endpoint(struct device_node *np,
+						 const char *prop_name,
+						 int index)
+{
+	/* Return NULL for index > 0 to signify end of remote-endpoints. */
+	if (!index || strcmp(prop_name, "remote-endpoint"))
+		return NULL;
+
+	return of_graph_get_remote_port_parent(np);
+}
+
 static const struct supplier_bindings of_supplier_bindings[] = {
 	{ .parse_prop = parse_clocks, },
 	{ .parse_prop = parse_interconnects, },




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux