From patchwork Wed Mar 10 12:54:49 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: 12128035 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 41C64C433E0 for ; Wed, 10 Mar 2021 12:59:02 +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 B559364F45 for ; Wed, 10 Mar 2021 12:59:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B559364F45 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=5oSTvJcmx4WDlLgkSghE21kCp4uNsiBn2PCwd7R+wnE=; b=Os6cnMYzt7Vau1RLeEqX0gCXm 63WyV9oEs6PZt4C3rDDZd+bftfQHSOsCX9CA8WtfP+2htfGAgan5OtDcJP4BvtbkJr4PNWtdVQz33 zP2zUAbZd2HlmQyl1ZihNmAOX8xUoMh0+lztCwNaQeV0dxHHnCmt2Lg48P41m8dG9vNw+m+g4BmxH 199VduHN3ZvBP1dcYgwDX+2btjVj8KQum4h92wc3AHoZXyKTVq4ubN8JQIYnxWd0HvhhcAW16DAYH YNwvzAwymiMQEeXXW8H/kvMd3xHmTzELC4QVgnsp58+RFkT3L00/Mok0h5M2SJSjKTVHBbX3gZNcs iRsjaKGhQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJyPD-006q4n-4t; Wed, 10 Mar 2021 12:57:39 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJyMo-006piP-5D for linux-arm-kernel@lists.infradead.org; Wed, 10 Mar 2021 12:57:13 +0000 Received: by mail-wm1-x32e.google.com with SMTP id b2-20020a7bc2420000b029010be1081172so10648836wmj.1 for ; Wed, 10 Mar 2021 04:55:08 -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=sSch/5wksUDthsaLNwHNQHxAijIb6OwKSPbl9xmbVF0=; b=pb73dXNrhv2abYwzcvtVroyfwEt5vMAXX0gE0L4mzVVryQ7YakAJYCCAEo4p0Qylwl 4G7nu46eXrIlChwqVxGsoCETfypqEyP7/osVMnrNPNmqKY0aYFyCTgQjIu310gXo3sOE sbvzGLmErpVTtSgbcYf7HLmKVnf4VQNcF49jqc5VB3Bh9DetID7JhCVRA6/It7/9tVTL m3nI1nTxyKYFnlhzGZUW4YIdHxdbxmvB+F88Ew8nAZOrd50hZxIkr2Vas7uM6u2ZLT/Q 06HlzjUi+TE1B3r1JlzkUpyPi68TeaMSfVCVstsdsMuMrnTyhZgm/hZeBn7YOG3DZk14 jqfg== 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=sSch/5wksUDthsaLNwHNQHxAijIb6OwKSPbl9xmbVF0=; b=ZLHuaYa8OLrvxwbfNkVdQipTHafcMRXo4J+UI9JUTwGWbsWl0yoq4ihhB0UhAwlpNc 8aASpejSNNlO5o+zoInN/WgyZ5kncCthSX1nUUj2GT3o+LKghb9/OM+WBSgkyAHYlYNi s9z3mYrsepFbKHOxv7HCetZyyaGCGPjQQYMQsYlIGiMck7RrfbPomcyCtMwcRTLdfE7v mzx6O1TNCtANmssbPzAoocwtHqnCJQytWrgShwwaVeXsw6qE4lzJN0jCpbC4aBMh4u2B VIpvIlH9yT2JKy0QE3ZMUVwdhM0b772UvqXEyjyOLIgbLfrt7bMlQ1MAmfNPB5P8kLqu VycA== X-Gm-Message-State: AOAM531JyLwn3Yp6aAsH0RU6YsBY6q5y5L33VBEeTT8kl3boVFHm6iz4 QlDPr20WEMFUSytnzpGXSAQ= X-Google-Smtp-Source: ABdhPJxSmktWnpxP3NOD7h9yEQlwW/62KOpSdQ5Cg7L0OxXt6w4h9Cf+W/o+y2zhyd1UsQWzsuZa9g== X-Received: by 2002:a1c:2390:: with SMTP id j138mr3200930wmj.72.1615380907885; Wed, 10 Mar 2021 04:55:07 -0800 (PST) Received: from skynet.lan ([80.31.204.166]) by smtp.gmail.com with ESMTPSA id v6sm29403398wrx.32.2021.03.10.04.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 04:55:07 -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 v6 01/15] gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP Date: Wed, 10 Mar 2021 13:54:49 +0100 Message-Id: <20210310125504.31886-2-noltari@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310125504.31886-1-noltari@gmail.com> References: <20210310125504.31886-1-noltari@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210310_125710_627077_D7D4C40A X-CRM114-Status: GOOD ( 11.97 ) 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: Linus Walleij Reviewed-by: Michael Walle --- v6: no changes 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);