Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1277599pxb; Thu, 4 Mar 2021 07:36:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyprrQ/wq2nUGw6OGa2lkzwbWSjrBNffXl5Zc7q/C3tmSxEngODwwj+cf/9moThloNFLdPk X-Received: by 2002:aa7:c551:: with SMTP id s17mr5013296edr.291.1614872196895; Thu, 04 Mar 2021 07:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614872196; cv=none; d=google.com; s=arc-20160816; b=U7sDEW7krmVJbRvUeZWzm+VeLeT+mPwNv1fKWhvuCOh3X68cyWTvx1MinB4oy5usrz hCHBKyDkB2knQuOPGHlqOCQqsIFBzudBDtWQMTwTmAQZq1mi0ExN8//aps4LvAHWTtzr VIHy9/jfC9rj2qb4W/efxZLhLQ0BoxaDZVz3iZbqE3AEeUxYf8heF71NQs/jW2XK9WtQ ejntbDc2kwe+2uhN05u7tDF/WIbJU4+P1ljAplRNozDaZanxuiOVkeNRrxe6uHmywiZs poUVg4QrdMO4TUx/C1mOh59ToT43j8mvRiX+mTXUmMhEopXt6OVjwIYlX8zXRKTkvukT wvzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=1j4UMCrX0AEJRJZ4Ec8Gm1WvvUQka0jywWPtTgKs8UM=; b=YrpnkHkTdZOTi+HJBhwTkysfPyixSMGDqPzZVN3KcdTpGZzLd1IS4BGe+Oy9hwa2Bv m2BQMVL/vVEPPBydg87EDrz6/n6CvjVrWv1YOiGXMTTCTlPTj0Cu8EI8sqKSWyKnt/cC Ie1zg6wLBaR3awoBIP6FLTRYzjIxOGt0+39UA4ZnPVFf8An9MvyIUbW4jZ5wRDciX//s xHamo9cSkHW/blGhkT3urJmQX83c46zpc7ZTgXDis3/T66C2h8I+zmyc2q/q9JdAjQnz d/Caelfnoy8w6HXCa5uGmPFFbCFM5cS8FbtAofAW2FU5xi1RhcYiTNRnEh3olmFfD/6W 4YvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=snsS6Crl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb25si17677831ejb.519.2021.03.04.07.36.14; Thu, 04 Mar 2021 07:36:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=snsS6Crl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236823AbhCDI3t (ORCPT + 99 others); Thu, 4 Mar 2021 03:29:49 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:43941 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236831AbhCDI3r (ORCPT ); Thu, 4 Mar 2021 03:29:47 -0500 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id EE7E32223A; Thu, 4 Mar 2021 09:29:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1614846546; 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=1j4UMCrX0AEJRJZ4Ec8Gm1WvvUQka0jywWPtTgKs8UM=; b=snsS6CrlVkGwIZuCH5woq3zU1CIJ+LlhjN+CY34F/goxsEN8tpRxnaUzDy4HzsGqJhdaMi i1hOi1DHVafCl+jryzsIccFmUTD5mhv0NnOGgDWhegmlAdiCbujxnrooCruMZ3rO8s4STb J6U6jUZ2REYvgXTYFfP6ZRbnKEi9X0M= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 04 Mar 2021 09:29:05 +0100 From: Michael Walle To: =?UTF-8?Q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: regmap: disable IRQ domain without GPIOLIB_IRQCHIP In-Reply-To: <20210304070501.30942-1-noltari@gmail.com> References: <20210304070501.30942-1-noltari@gmail.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <265ad883fee30b799fd53954876dc567@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-03-04 08:05, schrieb Álvaro Fernández Rojas: > The current code doesn't check if GPIOLIB_IRQCHIP is enabled, which > results in > a compilation error when trying to build gpio-regmap without having > selected > CONFIG_GPIOLIB_IRQCHIP. > > Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using > regmap") > Signed-off-by: Álvaro Fernández Rojas Nice catch. However, instead of having that ifdef, commit 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()") could be fixed. That one is missing a stub if CONFIG_GPIOLIB_IRQCHIP is not defined. --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -624,8 +624,16 @@ void gpiochip_irq_domain_deactivate(struct irq_domain *domain, bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gc, unsigned int offset); +#ifdef CONFIG_GPIOLIB_IRQCHIP int gpiochip_irqchip_add_domain(struct gpio_chip *gc, struct irq_domain *domain); +#else +static inline int gpiochip_irqchip_add_domain(struct gpio_chip *gc, + struct irq_domain *domain) +{ + return 0; +} +#endif /* CONFIG_GPIOLIB_IRQCHIP */ Linus, do you agree? -michael