Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1888373rwd; Mon, 15 May 2023 04:40:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ75mhNX3Jusd8ePqq9iLk5b0i97FhDvn9cIdFXxAIrbc9s47HdeJv1bWqSCBNux1YkyG6FR X-Received: by 2002:a05:6a00:891:b0:643:b4d5:e3db with SMTP id q17-20020a056a00089100b00643b4d5e3dbmr39652425pfj.4.1684150816273; Mon, 15 May 2023 04:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684150816; cv=none; d=google.com; s=arc-20160816; b=wiIERIv3ktVXl3Ds7/2OHuy5K1QAbtoVbxxBV8XzOuCwfd3grjJn/nIv4L3p+hNAdm ZyTXfYkkqASSSlhHqQCs+6aLq+4Q1Va6UvZNDe8swftaPQelV0pq3iJd4MblbSPTqT3F wRKGdllOSHS9FqzSrIYUWP6XsMkQTDFcWhsUHjeddfzcOWdKR+5sNVGyrm7XvNw+LgD6 iVWPJVNSnFt0TatyRg9+28gD4oraG1JR4Mrv0FAX5UBq/rSA6LVSWCTL93YrUH4yN4fo kTq117x5L1vaH4pxzsJCUllCWT9oaHiIpWTysrJr25WvXqm+lnbzCpE9DGAiHsX9TGPD QoxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EknZN+gVEz0y+jqRr/kWCekBhWFMVRJHQzmjwli6WTE=; b=LH1i8Syy5G60PIzLp1K/iWJbxlAfhFiLyNmBUlXR+kXQuYVbaF7Bw1KH+UiwnY91Vp GEhkMaBZIlDjP7tbT2Hvs+YcuPgC1zBUyVn3sVXYlrGavhSGL7Vi2xfgeWI/UT33PNls 3mBnybjeM5ZZi0wYBBDTA9Ns0AJbAzErlE6EhtzWz8CVxSp9St/XeiFcFK29oil9Pu80 ceyAJ6/SbI3JqsjH7EjF2onH4lr3TrqiXzcwJTDRhtyRu8+CTfKDgoCeVcILb1ejPyuo 8C8gSpkvi3QUjsgLZTG6zx345f088uyEFWpHMn2Ks1eJXMKg+OF6PnMsyEJCFlwM1d3V Mrjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KFbji4AX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w14-20020a63a74e000000b00524ba7e95c3si16550262pgo.785.2023.05.15.04.40.01; Mon, 15 May 2023 04:40:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KFbji4AX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241257AbjEOL0W (ORCPT + 99 others); Mon, 15 May 2023 07:26:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241250AbjEOL0U (ORCPT ); Mon, 15 May 2023 07:26:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C8FC1736; Mon, 15 May 2023 04:26:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B522C622BE; Mon, 15 May 2023 11:26:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9818CC433D2; Mon, 15 May 2023 11:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684149961; bh=MBqNZwSUWIVyUFPu5xzrWq+IS+ipisPvB7leUbn8x7I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KFbji4AXA3hGRsqTwofLDZiiIfOsCOOHJjiwkI4H4/iGfs82EgkS5b1Xg0tLaoqh/ tJ3DPhdMHBOVrCpMIZdlKFsIAa3H18C9ex5U3yjpI6X83AIpfcyksAvxVywqgfkpoW sVVLV0/2LJ5LaVTgNFNS6P+BrBxDDkogc2PQdFDVzskUrXiXZWJVGFGjU36gn8sAPZ t6feA4rv/otyZkO6Cim+P7ICaZ2Myn68JP356IAppwnzC+OuvMgyGYAQrGzLrvmCRv qE0XMb5fBJz9q9qUd785/TUka+DUI4OPC1H6/LMzHlne0JMH0BQC4YeL5q6bP8g4PM lr8KyMx0+2NpQ== Date: Mon, 15 May 2023 12:25:54 +0100 From: Lee Jones To: Marc Zyngier Cc: Charles Keepax , broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, tglx@linutronix.de, linus.walleij@linaro.org, vkoul@kernel.org, lgirdwood@gmail.com, yung-chuan.liao@linux.intel.com, sanyog.r.kale@intel.com, pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/10] irqchip/cs42l43: Add support for the cs42l43 IRQs Message-ID: <20230515112554.GA10825@google.com> References: <20230512122838.243002-1-ckeepax@opensource.cirrus.com> <20230512122838.243002-8-ckeepax@opensource.cirrus.com> <86o7mpmvqq.wl-maz@kernel.org> <20230512153933.GH68926@ediswmail.ad.cirrus.com> <86mt29mt2m.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86mt29mt2m.wl-maz@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 May 2023, Marc Zyngier wrote: > On Fri, 12 May 2023 16:39:33 +0100, > Charles Keepax wrote: > > > > On Fri, May 12, 2023 at 04:10:05PM +0100, Marc Zyngier wrote: > > > On Fri, 12 May 2023 13:28:35 +0100, > > > Charles Keepax wrote: > > > > > > > > The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface > > > > (Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed > > > > for portable applications. It provides a high dynamic range, stereo > > > > DAC for headphone output, two integrated Class D amplifiers for > > > > loudspeakers, and two ADCs for wired headset microphone input or > > > > stereo line input. PDM inputs are provided for digital microphones. > > > > > > > > The IRQ chip provides IRQ functionality both to other parts of the > > > > cs42l43 device and to external devices that wish to use its IRQs. > > > > > > Sorry, but this isn't much of an interrupt controller driver. A modern > > > interrupt controller driver is firmware-driven (DT or ACPI, pick your > > > poison), uses irq domains, and uses the irqchip API. > > > > > > > Apologies but I really need a little help clarifying the issues > > here. I am totally happy to fix things up but might need a couple > > pointers. > > > > 1) uses the irqchip API / uses irq domains > > > > The driver does use both the irqchip API and domains, what > > part of the IRQ API are we not using that we should be? > > > > The driver registers an irq domain using > > irq_domain_create_linear. It requests its parent IRQ using > > request_threaded_irq. It passes IRQs onto the devices requesting > > IRQs from it using handle_nested_irq and irq_find_mapping. > > > > Is the objection here that regmap is making these calls for us, > > rather than them being hard coded into this driver? > > That's one of the reasons. Look at the existing irqchip drivers: they > have nothing in common with yours. The regmap irqchip abstraction may > be convenient for what you are doing, but the result isn't really an > irqchip driver. It is something that is a small bit of a larger device > and not an interrupt controller driver on its own. The irqchip > subsystem is there for "first class" interrupt controllers. I'm not aware of another subsystem that deals with !IRQChip level IRQ controllers. Where do simple or "second class" interrupt controllers go? -- Lee Jones [李琼斯]