From mboxrd@z Thu Jan 1 00:00:00 1970 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 94E3EC4167B for ; Tue, 28 Sep 2021 18:23:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78BE460F70 for ; Tue, 28 Sep 2021 18:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242246AbhI1SYk (ORCPT ); Tue, 28 Sep 2021 14:24:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242256AbhI1SYY (ORCPT ); Tue, 28 Sep 2021 14:24:24 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A3CBC06161C; Tue, 28 Sep 2021 11:22:36 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id b22so4000870pls.1; Tue, 28 Sep 2021 11:22:36 -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=3QThqxTZ5uzX8g3SWHj4WUPibxza6P9n5f90ZfsEf6I=; b=MmGuTkaJ0F6u+7C//ugUwBLAcl24MNApoeX+TSLBrVHYBHQZk9M+cHCz5KQNfeFz7O zH3Fv+HZpAFyed+/YYn047pkbWXCVyxxti5zUZeiv5zZPG8EphAvixN/GPgQK5xV1bJf o4hSWKG9vF0nnikfqJB1WE24B/ChltSpqrRjLWo4kU9ojUmJ1gfM0n+GEFGQch89CRRJ F46MWu7Wr/tkUytzjt+3fZZkqdih/gYK/nm+xdC0Znqnln5vTEQacwFId4Q879djTOcM vI2aBZEjCoCyRuT5DO4MZHoWg0v1O4JHP14zaDCl9dwdcTJWROqFShzMBaXpFjpiK7Lm 5QlA== 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=3QThqxTZ5uzX8g3SWHj4WUPibxza6P9n5f90ZfsEf6I=; b=vpxJblG15+OjrKjsCF9RlFG1sJLnZArqf0RkTEeJtXgjhMPAlB6jZU5zT8RJ+DhiDA B0LFf3A4HSFF0YfFjETDPwtmoKO/RP4YJnmLYeSxu7dLLs6mK4/2mhaW1Id5TVHHGn+v bHbOW6+BRclm7CRSFwI1rhj3JywvzYw/pumaJ+1/GLtut0Nami1QwHvl15+bEjcoE6qR zjt+9sx4mlVOcEa7Q5l9qrvPNxLP9hEoZaD8bKtDsrdWGCr14hLGI1Ogo5NqLubuf+bQ Pc+XdfeFI+HHRl9hF7vVn99h9a2xQwCKMbpdNNvnp/k5JXMdd9DHcs0FjQd0EENcj9Ne wqXQ== X-Gm-Message-State: AOAM5337hAo1lfjvls6hGiVfH/v+wjK3ZjiWkNgHgMenYraUnLMknbBC h4gk/09pjL+Szjq33dyE/gCTe+ReQi8= X-Google-Smtp-Source: ABdhPJx8tmBo/AWrmQZYNo1TqTWhR59dq84XAd8DRwqLZN6020NHT9iGw4RwDY26Wsrx+lOWDWHmRg== X-Received: by 2002:a17:902:9689:b0:138:d2ac:44f with SMTP id n9-20020a170902968900b00138d2ac044fmr6285282plp.85.1632853355713; Tue, 28 Sep 2021 11:22:35 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:35 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , 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 v3 09/14] irqchip: Provide platform_device to of_irq_init_cb_t Date: Tue, 28 Sep 2021 11:21:34 -0700 Message-Id: <20210928182139.652896-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. Signed-off-by: Florian Fainelli --- drivers/irqchip/irqchip.c | 2 +- drivers/of/irq.c | 2 +- include/linux/of_irq.h | 5 ++++- 3 files changed, 6 insertions(+), 3 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/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 -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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 92C2DC433EF for ; Tue, 28 Sep 2021 18:27:51 +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 53042613A6 for ; Tue, 28 Sep 2021 18:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 53042613A6 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=2C48vHkw+4hko1sJXD7FI9tK2n6bZgAaWj9hkfhxc8o=; b=diCz4WThDiLnhx /qX6ilasv2TpwcngJGGQg1wJ4k2vBecwMAkdok/4UCyFDPmERqW6ISE9ngPuJ072lwZt3CMYlE3Oa Glcp49EAvFuhx3vsg/EeLOxub6SlCnaD3bOlNhlkoNrygVxCFyA5n0O7nQuCWObkm3MqS4JM/TBu7 52/cDwt6naQcIcqwaGoj0haAJR6HAHCKfTYOeYGEnRm3hv9fI9GZ7zkXsnr6Mx+l/5X0N9seSmxEW IiPvvvQor5QZh+sW9VGhnVvCSkxuOrGBDFIfk1Op/LwMmOcTZR3Ka1D2tzywWtslRIwKsUm3WTW5H Q8M3sSKoxoJWeyadas6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHnn-008PlR-LK; Tue, 28 Sep 2021 18:26:04 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVHkS-008OD7-SX for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 18:22:38 +0000 Received: by mail-pj1-x102d.google.com with SMTP id om12-20020a17090b3a8c00b0019eff43daf5so3493947pjb.4 for ; Tue, 28 Sep 2021 11:22:36 -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=3QThqxTZ5uzX8g3SWHj4WUPibxza6P9n5f90ZfsEf6I=; b=MmGuTkaJ0F6u+7C//ugUwBLAcl24MNApoeX+TSLBrVHYBHQZk9M+cHCz5KQNfeFz7O zH3Fv+HZpAFyed+/YYn047pkbWXCVyxxti5zUZeiv5zZPG8EphAvixN/GPgQK5xV1bJf o4hSWKG9vF0nnikfqJB1WE24B/ChltSpqrRjLWo4kU9ojUmJ1gfM0n+GEFGQch89CRRJ F46MWu7Wr/tkUytzjt+3fZZkqdih/gYK/nm+xdC0Znqnln5vTEQacwFId4Q879djTOcM vI2aBZEjCoCyRuT5DO4MZHoWg0v1O4JHP14zaDCl9dwdcTJWROqFShzMBaXpFjpiK7Lm 5QlA== 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=3QThqxTZ5uzX8g3SWHj4WUPibxza6P9n5f90ZfsEf6I=; b=pDvCmFOoldO4nKuHf9qwEpMEbSAb6xII0FH+vAs8BBI+1dI3xVxsH/J7lGQWMGVMKG 23h7jzP9g8Ggc9dZkQkLp0M4IlDq+dGM1WM7A5MElGIjBR1eYBLsSbMjWvKJgU4n+d1D reuPEib3hWkiDmdg3U1AI95482K02sVs0aGJUpP2/0e69nrmGWF28cFJ1tQAamyNdYZF klbTaRgK5l5GHeGJy9aIioj/jePSk7pBCFMYC9rrMgnCXgcooQdx3NOrgLk29VNw77R9 0I+g+qFoHRs87aAGhVqdYodg60FRFnQCqGzVJb8w5kEvNjbiMLPtyK2eIussQqkAfsmg dzIw== X-Gm-Message-State: AOAM53381ajIXDTSB+QQt5rSKqenGgy9VJ7XoNdikAd5xbEV6fqRU4E8 5WClF7Nq0Psr+eaFPHZzDHwpClMmNMc= X-Google-Smtp-Source: ABdhPJx8tmBo/AWrmQZYNo1TqTWhR59dq84XAd8DRwqLZN6020NHT9iGw4RwDY26Wsrx+lOWDWHmRg== X-Received: by 2002:a17:902:9689:b0:138:d2ac:44f with SMTP id n9-20020a170902968900b00138d2ac044fmr6285282plp.85.1632853355713; Tue, 28 Sep 2021 11:22:35 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id x19sm20855288pfn.105.2021.09.28.11.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Sep 2021 11:22:35 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , 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 v3 09/14] irqchip: Provide platform_device to of_irq_init_cb_t Date: Tue, 28 Sep 2021 11:21:34 -0700 Message-Id: <20210928182139.652896-10-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928182139.652896-1-f.fainelli@gmail.com> References: <20210928182139.652896-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-20210928_112236_952279_1EA46C29 X-CRM114-Status: GOOD ( 18.71 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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. Signed-off-by: Florian Fainelli --- drivers/irqchip/irqchip.c | 2 +- drivers/of/irq.c | 2 +- include/linux/of_irq.h | 5 ++++- 3 files changed, 6 insertions(+), 3 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/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 -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel