From patchwork Wed Sep 5 02:57:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 1405011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 2FF2FDF28C for ; Wed, 5 Sep 2012 03:23:24 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T96AQ-0000w9-6s; Wed, 05 Sep 2012 03:20:38 +0000 Received: from db3ehsobe006.messaging.microsoft.com ([213.199.154.144] helo=db3outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T969p-0000kv-Ht for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 03:20:03 +0000 Received: from mail36-db3-R.bigfish.com (10.3.81.235) by DB3EHSOBE002.bigfish.com (10.3.84.22) with Microsoft SMTP Server id 14.1.225.23; Wed, 5 Sep 2012 03:19:59 +0000 Received: from mail36-db3 (localhost [127.0.0.1]) by mail36-db3-R.bigfish.com (Postfix) with ESMTP id C8CCD3800C9; Wed, 5 Sep 2012 03:19:59 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 6 X-BigFish: VS6(zzc8kzz1202h1082kzz8275dhz2dh2a8h668h839hd24he5bhf0ah107ah1155h) Received: from mail36-db3 (localhost.localdomain [127.0.0.1]) by mail36-db3 (MessageSwitch) id 1346815198268642_8837; Wed, 5 Sep 2012 03:19:58 +0000 (UTC) Received: from DB3EHSMHS014.bigfish.com (unknown [10.3.81.243]) by mail36-db3.bigfish.com (Postfix) with ESMTP id 3C90A4A024C; Wed, 5 Sep 2012 03:19:58 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS014.bigfish.com (10.3.87.114) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 5 Sep 2012 03:19:55 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.309.3; Tue, 4 Sep 2012 22:19:53 -0500 Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id q853JRsZ019377; Tue, 4 Sep 2012 20:19:49 -0700 From: Dong Aisheng To: Subject: [PATCH v6 4/4] mfd: anatop-mfd: remove anatop driver Date: Wed, 5 Sep 2012 10:57:16 +0800 Message-ID: <1346813836-28736-5-git-send-email-b29396@freescale.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1346813836-28736-1-git-send-email-b29396@freescale.com> References: <1346813836-28736-1-git-send-email-b29396@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [213.199.154.144 listed in list.dnswl.org] 0.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linus.walleij@stericsson.com, swarren@wwwdotorg.org, devicetree-discuss@lists.ozlabs.org, s.hauer@pengutronix.de, broonie@opensource.wolfsonmicro.com, rob.herring@calxeda.com, grant.likely@secretlab.ca, richard.zhao@freescale.com, kernel@pengutronix.de, shawn.guo@linaro.org, lrg@ti.com, linux-arm-kernel@lists.infradead.org, sameo@linux.intel.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Dong Aisheng The anatop registers are accessed via syscon now, no one will use mfd anatop driver anymore, remove it. Acked-by: Stephen Warren Signed-off-by: Dong Aisheng --- drivers/mfd/Kconfig | 8 --- drivers/mfd/Makefile | 1 - drivers/mfd/anatop-mfd.c | 124 -------------------------------------------- include/linux/mfd/anatop.h | 40 -------------- 4 files changed, 0 insertions(+), 173 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 82247b7..0b5c0cc 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -985,14 +985,6 @@ config MFD_STA2X11 depends on STA2X11 select MFD_CORE -config MFD_ANATOP - bool "Support for Freescale i.MX on-chip ANATOP controller" - depends on SOC_IMX6Q - help - Select this option to enable Freescale i.MX on-chip ANATOP - MFD controller. This controller embeds regulator and - thermal devices for Freescale i.MX platforms. - config MFD_SYSCON bool "System Controller Register R/W Based on Regmap" depends on OF diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 8384bc9..0f10a95 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -130,6 +130,5 @@ obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o obj-$(CONFIG_MFD_PALMAS) += palmas.o obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o -obj-$(CONFIG_MFD_ANATOP) += anatop-mfd.o obj-$(CONFIG_MFD_SYSCON) += syscon.o obj-$(CONFIG_MFD_LM3533) += lm3533-core.o lm3533-ctrlbank.o diff --git a/drivers/mfd/anatop-mfd.c b/drivers/mfd/anatop-mfd.c deleted file mode 100644 index 5576e07..0000000 --- a/drivers/mfd/anatop-mfd.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Anatop MFD driver - * - * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) - * Copyright (C) 2012 Linaro - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include -#include -#include -#include -#include -#include -#include - -u32 anatop_read_reg(struct anatop *adata, u32 addr) -{ - return readl(adata->ioreg + addr); -} -EXPORT_SYMBOL_GPL(anatop_read_reg); - -void anatop_write_reg(struct anatop *adata, u32 addr, u32 data, u32 mask) -{ - u32 val; - - data &= mask; - - spin_lock(&adata->reglock); - val = readl(adata->ioreg + addr); - val &= ~mask; - val |= data; - writel(val, adata->ioreg + addr); - spin_unlock(&adata->reglock); -} -EXPORT_SYMBOL_GPL(anatop_write_reg); - -static const struct of_device_id of_anatop_match[] = { - { .compatible = "fsl,imx6q-anatop", }, - { }, -}; - -static int __devinit of_anatop_probe(struct platform_device *pdev) -{ - struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; - void *ioreg; - struct anatop *drvdata; - - ioreg = of_iomap(np, 0); - if (!ioreg) - return -EADDRNOTAVAIL; - drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); - if (!drvdata) - return -ENOMEM; - drvdata->ioreg = ioreg; - spin_lock_init(&drvdata->reglock); - platform_set_drvdata(pdev, drvdata); - of_platform_populate(np, NULL, NULL, dev); - - return 0; -} - -static int __devexit of_anatop_remove(struct platform_device *pdev) -{ - struct anatop *drvdata; - drvdata = platform_get_drvdata(pdev); - iounmap(drvdata->ioreg); - - return 0; -} - -static struct platform_driver anatop_of_driver = { - .driver = { - .name = "anatop-mfd", - .owner = THIS_MODULE, - .of_match_table = of_anatop_match, - }, - .probe = of_anatop_probe, - .remove = of_anatop_remove, -}; - -static int __init anatop_init(void) -{ - return platform_driver_register(&anatop_of_driver); -} -postcore_initcall(anatop_init); - -static void __exit anatop_exit(void) -{ - platform_driver_unregister(&anatop_of_driver); -} -module_exit(anatop_exit); - -MODULE_AUTHOR("Ying-Chun Liu (PaulLiu) "); -MODULE_DESCRIPTION("ANATOP MFD driver"); -MODULE_LICENSE("GPL v2"); diff --git a/include/linux/mfd/anatop.h b/include/linux/mfd/anatop.h deleted file mode 100644 index 7f92acf..0000000 --- a/include/linux/mfd/anatop.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * anatop.h - Anatop MFD driver - * - * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) - * Copyright (C) 2012 Linaro - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __LINUX_MFD_ANATOP_H -#define __LINUX_MFD_ANATOP_H - -#include - -/** - * anatop - MFD data - * @ioreg: ioremap register - * @reglock: spinlock for register read/write - */ -struct anatop { - void *ioreg; - spinlock_t reglock; -}; - -extern u32 anatop_read_reg(struct anatop *, u32); -extern void anatop_write_reg(struct anatop *, u32, u32, u32); - -#endif /* __LINUX_MFD_ANATOP_H */