From patchwork Thu Aug 9 15:53:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 10642 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 5AAB523E40 for ; Thu, 9 Aug 2012 15:54:06 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2A2E0A18278 for ; Thu, 9 Aug 2012 15:54:06 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so593022ggn.11 for ; Thu, 09 Aug 2012 08:54:06 -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=EPfrITz0CDeRRV1n7LpXnvGZmht9PJLkHoVvqquFQUE=; b=ckoSUxPhkSOW/5qS/K/PkzKIPGRXd8tOd22ARs0dXrb+yyxNAVc8jToh1mBGm23lc8 GXabtPbkNVJN+R2cx4KFgVKGpCxVrhUN0qaZflF7FaE6N+H7XYIdUIKOYx9Tx0tGUS0X s7njir12GvyGPHBmIHYao/ga3dJQc54rLIjGHodHIPBZx0dqL95O2Ukls6BZQ47PXNc+ Sg1VTpkoeuTgMannII2qYFm6f0OCT0UcWKqA8XH+AsC/OJfmQ/4fNwVSvegP0rD5IuHZ SHGrEsQkyLGVEoRmD67fOe+CwmHMgzsmrBlQOQ9DArQ8gWuC9PgZukkdhioxK964p2w2 uXwg== Received: by 10.50.181.136 with SMTP id dw8mr1608735igc.31.1344527645534; Thu, 09 Aug 2012 08:54:05 -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.200 with SMTP id ew8csp15555igc; Thu, 9 Aug 2012 08:54:04 -0700 (PDT) Received: by 10.216.181.67 with SMTP id k45mr1967642wem.17.1344527643924; Thu, 09 Aug 2012 08:54:03 -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 q10si2978488wiz.18.2012.08.09.08.54.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:54:03 -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 mail-we0-f178.google.com with SMTP id u7so485525wey.37 for ; Thu, 09 Aug 2012 08:54:03 -0700 (PDT) Received: by 10.180.106.97 with SMTP id gt1mr4025801wib.5.1344527643460; Thu, 09 Aug 2012 08:54:03 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id cl8sm2302659wib.10.2012.08.09.08.54.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Aug 2012 08:54:02 -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, broonie@opensource.wolfsonmicro.com, Lee Jones , Rob Herring , devicetree-discuss@lists.ozlabs.org Subject: [PATCH 1/8] of/irq: Create stub for of_irq_find_parent when !CONFIG_OF Date: Thu, 9 Aug 2012 16:53:48 +0100 Message-Id: <1344527635-6163-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1344527635-6163-1-git-send-email-lee.jones@linaro.org> References: <1344527635-6163-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnm9M7otAdy0JtqTpQ0XhvA5o3cytp7OlsnSxUzm04ws415qVSUS7VyueithAWIAAzH5DGj 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. CC: Rob Herring CC: devicetree-discuss@lists.ozlabs.org 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 */