From patchwork Tue Oct 19 21:58:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12571193 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 17565C433EF for ; Tue, 19 Oct 2021 22:02:26 +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 D65E260E0C for ; Tue, 19 Oct 2021 22:02:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D65E260E0C 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=EONwBbCU6ORSaF f2lR6OqhNCufajGUf2bSG0XwgCTsLY3veivEmzxK/vgWF87ePichTWyyoY/gE0McuXHJnBMHAdnna t3XGempaeIRWckoqKHYGW/3g5qjnBMGqNRsclATGpkk1/quCeLgPxv5lpm8wUfGlq8pUGrP/g3JSY HrrB38mgygOUu3p3fjkfDSv9JclCtspi8CUtsGI3gOCibFpKuF44d2dTmtsukzbfIocPCl3Pv4r1O pGltB/ctWFa2nWB78ntLbmjdSAbdJt+mVGcwkgbnl8Di/yCm+PlloaJTsddcrY74r6ryEgSG2ayQ6 /bGQCLPyYYzAteSpGXyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcxAD-002jiO-Lt; Tue, 19 Oct 2021 22:00:53 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcx8R-002im1-KJ for linux-arm-kernel@lists.infradead.org; Tue, 19 Oct 2021 21:59:05 +0000 Received: by mail-pg1-x531.google.com with SMTP id t184so7650553pgd.8 for ; Tue, 19 Oct 2021 14:59:02 -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=AY2Ha5MT0GGSiAQJtui4C9ngVrORBxADCZ2UfDcWMFG49K8fbexaNgX+wtRbjAPmOs h1EEcZ3Vs5nGsU3lxyyBJQMwREZVYsbTP/YzlXMZWlzD5GbioJ60HLdgBxq2ORiyZHQE 4xyeZJ9jjQsOYUQ61XMmMS62pVe4SGhnSo6SPFOPxwphnh0bXAM/2XCi5hPWH7W7fV/a FodWYf/Ikfz1FcNJecK5z/opptgGMCyXJvoGJlCnRQuG9Y9QYUO0RNppBhkS/g4Jf9TO Zq4H8Ih541/TPH4MSdRSiP1RLwvGXN/GMeWW4RX/0QiH1IfwYTZumd/Vuclo5j+8ay3s 6QYw== 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=n2azWI/yALAXANnXuB3q4Fv+Xo3IVsm0zfAKjpNVhE7zKyGlF/xTapXSoRWqLVu/lR VYbxZ9uCr6f2WQW7NBmUm13/NGf7gXtozuDmFsLn2V4ZDbJPHTDQL5wSM2V/OEz8sU6j RKZcg68odDrsk7Z1YKGQOlTpFl1N+lm4QoYKbqBkBo6nsbbAMwCvL3qM5HUhCJ+DIlwj +MldZXRwJ7rY/8UsMMjw/i0m7zqTKj6j0h9wJ3yK9D9+7dabQ/LkMaIbwxfRNj+AzrYl nYNupvlFIwbq0/G60OnLol0TRojku1bPz5h793/dor1ujsG3xmVk8OKMBQCEJcuk+mhY IKZA== X-Gm-Message-State: AOAM532h04V0AAYKIMPO1CSiZBVadss7zcbcp+yJgI2B0ZSXcCzKi401 B4PQiIcr9YxwoEVWhlnxiU8= X-Google-Smtp-Source: ABdhPJxg80f3aU9s30YTITBpGuu/MH1V8WZnV8yB6ev7fGNeckIaO0jlPiUPY6LwoY00LNnGswTQWA== X-Received: by 2002:a05:6a00:1a8e:b0:44c:5f27:e971 with SMTP id e14-20020a056a001a8e00b0044c5f27e971mr2464454pfv.72.1634680742412; Tue, 19 Oct 2021 14:59:02 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id bf7sm139325pjb.14.2021.10.19.14.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 14:59:01 -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 v5 01/14] irqchip: Provide platform_device to of_irq_init_cb_t Date: Tue, 19 Oct 2021 14:58:42 -0700 Message-Id: <20211019215855.1920099-2-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211019215855.1920099-1-f.fainelli@gmail.com> References: <20211019215855.1920099-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-20211019_145903_706534_47161F67 X-CRM114-Status: GOOD ( 18.94 ) 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