From patchwork Thu Oct 19 13:18:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 116394 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp489228qgn; Thu, 19 Oct 2017 06:18:35 -0700 (PDT) X-Received: by 10.159.195.7 with SMTP id bd7mr1548306plb.366.1508419115199; Thu, 19 Oct 2017 06:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508419115; cv=none; d=google.com; s=arc-20160816; b=xSFC8vmDarUCJOA2sr5JeKcIUOE3Kx688xesPxDYc+/QnYGMQDRoI8uXEEP+DDzG4k vr9q5IbhI1YGbYkUibaWQYRWHEwK6/SFPMi6SMyGGjOCXHb7LSiO8p+sYsVsxEKltcce o6t9ExYVZz6vVWGqsQEWawpkpcXZfHUFoYCcwzMZXwKWuL3Pfst7Hi/IdKT3qmXPPKp/ UfPn8SIN4dM+tlDGm/hjjDDJX9/fonspHVsSHeqRaKa/fiHmdAEZoq7k2Px5hX+wiknu nztbfPEgUoNmvEZM77kZM9Vvs4yyXdSXBlO2rIhANPCEUcmjD4k1WwoFz8JROIZXy6vt GLWQ== 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=KXuEj9YPaWBLPTJyXvdLmXHJVFwNdHuPCwUFOMagbF0=; b=q3bVky6fH/fz/zkBXNus/jiZ1tMVs44EpGr44tRZevwH88FwybiRX22BIQ2XAY2X60 mRO0l+WrNbFVyG+Xq4jwNBJW0CbqhfTC6Jjnso05IW3UvwJqVosZlPj/Lm6Cs9mAoJ4L lA67vNPZWBE1CooMiyaAbPmPte+QZ0bQf+BmRt5aG/0uEuybvtRX04Znz5tv2Jo8WDum +OqS82H1He4tTKnRjssHeDafXq4ceoFwIJisIC6zPR3dimF5ibe2tFLtlOrBcXsFRzB4 qUXcCrwFmExigXkAEnRcbOz2s45jL8+Qmy53a+KXNb20LqCEZ8GT4nkehBTahOdYrH5v 4i5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DefOipH3; 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.34; Thu, 19 Oct 2017 06:18:35 -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=DefOipH3; 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 S1752677AbdJSNSe (ORCPT + 6 others); Thu, 19 Oct 2017 09:18:34 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:46920 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752639AbdJSNSd (ORCPT ); Thu, 19 Oct 2017 09:18:33 -0400 Received: by mail-lf0-f68.google.com with SMTP id g70so9586673lfl.3 for ; Thu, 19 Oct 2017 06:18:32 -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=Qh0Aj4zONrHB1wBS2ObncjbfnckpVDKpW578vEpTRao=; b=DefOipH33Bh0L8WhnlWjE9Ly/CFRHGEkfFr7Z2reIj5dwhennxvGCGrbwzXUThLCNp GhjllBJNVEnp2UzLlXOmZ5LpdMYUtfcnD7LZHroLDslRN7IVfui/Tbc2tnV8HlN8a44e v8eiVzb5Skzo0ZJD4Mv6OIO7KJQ1Y1irRc+3g= 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=Qh0Aj4zONrHB1wBS2ObncjbfnckpVDKpW578vEpTRao=; b=Rr+dPVcPRzZ2eQHfDBEVvjfTbAiErbYonPYzpXvZm3x5xG/Kvm6zi839gn8U8JXaYR xzLzbE8jrzmu4T0ohQUtVtB3k67FiT1r4Hs1qhhNVhYfrN9SejhHQu3QZRCpQjIFyvX2 zVE1oKOVmYwuUp5HuYV2jjh6F9kCURpjHiDFg/v2HWLm3izeKB+ft/f9sM0xfjtqJOwD ahe0TbUyvUhs8vo2dXeqSe+6AiEvwjFh35YySaRoFMc2u5PGIpPFrDoG7aR4pGelKfRE BLP9Jo3dt/nuWcFKa47f5K0ZJ0kezq/aNN0/cuAFBJvE86AsjXEhOjzAw4xkJGCpxFgU 0yeg== X-Gm-Message-State: AMCzsaX/aD/uCT4Kzt6KZifwgGyjESJ5iZocHA+C0kp+9oFkbjWMNCsH XkA+4ksoA8baPXSndhxaW0x++KNWpZ0= X-Google-Smtp-Source: ABhQp+R/hk9G0GwIN55CQIbhmylmfKjL3Y59ybNAb9/4wxeWzRQ2MO4eIFUBlyTKTO/WptczV1+FfQ== X-Received: by 10.46.7.68 with SMTP id i4mr714393ljd.150.1508419111795; Thu, 19 Oct 2017 06:18:31 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 129sm3106557ljj.9.2017.10.19.06.18.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 06:18:31 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Steven Miao , Huanhuan Feng Subject: [PATCH 1/2] pinctrl: adi2: Fix Kconfig build problem Date: Thu, 19 Oct 2017 15:18:26 +0200 Message-Id: <20171019131826.28584-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 The build robot is complaining on Blackfin: drivers/pinctrl/pinctrl-adi2.c: In function 'port_setup': >> drivers/pinctrl/pinctrl-adi2.c:221:21: error: dereferencing pointer to incomplete type 'struct gpio_port_t' writew(readw(®s->port_fer) & ~BIT(offset), ^~ drivers/pinctrl/pinctrl-adi2.c: In function 'adi_gpio_ack_irq': >> drivers/pinctrl/pinctrl-adi2.c:266:18: error: dereferencing pointer to incomplete type 'struct bfin_pint_regs' if (readl(®s->invert_set) & pintbit) ^~ It seems the driver need to include and to compile. The Blackfin architecture was re-defining the Kconfig PINCTRL symbol which is not OK, so replaced this with PINCTRL_BLACKFIN_ADI2 which selects PINCTRL and PINCTRL_ADI2 just like most arches do. Further, the old GPIO driver symbol GPIO_ADI was possible to select at the same time as selecting PINCTRL. This was not working because the arch-local header contains an explicit #ifndef PINCTRL clause making compilation break if you combine them. The same is true for DEBUG_MMRS. Make sure the ADI2 pinctrl driver is not selected at the same time as the old GPIO implementation. (This should be converted to use gpiolib or pincontrol and move to drivers/...) Also make sure the old GPIO_ADI driver or DEBUG_MMRS is not selected at the same time as the new PINCTRL implementation, and only make PINCTRL_ADI2 selectable for the Blackfin families that actually have it. This way it is still possible to add e.g. I2C-based pin control expanders on the Blackfin. Cc: Steven Miao Cc: Huanhuan Feng Signed-off-by: Linus Walleij --- arch/blackfin/Kconfig | 7 +++++-- arch/blackfin/Kconfig.debug | 1 + drivers/pinctrl/Kconfig | 3 ++- 3 files changed, 8 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/Kconfig b/arch/blackfin/Kconfig index 89bdb8264305..6cd804e16a94 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig @@ -320,11 +320,14 @@ config BF53x config GPIO_ADI def_bool y + depends on !PINCTRL depends on (BF51x || BF52x || BF53x || BF538 || BF539 || BF561) -config PINCTRL +config PINCTRL_BLACKFIN_ADI2 def_bool y - depends on BF54x || BF60x + depends on (BF54x || BF60x) + select PINCTRL + select PINCTRL_ADI2 config MEM_MT48LC64M4A2FB_7E bool diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug index f3337ee03621..a93cf06a4d6f 100644 --- a/arch/blackfin/Kconfig.debug +++ b/arch/blackfin/Kconfig.debug @@ -17,6 +17,7 @@ config DEBUG_VERBOSE config DEBUG_MMRS tristate "Generate Blackfin MMR tree" + depends on !PINCTRL select DEBUG_FS help Create a tree of Blackfin MMRs via the debugfs tree. If diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index c0294958405d..5b4939e709ac 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -32,7 +32,8 @@ config DEBUG_PINCTRL config PINCTRL_ADI2 bool "ADI pin controller driver" - depends on BLACKFIN + depends on (BF54x || BF60x) + depends on !GPIO_ADI select PINMUX select IRQ_DOMAIN help