From patchwork Sat Oct 9 02:20:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12547273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A85FC433EF for ; Sat, 9 Oct 2021 03:15:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E235760FC2 for ; Sat, 9 Oct 2021 03:15:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E235760FC2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UGB1O4i99J9EkRC75hTxBJ/n+neyFDOGlpEOFNcIrz0=; b=S6ByknsZ/GGEp6 0ouO48+aiuxP6mMAP8JStqYJtytJdSBnnASnPHNW1GgCsES8dR1KOPQHSLV+8gCiNeKGwbkjdWZyz LjcBYBZHZK47ijjlzKlleeLgYm/TXELRYhX2TZz72ofAiuJ6JfJL6TBoUn7WALV42Umkn36ecewc3 0HDqb502Vertv/B1POUJXBsmpHh4EjeKPj3W+j15fxFQ+B7PyQ6HqNlZGe6MBmzE1O2HYjNzy8XrI fGCtq2L/0010cdaUT4LXW55H2G2gxUm58cpMabrSo/JIVrkACBPXBFhhEmr52RGJK+P2fsDNtoc0x gkBGk2NBWry5WvBb69iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZ2nV-004s12-Ut; Sat, 09 Oct 2021 03:13:19 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZ1yf-004Xy2-BR for linux-arm-kernel@lists.infradead.org; Sat, 09 Oct 2021 02:20:46 +0000 Received: by mail-pl1-x633.google.com with SMTP id k8so1850336pls.3 for ; Fri, 08 Oct 2021 19:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dv8ie/kzP99OSKx2zPfoLqRlI0izEadzKVnoX+2n0Ow=; b=XmVZQ8ecVe8ssNoW3ri/l0xaim8HSgzUF8wAV4y3HLNJpdveIMz6JlwIUVyEiWgj4R vr5X0u6sk9Ca5Pdw8C2ckmHkm7tibgMWWAyshNNen99epCOx6IOsEbbTa8+mOPrxucl3 F4YxOKSlw0G1DTsjnFtxO3exNW2jwZcpe8otVI6WAtvF75bryFrdxpZSI6lhiuL/aYzT ZnQbqJOogyH8DTx4Yg2JW0vqrn+jkoV+YPOnUcLEteYbAJAaIyahNwX/ZTGs14GLPE2p I0t73KD1eIZAGOLNopwuBzjzneID8YRilac4sz4oe9MNBQ8AA/ljepB4ytxjTREo432T JoiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dv8ie/kzP99OSKx2zPfoLqRlI0izEadzKVnoX+2n0Ow=; b=EaVe9oHweppA3rbyg3gZm9yelZvnKnMIvH023ukNIpOyGgjp832vq1rfIxLCNLfJ6e +GaggMwhTHnQbRp8Yq1W/izZ+H37RuMK4WHr8bvlLRqbw5NZHFrVJEQfV7CKoiHI2fBz VWAMjGeIiND9+kEFDEvwXCa8STPNkKwyrLKpo2wmByUCUrK3CXagwMqrm+jKp+XVtN5i or7mqhOuwZnsp4Y/lJ9RlUod3Hhcz1dNJIZ2QH+MLr/qXyciFUPV5hE0W7xPojP4qt0l CRAue1MPJFqqNtiLSl1PpJnxfEW+4BaI0Q66RVScrdyo77fxUN5unJjVaImRoR6fV0Ae HSfw== X-Gm-Message-State: AOAM533NMF/SQbJcPqGwzQTFJRw6qYUxE1XaD60mwfdWM5qwrUYOc3aq BFfIAgS5xrczIlBPSZhbPc4= X-Google-Smtp-Source: ABdhPJzF3gI7qfa3LWqIKHoJ03LLsWPTSCV4u1fVS3qzFGwkcYas6/EtejS42d9w4UMRoGhUfYAlzw== X-Received: by 2002:a17:90b:1d0d:: with SMTP id on13mr15716331pjb.118.1633746043559; Fri, 08 Oct 2021 19:20:43 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id pi9sm444692pjb.31.2021.10.08.19.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 19:20:43 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Rob Herring , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Russell King , Catalin Marinas , Will Deacon , Thomas Bogendoerfer , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org (moderated list:ARM SUB-ARCHITECTURES), linux-mips@vger.kernel.org (open list:MIPS), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v4 09/14] irqchip: Provide platform_device to of_irq_init_cb_t Date: Fri, 8 Oct 2021 19:20:18 -0700 Message-Id: <20211009022023.3796472-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211009022023.3796472-1-f.fainelli@gmail.com> References: <20211009022023.3796472-1-f.fainelli@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211008_192045_432772_5BA7FBB9 X-CRM114-Status: GOOD ( 18.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Provide the platform device mapping to the interrupt controller node to the of_irq_init_cb_t callback such that drivers can make use of it. Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli --- drivers/irqchip/irqchip.c | 2 +- drivers/irqchip/qcom-pdc.c | 3 ++- drivers/of/irq.c | 2 +- include/linux/of_irq.h | 5 ++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c index 3570f0a588c4..289784eefd00 100644 --- a/drivers/irqchip/irqchip.c +++ b/drivers/irqchip/irqchip.c @@ -55,6 +55,6 @@ int platform_irqchip_probe(struct platform_device *pdev) if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY)) return -EPROBE_DEFER; - return irq_init_cb(np, par_np); + return irq_init_cb(np, par_np, pdev); } EXPORT_SYMBOL_GPL(platform_irqchip_probe); diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index 173e6520e06e..819a93360b96 100644 --- a/drivers/irqchip/qcom-pdc.c +++ b/drivers/irqchip/qcom-pdc.c @@ -359,7 +359,8 @@ static int pdc_setup_pin_mapping(struct device_node *np) return 0; } -static int qcom_pdc_init(struct device_node *node, struct device_node *parent) +static int qcom_pdc_init(struct device_node *node, struct device_node *parent, + struct platform_device *pdev) { struct irq_domain *parent_domain, *pdc_domain, *pdc_gpio_domain; int ret; diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 352e14b007e7..18f3f5c00c87 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -538,7 +538,7 @@ void __init of_irq_init(const struct of_device_id *matches) desc->dev, desc->dev, desc->interrupt_parent); ret = desc->irq_init_cb(desc->dev, - desc->interrupt_parent); + desc->interrupt_parent, NULL); if (ret) { of_node_clear_flag(desc->dev, OF_POPULATED); kfree(desc); diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index aaf219bd0354..89acc8b089f0 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -9,7 +9,10 @@ #include #include -typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *); +struct platform_device; + +typedef int (*of_irq_init_cb_t)(struct device_node *, struct device_node *, + struct platform_device *); /* * Workarounds only applied to 32bit powermac machines