From patchwork Fri Oct 27 20:21:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 117381 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1178027qgn; Fri, 27 Oct 2017 13:22:09 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QxwYOgdaHYWSNdO78G2QIc6b08hgyWj3hWctmPqdLhziZkNSz9yclHB01k8tPZMR9/z2Vq X-Received: by 10.99.157.133 with SMTP id i127mr1270060pgd.204.1509135729748; Fri, 27 Oct 2017 13:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509135729; cv=none; d=google.com; s=arc-20160816; b=yY4kSt6f5V8HJDSQDuvbes70f1aisleL/Tncb+0KQIFOyamkUjY/0+jTfCoUfUpc/O /LLk3a1tEmJ6tYI0pVyQDtGYe+39X0nn2rZqmHY3O14Lo6OiplTdrj+mmoIdIofK+meM Ej2sblV2TOFKzZgToJUx4CSIhsWinbuFLPcDvp1hCMDt5hHLhC7wrs7W1gYYkDZkSh63 o6lcU1iaZW/8kU6X9rOhgerqluwGMX3vDxCE0eWII2k70CMsE5dRLpAdezNFnmCarZLu L3W2YvxXu5tEq/Ty8qVzRiNcKxKHu7pfiY9JaCThfnJ+kbjvz7XtGZgqFn4THSkfKypr 4qjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=LgO1Rfv3BERt/U0Fa8kgdg+GpJnnt/rTt70bAXorpyA=; b=tzKuVxS0nln0uL9IR0uHfJyJBLr5MITKBTxGE4HWppphVuw0QluOhiG8kDTY/gq6Og QHGjiLRji7kkf04XQmp1gFSRT4naQ3G+eGD7BvAhOULDJJ9uX0pk6Ij59LbuCRWaIKId ZSfVC67SzUZ+yxhWc0CKBmcj2MrmoFQTxzrjuYXU1lRO9xLni9R2IiG8AYCE7TVtxa9G ZNdOFaleSVwMoGezaj3nBe+81XnWqiKPl7Rh377vHu8LXhqrVH+BokBgnyuTWyqNIeR4 nhxkgppjGYiSZlZXS5cwps9EbaUHyupcRRypWTCEIuWoxlQxOJI2RZSltO4W+rzWOnDl 7tYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=E+57a4Tw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si4794691pld.579.2017.10.27.13.22.09; Fri, 27 Oct 2017 13:22:09 -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 header.s=google header.b=E+57a4Tw; 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 S1751854AbdJ0UWJ (ORCPT + 6 others); Fri, 27 Oct 2017 16:22:09 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:53116 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751831AbdJ0UWI (ORCPT ); Fri, 27 Oct 2017 16:22:08 -0400 Received: by mail-wm0-f67.google.com with SMTP id t139so5844078wmt.1 for ; Fri, 27 Oct 2017 13:22:07 -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=vwEgeMlANj81tpLa4Ph8+3rET1AF6vw2TAj/lcZ6Ejo=; b=E+57a4TwMLTdIJNlJzxlur8g9O+1JqSNmAbQObzWYxuqC0Xz0nI4lleJb03VgJt7Y/ FcD+/99e0sOGygAf3W3TFzC7wc9b/IqdVkwqnjRWjiV2yO6VcJmcrtAH6VKpUb0f3EHi 8Wpd+6aw29CCfSDG2+39bHm3ELgH9527hshf0= 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=vwEgeMlANj81tpLa4Ph8+3rET1AF6vw2TAj/lcZ6Ejo=; b=fjJ5yCtg2ospwAEkDtzaB6OGHk5BT6kmibupxDXnHO92QUtgXimnJ3C9XEAXcuuNZX Y02+RF/G4UeA3l802yu28O9+edG87cV8qneOQbbEfKMe9Bekexez1U1A7fdIXqd+j/tZ e/HbJuC32SCcS1KfclXB3S00jdRyOR9kjlUSYEegNexQ4ShheKODV+d45AaQcaFspQkU ZQNu/oFGQGMmkW1YS64odkjZxC+k8cMGrm+JWzK/2TsYbrcKF6nkXp95xgjKndNy6TDV EXiQwQVXzQe0jYdhPK7609YriCQ0pDbZBxnuergQtYOwQhOAAQmRSo5nUsqwRE0YHOjd lXPg== X-Gm-Message-State: AMCzsaVWVbyoXBptiUPXlWdVMfuLsIP4CeXI2/MQ709xAOd8JQXqaNp+ 8OpdfPnGByHOSnjBJ0cJf+jFbhkGYFo= X-Received: by 10.28.174.78 with SMTP id x75mr1427527wme.27.1509135727002; Fri, 27 Oct 2017 13:22:07 -0700 (PDT) Received: from localhost.localdomain ([160.171.245.11]) by smtp.gmail.com with ESMTPSA id c37sm10388722wrc.92.2017.10.27.13.22.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Oct 2017 13:22:05 -0700 (PDT) From: Ard Biesheuvel To: linux-gpio@vger.kernel.org Cc: linus.walleij@linaro.org, daniel.thompson@linaro.org, leif.lindholm@linaro.org, jaswinder.singh@linaro.org, masami.hiramatsu@linaro.org, Ard Biesheuvel , Geliang Tang , Paul Gortmaker Subject: [PATCH 1/2] gpio: mb86s7x: share with other SoCs as module Date: Fri, 27 Oct 2017 21:21:47 +0100 Message-Id: <20171027202148.4188-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171027202148.4188-1-ard.biesheuvel@linaro.org> References: <20171027202148.4188-1-ard.biesheuvel@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org In order to reuse this driver for the Socionext Synquacer SC2A11 SoC, which inherited this IP from Fujitsu, remove the ARCH_MB86S7X Kconfig dependency, and revert the changes that prevent it from being built as a module. This reverts commits d65aa4b67b4f47f303bdeaef1e4d42ef18e6b293 and d5610e514e92144d19bd5e39e5cf3804bbf85f3e. Cc: Geliang Tang Cc: Linus Walleij Cc: Paul Gortmaker Signed-off-by: Ard Biesheuvel --- drivers/gpio/Kconfig | 3 +-- drivers/gpio/gpio-mb86s7x.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) -- 2.11.0 -- 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 3f80f167ed56..bf40a948e4cc 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -286,8 +286,7 @@ config GPIO_LYNXPOINT Requires ACPI device enumeration code to set up a platform device. config GPIO_MB86S7X - bool "GPIO support for Fujitsu MB86S7x Platforms" - depends on ARCH_MB86S7X || COMPILE_TEST + tristate "GPIO support for Fujitsu MB86S7x Platforms" help Say yes here to support the GPIO controller in Fujitsu MB86S70 SoCs. diff --git a/drivers/gpio/gpio-mb86s7x.c b/drivers/gpio/gpio-mb86s7x.c index 94d772677ed6..6e1598471733 100644 --- a/drivers/gpio/gpio-mb86s7x.c +++ b/drivers/gpio/gpio-mb86s7x.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -209,6 +210,7 @@ static const struct of_device_id mb86s70_gpio_dt_ids[] = { { .compatible = "fujitsu,mb86s70-gpio" }, { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, mb86s70_gpio_dt_ids); static struct platform_driver mb86s70_gpio_driver = { .driver = { @@ -219,4 +221,12 @@ static struct platform_driver mb86s70_gpio_driver = { .remove = mb86s70_gpio_remove, }; -builtin_platform_driver(mb86s70_gpio_driver); +static int __init mb86s70_gpio_init(void) +{ + return platform_driver_register(&mb86s70_gpio_driver); +} +module_init(mb86s70_gpio_init); + +MODULE_DESCRIPTION("MB86S7x GPIO Driver"); +MODULE_ALIAS("platform:mb86s70-gpio"); +MODULE_LICENSE("GPL");