Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp532783rwb; Thu, 10 Nov 2022 04:22:30 -0800 (PST) X-Google-Smtp-Source: AMsMyM6jP4Z5EzOvcLw7Zxb6GnZx8lpyACufY/LVbEYRvoYpb0mlhUPSh/DRFPsKy6Jb5Bz5tSIO X-Received: by 2002:a17:902:8541:b0:17f:6b27:7a75 with SMTP id d1-20020a170902854100b0017f6b277a75mr64392406plo.65.1668082950538; Thu, 10 Nov 2022 04:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668082950; cv=none; d=google.com; s=arc-20160816; b=xyx2DSDxjhOgvWEaQHyPs/c0SAIB7qbSvXmPBznx5lp3dJ8izsPc5pesuUQ8e0iDEj 038gX80u9kttFr+gsOVY0XASGl9/gVHPo0JuNuu8i0vr5Q9SF0TEEwHUqFuWZQ2te9CC EBFlFEhLKKgX0pbSteVzFeFhBv0PS2iKHou23nHgfbcqdF0TSt6jaDl9xmG57KBncaQo UMWZvvSRcOOMAPJcxRWHspwuXCDfMdBsZJSBTywD9Gvt8QPj9PTWQk6HpklEMz6Fm3rH 1xSbwkR3d/sGClfIEbwSkMkFchcDLbJ5DqA9cRAC3FjBujkpkLXKFjYQSILpsq6SFDzX PNGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=+QtKL18Xa6Oi/ExacuuRLk2DqSMAodao8WAD9/MvqOI=; b=HvnFWnk8cv4EHoDR93J+rYCdrcA4tgZ2pfshx/9UudvIPsry+4Fxn9cGGHxx7d4cCH zyR8D4Dbuwgh5RVVEFKAEPvVrd5aI/BsVX/OETnpG5BSmGsK5ZLV1tnrBWJwz7StwrFl A8Cj4KTrNwSV0HWjwWhV7tu8cYBmVu5HIqisaAUsW9S3k5hDB9unxthWnXSC2MAWYl70 RdY+R+Xz+DY9DPwKK+Go/9Hu/uvmEHOE4OfZk8JaVHRPJN/zKmbSnuOAYkt1Gdnvyopk fVLSml/V+uPm+Y8/AHpbqCiKrl+DQt665RPFx5m9Td/4dZp6GcF/Hjb3ER+RjkOo4v2N sHOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J7p5ydwS; 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 lk7-20020a17090b33c700b0020d4dc7fa97si5070589pjb.110.2022.11.10.04.22.14; Thu, 10 Nov 2022 04:22:30 -0800 (PST) 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=J7p5ydwS; 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 S230310AbiKJMBw (ORCPT + 93 others); Thu, 10 Nov 2022 07:01:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229531AbiKJMBt (ORCPT ); Thu, 10 Nov 2022 07:01:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 635701B1D0; Thu, 10 Nov 2022 04:01:49 -0800 (PST) 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 F2B98615D8; Thu, 10 Nov 2022 12:01:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54B94C433C1; Thu, 10 Nov 2022 12:01:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668081708; bh=eAMR77Nrs7OwqkdHrhBIYIqrtO/NNvfrQzOxfDePPfE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=J7p5ydwSOlvcNPWZZPzKtRSJTtX1kvDEbxD9h/oYP4eocx4WRWzmVe1EsUbUIMv/o UOacVZRd141HlomFt2GXcwuHnPwZD3Nira5V6SKoEp5gQcIzLQmqDf56l/1b7qX7MJ 9Es3xgufJ3T+DaunZBXaOMdmkCpeTGnv3EzJTiYvrVoVsjk1cdq0CfJ9oeOeRmAPqd VJMUTh1R5X98L4US8bWF3WxeeCD5d2fgR7mkxNjuBP8Mbto2i0bjm43oxAK/Kh46h0 HBqQ5iGSmied6aENk0wFZ0aV5q74da8knXpoJB2GsP7ZOlbeRfCFNauVc39wXXC6VO D/8vsDALqAx0A== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ot6Fd-00593c-VM; Thu, 10 Nov 2022 12:01:46 +0000 Date: Thu, 10 Nov 2022 12:01:45 +0000 Message-ID: <86pmdvow5y.wl-maz@kernel.org> From: Marc Zyngier To: Richard Fitzgerald Cc: , , , , , , , , , , Subject: Re: [PATCH 09/12] irqchip: cirrus: Add driver for Cirrus Logic CS48L31/32/33 codecs In-Reply-To: References: <20221109165331.29332-1-rf@opensource.cirrus.com> <20221109165331.29332-10-rf@opensource.cirrus.com> <87mt8zutib.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: rf@opensource.cirrus.com, lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, broonie@kernel.org, tglx@linutronix.de, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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 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 Thu, 10 Nov 2022 11:22:26 +0000, Richard Fitzgerald wrote: > > On 10/11/2022 08:02, Marc Zyngier wrote: > > On Wed, 09 Nov 2022 16:53:28 +0000, > > Richard Fitzgerald wrote: > >> > >> The Cirrus Logic CS48L31/32/33 audio codecs contain a programmable > >> interrupt controller with a variety of interrupt sources, including > >> GPIOs that can be used as interrupt inputs. > >> > >> This driver provides the handling for the interrupt controller. As the > >> codec is accessed via regmap, the generic regmap_irq functionality > >> is used to do most of the work. > >> > > > > I cannot spot a shred of interrupt controller code in there. This > > It is providing support for handling an interrupt controller so that > other drivers can bind to those interrupts. It's just that regmap > provides a lot of generic implementation for SPI-connected interrupt > controllers so we don't need to open-code all that in the > irqchip driver. And thus none of that code needs to live in drivers/irqchip. > > > belongs IMO to the MFD code. > > We did once put interrupt support in MFD for an older product line but > the MFD maintainer doesn't like the MFD being a dumping-ground for > random other functionality that have their own subsystems. I don't like this stuff either. All this code is a glorified set of interrupt handlers and #defines that only hide the lack of a proper DT binding to express the interrupt routing (it feels like looking at board files from 10 years ago). None of that belongs in the irqchip code. > > > It is also a direct copy of the existing > > irq-madera.c code, duplicated for no obvious reason. > > It's not a duplicate. The register map of this device is different > (different addressing, 32-bit registers not 16-bit) And? How hard is it to implement an indirection containing the register map and the relevant callbacks? /roll-eyes M. -- Without deviation from the norm, progress is not possible.