Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5489580rdb; Wed, 13 Dec 2023 10:02:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IH92MIBlikcu8YW5Ikaf8kxtG/BjjHkXPBU0yAC/MhBRKkCL/UZelmJR6rw4GUrIbv260+H X-Received: by 2002:a05:6a20:8f13:b0:18c:64b7:b217 with SMTP id b19-20020a056a208f1300b0018c64b7b217mr10007086pzk.22.1702490530777; Wed, 13 Dec 2023 10:02:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702490530; cv=none; d=google.com; s=arc-20160816; b=KRzQMJePz0VPT/BVRY7i8BgmWpLas4Wbj62NREA9/XjDUAOznUSQi65+0wPF3RvA7H zZS/VihGAELoyvuNahv6um5SE3G38es96JO+qdVJdxK3ksk+0ieMIPmUU5LUsUM3rJg3 ZfZo7/YwnnXQs2RGD+jl8APWf5Wl7SCZE7GGzMIEwu//3GSzpVmLArygxYd+YR4DvOc+ IaFNcvWQDX3ccCSbeRy8o/yR21qyM4oUkCBogiwXLkNmF1+kvDiToj/FftSG1N/Ivpnf x+L8IMvThfIC8WtEKzRz5ovgGdL4VjHK5tnzZo6pRl+4pScMHlj3Ufh+4SPPGPxtwUJd Nefw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/W+jCmhtVUK3Oan20pcyAoaX1l8QrXEMpfoAzq+htTI=; fh=zxG5iud9xF1D6IY8H/gUMSGI5vQPvUvLe4axMqsZymY=; b=wFFAob38CuLhiWL8cDbi6J2aa8DqCGlQxG/pLcoL8hc0xbwcBmlsOn+tE2agmCZ3ZN zAI8uIMc+URX/ziykZGMrdrDp6Dw3XPdnh3ZO5ELe3+fG3eUtilviO4IHfvURBJpSDHE vFY40hKlDD8vEO91nhOCkayt3AK/DdIoIAKf+FpLuPUWvqvmTtMfJZh0Z/NyV4MCdBLn 5GXP26SvH4j9cYF7iTPREYGGiARdNvAhQn89TtQwW4MZcPCy7HeKip67B7R+UvBxHt1x 5N1EeLjHRW18FFTbvm7zTYWE3ZCmlzTzbLmaBk/7SpxNN6KZGlT9Z9S9V6tvyCu6+RqX 5Bjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K3uuzmd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id i12-20020a63cd0c000000b005c676c2d80bsi9794010pgg.389.2023.12.13.10.02.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:02:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=K3uuzmd2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 32CF98095F53; Wed, 13 Dec 2023 10:02:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378958AbjLMSBj (ORCPT + 99 others); Wed, 13 Dec 2023 13:01:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233645AbjLMSBc (ORCPT ); Wed, 13 Dec 2023 13:01:32 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07A510A for ; Wed, 13 Dec 2023 10:01:38 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id e9e14a558f8ab-35f71face1bso4229275ab.1 for ; Wed, 13 Dec 2023 10:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1702490498; x=1703095298; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/W+jCmhtVUK3Oan20pcyAoaX1l8QrXEMpfoAzq+htTI=; b=K3uuzmd2WbSz2A8XCRYtvEjPlaG28elxyT2ZLFTIIkr/wVGwhpPttmE4sc45Yul2l1 Mu09fcLdOaHgpRyCeFEW0nInQYk8IhvmCIUrmlzehtkTpv9e8DgAca8nShBj6BRarEZm 1qyT5jSkVXLDbTm9jcz9q9IogBPwKcLYoQ2Fo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702490498; x=1703095298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/W+jCmhtVUK3Oan20pcyAoaX1l8QrXEMpfoAzq+htTI=; b=LrqnMV8pxJveLHvwEKlsM7I0zXL2vjb0IuyxZtEqW8l+SDiiqj7T9PSXM62oYVeY1E KKxxO1JVzin2L4QuDYj3m8r4iuA9cONTKe6JTgXXVyNMDduvRi+BdwyF5Az22E+TtAER 7jCHBEQTEHhqeQW0Lf+AYEDXWo1n9AF+ZUVkbIJrKJjHA43X4zc02zIs9fSAB/KltKFl FkEtoxizUm9gkTICCAYLHd7ZI7r+AU9UZnwH4lPtnbhNq2tTnGRZnDwYauRnCY8zmCqk WUDbXwkdcZWlllivqIlgxBJC6BeTb6bjmX29CxnDKKELmkIT1xH3QtNshyt8aUEUhwST ZeKw== X-Gm-Message-State: AOJu0Yx00sQOJ6vUxVaIECmDa+UgZZfakmkKa7nl4ljGq9T9DY6PsuaD +nPN+/puX4V/cXMAnxmZSQzZEamAJ/S6PpcyWmY= X-Received: by 2002:a92:d948:0:b0:35d:59a2:92ab with SMTP id l8-20020a92d948000000b0035d59a292abmr7913891ilq.63.1702490497991; Wed, 13 Dec 2023 10:01:37 -0800 (PST) Received: from markhas1.corp.google.com ([100.107.108.224]) by smtp.gmail.com with ESMTPSA id o28-20020a02cc3c000000b0046671f9717csm3161206jap.109.2023.12.13.10.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:01:37 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: Raul Rangel , Mark Hasemeyer , Frank Rowand , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v1 4/6] of: irq: Add default implementation for of_irq_to_resource() Date: Wed, 13 Dec 2023 11:00:22 -0700 Message-ID: <20231213110009.v1.4.I31d4dd6a7e5a3e5eee05c87b358e63cd1aa0e467@changeid> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20231213110009.v1.1.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid> References: <20231213110009.v1.1.Ifd0903f1c351e84376d71dbdadbd43931197f5ea@changeid> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 10:02:03 -0800 (PST) Similar to of_irq_to_resource_table(), add a default implementation of of_irq_to_resource() for systems that don't have CONFIG_OF_IRQ defined. Signed-off-by: Mark Hasemeyer --- include/linux/of_irq.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index d6d3eae2f1452..817c7510082cb 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -34,8 +34,6 @@ static inline int of_irq_parse_oldworld(const struct device_node *device, int in extern int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq); extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data); -extern int of_irq_to_resource(struct device_node *dev, int index, - struct resource *r); #ifdef CONFIG_OF_IRQ extern void of_irq_init(const struct of_device_id *matches); @@ -44,6 +42,8 @@ extern int of_irq_parse_one(struct device_node *device, int index, extern int of_irq_count(struct device_node *dev); extern int of_irq_get(struct device_node *dev, int index); extern int of_irq_get_byname(struct device_node *dev, const char *name); +extern int of_irq_to_resource(struct device_node *dev, int index, + struct resource *r); extern int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int nr_irqs); extern struct device_node *of_irq_find_parent(struct device_node *child); @@ -76,6 +76,11 @@ static inline int of_irq_get_byname(struct device_node *dev, const char *name) { return 0; } +static inline int of_irq_to_resource(struct device_node *dev, int index, + struct resource *r) +{ + return 0; +} static inline int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int nr_irqs) { -- 2.43.0.472.g3155946c3a-goog