aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mfd/Kconfig8
-rw-r--r--drivers/mfd/Makefile1
-rw-r--r--drivers/mfd/anatop-mfd.c124
-rw-r--r--include/linux/mfd/anatop.h40
4 files changed, 0 insertions, 173 deletions
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 909d84b1f5c1..b0d7d9b5b7d4 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -996,14 +996,6 @@ config MFD_STA2X11
996 depends on STA2X11 996 depends on STA2X11
997 select MFD_CORE 997 select MFD_CORE
998 998
999config MFD_ANATOP
1000 bool "Support for Freescale i.MX on-chip ANATOP controller"
1001 depends on SOC_IMX6Q
1002 help
1003 Select this option to enable Freescale i.MX on-chip ANATOP
1004 MFD controller. This controller embeds regulator and
1005 thermal devices for Freescale i.MX platforms.
1006
1007config MFD_SYSCON 999config MFD_SYSCON
1008 bool "System Controller Register R/W Based on Regmap" 1000 bool "System Controller Register R/W Based on Regmap"
1009 depends on OF 1001 depends on OF
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 07b66aff30b4..b88cdb876e15 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -131,6 +131,5 @@ obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o
131obj-$(CONFIG_MFD_PALMAS) += palmas.o 131obj-$(CONFIG_MFD_PALMAS) += palmas.o
132obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o 132obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o
133obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o 133obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o
134obj-$(CONFIG_MFD_ANATOP) += anatop-mfd.o
135obj-$(CONFIG_MFD_SYSCON) += syscon.o 134obj-$(CONFIG_MFD_SYSCON) += syscon.o
136obj-$(CONFIG_MFD_LM3533) += lm3533-core.o lm3533-ctrlbank.o 135obj-$(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 5576e07576de..000000000000
--- a/drivers/mfd/anatop-mfd.c
+++ /dev/null
@@ -1,124 +0,0 @@
1/*
2 * Anatop MFD driver
3 *
4 * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
5 * Copyright (C) 2012 Linaro
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23 * (at your option) any later version.
24 *
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
29 *
30 * You should have received a copy of the GNU General Public License along
31 * with this program; if not, write to the Free Software Foundation, Inc.,
32 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 *
34 */
35
36#include <linux/io.h>
37#include <linux/module.h>
38#include <linux/platform_device.h>
39#include <linux/of.h>
40#include <linux/of_platform.h>
41#include <linux/of_address.h>
42#include <linux/mfd/anatop.h>
43
44u32 anatop_read_reg(struct anatop *adata, u32 addr)
45{
46 return readl(adata->ioreg + addr);
47}
48EXPORT_SYMBOL_GPL(anatop_read_reg);
49
50void anatop_write_reg(struct anatop *adata, u32 addr, u32 data, u32 mask)
51{
52 u32 val;
53
54 data &= mask;
55
56 spin_lock(&adata->reglock);
57 val = readl(adata->ioreg + addr);
58 val &= ~mask;
59 val |= data;
60 writel(val, adata->ioreg + addr);
61 spin_unlock(&adata->reglock);
62}
63EXPORT_SYMBOL_GPL(anatop_write_reg);
64
65static const struct of_device_id of_anatop_match[] = {
66 { .compatible = "fsl,imx6q-anatop", },
67 { },
68};
69
70static int __devinit of_anatop_probe(struct platform_device *pdev)
71{
72 struct device *dev = &pdev->dev;
73 struct device_node *np = dev->of_node;
74 void *ioreg;
75 struct anatop *drvdata;
76
77 ioreg = of_iomap(np, 0);
78 if (!ioreg)
79 return -EADDRNOTAVAIL;
80 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
81 if (!drvdata)
82 return -ENOMEM;
83 drvdata->ioreg = ioreg;
84 spin_lock_init(&drvdata->reglock);
85 platform_set_drvdata(pdev, drvdata);
86 of_platform_populate(np, NULL, NULL, dev);
87
88 return 0;
89}
90
91static int __devexit of_anatop_remove(struct platform_device *pdev)
92{
93 struct anatop *drvdata;
94 drvdata = platform_get_drvdata(pdev);
95 iounmap(drvdata->ioreg);
96
97 return 0;
98}
99
100static struct platform_driver anatop_of_driver = {
101 .driver = {
102 .name = "anatop-mfd",
103 .owner = THIS_MODULE,
104 .of_match_table = of_anatop_match,
105 },
106 .probe = of_anatop_probe,
107 .remove = of_anatop_remove,
108};
109
110static int __init anatop_init(void)
111{
112 return platform_driver_register(&anatop_of_driver);
113}
114postcore_initcall(anatop_init);
115
116static void __exit anatop_exit(void)
117{
118 platform_driver_unregister(&anatop_of_driver);
119}
120module_exit(anatop_exit);
121
122MODULE_AUTHOR("Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>");
123MODULE_DESCRIPTION("ANATOP MFD driver");
124MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mfd/anatop.h b/include/linux/mfd/anatop.h
deleted file mode 100644
index 7f92acf03d9e..000000000000
--- a/include/linux/mfd/anatop.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * anatop.h - Anatop MFD driver
3 *
4 * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
5 * Copyright (C) 2012 Linaro
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#ifndef __LINUX_MFD_ANATOP_H
23#define __LINUX_MFD_ANATOP_H
24
25#include <linux/spinlock.h>
26
27/**
28 * anatop - MFD data
29 * @ioreg: ioremap register
30 * @reglock: spinlock for register read/write
31 */
32struct anatop {
33 void *ioreg;
34 spinlock_t reglock;
35};
36
37extern u32 anatop_read_reg(struct anatop *, u32);
38extern void anatop_write_reg(struct anatop *, u32, u32, u32);
39
40#endif /* __LINUX_MFD_ANATOP_H */