Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp219150pja; Fri, 22 Nov 2019 05:38:35 -0800 (PST) X-Google-Smtp-Source: APXvYqxEVaiwsH+3INXbmEdyTdIHGHJ0zzOx8bWWoC6yQe0JJVlDvIK9siAFppIA2Oq/K/KMj/7k X-Received: by 2002:a50:c408:: with SMTP id v8mr1123084edf.140.1574429915808; Fri, 22 Nov 2019 05:38:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574429915; cv=none; d=google.com; s=arc-20160816; b=O8ESzkJJUpnYK8l+0Am4n5PODJ+37/xrdB/DikgK8ikBM+AfkP9b7PTo9KcnBP5KKm jLsuivHTZeHmYwXIdvb+QD093VJ3abFIH50Lj+OZU/OjHSTu9fGayKOIzKbXx3feW/TO 5fMGt4e1xDPhJ91hep9OFC4ZxVe3DiGNm6mkoRFrf0uJXN93Un0FIvJHaS2hr3IxRkcL dCUEewNt4z2J9eZ+fJ06wg/yE+5p+Aho3/SmYmTwYNFekWjggiAC34EvAeml4xEhgeSU O5PjUKp9sEAcLCzXwHSfEJE3Xp4xcg9Az1/ysjN0esli3aWfL+vCRYhCkdglk9bb/lDq qFmg== 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=S7n1bNi/iWjBnRYWr6g2i2lnuN5sCVoOHDDoiet6C5M=; b=FEc6ijmsWg4xvuV/L+I1rtrV9ExQ0TKgIVebAjCSURkpQWgjjQviB5Ly7sQVhHAA0u eYZHUmelS+S5APAKbxgGNlRhyn+L7Vm91AvTkPdi7W4Aa3UA8rnfny/+UIwxRQ/1s0/X s7vwF/JlIOm+j1Q3fXucp220th9JjtC8Prn4iaO8L8zOD2zdHYWi7ySjrop7+5ZpM5ER 4M6YSIlAWx8ZJPnVfH6Is9Ptg6viujHTR7eVEaLd53nEs8uf/PZn/T1Oci18O1PhXE1D 0Q8LVeco3jrd0Z4L/4flApIzvwzhUaQDgBC8bEmvqCkSMFydjNpSuxRuMCjattka3Oeo gGWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dpbMT4Xw; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n13si702358edr.73.2019.11.22.05.38.12; Fri, 22 Nov 2019 05:38:35 -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=@kernel.org header.s=default header.b=dpbMT4Xw; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726961AbfKVNfG (ORCPT + 99 others); Fri, 22 Nov 2019 08:35:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:56588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfKVNfF (ORCPT ); Fri, 22 Nov 2019 08:35:05 -0500 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D0F9F2077B; Fri, 22 Nov 2019 13:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574429705; bh=Xc8NEhUH7x1Ru0D5hE6DS/61EqvwOoHXnghK6Qnxolg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dpbMT4Xw98yDPO1nvqRYpcpH2lGk+6hOAUBQbwZNtohXzMR5SwP0c2wMxu9jC8LF4 E1GO/L9BRDCbTqGJ860Rq9w23C5lG7N8QUTQhEwWIGGvRJz+Sq/II0Km1U24I9hG+w wW5wzCJKW0ZjceFRSzBD5XLu92320Q6QETL422DE= Received: by mail-qk1-f173.google.com with SMTP id z65so1465163qka.6; Fri, 22 Nov 2019 05:35:04 -0800 (PST) X-Gm-Message-State: APjAAAVAG0UnsZex8tr7Yak7YMu3chi5HIdAkRoC6MiSkVElS7ddM2Z7 uacYp3m8hWBthu64niV71S3Bukyc214+LjN9Eg== X-Received: by 2002:a05:620a:226:: with SMTP id u6mr13116027qkm.393.1574429703879; Fri, 22 Nov 2019 05:35:03 -0800 (PST) MIME-Version: 1.0 References: <20191120071302.227777-1-saravanak@google.com> In-Reply-To: <20191120071302.227777-1-saravanak@google.com> From: Rob Herring Date: Fri, 22 Nov 2019 07:34:51 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: property: Add device link support for interrupt-parent, dmas and -gpio(s) To: Saravana Kannan Cc: Frank Rowand , Greg Kroah-Hartman , Thomas Gleixner , Vinod Koul , Linus Walleij , Android Kernel Team , devicetree@vger.kernel.org, "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 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. You could make it work by specifying 'interrupt-parent' in every node, but that's not a pattern I want to encourage. 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. > +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 >