From patchwork Fri Mar 4 11:42:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Brugger X-Patchwork-Id: 591956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D9BDE1402A1 for ; Fri, 4 Mar 2016 22:42:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751251AbcCDLmg (ORCPT ); Fri, 4 Mar 2016 06:42:36 -0500 Received: from smtp.nue.novell.com ([195.135.221.5]:45012 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750976AbcCDLmf (ORCPT ); Fri, 4 Mar 2016 06:42:35 -0500 Received: from nwb-ext-pat.microfocus.com ([10.120.13.103]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Fri, 04 Mar 2016 12:42:34 +0100 Received: from linux-gy6r.site (nwb-a10-snat.microfocus.com [10.120.13.201]) by nwb-ext-pat.microfocus.com with ESMTP (TLS encrypted); Fri, 04 Mar 2016 11:42:18 +0000 From: Matthias Brugger To: linus.walleij@linaro.org, gnurou@gmail.com Cc: qnguyen@apm.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Matthias Brugger Subject: [PATCH] gpio: xgene: Fix kconfig for standby GIPO contoller Date: Fri, 4 Mar 2016 12:42:12 +0100 Message-Id: <1457091732-21924-1-git-send-email-mbrugger@suse.com> X-Mailer: git-send-email 2.6.2 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The standby GPIO controller can be used as a interrupt controller. Select GPIOLIB_IRQCHIP when compiling this driver. Otherwise we get a compilation error: drivers/gpio/gpio-xgene-sb.c: In function 'xgene_gpio_sb_probe': drivers/gpio/gpio-xgene-sb.c:312:10: error: 'struct gpio_chip' has no member named 'irqdomain' priv->gc.irqdomain = priv->irq_domain; ^ scripts/Makefile.build:295: recipe for target 'drivers/gpio/gpio-xgene-sb.o' failed make[2]: *** [drivers/gpio/gpio-xgene-sb.o] Error 1 Apart if compiled as module, we get the following modpost errors: ERROR: "irq_chip_eoi_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "irq_chip_unmask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "irq_chip_mask_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "irq_domain_create_hierarchy" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "gpiochip_get_data" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "irq_chip_set_type_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "irq_domain_alloc_irqs_parent" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "irq_domain_set_hwirq_and_chip" [drivers/gpio/gpio-xgene-sb.ko] undefined! ERROR: "irq_domain_reset_irq_data" [drivers/gpio/gpio-xgene-sb.ko] undefined! This patch changes the kconfig so that the gpio controller can only be build-in and selects GPIOLIB_IRQCHIP. Fixes: 1013fc41 "gpio: xgene: Enable X-Gene standby GPIO as interrupt controller" Cc: Quan Nguyen Signed-off-by: Matthias Brugger --- Changes for v2: - Add modprobe fix, changing tristate to bool - Add Cc tag drivers/gpio/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 619767b..ff67dc3 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -449,9 +449,10 @@ config GPIO_XGENE here to enable the GFC GPIO functionality. config GPIO_XGENE_SB - tristate "APM X-Gene GPIO standby controller support" + bool "APM X-Gene GPIO standby controller support" depends on ARCH_XGENE && OF_GPIO select GPIO_GENERIC + select GPIOLIB_IRQCHIP help This driver supports the GPIO block within the APM X-Gene Standby Domain. Say yes here to enable the GPIO functionality.