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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A66F9C433E0 for ; Thu, 4 Jun 2020 04:17:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D58520872 for ; Thu, 4 Jun 2020 04:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726601AbgFDERj (ORCPT ); Thu, 4 Jun 2020 00:17:39 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:34843 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726175AbgFDERi (ORCPT ); Thu, 4 Jun 2020 00:17:38 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 1A940100DA1B3; Thu, 4 Jun 2020 06:17:33 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id AA79527E8AE; Thu, 4 Jun 2020 06:17:32 +0200 (CEST) Date: Thu, 4 Jun 2020 06:17:32 +0200 From: Lukas Wunner To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, Mark Brown , Rob Herring , Nicolas Saenz Julienne , Ray Jui , Scott Branden , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , "open list:SPI SUBSYSTEM" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Martin Sperl Subject: Re: [PATCH 3/3] spi: bcm2835: Enable shared interrupt support Message-ID: <20200604041732.7ijkvad2yadtgjid@wunner.de> References: <20200604034655.15930-1-f.fainelli@gmail.com> <20200604034655.15930-4-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200604034655.15930-4-f.fainelli@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 03, 2020 at 08:46:55PM -0700, Florian Fainelli wrote: > +static const struct of_device_id bcm2835_spi_match[] = { > + { .compatible = "brcm,bcm2835-spi", .data = &bcm2835_spi_interrupt }, > + { .compatible = "brcm,bcm2711-spi", .data = &bcm2835_spi_sh_interrupt }, > + { .compatible = "brcm,bcm7211-spi", .data = &bcm2835_spi_sh_interrupt }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, bcm2835_spi_match); Maybe I'm missing something but I think you either have to reverse the order of the entries in this array or change patch [2/3] to drop "brcm,bcm2835-spi" from the compatible string: __of_match_node() iterates over the entries in the array above and calls __of_device_is_compatible() for each of them, which returns success if the entry matches any of the device's compatible string. Because "brcm,bcm2835-spi" is checked first and that string is present on the controllers with shared interrupt, they're all deemed not to use shared interrupts. If you opt so fix this by dropping "brcm,bcm2835-spi" from the device's compatible strings, then you have to move patch [2/3] behind patch [3/3]. > static int bcm2835_spi_probe(struct platform_device *pdev) > { > + irqreturn_t (*bcm2835_spi_isr_func)(int, void *); A more succinct alternative is: irq_handler_t bcm2835_spi_isr_func; Otherwise this patch LGTM. Thanks, Lukas