From patchwork Thu Jan 28 19:44:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alban X-Patchwork-Id: 574850 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 02055140BA0 for ; Fri, 29 Jan 2016 06:44:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965765AbcA1To4 (ORCPT ); Thu, 28 Jan 2016 14:44:56 -0500 Received: from smtp2-g21.free.fr ([212.27.42.2]:61481 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965584AbcA1Toz (ORCPT ); Thu, 28 Jan 2016 14:44:55 -0500 Received: from localhost.localdomain (unknown [176.2.68.19]) (Authenticated sender: albeu) by smtp2-g21.free.fr (Postfix) with ESMTPA id 088944B013B; Thu, 28 Jan 2016 20:42:45 +0100 (CET) From: Alban Bedel To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Alexandre Courbot , Antony Pavlov , Gabor Juhos , linux-kernel@vger.kernel.org, Alban Bedel Subject: [PATCH 2/5] gpio: ath79: Allow building in compile tests Date: Thu, 28 Jan 2016 20:44:30 +0100 Message-Id: <1454010273-21513-2-git-send-email-albeu@free.fr> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1454010273-21513-1-git-send-email-albeu@free.fr> References: <1454010273-21513-1-git-send-email-albeu@free.fr> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org To allow building the driver in compile tests we must drop the dependency on asm/mach-ath79/ar71xx_regs.h. For this we replace the include with local definition of the registers needed for this driver. Signed-off-by: Alban Bedel --- drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-ath79.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index ee9909c..04118f3 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -129,7 +129,7 @@ config GPIO_AMDPT config GPIO_ATH79 tristate "Atheros AR71XX/AR724X/AR913X GPIO support" default y if ATH79 - depends on ATH79 + depends on ATH79 || COMPILE_TEST select GPIO_GENERIC help Select this option to enable GPIO driver for diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c index 13d9648..afb535e 100644 --- a/drivers/gpio/gpio-ath79.c +++ b/drivers/gpio/gpio-ath79.c @@ -16,7 +16,10 @@ #include #include -#include +#define AR71XX_GPIO_REG_OE 0x00 +#define AR71XX_GPIO_REG_IN 0x04 +#define AR71XX_GPIO_REG_SET 0x0c +#define AR71XX_GPIO_REG_CLEAR 0x10 struct ath79_gpio_ctrl { struct gpio_chip gc;