From patchwork Tue Sep 28 02:27:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 12521587 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 E85F8C433F5 for ; Tue, 28 Sep 2021 02:33:38 +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 AF54261156 for ; Tue, 28 Sep 2021 02:33:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AF54261156 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=ZsJtkDJvhBQjiT 4MpJy0FXgyv/XkE7QXP60NcUAV4UfvUSYr2himW3vuaPyYZoZ5AepdG8rygvAeO1biq0gz/zTc3eu 981FwzaMjiuGunii4bYbVVsQRl17IcVrRcRhV1LJ0apbf17bnyYlDJkJ1N25c7KuQEKFFlF5OUPua M5WiifO8KTC9J21TLh37fhqWATMgjttFhlwPikh6+7LtpsxN80EzqGNi3BheHkQktdMEsnunc33OV XWD9P5Um82wGRiZGvgMSc8FMMpcv0jcubITpgakogQMxTpHf/ZSXrBrh80c03uBczyF6XouzqhvNI RydFYw9m1gXh3ljCrrKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV2uM-005Heh-Tn; Tue, 28 Sep 2021 02:31:51 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV2rv-005GXF-Mc for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 02:29:21 +0000 Received: by mail-pf1-x432.google.com with SMTP id y8so17623252pfa.7 for ; Mon, 27 Sep 2021 19:29:19 -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=Sc/fOiG5FBGWfD5Mpa7eQeAjpUOeeIAanPYOEnXV7MsFIytNZUAPeGAK2MGtkwMczA nMW8dZ3yeNayGVC7uSbak+6ixei0Je+rr23F+J7R3qI4qhpTNcWcTp0LuhkF37OG979M iabGp88RfBqq84xEfWA+p+SyCIyFGN+uAPz7WunxzeU6EVhSrsYOD+hDYpy6G4HnZTia M3HEf30SrxwY+5+1AyAvgjgySCzfTY2CjiWSMcBXYFUE0GfDEV326E91R7hLr8DzbTOi lZJbocsTYhEbCk+uLRG/nHGoupBmdDdxZ0ncVISl2DwZ7xA2G2aIKkX5fVgKM0eyq+4E xOkQ== 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=r0E8ssI74zX2PaToQDhAVmMf3hhjcz+LRzwD16RcFLE45jcV9E/wOxyMAW+nP6pzJ6 RhkURG9HcdJdSoU+wS400lPu59tgs1hQ4cWvoMUMAV0n3vltgK7vKqqzrGFEn39JHRIc W0FiQo3gVoeucNCW0q+F7xrAs1Mg0E4Sqsz1bcL/ADNbgA5PZUpk28X1NcxsPphL2JIx ATg/9kmrzxd1AMQyRnTKN0hFnF134vWPBRBE/6QBNIuBeOZbr+kLrVwTvrJIPrTr0v0x RsOfUrt9JAh2MBbEt816ED2/VbaXGI0pi2c0ojMWmP13M4ckaOOM9moZwqHpTTASrSJP PnqQ== X-Gm-Message-State: AOAM533glX1H4kuNouCWexCc8hckDXvLEHCzZPIS34Nua7VPvy5LDugp RNb1wOj91fGFFuhY+nTr79c= X-Google-Smtp-Source: ABdhPJyP2VEu5OlJ0sDp5X5h65NyS9eQ9y1/4IxbmDdxSNduktAW9wMXSswYWVD1gjzruN8Ug7oIOw== X-Received: by 2002:a63:b341:: with SMTP id x1mr2420629pgt.69.1632796158534; Mon, 27 Sep 2021 19:29:18 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id k14sm633261pji.45.2021.09.27.19.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Sep 2021 19:29:18 -0700 (PDT) From: Florian Fainelli To: linux-kernel@vger.kernel.org Cc: Florian Fainelli , Russell King , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Catalin Marinas , Will Deacon , Yoshinori Sato , Rich Felker , Thomas Gleixner , Marc Zyngier , Rob Herring , Frank Rowand , Ard Biesheuvel , Mike Rapoport , Linus Walleij , Andrew Morton , Geert Uytterhoeven , Arnd Bergmann , Guenter Roeck , Kefeng Wang , Mark Rutland , Andrey Konovalov , Anshuman Khandual , Valentin Schneider , Ingo Molnar , Peter Zijlstra , linux-arm-kernel@lists.infradead.org (moderated list:ARM PORT), linux-sh@vger.kernel.org (open list:SUPERH), linux-mips@vger.kernel.org (open list:BROADCOM BMIPS MIPS ARCHITECTURE), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE) Subject: [PATCH v2 08/12] irqchip: Provide platform_device to of_irq_init_cb_t Date: Mon, 27 Sep 2021 19:27:11 -0700 Message-Id: <20210928022715.369160-9-f.fainelli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210928022715.369160-1-f.fainelli@gmail.com> References: <20210928022715.369160-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-20210927_192919_799920_648892D9 X-CRM114-Status: GOOD ( 20.33 ) 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. 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