[2/3] of: property: Add fw_devlink support for msi-parent

Message ID 20231025142820.390238-3-apatel@ventanamicro.com
State New
Headers
Series Linux RISC-V AIA Preparatory Series |

Commit Message

Anup Patel Oct. 25, 2023, 2:28 p.m. UTC
  This allows fw_devlink to create device links between consumers of
a MSI and the supplier of the MSI.

Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Saravana Kannan <saravanak@google.com>
---
 drivers/of/property.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Thomas Gleixner Oct. 27, 2023, 7:57 a.m. UTC | #1
On Wed, Oct 25 2023 at 19:58, Anup Patel wrote:
> This allows fw_devlink to create device links between consumers of
> a MSI and the supplier of the MSI.

How is this related to the two fixes in this series?
  
Anup Patel Oct. 27, 2023, 3:31 p.m. UTC | #2
Hi Thomas,

On Fri, Oct 27, 2023 at 1:27 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Wed, Oct 25 2023 at 19:58, Anup Patel wrote:
> > This allows fw_devlink to create device links between consumers of
> > a MSI and the supplier of the MSI.
>
> How is this related to the two fixes in this series?

The first three patches of the v11 RISC-V AIA series are all
fixes hence I sent them separately for the 6.7 merge window.
(https://lore.kernel.org/lkml/20231023172800.315343-1-apatel@ventanamicro.com/)

All three fixes are unrelated to each other and were discovered
during AIA driver development.

This patch fixes the probing order for platform devices having
inter-dependency based on "msi-parent" DT property.
For example, the AIA APLIC (wired-to-MSI bridge) platform
device depends on the AIA IMSIC (MSI controller) platform
device.

Are you okay with this patch going through the RISC-V tree ?

Regards,
Anup
  
Thomas Gleixner Oct. 27, 2023, 5:29 p.m. UTC | #3
On Fri, Oct 27 2023 at 21:01, Anup Patel wrote:
> On Fri, Oct 27, 2023 at 1:27 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>>
>> On Wed, Oct 25 2023 at 19:58, Anup Patel wrote:
>> > This allows fw_devlink to create device links between consumers of
>> > a MSI and the supplier of the MSI.
>>
>> How is this related to the two fixes in this series?
>
> The first three patches of the v11 RISC-V AIA series are all
> fixes hence I sent them separately for the 6.7 merge window.
> (https://lore.kernel.org/lkml/20231023172800.315343-1-apatel@ventanamicro.com/)
>
> All three fixes are unrelated to each other and were discovered
> during AIA driver development.
>
> This patch fixes the probing order for platform devices having
> inter-dependency based on "msi-parent" DT property.
> For example, the AIA APLIC (wired-to-MSI bridge) platform
> device depends on the AIA IMSIC (MSI controller) platform
> device.

Well, the changelog should tell that it is a fix and not make the
illusion that this is pure enablement....

> Are you okay with this patch going through the RISC-V tree ?

Fine with me.
  

Patch

diff --git a/drivers/of/property.c b/drivers/of/property.c
index cf8dacf3e3b8..afdaefbd03f6 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1267,6 +1267,7 @@  DEFINE_SIMPLE_PROP(resets, "resets", "#reset-cells")
 DEFINE_SIMPLE_PROP(leds, "leds", NULL)
 DEFINE_SIMPLE_PROP(backlight, "backlight", NULL)
 DEFINE_SIMPLE_PROP(panel, "panel", NULL)
+DEFINE_SIMPLE_PROP(msi_parent, "msi-parent", "#msi-cells")
 DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)
 DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
 
@@ -1356,6 +1357,7 @@  static const struct supplier_bindings of_supplier_bindings[] = {
 	{ .parse_prop = parse_leds, },
 	{ .parse_prop = parse_backlight, },
 	{ .parse_prop = parse_panel, },
+	{ .parse_prop = parse_msi_parent, },
 	{ .parse_prop = parse_gpio_compat, },
 	{ .parse_prop = parse_interrupts, },
 	{ .parse_prop = parse_regulators, },