Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp926464lqo; Wed, 8 May 2024 22:08:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUngABP+gncOfyUM6NxgB47wIofQe/VrLXY2DzPe98+pPQqux0hKrlSFJydA+MpV6ey7FBndezVVzO2nQguwybcnyJ38440Jitkfq3wOA== X-Google-Smtp-Source: AGHT+IHAFvt4iofmoraFxumaDMcAm0wknZLmgHBvYquICwIeHPowif9yL/HH5+MwP9LF4+e4qDve X-Received: by 2002:a05:6a20:7fa6:b0:1a7:4f8b:6439 with SMTP id adf61e73a8af0-1afc8d5bf28mr6611817637.34.1715231306529; Wed, 08 May 2024 22:08:26 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b671589bc4si721096a91.148.2024.05.08.22.08.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 22:08:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174142-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=DqZUvz5O; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-174142-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174142-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7F480284A58 for ; Thu, 9 May 2024 05:08:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C7B91EB56; Thu, 9 May 2024 05:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DqZUvz5O" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7C5E148FFB; Thu, 9 May 2024 05:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715231298; cv=none; b=g/QgXwWvduHNFwktoELsyvrvJuVEiySxeK5q4OgNisrq45CJ+vGk1Gw5fYoB1lypS1kD/NAfyBnUzZn/IcAG05pmsQDkrOclwPPuN6ILDd67vLpvnCoIuzCCOSpsU12vHe00lSuueJHR+IGSZQ/JEklUW84Hhe74Twm6L+C51Bo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715231298; c=relaxed/simple; bh=S3wo7d6dVVVHJbHfUlKIIqEpnUYGY2iZwMogOjuJGx8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fbxQqzwcuAAcpVW+SyZr2GP81mXqH3fDOebXt+o3HPwcuHlWZniKiAQbOBSSGuOhoh+PrOx4r29s+MuXEmc+NoDHK4AEISnVwsWVZb8z74F3V0c2WPF8fMe18YW4/9FWfELZ19p5NpSEUnICK1bI/9fUChYn4G7s238RluMErfc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DqZUvz5O; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF1BDC116B1; Thu, 9 May 2024 05:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715231298; bh=S3wo7d6dVVVHJbHfUlKIIqEpnUYGY2iZwMogOjuJGx8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DqZUvz5OrJ+ljxY18xYa63gis6+nDn5tcioIVdZDq8ho8RI6U5ijznAFS4hxiR60f LfV01nYVRzdQrQ0ATJcuPgPXTssf30nrDmi/evBw6Q+CJtIeqM/88fb91zTjdr/8Po q4uNnul58qGMheBbRlZ4cP0mGEPu+8G3zASJ8VF67CxTZxe8tyOdwdWdYKGe38Coyx WdRBOZCE5XXrSxQI7wAyLPZmZHp50ejFkSlSjllcNKS/VX7Sq8XVvU21u5a1yPV+tx b0KLCjIGyK7IN/xntAqgcFEvYqvZy+1uZrtL4PaHtIYT3XD7ZOx12YRQrux1z8hDv8 Od5H+knND8F8A== Date: Thu, 9 May 2024 07:08:15 +0200 From: Mark Brown To: Matti Vaittinen Cc: Matti Vaittinen , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Wim Van Sebroeck , Guenter Roeck , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Thomas Gleixner Subject: Re: [RFC PATCH 0/6] Support ROHM BD96801 scalable PMIC Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/PL7cyDLGd10Dqzd" Content-Disposition: inline In-Reply-To: X-Cookie: Sorry. Nice try. --/PL7cyDLGd10Dqzd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 22, 2024 at 01:52:27PM +0300, Matti Vaittinen wrote: > On 4/5/24 12:19, Matti Vaittinen wrote: > > On 4/4/24 16:15, Matti Vaittinen wrote: > > > > I would expect each parent interrupt to show up as a separate remap_irq. > > > > So if we arrange to supply a name when we register multiple domains > > > > things should work fine? > > After my latest findings, yes, I think so. How to do this correctly is > > beyond me though. The __irq_domain_create() seems to me that the name is > > meant to be the dt-node name when the controller is backed by a real > > dt-node. Naming of the irq_domain_alloc_named_fwnode() sounds to me like .. > If we wanted to support multiple HWIRQs / regmap-IRQ controller, it would > require us to duplicate almost everything in the struct regmap_irq_chip for > every new parent IRQ. The status/mask register information, IRQ type, etc. > Naturally, it would require also duplicating lot of the data contained in > the struct regmap_irq_chip_data. I am not sure if this could be done so the > change is not reflected in the existing IRQ data initialization macros etc. > Furthermore, some API changes would be required like changes to > regmap_irq_get_domain(). I don't understand what the difficulty is here - we're creating multiple interrupt controllers so I'd expect to have to have full definitions of each, and since everything is referenced by name from the root regmap_irq_chip which gets registered it's just a case of supplying different names and all the helpers should be fine? > Thus, forcing the regmap-IRQ to support multiple parents instead of having > own regmap-IRQ instance / parent IRQ feels like fitting square item to a > round hole. I am sure fixing all the bugs I caused would give donate a lot > of EXP-points though :rolleyes: Right, my suggestion is to register multiple regmap_irq instrances - one per parent - and supply a name that allows all the display/debugfs stuff that currently uses the dev_name() to deduplicate. You'd end up sticking -primary, -secondary or whatever name was supplied onto the names we currently use. > Another option I see, is trying to think if irq-domain name could be > changed. (This is what the RFC v3 does, [ab]using the > irq_domain_update_bus_token()). I was a bit put off by the idea of > 'instantiating' multiple domains (or regmap-IRQ controllers) from a single > node, but more I think of this, more I lean towards it. Besides, this is not Yes, register mutliple controllers with different names. --/PL7cyDLGd10Dqzd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmY8WjwACgkQJNaLcl1U h9BlIgf/efaIkV0f4VqTTEAwN9jK2xqYQzUU/QYaEluaoaVtgKOVZ/Y2CA88QkDD gOs5ZkvkmijhpvI96By0iwMdNHM7St2qpr+QBOrRx1eMEgffLgVTTQC3L3ob+N5e /igyou5OM/aoQmqWKDpB3xbNrt3ALHZ5wkl4RM/bs3gKax7Nu2JuOTgK2LKqaVqL H2zf8A3U1HILV+T9CLWeF0Hy6euF1CaZTaAAhgDNVoyOKbV4BvyjRqbenGsMhhAa PjGnEt/d/o/zyZLwuIOz2ysbl0rsaW4RtK7zpTYFSjZFGCGlTCPWAfu1PrqD865l Q4d3hwpxu39VfTyfjb6bZ7JLfMbQHQ== =iZw5 -----END PGP SIGNATURE----- --/PL7cyDLGd10Dqzd--