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: 95191 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp952659qgd; Sun, 12 Mar 2017 16:28:43 -0700 (PDT) X-Received: by 10.84.232.1 with SMTP id h1mr42880151plk.95.1489361323135; Sun, 12 Mar 2017 16:28:43 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si16421668plb.171.2017.03.12.16.28.42; Sun, 12 Mar 2017 16:28:43 -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; 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 S935487AbdCLX2n (ORCPT + 4 others); Sun, 12 Mar 2017 19:28:43 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:35823 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933311AbdCLX2m (ORCPT ); Sun, 12 Mar 2017 19:28:42 -0400 Received: by mail-lf0-f53.google.com with SMTP id j90so57567771lfk.2 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=KOf631qXTogtCZkEqPqbusX+MfTMFUgWAg8ZnHP2c+ZQz/y2baNXvB3Ku7eHOA7dL1 w0QJqefRokCIreX0qbo0A17ydJpnSkJycvXUWgtmO4r5PKiEPl7T8bPLjyFLKv1pak0u RzYeSGM1wZbvQilgxYQ5UIoFr4gUNlPdg89/pP/HRYd/isa1kfjWafS8oZEgRozFn3+M flhYzIDbnrJ5wwA5q58y2hszSlTE0zxx+CHsHizMH0fmbf7AyGNzSSY7bQ/i/R/D/EKA PUc55ju02xRhfFOAcIqwSGsZccRUSNeQN3I2Jb0i94HL5eMkWF91pm1WE9WNiblRQcFL gtaw== X-Gm-Message-State: AMke39nWiV2arHwRvGG4Pbk5SJgmjv5V3teyIS48T6OXcSjN0f7RowFodwFlmxlZkwoPN42L 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 Cc: Janos Laube , Paulius Zaleckas , openwrt-devel@openwrt.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, Linus Walleij 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> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 -- 2.9.3 -- 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/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);