aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--Documentation/i2c/busses/i2c-voodoo362
-rw-r--r--drivers/i2c/busses/Kconfig16
-rw-r--r--drivers/i2c/busses/Makefile3
-rw-r--r--drivers/i2c/busses/i2c-voodoo3.c248
5 files changed, 0 insertions, 338 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index f613df8ec7bf..55169414f2f0 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -419,15 +419,6 @@ Who: Alex Chiang <achiang@hp.com>
419 419
420--------------------------- 420---------------------------
421 421
422What: i2c-voodoo3 driver
423When: October 2009
424Why: Superseded by tdfxfb. I2C/DDC support used to live in a separate
425 driver but this caused driver conflicts.
426Who: Jean Delvare <khali@linux-fr.org>
427 Krzysztof Helt <krzysztof.h1@wp.pl>
428
429---------------------------
430
431What: CONFIG_RFKILL_INPUT 422What: CONFIG_RFKILL_INPUT
432When: 2.6.33 423When: 2.6.33
433Why: Should be implemented in userspace, policy daemon. 424Why: Should be implemented in userspace, policy daemon.
diff --git a/Documentation/i2c/busses/i2c-voodoo3 b/Documentation/i2c/busses/i2c-voodoo3
deleted file mode 100644
index 62d90a454d39..000000000000
--- a/Documentation/i2c/busses/i2c-voodoo3
+++ /dev/null
@@ -1,62 +0,0 @@
1Kernel driver i2c-voodoo3
2
3Supported adapters:
4 * 3dfx Voodoo3 based cards
5 * Voodoo Banshee based cards
6
7Authors:
8 Frodo Looijaard <frodol@dds.nl>,
9 Philip Edelbrock <phil@netroedge.com>,
10 Ralph Metzler <rjkm@thp.uni-koeln.de>,
11 Mark D. Studebaker <mdsxyz123@yahoo.com>
12
13Main contact: Philip Edelbrock <phil@netroedge.com>
14
15The code is based upon Ralph's test code (he did the hard stuff ;')
16
17Description
18-----------
19
20The 3dfx Voodoo3 chip contains two I2C interfaces (aka a I2C 'master' or
21'host').
22
23The first interface is used for DDC (Data Display Channel) which is a
24serial channel through the VGA monitor connector to a DDC-compliant
25monitor. This interface is defined by the Video Electronics Standards
26Association (VESA). The standards are available for purchase at
27http://www.vesa.org .
28
29The second interface is a general-purpose I2C bus. The intent by 3dfx was
30to allow manufacturers to add extra chips to the video card such as a
31TV-out chip such as the BT869 or possibly even I2C based temperature
32sensors like the ADM1021 or LM75.
33
34Stability
35---------
36
37Seems to be stable on the test machine, but needs more testing on other
38machines. Simultaneous accesses of the DDC and I2C busses may cause errors.
39
40Supported Devices
41-----------------
42
43Specifically, this driver was written and tested on the '3dfx Voodoo3 AGP
443000' which has a tv-out feature (s-video or composite). According to the
45docs and discussions, this code should work for any Voodoo3 based cards as
46well as Voodoo Banshee based cards. The DDC interface has been tested on a
47Voodoo Banshee card.
48
49Issues
50------
51
52Probably many, but it seems to work OK on my system. :')
53
54
55External Device Connection
56--------------------------
57
58The digital video input jumpers give availability to the I2C bus.
59Specifically, pins 13 and 25 (bottom row middle, and bottom right-end) are
60the I2C clock and I2C data lines, respectively. +5V and GND are probably
61also easily available making the addition of extra I2C/SMBus devices easy
62to implement.
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index e8fe7f169e25..5f318ce29770 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -640,22 +640,6 @@ config I2C_TINY_USB
640 This driver can also be built as a module. If so, the module 640 This driver can also be built as a module. If so, the module
641 will be called i2c-tiny-usb. 641 will be called i2c-tiny-usb.
642 642
643comment "Graphics adapter I2C/DDC channel drivers"
644 depends on PCI
645
646config I2C_VOODOO3
647 tristate "Voodoo 3 (DEPRECATED)"
648 depends on PCI
649 select I2C_ALGOBIT
650 help
651 If you say yes to this option, support will be included for the
652 Voodoo 3 I2C interface. This driver is deprecated and you should
653 use the tdfxfb driver instead, which additionally provides
654 framebuffer support.
655
656 This driver can also be built as a module. If so, the module
657 will be called i2c-voodoo3.
658
659comment "Other I2C/SMBus bus drivers" 643comment "Other I2C/SMBus bus drivers"
660 644
661config I2C_ACORN 645config I2C_ACORN
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index ff937ac69f5b..302c551977bb 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -61,9 +61,6 @@ obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o
61obj-$(CONFIG_I2C_TAOS_EVM) += i2c-taos-evm.o 61obj-$(CONFIG_I2C_TAOS_EVM) += i2c-taos-evm.o
62obj-$(CONFIG_I2C_TINY_USB) += i2c-tiny-usb.o 62obj-$(CONFIG_I2C_TINY_USB) += i2c-tiny-usb.o
63 63
64# Graphics adapter I2C/DDC channel drivers
65obj-$(CONFIG_I2C_VOODOO3) += i2c-voodoo3.o
66
67# Other I2C/SMBus bus drivers 64# Other I2C/SMBus bus drivers
68obj-$(CONFIG_I2C_ACORN) += i2c-acorn.o 65obj-$(CONFIG_I2C_ACORN) += i2c-acorn.o
69obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o 66obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
diff --git a/drivers/i2c/busses/i2c-voodoo3.c b/drivers/i2c/busses/i2c-voodoo3.c
deleted file mode 100644
index 7663d57833a0..000000000000
--- a/drivers/i2c/busses/i2c-voodoo3.c
+++ /dev/null
@@ -1,248 +0,0 @@
1/*
2 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>,
3 Philip Edelbrock <phil@netroedge.com>,
4 Ralph Metzler <rjkm@thp.uni-koeln.de>, and
5 Mark D. Studebaker <mdsxyz123@yahoo.com>
6
7 Based on code written by Ralph Metzler <rjkm@thp.uni-koeln.de> and
8 Simon Vogl
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23*/
24
25/* This interfaces to the I2C bus of the Voodoo3 to gain access to
26 the BT869 and possibly other I2C devices. */
27
28#include <linux/kernel.h>
29#include <linux/module.h>
30#include <linux/init.h>
31#include <linux/pci.h>
32#include <linux/i2c.h>
33#include <linux/i2c-algo-bit.h>
34#include <asm/io.h>
35
36/* the only registers we use */
37#define REG 0x78
38#define REG2 0x70
39
40/* bit locations in the register */
41#define DDC_ENAB 0x00040000
42#define DDC_SCL_OUT 0x00080000
43#define DDC_SDA_OUT 0x00100000
44#define DDC_SCL_IN 0x00200000
45#define DDC_SDA_IN 0x00400000
46#define I2C_ENAB 0x00800000
47#define I2C_SCL_OUT 0x01000000
48#define I2C_SDA_OUT 0x02000000
49#define I2C_SCL_IN 0x04000000
50#define I2C_SDA_IN 0x08000000
51
52/* initialization states */
53#define INIT2 0x2
54#define INIT3 0x4
55
56/* delays */
57#define CYCLE_DELAY 10
58#define TIMEOUT (HZ / 2)
59
60
61static void __iomem *ioaddr;
62
63/* The voo GPIO registers don't have individual masks for each bit
64 so we always have to read before writing. */
65
66static void bit_vooi2c_setscl(void *data, int val)
67{
68 unsigned int r;
69 r = readl(ioaddr + REG);
70 if (val)
71 r |= I2C_SCL_OUT;
72 else
73 r &= ~I2C_SCL_OUT;
74 writel(r, ioaddr + REG);
75 readl(ioaddr + REG); /* flush posted write */
76}
77
78static void bit_vooi2c_setsda(void *data, int val)
79{
80 unsigned int r;
81 r = readl(ioaddr + REG);
82 if (val)
83 r |= I2C_SDA_OUT;
84 else
85 r &= ~I2C_SDA_OUT;
86 writel(r, ioaddr + REG);
87 readl(ioaddr + REG); /* flush posted write */
88}
89
90/* The GPIO pins are open drain, so the pins always remain outputs.
91 We rely on the i2c-algo-bit routines to set the pins high before
92 reading the input from other chips. */
93
94static int bit_vooi2c_getscl(void *data)
95{
96 return (0 != (readl(ioaddr + REG) & I2C_SCL_IN));
97}
98
99static int bit_vooi2c_getsda(void *data)
100{
101 return (0 != (readl(ioaddr + REG) & I2C_SDA_IN));
102}
103
104static void bit_vooddc_setscl(void *data, int val)
105{
106 unsigned int r;
107 r = readl(ioaddr + REG);
108 if (val)
109 r |= DDC_SCL_OUT;
110 else
111 r &= ~DDC_SCL_OUT;
112 writel(r, ioaddr + REG);
113 readl(ioaddr + REG); /* flush posted write */
114}
115
116static void bit_vooddc_setsda(void *data, int val)
117{
118 unsigned int r;
119 r = readl(ioaddr + REG);
120 if (val)
121 r |= DDC_SDA_OUT;
122 else
123 r &= ~DDC_SDA_OUT;
124 writel(r, ioaddr + REG);
125 readl(ioaddr + REG); /* flush posted write */
126}
127
128static int bit_vooddc_getscl(void *data)
129{
130 return (0 != (readl(ioaddr + REG) & DDC_SCL_IN));
131}
132
133static int bit_vooddc_getsda(void *data)
134{
135 return (0 != (readl(ioaddr + REG) & DDC_SDA_IN));
136}
137
138static int config_v3(struct pci_dev *dev)
139{
140 unsigned long cadr;
141
142 /* map Voodoo3 memory */
143 cadr = dev->resource[0].start;
144 cadr &= PCI_BASE_ADDRESS_MEM_MASK;
145 ioaddr = ioremap_nocache(cadr, 0x1000);
146 if (ioaddr) {
147 writel(0x8160, ioaddr + REG2);
148 writel(0xcffc0020, ioaddr + REG);
149 dev_info(&dev->dev, "Using Banshee/Voodoo3 I2C device at %p\n", ioaddr);
150 return 0;
151 }
152 return -ENODEV;
153}
154
155static struct i2c_algo_bit_data voo_i2c_bit_data = {
156 .setsda = bit_vooi2c_setsda,
157 .setscl = bit_vooi2c_setscl,
158 .getsda = bit_vooi2c_getsda,
159 .getscl = bit_vooi2c_getscl,
160 .udelay = CYCLE_DELAY,
161 .timeout = TIMEOUT
162};
163
164static struct i2c_adapter voodoo3_i2c_adapter = {
165 .owner = THIS_MODULE,
166 .name = "I2C Voodoo3/Banshee adapter",
167 .algo_data = &voo_i2c_bit_data,
168};
169
170static struct i2c_algo_bit_data voo_ddc_bit_data = {
171 .setsda = bit_vooddc_setsda,
172 .setscl = bit_vooddc_setscl,
173 .getsda = bit_vooddc_getsda,
174 .getscl = bit_vooddc_getscl,
175 .udelay = CYCLE_DELAY,
176 .timeout = TIMEOUT
177};
178
179static struct i2c_adapter voodoo3_ddc_adapter = {
180 .owner = THIS_MODULE,
181 .class = I2C_CLASS_DDC,
182 .name = "DDC Voodoo3/Banshee adapter",
183 .algo_data = &voo_ddc_bit_data,
184};
185
186static struct pci_device_id voodoo3_ids[] __devinitdata = {
187 { PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO3) },
188 { PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_BANSHEE) },
189 { 0, }
190};
191
192MODULE_DEVICE_TABLE (pci, voodoo3_ids);
193
194static int __devinit voodoo3_probe(struct pci_dev *dev, const struct pci_device_id *id)
195{
196 int retval;
197
198 retval = config_v3(dev);
199 if (retval)
200 return retval;
201
202 /* set up the sysfs linkage to our parent device */
203 voodoo3_i2c_adapter.dev.parent = &dev->dev;
204 voodoo3_ddc_adapter.dev.parent = &dev->dev;
205
206 retval = i2c_bit_add_bus(&voodoo3_i2c_adapter);
207 if (retval)
208 return retval;
209 retval = i2c_bit_add_bus(&voodoo3_ddc_adapter);
210 if (retval)
211 i2c_del_adapter(&voodoo3_i2c_adapter);
212 return retval;
213}
214
215static void __devexit voodoo3_remove(struct pci_dev *dev)
216{
217 i2c_del_adapter(&voodoo3_i2c_adapter);
218 i2c_del_adapter(&voodoo3_ddc_adapter);
219 iounmap(ioaddr);
220}
221
222static struct pci_driver voodoo3_driver = {
223 .name = "voodoo3_smbus",
224 .id_table = voodoo3_ids,
225 .probe = voodoo3_probe,
226 .remove = __devexit_p(voodoo3_remove),
227};
228
229static int __init i2c_voodoo3_init(void)
230{
231 return pci_register_driver(&voodoo3_driver);
232}
233
234static void __exit i2c_voodoo3_exit(void)
235{
236 pci_unregister_driver(&voodoo3_driver);
237}
238
239
240MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, "
241 "Philip Edelbrock <phil@netroedge.com>, "
242 "Ralph Metzler <rjkm@thp.uni-koeln.de>, "
243 "and Mark D. Studebaker <mdsxyz123@yahoo.com>");
244MODULE_DESCRIPTION("Voodoo3 I2C/SMBus driver");
245MODULE_LICENSE("GPL");
246
247module_init(i2c_voodoo3_init);
248module_exit(i2c_voodoo3_exit);