From patchwork Sun Mar 12 23:28:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9619607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7473660492 for ; Sun, 12 Mar 2017 23:31:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65BEE28438 for ; Sun, 12 Mar 2017 23:31:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A48A2843D; Sun, 12 Mar 2017 23:31:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E9F4228438 for ; Sun, 12 Mar 2017 23:31:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JyzzKi9LTsqOZ8ZL+aXEzodWeurD3YjhoTLVKRAogYI=; b=n2Nahzh+lGdmKFqdU6EkeZKHyA /pMGPqfqcOZ8CEdqwfSzzNCHc5qXtPdDb2RLat09TqfhT3pDXmK6HoptamqmW9JmfvYg10S7tviTH LGOQOv0odsn4COqGJN2PDktm8NVVazrLEtEqlwWiVMxMfveeQhmwC+KC5K4r35/CfRvlq5i/QaGFY 67dny63N1/p5WCtP+QVnpgU65SBX9I5jSZpFVCQ7wPOr6jSAr9fW0UBPK3oUXHvLlnqI+dDT1QHPQ XylYnkkM9814Qck7eQlbAhdKJhBt0ZFFQ0v64O1eHAHb0yvZr9+NPUKV5JfdAr5/TpgB7+dJ7QGNs jrskYebA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cnCxA-00035y-AT; Sun, 12 Mar 2017 23:31:08 +0000 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cnCv8-0000Gf-5r for linux-arm-kernel@lists.infradead.org; Sun, 12 Mar 2017 23:29:05 +0000 Received: by mail-lf0-x236.google.com with SMTP id z15so35463460lfd.1 for ; Sun, 12 Mar 2017 16:28: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:in-reply-to:references; bh=LUSn2Yh76kvsvmoNvXzkcH2xWi+pPjVFi4a29WPGS7A=; b=La2kDevDXaBlapFX4ywpey3d4WeLmgwz3B1XyckqL3+QbglGzRnRXBDD/MZX3lOQKz bsCRTpmtzpObceVJtObA0v4cHZRiKJGaPZDQbU3yPbUakKJ42GLCC6WQOvmZT1pJXWta SqlKeMED016Asl5g+kaCGurAMa9wxmOGQptS4= 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:in-reply-to :references; bh=LUSn2Yh76kvsvmoNvXzkcH2xWi+pPjVFi4a29WPGS7A=; b=cl0CS673tNJ0EtJmIRc2ZdIva1AHvhx3iWXdAFlDl7g47YU687aSIRfMsTxLDf4j2K Gjg+/NUSf/q+3jD4kzyAY3qyIdX+fjwy7GpHayIvKqZPIi80dX6+6IuXtJaKcj1K1bCi rPhEUlJkhklHfUTj+Yd+VLzgk7D8jSLFXLC4sq4nHLl0l3zRozhQJOyQDA5XzL3qxjwv zB5cqrv22cbsYiMGXtG86wg23n7ZCHOQ8fI1F6v8z3xQA1qRPPSFi2Dbv3fpMAoKhUCp Qoi9Dr9BYYZoDeOOXfTmGFXLDvDhe8mVCa0TwN7UtgdwtjJcEGY2q9SYd6ClEInwjaZM uctw== X-Gm-Message-State: AMke39ka/ondDpccF2otD65RkAUBxstX+o3NkN21DJRBDs8lmK/PjgZg/Wu/jnmlE8Z8EweG X-Received: by 10.25.29.204 with SMTP id d195mr7401739lfd.173.1489361320136; Sun, 12 Mar 2017 16:28:40 -0700 (PDT) Received: from localhost.localdomain (c-357171d5.014-348-6c756e10.cust.bredbandsbolaget.se. [213.113.113.53]) by smtp.gmail.com with ESMTPSA id l137sm1811955lfb.64.2017.03.12.16.28.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Mar 2017 16:28:38 -0700 (PDT) From: Linus Walleij To: Hans Ulli Kroll , Florian Fainelli , Jonas Jensen , Alexandre Courbot Subject: [PATCH 5/6] gpio: moxart: Switch to using the FTGPIO010 driver Date: Mon, 13 Mar 2017 00:28:17 +0100 Message-Id: <20170312232818.26304-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170312232818.26304-1-linus.walleij@linaro.org> References: <20170312232818.26304-1-linus.walleij@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170312_162902_428862_076BA396 X-CRM114-Status: GOOD ( 16.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: openwrt-devel@openwrt.org, Paulius Zaleckas , Linus Walleij , linux-gpio@vger.kernel.org, Janos Laube , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This just deletes the Moxa ART driver and replaces it with the more versatile Faraday FTGPIO010 driver. Make this default on for ARCH_GEMINI and ARCH_MOXART so we do not get Kconfig glitches. Cc: Jonas Jensen Signed-off-by: Linus Walleij --- drivers/gpio/Kconfig | 10 +----- drivers/gpio/Makefile | 1 - drivers/gpio/gpio-moxart.c | 84 ---------------------------------------------- 3 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 drivers/gpio/gpio-moxart.c diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 82ba825c224a..36298ddca3d6 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -206,10 +206,10 @@ config GPIO_GE_FPGA config GPIO_FTGPIO010 bool "Faraday FTGPIO010 GPIO" - depends on ARCH_GEMINI depends on OF_GPIO select GPIO_GENERIC select GPIOLIB_IRQCHIP + default (ARCH_GEMINI || ARCH_MOXART) help Support for common GPIOs from the Faraday FTGPIO010 IP core, found in Cortina systems Gemini platforms, Moxa ART and others. @@ -309,14 +309,6 @@ config GPIO_MOCKUP tools/testing/selftests/gpio/gpio-mockup.sh. Reference the usage in it. -config GPIO_MOXART - bool "MOXART GPIO support" - depends on ARCH_MOXART || COMPILE_TEST - select GPIO_GENERIC - help - Select this option to enable GPIO driver for - MOXA ART SoC devices. - config GPIO_MPC5200 def_bool y depends on PPC_MPC52xx diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index 4b904fec8273..bd995dc2a84a 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -80,7 +80,6 @@ obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o obj-$(CONFIG_GPIO_MM_LANTIQ) += gpio-mm-lantiq.o obj-$(CONFIG_GPIO_MOCKUP) += gpio-mockup.o -obj-$(CONFIG_GPIO_MOXART) += gpio-moxart.o obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o obj-$(CONFIG_GPIO_MPC8XXX) += gpio-mpc8xxx.o obj-$(CONFIG_GPIO_MSIC) += gpio-msic.o diff --git a/drivers/gpio/gpio-moxart.c b/drivers/gpio/gpio-moxart.c deleted file mode 100644 index d58d38906ba6..000000000000 --- a/drivers/gpio/gpio-moxart.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * MOXA ART SoCs GPIO driver. - * - * Copyright (C) 2013 Jonas Jensen - * - * Jonas Jensen - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define GPIO_DATA_OUT 0x00 -#define GPIO_DATA_IN 0x04 -#define GPIO_PIN_DIRECTION 0x08 - -static int moxart_gpio_probe(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - struct resource *res; - struct gpio_chip *gc; - void __iomem *base; - int ret; - - gc = devm_kzalloc(dev, sizeof(*gc), GFP_KERNEL); - if (!gc) - return -ENOMEM; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - - ret = bgpio_init(gc, dev, 4, base + GPIO_DATA_IN, - base + GPIO_DATA_OUT, NULL, - base + GPIO_PIN_DIRECTION, NULL, - BGPIOF_READ_OUTPUT_REG_SET); - if (ret) { - dev_err(&pdev->dev, "bgpio_init failed\n"); - return ret; - } - - gc->label = "moxart-gpio"; - gc->request = gpiochip_generic_request; - gc->free = gpiochip_generic_free; - gc->base = 0; - gc->owner = THIS_MODULE; - - ret = devm_gpiochip_add_data(dev, gc, NULL); - if (ret) { - dev_err(dev, "%s: gpiochip_add failed\n", - dev->of_node->full_name); - return ret; - } - - return ret; -} - -static const struct of_device_id moxart_gpio_match[] = { - { .compatible = "moxa,moxart-gpio" }, - { } -}; - -static struct platform_driver moxart_gpio_driver = { - .driver = { - .name = "moxart-gpio", - .of_match_table = moxart_gpio_match, - }, - .probe = moxart_gpio_probe, -}; -builtin_platform_driver(moxart_gpio_driver);