From patchwork Thu Sep 20 12:12:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11542 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A02411B4E37 for ; Thu, 20 Sep 2012 12:13:13 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id CF36DA1922F for ; Thu, 20 Sep 2012 12:13:12 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so2722067iej.11 for ; Thu, 20 Sep 2012 05:13:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=e9j3jZgQ6cSLqncIyoVmGAosC+rEzz1EEG7cpjGFC40=; b=eBqAEhefVg/5RokJE1nps5i1dYn6d87qkjaYoQc1rJTdMIwk62fV8j/e2rCkk53f7L Lx/0h5GE3xaAq4iCnVsoMM3eGPhOQkyMcWLrPssD5h8CRmbRIjRUAKmtGgjK4i1sCLTL wxGno+GfZTn324GdHBiCQVRmkRRsbcQXNiTCZZ/gozpY5QfNTMxnKaATw5MYBbKgZvrF FFEOm5icwolplHqJiuuHO0qSdZ0Pgj/9P+/ROGeQ+taZzNM7swSDICSZiEpn8FtDHjMM WkmtYB7KRKe+fG8IRunrgtf7ZErceNBIUNxICjUKrbxcgX+jHsuOI/zQoD5H+x7+UY8l gsVg== Received: by 10.50.217.227 with SMTP id pb3mr2208894igc.28.1348143192541; Thu, 20 Sep 2012 05:13:12 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp71583igc; Thu, 20 Sep 2012 05:13:11 -0700 (PDT) Received: by 10.180.14.74 with SMTP id n10mr4116909wic.17.1348143191179; Thu, 20 Sep 2012 05:13:11 -0700 (PDT) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id d6si41909124wiv.2.2012.09.20.05.13.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 05:13:11 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by weyu7 with SMTP id u7so1482367wey.37 for ; Thu, 20 Sep 2012 05:13:10 -0700 (PDT) Received: by 10.216.162.141 with SMTP id y13mr1073206wek.14.1348143190483; Thu, 20 Sep 2012 05:13:10 -0700 (PDT) Received: from localhost.localdomain (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPS id w7sm32394460wiz.0.2012.09.20.05.13.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 20 Sep 2012 05:13:09 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: STEricsson_nomadik_linux@list.st.com, linus.walleij@stericsson.com, arnd@arndb.de, olof.johansson@gmail.com, Lee Jones Subject: [PATCH 05/32] of/irq: Create stub for of_irq_find_parent when !CONFIG_OF Date: Thu, 20 Sep 2012 14:12:23 +0200 Message-Id: <1348143170-2130-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348143170-2130-1-git-send-email-lee.jones@linaro.org> References: <1348143170-2130-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQna1xZzCFLVFn+qTtJ4IagfLuK73bMHu+PPqVLnCu+hCn+4/ig8ZUKwF14yZLQ/1abDKTCG of_irq_find_parent is a handy function to use outside the confines of the Open Firmware subsystem. One such use-case is when the IRQ Domain wishes to find an IRQ domain for a given device node. Currently it can not take any notice of the 'interrupt-parent' property. Instead it just uses the first IRQ controller as it climbs the Device Tree. If we were to use this as a precursor the resultant controller is more likely to be correct. Acked-by: Rob Herring Acked-by: Linus Walleij Signed-off-by: Lee Jones --- include/linux/of_irq.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index 1717cd9..b8e2411 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -83,6 +83,11 @@ static inline unsigned int irq_of_parse_and_map(struct device_node *dev, { return 0; } + +static inline void *of_irq_find_parent(struct device_node *child) +{ + return NULL; +} #endif /* !CONFIG_OF */ #endif /* __OF_IRQ_H */