From patchwork Sat Mar 6 15:56:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 12120101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF758C433E0 for ; Sat, 6 Mar 2021 15:59:05 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BE2C64FEA for ; Sat, 6 Mar 2021 15:59:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BE2C64FEA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pCR3V9PEA6mQ3v9cWkInjt4yGOC1iCwzF8nMAM6Ovp0=; b=Qg2DOx8EyFrsrI+bS8T89c/Dx kmRKqrBBzkZTjeLLglyP9thDnLWEVjbtxKHdWMgWEZnQ/2miY7Jf3KIdrwfZqCOuWFk3W06gk9QCJ uSgqqO+rz0yn9JpDJKWSUMZ0mHpuaUqWS9vu25ZkzhbopAzqe+ky6Txhi+JeCoIaNJ1A1lCgQYlHR rdaFtUwJujUzb5Z9xNR+u5GlUtdRIEbRjap0Z14/amRsRgQqzYAtIdXYKc/EjDeDQKPh3WUII2TSn Ur47JVEMEmbLI4+IK0jJgCHBBpzPbaM+7sw2HZnp1L9mdea9yb96GS64XKw5fO9LmowoMyZ1Zpcac 8BB5Xb8WQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIZJ1-003Uw6-QV; Sat, 06 Mar 2021 15:57:28 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIZIt-003Uq8-UR for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 15:57:21 +0000 Received: by mail-wm1-x32a.google.com with SMTP id t5-20020a1c77050000b029010e62cea9deso1125501wmi.0 for ; Sat, 06 Mar 2021 07:57:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PcCnT8hlePYBrVx9+vaY6Viur8QCCOHDFsB+RfHcbdI=; b=MTuXyPDlVhV+cpBWlaU/KIhgzHKNYscLm3fbJhN+iR6TRNY3HCVRm0ObtckAdqD8oD mHak32ZxcjBcMpIWnsvMegmUO1R9gf3Ay/qE8trTUlmtoAuuCnsBCNABwL5dwWrJ+MEb lOYmDhf/aTPPZ/TeAAQ8v6sC46ZRXAJ6MintQeNm13XttiIdZAoDQlgLYMxsCeeG989S n/8Qes3xrSiBgtqw0MME2/5sv5dq/MUk//qNpUF88jnHp4l2lPu9C5ZvJi5B4CEtUj47 18RbFHJzwJkle4d1UutAM8Mw55518cGhpPZXfzKEC2h9vnNXTzSZ7eAFoxVq0umwbBO0 6qTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PcCnT8hlePYBrVx9+vaY6Viur8QCCOHDFsB+RfHcbdI=; b=k0gF6xhNAlBIUaBpjLQIkj+ro7pJi1e5APpCaEiHXAxLNy8sTSeY8Hxc1PuKuGDu5y En+mnDXHr00War0jhvf3oOlRV7AVfv1vO0EUEupFJgHgbYYdGkBf6EEUtbNGezNON1Bh EnvIO9A+wLUjUHMhdxgJpXRHiKX9TDUwIEIddl7oFAZP3ox3Jqc7MDab6lhCa1wMSVDb B3kDGjA4Xk2gUe01vQTXzDG6vOAwsNn2u7stpd5lBzxgIZUJp8mEbtn69G4H1nv4flr+ 8mQyqhpZib1P5OF9t7Rex7lL/y5DTUVD3sQBWrkVihmFABfwTkHif5Q/75JnGzhhwcJH i/cQ== X-Gm-Message-State: AOAM530JSKvNdr0w8MYSS3wRiNaRdKj8k9v4DvUf5leCJ2IKOS0ZsBzN goRwy/BPe3qWtxZKf6WdZW0= X-Google-Smtp-Source: ABdhPJwYwev+H2twyUy1n4rIomNoNpbm3gAAQz6R4vcH+bISHt92e1c8PqSYVdlsQ+thVY5Hi/yIAg== X-Received: by 2002:a1c:bb0b:: with SMTP id l11mr14468249wmf.150.1615046234857; Sat, 06 Mar 2021 07:57:14 -0800 (PST) Received: from skynet.lan (224.red-2-138-103.dynamicip.rima-tde.net. [2.138.103.224]) by smtp.gmail.com with ESMTPSA id p6sm9315188wru.2.2021.03.06.07.57.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Mar 2021 07:57:14 -0800 (PST) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: Linus Walleij , Rob Herring , Michael Walle , Bartosz Golaszewski , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Jonas Gorski , =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , Necip Fazil Yildiran , Andy Shevchenko , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 01/15] gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP Date: Sat, 6 Mar 2021 16:56:58 +0100 Message-Id: <20210306155712.4298-2-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210306155712.4298-1-noltari@gmail.com> References: <20210306155712.4298-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_155720_230659_164D7CFA X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The current code doesn't check if GPIOLIB_IRQCHIP is enabled, which results in a compilation error when trying to build gpio-regmap if CONFIG_GPIOLIB_IRQCHIP isn't enabled. Fixes: 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()") Suggested-by: Michael Walle Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Michael Walle --- v5: add missing Suggested-by tag v4: add patch (fix include instead of gpio-regmap.c) include/linux/gpio/driver.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 286de0520574..ecf0032a0995 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -624,8 +624,17 @@ 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) +{ + WARN_ON(1); + return -EINVAL; +} +#endif int gpiochip_generic_request(struct gpio_chip *gc, unsigned int offset); void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset);