From patchwork Thu Oct 19 13:18:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 116395 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp489369qgn; Thu, 19 Oct 2017 06:18:43 -0700 (PDT) X-Received: by 10.98.223.72 with SMTP id u69mr1548133pfg.305.1508419123349; Thu, 19 Oct 2017 06:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508419123; cv=none; d=google.com; s=arc-20160816; b=Fk+me0shhIxhWWYp+rboy1Ap16El/lqwXyvF2rAFjAIiSdK9QUxP06XM1jHkgQgWXI thODpqcoBzQjTlMmZMu4lmUTwAPti+JQZOc3DtDfX2EaO+QvaAMYe3liFTwZjJnb9TCS wxt7uOXYBhxCQGCAFrnglPfxDymtVbEJ+jePiM+DhlEWmR35Xd45QGrrDWP6Po0PmZo1 +Q9FAx5XqOvROKCKXG7StWE3OzjuxmIYSbkLeDAl8rX915LWBp3ZMKFR677b2q0kmQYx O7d73qHcAsbMlgCHDGwPnfHagdOi4NixAxnEm26FbLhD6jqJ9mapeq8oQcjCslMJZE+A XIww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=gdhIeKxj3dDOSzyFFx3c2+Q0wmBPZIi16Hbbsbpd+Gs=; b=NSKmaRCwFSuYLSxotQ8o88Gv7XuOdFbL6eu9z04WUUAWr0FKfyBRguMwP04ytWX0kb +pCXGvPOT1QFM2FMRjRE5Qbo5fKLkKK43I/3PxM9e/9XdSHq0ibmMXhR94FwWNkpHwdu W+cdSEMNTedYx8zPqtnSmGa1zg64iahgETmk7ei+kebjrHcJzqaH9j4W5f9CC113CmZI MBwGAYOs55l8J4CgXu2Lnyoiu9yDQNU2p/1bhSfdf4dGF6eB2nsuBAp5kMPbmfftt7mr kKDXKB2Ttc45X/EifshpbN9qFCVditSNTjlY2nmchxrhSioMKRHFS7nFYce0DvsIeBej j+Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PJrVZ63g; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21si2815390pfj.448.2017.10.19.06.18.43; Thu, 19 Oct 2017 06:18:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=PJrVZ63g; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752278AbdJSNSm (ORCPT + 6 others); Thu, 19 Oct 2017 09:18:42 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:52854 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752639AbdJSNSl (ORCPT ); Thu, 19 Oct 2017 09:18:41 -0400 Received: by mail-lf0-f65.google.com with SMTP id b190so9557670lfg.9 for ; Thu, 19 Oct 2017 06:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=KsPcMU2bKwAgDCSevwjqgy5t94fNTxtFJPJWxGrtCyI=; b=PJrVZ63grCbfcZCJ1TWGik+vuKMC6Ro+iMR5z3shu9O6s0VHUtz618RtWs1Ed6NTOd 8RhchJ7SrgUnuCUCc+ZUfMirrT5OFEDMmdnW5WmcCtZwk0zJZ3xVI93MpBvHb95kVGjl QTxHZ7RwoAa5/T/8I3Sz8JehNrpV//WQ/wL/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KsPcMU2bKwAgDCSevwjqgy5t94fNTxtFJPJWxGrtCyI=; b=t4XdMA8ezcpRFsiRuP+sReDB7uFQ9bMF4zG+IGV5UjfD845a0XTndYbdai+EuCJifX Y2VUtEJ98irxiI/Mqnr9RJ0lZhHlOocCaEWl2YortJJvZO1+pipvBkPx1HC6PGF1jWe9 gtiElGmEg9TOph28ZagcXaog3LGBjR6A9YkvfgNcenmLK7ykrJSQwPuXELoHhGl+bYiu dTLZSsIXN5tDDQyqXIrAWHKzQDR1bpfjdbBrwHl++pTITwgPmYnImqVkwmD3o06t7w+m AxSqKl+OdBzL6G4Fz4js/XZ616c4mGc08gtLgz+xhkruGCSZQPHs0TkYy5oDmGyQPjzC LsFQ== X-Gm-Message-State: AMCzsaUVV5XmJ/cL9ZMpoNBji2gRsp11aT4B/lHr4ZRKlYkmRpTHRc3i u39GMkc7tEMYJ95YTPcVeiKCOBtYTiw= X-Google-Smtp-Source: ABhQp+QVysYiOIAROoX4iFEWmZZMOycqs1hPkOaMjNufMwTyN0CguOqIc/EOgbEm+5ecmHyZAcWfEA== X-Received: by 10.25.143.156 with SMTP id s28mr661223lfk.236.1508419119993; Thu, 19 Oct 2017 06:18:39 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id b12sm411895ljf.60.2017.10.19.06.18.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 06:18:39 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Steven Miao , Huanhuan Feng Subject: [PATCH 2/2] blackfin: Fix local includes Date: Thu, 19 Oct 2017 15:18:36 +0200 Message-Id: <20171019131836.28634-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.6 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When making the pin control submenu globally visible, all kinds of oddities appear, in blackfin a few files were #including and relying on that to pull in . This was not working when pin control but not GPIOLIB was selected resulting in a breakage in allmodconfig. The code these files were using was still there and defined in just not pulle in from just including Simply add the required includes explicitly in the blackfin kernel core and everything compiles fine. Delete the use of the incorrect where possible. Add stubs to for the functions called from PM: these should probably also depend on !PINCTRL but since the global CONFIG_PM symbol is used to compile PM support, we need some more intrusive thing here, to be tested by Blackfin maintainers. Cc: Steven Miao Cc: Huanhuan Feng Signed-off-by: Linus Walleij --- arch/blackfin/include/asm/gpio.h | 20 ++++++++++++++++++++ arch/blackfin/kernel/bfin_gpio.c | 3 +++ arch/blackfin/kernel/debug-mmrs.c | 2 +- arch/blackfin/mach-common/ints-priority.c | 2 +- arch/blackfin/mach-common/pm.c | 2 +- 5 files changed, 26 insertions(+), 3 deletions(-) -- 2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 99d338ca2ea4..a2579321c7f1 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h @@ -183,6 +183,26 @@ static inline int irq_to_gpio(unsigned irq) { return irq - GPIO_IRQ_BASE; } + +#else /* CONFIG_PINCTRL */ + +/* + * CONFIG_PM is not working with pin control and should probably + * avoid being selected when pin control is active, but so far, + * these stubs are here to make allyesconfig and allmodconfig + * compile properly. These functions are normally backed by the + * CONFIG_ADI_GPIO custom GPIO implementation. + */ + +static inline int bfin_pm_standby_setup(void) +{ + return 0; +} + +static inline void bfin_pm_standby_restore(void) +{ +} + #endif /* CONFIG_PINCTRL */ #include diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index c5d31287de01..63da80bbadf6 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c @@ -15,6 +15,9 @@ /* FIXME: consumer API required for gpio_set_value() etc, get rid of this */ #include #include +#include +#include +#include #if ANOMALY_05000311 || ANOMALY_05000323 enum { diff --git a/arch/blackfin/kernel/debug-mmrs.c b/arch/blackfin/kernel/debug-mmrs.c index f31ace221392..194773ce109e 100644 --- a/arch/blackfin/kernel/debug-mmrs.c +++ b/arch/blackfin/kernel/debug-mmrs.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -20,6 +19,7 @@ #include #include #include +#include /* Common code defines PORT_MUX on us, so redirect the MMR back locally */ #ifdef BFIN_PORT_MUX diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 13e94bf9d8ba..e81a5b7dabdc 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #ifdef CONFIG_IPIPE #include @@ -28,6 +27,7 @@ #include #include #include +#include /* * NOTES: diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index 5ece38a5b758..f57b5fe5355e 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c @@ -15,12 +15,12 @@ #include #include #include -#include #include #include #include #include +#include #ifdef CONFIG_BF60x struct bfin_cpu_pm_fns *bfin_cpu_pm;