Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp448154rwd; Tue, 16 May 2023 03:25:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4duefyky10J1KDXzSE3xFKLx6sHc20TrfmUpfyLW/MKV6FG0v5tFBk39Pyns16SfzbutRW X-Received: by 2002:a17:902:d488:b0:1aa:e5cd:6478 with SMTP id c8-20020a170902d48800b001aae5cd6478mr49661927plg.58.1684232735650; Tue, 16 May 2023 03:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684232735; cv=none; d=google.com; s=arc-20160816; b=s0mQVE0pWPoLBl0z+mkODsS8joQwcEgGU2/Wm8xDY/1bI23buKuRFpxw7jZnKXfjHE CmBok+kN9EWXYQFV5cyFoHw0ESxx6iB8l+O0uoTz65CpuSrUaZcDh+dtM6pBkdmORydD wEpfwWIQwmatN9R/Joiiyt6K0Xvv9LXNM/aEUD7i+0LdOEii8ykTG+EPFXXZowFzNaBU VIEiBK1eV1G1WaIaYeqs/o6oOaFy8z5V7xwWD/lA2An8t+Vts9Ixea9bfaStlVQYfdLf MFz3GRFNfO37XkddbfC4jTtw03Wv0v7WeTv4eqlBv1tZQOYZQ/ZZ3DhBDHQnVksj62l+ yBaA== 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=GKxeMVabofBhypaZ5cBVEI0jrGHAZlkmx5xXpHh42Ls=; b=A5SA+uxtPTPVuZhXcL3Kn4p+tW1wz52Hgny1+CaZ7l/5I9/PCGQ82kNfQuadkdN+gQ 8Sz4BLrv8fIIBW59q8LjyYPttlxN9Jrl4iAxuK6ozVcPr9CNoqrlAqZXzIWEac2SrWGM RxzrfywkgiX8yHB/0qSJAnL1CbsxA6Ftu65uYSCIZbaNHcpBTArKNMqOHOfVSoar5fCF ZIHEkOPMzGb/WkCKkEFuLEUClK/JBJlsS72MPtdFC+10qQbOHHAq/Mf1d6rbnnx1dHPu Qoli9sYyH+/QQ5VnHbYITiu7mPW8ntdjSVpdKkV8jMrfSfnXkmrqETzXsfIwuJB/wZzY R00g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OaXk2JUl; 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 y14-20020a17090322ce00b001aada12d628si18653159plg.585.2023.05.16.03.25.20; Tue, 16 May 2023 03:25:35 -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=OaXk2JUl; 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 S231861AbjEPKKG (ORCPT + 99 others); Tue, 16 May 2023 06:10:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232249AbjEPKJ7 (ORCPT ); Tue, 16 May 2023 06:09:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 910D12719; Tue, 16 May 2023 03:09:45 -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 F16C16374A; Tue, 16 May 2023 10:09:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93DF8C4339E; Tue, 16 May 2023 10:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684231784; bh=UzWc5Lwm75FxyK+w8YmzHI/DvA777osEnR4l5zmjBh4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OaXk2JUlwNc9953eKu4k6Tz88/RHcSQ8rAN8NQIWm6MZ7UtyQPb+nTSAEsZhCXBVf +XANWEmW4zXYMNZvFxACRsTpj47X29nqAcf9nIfyqGzYR3tsiiwqtLonq1fVvXFLwY EaqnQpFCrX5dV0ZfIPMxoNV5xeYCcHKO5+xnaYQnjMmLtEiCoDYZMRML44IgvRNpXN 8ji3D//H6icA/jIND8ED/ofji+rWgN/sytWNwUR3Q0pRQi+0zQTOsE51S3fyJwOn8f EcpwXoYvQBP9mBGIYa2llUd5CdqZ3WeOFo/1knvE6ImJ46qrJ7FHALZW92M/3m+xfW a0TNvvur6xjTQ== Date: Tue, 16 May 2023 11:09:36 +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: <20230516100936.GF10825@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> <20230515112554.GA10825@google.com> <86h6scmzf7.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: <86h6scmzf7.wl-maz@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Tue, 16 May 2023, Marc Zyngier wrote: > On Mon, 15 May 2023 12:25:54 +0100, > Lee Jones wrote: > > > > 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? > > This isn't an interrupt controller. This is internal signalling, local > to a single component that has been artificially broken into discrete > bits, including an interrupt controller. The only *real* interrupts > here are the GPIOs. > > I'm happy to see an interrupt controller for the GPIOs. But the rest > is just internal muck that doesn't really belong here. Where should it You should have been a poet! =;-) > go? Together with the rest of the stuff that manages the block as a > whole. Which looks like the MFD subsystem to me. Very well. Let's see this "muck" in a patch please! -- Lee Jones [李琼斯]