Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6781208rdb; Tue, 2 Jan 2024 13:14:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3rA1OAl0LJb7Rn2OEbZ0eJyWSCj2lzrbkUcVvBYWMYp3Yv3gFniL4QcO/QVim5N1AMYp2 X-Received: by 2002:a17:90a:fe82:b0:28c:caf1:f80b with SMTP id co2-20020a17090afe8200b0028ccaf1f80bmr74363pjb.26.1704230045442; Tue, 02 Jan 2024 13:14:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704230045; cv=none; d=google.com; s=arc-20160816; b=t54VItpfhsAchRUviRLyyxwwDY51RXIy3r3FQtaVSRSFxqrOdRplO4eC4MUUDgEIup CePmX/p6vVDVgtOPQQNrytyFLjNcc2ZTaJ+j6gxUkWIALa2wbLBwOt4v8Q7gSIwedRO+ 5/ydFsIna5yhp8b+RsYZ3a9lRq4fLrUGmjeANqnWUN0+8OF64Yd2fh5hMT6HOnVS2Vdt G82GZ5KdP1fWCvSXh1GXa6FpmpFD9K+MkLD7iaUc+TdQAOJef6engCqC8HtlbfjHQjvS 0ckRCd9OwXzwNBfcVSFb5epbfGMf+NsoW92xJFx1cY67bBEzGIqvW4uFXvHXhLklTtJU v+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mrqyCRQGWqtYZon/B8x6Cl4Beyi5N2srdFtijVb67bM=; fh=GIXp3Un6gCk2tdqRQywS+QjQ3DWCya/DIYXQDtsL7bI=; b=Q0tvFXiNigugd3t5qNi5WAZn4BfMh6OK1O8hwoVYi69gUblKYNNb0DGFqtbM6pHEMt 4FzyReVPj22wFL6j0lfsWho7sWT9b4vRmuA7JBb+WQGj+VdbpHu5nSN2qaVJj7h8emdq 9QAkMbfuhbawXjVdOic7fRg500CqyZs73hzyu6JG4OeOp2RqxY5qqX1oXHYWwqG66qo9 N5qL6iyzG+gOvW7zAy+Oxv3T4n2JjVg4v0bwKjKpEVbVRn9GodTGe9lQIZLsSa70sZzR KR5x/qFRPwjAH6VDliQWHg0TJuF+5PAHbyclOVAKW3HCvl2Bbhii9XSD91yTX8Ndo1eI NuUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Jd+OrY9Y; spf=pass (google.com: domain of linux-kernel+bounces-14843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id co20-20020a17090afe9400b0028c1c0ab028si78985pjb.75.2024.01.02.13.14.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 13:14:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Jd+OrY9Y; spf=pass (google.com: domain of linux-kernel+bounces-14843-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14843-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1EF5E284681 for ; Tue, 2 Jan 2024 21:14:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ABA5A199A1; Tue, 2 Jan 2024 21:09:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Jd+OrY9Y" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8350218ECB for ; Tue, 2 Jan 2024 21:09:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-35fe47edd2eso20695865ab.0 for ; Tue, 02 Jan 2024 13:09:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704229740; x=1704834540; 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=mrqyCRQGWqtYZon/B8x6Cl4Beyi5N2srdFtijVb67bM=; b=Jd+OrY9YWz3i/Dgd40CfK61o+Ojf3v5aYpvPs2XixprcNnM76DiksrFsbbvnYCw1F/ NsxXHGO/4IdweWWLAfvIFHf3LCILdaCKVxlgufoMIRO5YwRMy8+w1Zs+GD/2UzJNi/6Q 4C4KqXzv4tj0m1mlNjS+7c7LM29ibY27GoC8Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704229740; x=1704834540; 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=mrqyCRQGWqtYZon/B8x6Cl4Beyi5N2srdFtijVb67bM=; b=g99TlKcnX2a86hOv18ZUq9wlLTmnot74zH2AdQJ4aL/2MTgEyF8k6ibq6n7BWpsgFq HB3PazDILxhqh8o2rhVNNKXWJeB3cqO4iw71chEnGSAI9UmdAKzDbeZsNgGeAlLX/Vjo XBisXZV7DvUWbL/gDmmWKPfgWcgYcCptlhDY7OTMb2Jq4cC80XmDzDQpjkWTBAC9GwIl Ip7DfbcTWu6poRw0pI37vkmu9Fir6vnlB3fZhAIQ29YfMBzwg6i1ImPuLW/mU8zYYeK2 EPmEmkZY+/SyubtfDpwnOGLWNx17dpMWL1RETthERuM2g48k4ytHRvHAPo1U+hXW+mNm S/Kg== X-Gm-Message-State: AOJu0YywHGWtmbFru5tYoH3HFXKCU2rmaYNrC6nlF9JtrLoOAT6vTtxa VFnx/RhGR6HzYnyVOVlm5tx9OlcnfESFZ0U3jK1rjGzFQNBL X-Received: by 2002:a05:6e02:1a0e:b0:35d:59b3:2f7d with SMTP id s14-20020a056e021a0e00b0035d59b32f7dmr40919ild.18.1704229740602; Tue, 02 Jan 2024 13:09:00 -0800 (PST) Received: from markhas1.lan (71-218-50-136.hlrn.qwest.net. [71.218.50.136]) by smtp.gmail.com with ESMTPSA id bo18-20020a056638439200b0046993034c91sm6956978jab.77.2024.01.02.13.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 13:09:00 -0800 (PST) From: Mark Hasemeyer To: LKML Cc: Sudeep Holla , AngeloGioacchino Del Regno , Rob Herring , Andy Shevchenko , Krzysztof Kozlowski , Konrad Dybcio , Raul Rangel , Tzung-Bi Shih , Mark Hasemeyer , Frank Rowand , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH v4 19/24] of: irq: Add default implementation for of_irq_to_resource() Date: Tue, 2 Jan 2024 14:07:43 -0700 Message-ID: <20240102140734.v4.19.I31d4dd6a7e5a3e5eee05c87b358e63cd1aa0e467@changeid> X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog In-Reply-To: <20240102210820.2604667-1-markhas@chromium.org> References: <20240102210820.2604667-1-markhas@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Acked-by: Rob Herring Signed-off-by: Mark Hasemeyer --- Changes in v4: -Add Rob's Ack tag from v2 include/linux/of_irq.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index d6d3eae2f1452..0d73b2ca92d31 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,7 @@ 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 +75,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