From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) (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 8DCA31BEF74; Wed, 26 Mar 2025 11:00:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742986858; cv=none; b=CTEtYU0gyTGGp7Swn5qvJU9NLTnEA0YOciD+hwBCsT4AAhS4yso+OD0sGcrUc52UREHVbkix//S6agpazfR4yGEC6i5uKt9i8v1XSTXtzTFEBUDT8InwiJGyM6ndFj5ijFXVDz/yFoDljreuT3ndpYaV/ZdbUPyeHjEFvb5xiFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742986858; c=relaxed/simple; bh=GE2f5tN/qrs1osKm348JtdX/kYHC5v1SQLpJiAUSdtI=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:From:To: References:In-Reply-To; b=XX7KwE4jgege/LKdpWUkoTWMERbPz5m36a8db38IhRs2tYjL8AbGqWOc2K8MWKkoCvbmUuXRQlzZf+bNWAVE7/JZLkESP7KvRBAbW5T1RSWyOeNHypbHPycFnLhO191HQFRfnS5cvPjeVi8ePxGn8cBZeI9B7cEJ5aew57KD0Q4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=TUF5oFvU; arc=none smtp.client-ip=217.70.183.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="TUF5oFvU" Received: by mail.gandi.net (Postfix) with ESMTPSA id 1BD5542E76; Wed, 26 Mar 2025 11:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1742986848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GE2f5tN/qrs1osKm348JtdX/kYHC5v1SQLpJiAUSdtI=; b=TUF5oFvUP1UgmZ2BOnZCz9Z2G146wpzLM5itfJZLhwMpIglNkeM8OjYInfj+nz0r+iZb3Z rl3v7ijxRThgN0RXQGNILrAEjMK+1F50TY/qa6VkiphCTby/owR1JcVZYXBH7vPQmYc7SJ dOxEUcPgzYD1E4wbxn5vfaicvCibTchkV27Ph0wTyhn+AXjfc+aKsKyHSGU7Oytr1XL1/y IoDTZSARXvoL8mlSmZRvXJqjCpgiWJw/ras4GN3dMeSJ+D1+KgZOnEoRZR67NC5jZps9GX 8BK0aiiQ9WJ64ZbyRqBJVdg+OGMZ/jcvlgV27rcXDxm/yQD5mxFpYiOrafDEhg== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 26 Mar 2025 12:00:46 +0100 Message-Id: Subject: Re: [PATCH v5 06/11] gpio: regmap: Allow to allocate regmap-irq device Cc: , , , , , , =?utf-8?q?Gr=C3=A9gory_Clement?= , "Thomas Petazzoni" From: "Mathieu Dubois-Briand" To: "Michael Walle" , "Lee Jones" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Kamel Bouhara" , "Linus Walleij" , "Bartosz Golaszewski" , "Dmitry Torokhov" , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , "Mark Brown" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Danilo Krummrich" X-Mailer: aerc 0.18.2-0-ge037c095a049 References: <20250318-mdb-max7360-support-v5-0-fb20baf97da0@bootlin.com> <20250318-mdb-max7360-support-v5-6-fb20baf97da0@bootlin.com> In-Reply-To: X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieehfeeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegggfgtfffkufevhffvofhfjgesthhqredtredtjeenucfhrhhomhepfdforghthhhivghuucffuhgsohhishdquehrihgrnhgufdcuoehmrghthhhivghurdguuhgsohhishdqsghrihgrnhgusegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeekhfekieeftefhjeetveefudehuddvvdeuvddvudfgfffhveekffethfeuffdtudenucffohhmrghinhepsghoohhtlhhinhdrtghomhenucfkphepvdgrtddumegvtdgrmegrieeimeefudektdemtgdtsggvmegslegrkeemvgehledvmeeirgeffhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemvgdtrgemrgeiieemfedukedtmegttdgsvgemsgelrgekmegvheelvdemiegrfehfpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmrghthhhivghurdguuhgsohhishdqsghrihgrnhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopedvvddprhgtphhtthhopehmfigrlhhlvgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhgvvgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepr hhosghhsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehkrhiikhdoughtsehkvghrnhgvlhdrohhrghdprhgtphhtthhopegtohhnohhrodgutheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepkhgrmhgvlhdrsghouhhhrghrrgessghoohhtlhhinhdrtghomhdprhgtphhtthhopehlihhnuhhsrdifrghllhgvihhjsehlihhnrghrohdrohhrghdprhgtphhtthhopegsrhhglhessghguggvvhdrphhl X-GND-Sasl: mathieu.dubois-briand@bootlin.com On Tue Mar 25, 2025 at 8:50 AM CET, Michael Walle wrote: > > > > +#ifdef CONFIG_GPIOLIB_IRQCHIP > > > > > > Why do we need this ifdef? > > > > > > > Hum yes, on second thought we probably need to depend on > > CONFIG_REGMAP_IRQ here. > > But then, you'd also require the regmap_irq support for chips that > don't support IRQs at all. devm_regmap_add_irq_fwnode() seems to be > missing a stub version. > Sorry, maybe my previous message was not clear, when I said "depend", what I meant is having an "#ifdef CONFIG_REGMAP_IRQ" here in place of "#ifdef CONFIG_GPIOLIB_IRQCHIP" If CONFIG_REGMAP_IRQ is enabled, drivers/base/regmap/regmap-irq.c is built, so we do have both devm_regmap_add_irq_chip_fwnode() and regmap_irq_get_domain(). So this code block should compile and link correctly. I did some build tests with and without CONFIG_GPIOLIB_IRQCHIP and I believe this is fine. Or am I missing something? --=20 Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com