Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp394642lqb; Fri, 24 May 2024 01:20:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXt2KvSNz6ht2ogp6X63xZG+Qt8Uc3kcJ/pKr9XL1CV4aa2Z95eURRJLPA7oCwPhIS7gfmWYctQ95Zd0ycTjRXxngK9b+FsYCSY6h8E5A== X-Google-Smtp-Source: AGHT+IF21XYxNfeWVOh2NJTgu4XvoRsZ1DAuH1yb8tUel9RFvZpT5j7wrKGkPn+F9VK0Q5Csp0Fj X-Received: by 2002:a17:903:8c3:b0:1f3:4d7:257c with SMTP id d9443c01a7336-1f4498ef8bbmr19324345ad.67.1716538851907; Fri, 24 May 2024 01:20:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716538851; cv=pass; d=google.com; s=arc-20160816; b=QFSjqf30oCY+vLqtVgCzrRo8m5BY0J8TqXhY4p5nnFfKEYYC3ohACofuud6OlemrNZ 3QimOcp8lfO5Y8oSr6WaQMgXNUhNO+jwjThFowVbD9WmL5G4cDqxhyWeS7WSL0G70CZW smDSVzUXnDsbw1GI9H7x6H5H+nrg5fpIALtONMFmW0g7sQKDStRuyopIg7OfEHINWP55 ghWcDeLd7f98Pry+2B9hnzujJr5E25s/AkrHliQsnsk5Z/gVVCrvsphRWeo6GMGJrPHC j0iWN7ZBp/MOPuF0716FHiK72o20p1WzA6W1DlAE/0C3Q6DJoR0IkJQBzj/31NiT6UXY ppEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+oz6UCrdb1975kB7UeAyVPQIZ7iHx46ETbSo/v9u0/s=; fh=ZKiV/d2nD5vvxQ31lEiNvLMAweblnrYyAmDnUtS0UC0=; b=jYTOcwAovs2xmEiymCCF8yZAukuuVHM2a5hYQCCDXwt3s/NMiZhrU/5ZGgV5Nq8EWe TQWX5SPOECrq1mlZT0gkJaXP4SFa94k7Sh/MI791esv7OCL3LkVaD/ENb2IXnN+wbznu EK04W1C0NTxsXe0XLSdU9TWspr67MKK9VY28eE5xYsd40F2Xs7UNF9DXgTYtZ6l2uHjL dltT1U6p7tG8JpAxIGpWBhIm1t0lgiqwdzt0Z7REr2RO66Ai+JvY6bBaM47LFnzPpzpB UOnM7qPKrNf6dtuTKQsv/q0SaXoZ/nyQ77yVUMHcl2m2CF70coyOMIyu9YaQWN3RiL0v 232w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bQPKLIu1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-188454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c7870fbsi9527055ad.51.2024.05.24.01.20.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 01:20:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bQPKLIu1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-188454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188454-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 32E8EB21CCC for ; Fri, 24 May 2024 08:19:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4D6D128383; Fri, 24 May 2024 08:19:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bQPKLIu1" Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68BD75B1F8 for ; Fri, 24 May 2024 08:19:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716538761; cv=none; b=P3RuIoEDXohEZg1vNbgo/RQxF4fAlSvq72WPLkBbpiySebOho1mXsn8JONYKR1Zi+ugg0Y51p58/AvjcIyd5o/TfbuOQxMScUflveFC+J1FjNW6MO/XdxLci9C6ZkTabbNdpGKt+rX0MldR4yzRK3C5GqRKWap248XtQmU2C8Dk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716538761; c=relaxed/simple; bh=lIC8PATib4ECHZvoRaJcqvbW2iLxMzcGASLxpvYW2uc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W5P9oF++4XtfhpOdWJHG9KVuMaLX6JX/EkyCtaNwt7yIlmUByZuS8KNYvc11ZwcXNIEw+WcbDQNG303ZL3yKj4JHYSY0bjNIVylaqOxQz/aTkBfIiCyOE5SkvikSi3x06uRrOTUo9/6WAxLiPjJ2612HzcNw7n35Aqe0cU5+iSM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bQPKLIu1; arc=none smtp.client-ip=209.85.167.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-52962423ed8so615824e87.2 for ; Fri, 24 May 2024 01:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716538759; x=1717143559; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+oz6UCrdb1975kB7UeAyVPQIZ7iHx46ETbSo/v9u0/s=; b=bQPKLIu1q7SirVMXU5v0Q6TCxZmzVaTyUxf+KcUpZO7pTuhVRQeU0R2CNNudUuRUr4 5PL+VeRFVOKHiMN4OXu6FPf1l/GakjPJsG85TSM2dhPYsXCeIja4bIArUwDhiFmqCljN bVMfzycH1wXp2+VvI8VFWk8jLSSlVk0hTZ53sRCt7GYl3po9m5FV/SOM1rSmQM9l5KfA 6ftko0IDsunqi1r/Koq0uFN8jXT3NK49S4uPWdqFGleItDrj+aZX5TJtkadmngTbgoUX NKg5TP6f1mlVnDqPznFCB0Jz5+2hZA0LP2DlceH0/jZn0Czz+UwKgmBMH4exJK/5yuam RH0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716538759; x=1717143559; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+oz6UCrdb1975kB7UeAyVPQIZ7iHx46ETbSo/v9u0/s=; b=ZEFwBgKqoOK1X8DFaSPCoNy1+27pNdFKKYv4/9dfOEgz4LDh+2QGSajunz2b0uOI+q /zZQtlrOMb7BCG166H6yUDPyBiJpzGrnMImOf/R364fvGlfWYvOA+9nO3+MzGPxnnLRV z+aEIEgOI/9sU2Ew/tobJ6ygUIWRRQiVdxVNpB+Np/6sw4kvVpTId40SIfyuRrOy9pgr zEKXFpflw4bMQTSMEzXl18kRXFB7bvHatrcaqbXL7KckIJmIW9qvjFKdB0p1G4SkQoQ4 5iNg5E+09jtIJaSyi1kz+wbDSn7m4AkPy/GDSQfYzpnfugkXEmlKQruA4U6zcpaDxO2n XdBA== X-Forwarded-Encrypted: i=1; AJvYcCUD9RAaPcHYG6kYrMoexBHsa2YlmIDBJ+MV6v7ZC6pxvAR/AvhAKTxms/4rZTifrM+YS5eywZJhv0CHzaaXULO9lsP1NiunRRTH40pG X-Gm-Message-State: AOJu0Yyv05lH7HpLXSYqxp2TKJcuYry8PAz5pqgKeqT/+Bl+DLAMwo6a QASRS7uCnGfVeYYS8K5QHayE75D2v9IHPyXPOL2mMowP6Il2ycmi X-Received: by 2002:ac2:47fc:0:b0:51f:5d0a:d716 with SMTP id 2adb3069b0e04-5296717ff6bmr737801e87.63.1716538758387; Fri, 24 May 2024 01:19:18 -0700 (PDT) Received: from fedora ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5297066b21dsm129380e87.173.2024.05.24.01.19.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 01:19:17 -0700 (PDT) Date: Fri, 24 May 2024 11:19:13 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Lee Jones , Mark Brown , Greg Kroah-Hartman , "Rafael J. Wysocki" , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: [PATCH v2 08/10] regmap: Allow setting IRQ domain name suffix 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-sha256; protocol="application/pgp-signature"; boundary="pvvwC7uEUQRemi+8" Content-Disposition: inline In-Reply-To: --pvvwC7uEUQRemi+8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable When multiple IRQ domains are created from same device-tree node they will get same name based on the device-tree path. This will cause a naming collision in debugFS when IRQ domain specific entries are created. The regmap-IRQ creates per instance IRQ domains. This will lead to the domain name conflict when a device which provides more than one physical IRQ uses the regmap-IRQ. Add support for specifying an IRQ domain name suffix when creating a regmap-IRQ controller. Signed-off-by: Matti Vaittinen --- drivers/base/regmap/regmap-irq.c | 13 ++++++++----- include/linux/regmap.h | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-= irq.c index 45fd13ef13fc..e86964a9843b 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -857,12 +857,15 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *= fwnode, } =20 if (irq_base) - d->domain =3D irq_domain_create_legacy(fwnode, chip->num_irqs, - irq_base, 0, - ®map_domain_ops, d); + d->domain =3D irq_domain_create_legacy_named(fwnode, + chip->num_irqs, irq_base, 0, + ®map_domain_ops, d, + chip->domain_suffix); else - d->domain =3D irq_domain_create_linear(fwnode, chip->num_irqs, - ®map_domain_ops, d); + d->domain =3D irq_domain_create_linear_named(fwnode, + chip->num_irqs, ®map_domain_ops, + d, chip->domain_suffix); + if (!d->domain) { dev_err(map->dev, "Failed to create IRQ domain\n"); ret =3D -ENOMEM; diff --git a/include/linux/regmap.h b/include/linux/regmap.h index b743241cfb7c..9df971986abb 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -1518,6 +1518,9 @@ struct regmap_irq_chip_data; * struct regmap_irq_chip - Description of a generic regmap irq_chip. * * @name: Descriptive name for IRQ controller. + * @domain_suffix: Name suffix to be appended to end of IRQ domain name. N= eeded + * when multiple regmap-IRQ controllers are created from same + * device. * * @main_status: Base main status register address. For chips which have * interrupts arranged in separate sub-irq blocks with own IRQ @@ -1603,6 +1606,7 @@ struct regmap_irq_chip_data; */ struct regmap_irq_chip { const char *name; + const char *domain_suffix; =20 unsigned int main_status; unsigned int num_main_status_bits; --=20 2.45.1 --=20 Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =3D]=20 --pvvwC7uEUQRemi+8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEIx+f8wZb28fLKEhTeFA3/03aocUFAmZQTYAACgkQeFA3/03a ocWAcQgAyjYIua3DPCGfdB6p+8JV35kfPtGJAlFn2Y4JeUQ3S2Fcz9kxiBguPt7R cPTtUgbTM62Go5CvTu0d6dX3zpyiEqaAlUxurh3oc386IKSi4RrSONRaI6+baIVO J19Z0EgyyqY66oBgT3EPBcctGtL+7yyyneREeQyZDL9UJaQY+eb2RibCiTQPkEU6 giGr/Lwo5otz/WtDQ4U9USZEn/K8hVipCINmsB0Tcamu8sVriayjnpdAk1c3O639 TBnCrhD8th/vUoWVWDgzys7iWHpUBnn/NlENlDk7Lul22mAQgCqppOScWqU4rcR3 rw+AMkXVexeEesDyl9/+535gDJYjlA== =LLTT -----END PGP SIGNATURE----- --pvvwC7uEUQRemi+8--