From patchwork Thu Nov 13 15:12:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 410454 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 647341400B6 for ; Fri, 14 Nov 2014 02:12:59 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933296AbaKMPM5 (ORCPT ); Thu, 13 Nov 2014 10:12:57 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:52930 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933114AbaKMPMy (ORCPT ); Thu, 13 Nov 2014 10:12:54 -0500 Received: by mail-pd0-f173.google.com with SMTP id v10so14732641pde.32 for ; Thu, 13 Nov 2014 07:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=TUC0AIP5pf+2MANoaGAF3JQRv7uPlGiTK57Tmr0USFA=; b=gAFr9mClWXp5TG4QCDnF9u4MWZOJc29UKU15qUkmxYS71NZxE0Jtqjk6xJNVH9Tw4v oUkyUUL7Y8VVXpkvjak+yq/ZD1WUSlA84xNguS5awKIIuoWVZ44F0GuKwKEEKZKNn5+8 V2O3UALjDhUR7+PYBAMAfmmegx7o2+E/hSoQfQS9/zg323y2X/tT5kx5ULpuCyadidIv ywtrn5epg8TRPWZm/X5L7kBeCMQ4/T/jGqoQTgMoXyj01qktsDh6n4xSyWw00C0HGloQ 5wYav4tS4fkzaZqL6vTZQ3jkHa17TGFz/tEjqWdGCnA8GYTDBNzGJxQ1zertM9dGR2OB 3Lpg== X-Received: by 10.70.48.38 with SMTP id i6mr3376385pdn.74.1415891574405; Thu, 13 Nov 2014 07:12:54 -0800 (PST) Received: from localhost.localdomain ([222.92.8.142]) by mx.google.com with ESMTPSA id gm11sm25086456pbd.63.2014.11.13.07.12.51 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Nov 2014 07:12:53 -0800 (PST) From: Huacai Chen To: Ralf Baechle Cc: John Crispin , "Steven J. Hill" , linux-mips@linux-mips.org, Fuxin Zhang , Zhangjin Wu , linux-gpio@vger.kernel.org, Huacai Chen Subject: [PATCH V4 2/6] MIPS: Move Loongson GPIO driver to drivers/gpio Date: Thu, 13 Nov 2014 23:12:40 +0800 Message-Id: <1415891560-8915-1-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 1.7.7.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Move Loongson-2's GPIO driver to drivers/gpio and add Kconfig options. Signed-off-by: Huacai Chen Acked-by: Alexandre Courbot --- arch/mips/configs/lemote2f_defconfig | 1 + arch/mips/loongson/common/Makefile | 1 - drivers/gpio/Kconfig | 6 ++++++ drivers/gpio/Makefile | 1 + .../common/gpio.c => drivers/gpio/gpio-loongson.c | 0 5 files changed, 8 insertions(+), 1 deletions(-) rename arch/mips/loongson/common/gpio.c => drivers/gpio/gpio-loongson.c (100%) diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig index 227a9de..0549b01 100644 --- a/arch/mips/configs/lemote2f_defconfig +++ b/arch/mips/configs/lemote2f_defconfig @@ -172,6 +172,7 @@ CONFIG_SERIAL_8250_FOURPORT=y CONFIG_LEGACY_PTY_COUNT=16 CONFIG_HW_RANDOM=y CONFIG_RTC=y +CONFIG_GPIO_LOONGSON=y CONFIG_THERMAL=y CONFIG_MEDIA_SUPPORT=m CONFIG_VIDEO_DEV=m diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile index 0bb9cc9..15fef59 100644 --- a/arch/mips/loongson/common/Makefile +++ b/arch/mips/loongson/common/Makefile @@ -4,7 +4,6 @@ obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \ bonito-irq.o mem.o machtype.o platform.o -obj-$(CONFIG_GPIOLIB) += gpio.o obj-$(CONFIG_PCI) += pci.o # diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 0959ca9..bc5ffac 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -452,6 +452,12 @@ config GPIO_GRGPIO Select this to support Aeroflex Gaisler GRGPIO cores from the GRLIB VHDL IP core library. +config GPIO_LOONGSON + tristate "Loongson-2 GPIO support" + depends on CPU_LOONGSON2 + help + driver for GPIO functionality on Loongson-2F processors. + config GPIO_TB10X bool select GENERIC_IRQ_CHIP diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index e5d346c..2153a71 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -39,6 +39,7 @@ obj-$(CONFIG_GPIO_JANZ_TTL) += gpio-janz-ttl.o obj-$(CONFIG_GPIO_KEMPLD) += gpio-kempld.o obj-$(CONFIG_ARCH_KS8695) += gpio-ks8695.o obj-$(CONFIG_GPIO_INTEL_MID) += gpio-intel-mid.o +obj-$(CONFIG_GPIO_LOONGSON) += gpio-loongson.o obj-$(CONFIG_GPIO_LP3943) += gpio-lp3943.o obj-$(CONFIG_ARCH_LPC32XX) += gpio-lpc32xx.o obj-$(CONFIG_GPIO_LYNXPOINT) += gpio-lynxpoint.o diff --git a/arch/mips/loongson/common/gpio.c b/drivers/gpio/gpio-loongson.c similarity index 100% rename from arch/mips/loongson/common/gpio.c rename to drivers/gpio/gpio-loongson.c