From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754892AbcC0Dv3 (ORCPT ); Sat, 26 Mar 2016 23:51:29 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34348 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754660AbcC0Dv1 (ORCPT ); Sat, 26 Mar 2016 23:51:27 -0400 From: Jianyu Zhan To: jiang.liu@linux.intel.com, marc.zyngier@arm.com, corbet@lwn.net, grant.likely@secretlab.ca, cernekee@gmail.com, ralf@linux-mips.org, rdunlap@infradead.org Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jianyu Zhan Subject: [PATCH] Documentation/IRQ-domain.txt: Document irq_domain_create_{linear, tree} Date: Sun, 27 Mar 2016 11:51:20 +0800 Message-Id: <1459050680-3053-1-git-send-email-nasa4836@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <56F6C127.3020405@infradead.org> References: <56F6C127.3020405@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org They have the same functionalities as irq_domain_add_{linear, tree}, except fro accepting different first argument. Signed-off-by: Jianyu Zhan --- v1->v2: Fix spelling error. Documentation/IRQ-domain.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt index 8d990bd..89dda22 100644 --- a/Documentation/IRQ-domain.txt +++ b/Documentation/IRQ-domain.txt @@ -70,6 +70,7 @@ of the reverse map types are described below: ==== Linear ==== irq_domain_add_linear() +irq_domain_create_linear() The linear reverse map maintains a fixed size table indexed by the hwirq number. When a hwirq is mapped, an irq_desc is allocated for @@ -81,10 +82,16 @@ map are fixed time lookup for IRQ numbers, and irq_descs are only allocated for in-use IRQs. The disadvantage is that the table must be as large as the largest possible hwirq number. +irq_domain_add_linear() and irq_domain_create_linear() are functionally +equivalent, except for the first argument is different - the former +accepts an Open Firmware specific 'struct device_node', while the latter +accepts a more general abstraction 'struct fwnode_handle'. + The majority of drivers should use the linear map. ==== Tree ==== irq_domain_add_tree() +irq_domain_create_tree() The irq_domain maintains a radix tree map from hwirq numbers to Linux IRQs. When an hwirq is mapped, an irq_desc is allocated and the @@ -95,6 +102,11 @@ since it doesn't need to allocate a table as large as the largest hwirq number. The disadvantage is that hwirq to IRQ number lookup is dependent on how many entries are in the table. +irq_domain_add_tree() and irq_domain_create_tree() are functionally +equivalent, except for the first argument is different - the former +accepts an Open Firmware specific 'struct device_node', while the latter +accepts a more general abstraction 'struct fwnode_handle'. + Very few drivers should need this mapping. ==== No Map ===- -- 2.4.3