Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1011519ybg; Wed, 3 Jun 2020 21:22:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk/KMP/gQJM33WEqn4bQMwY9J1FV97Y+GXSbILl8Fjpwvm0D/m6ONmH9vyVUYMsoWuQCNI X-Received: by 2002:a17:906:6686:: with SMTP id z6mr2212731ejo.258.1591244538245; Wed, 03 Jun 2020 21:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591244538; cv=none; d=google.com; s=arc-20160816; b=fML0ZklnJ2OgjMrL0Rf/j7E4CAaWk+miK4ShdKFZbCNjqBDJzngjOFtk88WW8m1CJ8 bpsQffObxkEM5BvwtA7l9dygAuoUrgyEG8bzuF1KOm0rFTU7zzrnJTKu4KMaAebUxjHv TGKFpJ6ca4C+z8WwQ08UK/Pl8wq+jcuhhoq3zA49n2ezWbNPeyHGiLI+4r++ZbkJJCmq j1MZw3bhoir1TuWivqOScfOqbWWbkjYAES87FeG/LoyS6I6Z3MHqBP6UVjk9dt9N7nIE lp/nl6oTTqJVgOk9f8zeSEGzrJNoM5tB0BTZODRcU8Si333uKv0znTk0oBGx2SLuKmea AScg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=AStgu/Q5PzElomKJb4I2SrdEc9rUbqIO8m2BvroX9CE=; b=a2KlH2LDvty703tXO0CoARHvw0zdRBMqvTnrdHVMlb2tlLlEZaYjLoLjlvZdhWNoZf nrP2qLn2AaV4BKrAvSnMF+nvN3Qh4+NE/ZN4vtBiQ6CuBYpYByi459Ms2dHEVPYThzyY Ijp9J8z3ug49I0TChq5dOkgh6CM3wL81rrIufTbUUhmxEkdSYPLCQddINfDD9ELZ4dTz 7s6I7Dsj+l8dONCiavi5HVNLEHrNuMnwlsrZzRX1Z2qvxmy9ebawTkQ/psRldRPTyZM7 9xVZuZXybJIB7lfTXf0gVwByuk/UuidCfwX6TqpI59elM6skW29j4bAUyUg48Q/p4qTW WQTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si889584ejx.476.2020.06.03.21.21.55; Wed, 03 Jun 2020 21:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726559AbgFDERi (ORCPT + 99 others); Thu, 4 Jun 2020 00:17:38 -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