Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp699843ybc; Fri, 22 Nov 2019 11:39:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwvisXuGpstkVa3d6W5IuVy6I39c4SCxOWZAzxTGFk/NqNFEFVTh63MZW2wGKEWFHZMes6D X-Received: by 2002:a17:906:c789:: with SMTP id cw9mr24585647ejb.40.1574451576040; Fri, 22 Nov 2019 11:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574451576; cv=none; d=google.com; s=arc-20160816; b=AioA0oSdJ7j+lj68P1Oc8BOVmYbAafgYEBzkZt8d2qsv4rYn8DKP1hJwlW0psnkgXV bx46GZqllgMncJ21rZMHZjrus8wpI8Zlus2P6eWwb4VLy6cv24cQpFsIGfO2goD6iKrt WfFGVthkPzFKm6q8iNW7qIRE11t5hQanOTcFd8Rcz6kk4BykLdfZoY+NZwSMfA1CIrwO geAT+tVUIWKi6m0vXHKKeWDDALdJLhlCZkRGr/J4X5IqRCP2nmTN6xIzA3PpK3YvV6Xa YiI9voC8IrtXZrSnXXbhSzZNd1rwemFI4EPXlzqbfukehYm5L8OLirjRv4nL/UUS0AiA gXUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=w5kE9sNVKHOR5v+8eWGC0h9VJree9L481GT6fR4KPH0=; b=zbmzUokXyHNJK8diT/FtJ+M7Fhj/wpyXkhmAjLe7I0WjWZJxZ2cuX5yXxJyLJ+TsBq 7bgSBewHVhxpCyOHjZW7X4HFFi44KdQ7m5WjlJEJ4rCZxFgBx5qdN4xd+AIOn/BM9lla bYJ+7Z/xpUKQQUx8HxiXf2BXXLJvPEmDkekYPvl/MNxM3c7voGL2JPpLjfEpIz0yAP7I fpBWtTBz4uFxsfGZMkTW++WF5XMnEurLdlTYUtiRySeYbVDc4rcEgJTO21UkReHq//FG fA8cPuN00M/Qon+IWBtCeDEpQavtRhxPPsRGt3Wthqd3prs1UrL3PrXGfrrjGkGS4Smv S6Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cNSJzEsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si3134001edz.130.2019.11.22.11.39.11; Fri, 22 Nov 2019 11:39:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=cNSJzEsY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbfKVTew (ORCPT + 99 others); Fri, 22 Nov 2019 14:34:52 -0500 Received: from mail-oi1-f194.google.com ([209.85.167.194]:36239 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726698AbfKVTev (ORCPT ); Fri, 22 Nov 2019 14:34:51 -0500 Received: by mail-oi1-f194.google.com with SMTP id j7so7550529oib.3 for ; Fri, 22 Nov 2019 11:34:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w5kE9sNVKHOR5v+8eWGC0h9VJree9L481GT6fR4KPH0=; b=cNSJzEsYJOJ4JEfhHWKXS7c10BorqhgrC+2FVDwki+JScCqyN8zUk/KqFNLNedcZQA aWfNbvyBmvnc2TbeuMGD3It7wRwSS0nLUUAN/eDrE04HeLS+bBmMPB0vTdlLW0CTJM7c LcwTId1iCmlFIbM1Sd1USPHSHF1mLFesM5WLGDEwTkIB8kfGLkJSyRcCjYi1L+vNNR8N yFs9aOq/72jZLwUehCwSDhYwh6FoIHY2g+bIK3J++l4SPr0nvyhv+NuKJygYzbv1kv8w /JR92Xm9IjO1GyFe3o36WV/1A8F5iQK0oLJYXsGbyIzvj55bLxY5hqzri0Vpj5nMEmUJ 24PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w5kE9sNVKHOR5v+8eWGC0h9VJree9L481GT6fR4KPH0=; b=Bvq5kqbi1lCpaLGK5cbSQV+VebLYCM5IwSwbbCHbiEmPKX6TIZJFqntst9/+5k7KZN mBeDxjx4APnL4eMsOY2hQQzM/x1EWTWnhs+5pKBJz/x/WQWTHZn0nMP3cu5+u3m6WzQj 6UXD67E5oRJLofxXLy+iQfNccdPCDr7NDDEwWLIT9r/cmWoxq93wEpjmifd3Jg1//UO7 PWCUPSxuB3omn3gd3c9TIS/2CqWuGs0AgalZC6xvuSHX34x1HY4gMF6+PwSzyyiKJ0/r N+6IOdia1Gd35UI6M1isaU/LMJL9XiofLIZYt5fS8tHnE2L68jptmubLUu6kabcVB0zJ ZsTA== X-Gm-Message-State: APjAAAWXhy4Z1C7BdsL853KzwSR5O0yEQqJKQoXw6k1A5INzyrU307Sf vvWbaXdH9HkBcFYkj/tQrxSPGxk1IhH7JZBMGgY9JA== X-Received: by 2002:aca:d558:: with SMTP id m85mr13142937oig.43.1574451288921; Fri, 22 Nov 2019 11:34:48 -0800 (PST) MIME-Version: 1.0 References: <20191120071302.227777-1-saravanak@google.com> In-Reply-To: From: Saravana Kannan Date: Fri, 22 Nov 2019 11:34:13 -0800 Message-ID: Subject: Re: [PATCH] of: property: Add device link support for interrupt-parent, dmas and -gpio(s) To: Rob Herring Cc: Frank Rowand , Greg Kroah-Hartman , Thomas Gleixner , Vinod Koul , Linus Walleij , Android Kernel Team , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 22, 2019 at 5:35 AM Rob Herring wrote: > > On Wed, Nov 20, 2019 at 1:13 AM Saravana Kannan wrote: > > > > Add support for creating device links out of more DT properties. > > > > Cc: Greg Kroah-Hartman > > Cc: Thomas Gleixner > > Cc: Vinod Koul > > Cc: Linus Walleij > > Signed-off-by: Saravana Kannan > > --- > > drivers/of/property.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/drivers/of/property.c b/drivers/of/property.c > > index 0fa04692e3cc..dedbf82da838 100644 > > --- a/drivers/of/property.c > > +++ b/drivers/of/property.c > > @@ -1188,7 +1188,11 @@ DEFINE_SIMPLE_PROP(interconnects, "interconnects", "#interconnect-cells") > > DEFINE_SIMPLE_PROP(iommus, "iommus", "#iommu-cells") > > DEFINE_SIMPLE_PROP(mboxes, "mboxes", "#mbox-cells") > > DEFINE_SIMPLE_PROP(io_channels, "io-channel", "#io-channel-cells") > > +DEFINE_SIMPLE_PROP(interrupt_parent, "interrupt-parent", NULL) > > This one is not going to work most of the time (ignoring the fact that > the primary controller doesn't have a struct device) because the > interrupt-parent is typically in a parent node. Just to make sure, I'm not parsing this property incorrectly, right? Are you saying it's listed at the parent of a bunch of devices and the interrupt-parent is inherited and won't really create device links for those child devices? I mainly added this to make sure IRQ controllers are probed in the right order. Also, if this delays the parent device probe, by the time the child devices are added, the interrupt parent most likely would already be probed. > You could make it work > by specifying 'interrupt-parent' in every node, but that's not a > pattern I want to encourage. I'm trying to take care of the basic per-device properties first. Adding support for inherited properties isn't too difficult, I just need to get to those at some point. Also, for inherited properties, we can't really block probing because the child device might not depend on that resource. Inherited properties are mainly relevant only for sync_state() callbacks. > There's also all the other ways the > parent can be determined. Any parent node with 'interrupt-controller' > or 'interrupt-map' property is the parent. And there's > 'interrupts-extended' too. Now I'm confused. Not sure if you are referring to actual device parent now or if you are talking about an "interrupt supplier". -Saravana > > > +DEFINE_SIMPLE_PROP(dmas, "dmas", "#dma-cells") > > DEFINE_SUFFIX_PROP(regulators, "-supply", NULL) > > +DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells") > > +DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells") > > > > static const struct supplier_bindings of_supplier_bindings[] = { > > { .parse_prop = parse_clocks, }, > > @@ -1196,7 +1200,11 @@ static const struct supplier_bindings of_supplier_bindings[] = { > > { .parse_prop = parse_iommus, }, > > { .parse_prop = parse_mboxes, }, > > { .parse_prop = parse_io_channels, }, > > + { .parse_prop = parse_interrupt_parent, }, > > + { .parse_prop = parse_dmas, }, > > { .parse_prop = parse_regulators, }, > > + { .parse_prop = parse_gpio, }, > > + { .parse_prop = parse_gpios, }, > > {} > > }; > > > > -- > > 2.24.0.432.g9d3f5f5b63-goog > >