summaryrefslogtreecommitdiff
path: root/include/video
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2009-04-07 06:01:03 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 19:31:08 +0400
commitfeff3880d06da0cc8fc65b9e40f518fea7594674 (patch)
tree0feb97f54ac1af23056070576fe68e954a44b9a2 /include/video
parent8f9b15286a8ea49e997e845d02d357ed33ebd090 (diff)
downloadlinux-feff3880d06da0cc8fc65b9e40f518fea7594674.tar.xz
tdfxfb: move I2C functionality into the tdfxfb
The I2C functionality provided by the i2c-voodoo3 driver is moved into the tdfxfb (frame buffer driver for Voodoo3 cards). This way there is no conflict between the i2c driver and the fb driver. The tdfxfb does not make use from the DDC functionality yet but provides all the functionality of the i2c-voodoo3 driver. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/video')
-rw-r--r--include/video/tdfx.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/video/tdfx.h b/include/video/tdfx.h
index 7431d9681e57..befbaf0a92d8 100644
--- a/include/video/tdfx.h
+++ b/include/video/tdfx.h
@@ -1,6 +1,9 @@
#ifndef _TDFX_H
#define _TDFX_H
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+
/* membase0 register offsets */
#define STATUS 0x00
#define PCIINIT0 0x04
@@ -123,6 +126,18 @@
#define VIDCFG_PIXFMT_SHIFT 18
#define DACMODE_2X BIT(0)
+/* I2C bit locations in the VIDSERPARPORT register */
+#define DDC_ENAB 0x00040000
+#define DDC_SCL_OUT 0x00080000
+#define DDC_SDA_OUT 0x00100000
+#define DDC_SCL_IN 0x00200000
+#define DDC_SDA_IN 0x00400000
+#define I2C_ENAB 0x00800000
+#define I2C_SCL_OUT 0x01000000
+#define I2C_SDA_OUT 0x02000000
+#define I2C_SCL_IN 0x04000000
+#define I2C_SDA_IN 0x08000000
+
/* VGA rubbish, need to change this for multihead support */
#define MISC_W 0x3c2
#define MISC_R 0x3cc
@@ -168,12 +183,23 @@ struct banshee_reg {
unsigned long miscinit0;
};
+struct tdfx_par;
+
+struct tdfxfb_i2c_chan {
+ struct tdfx_par *par;
+ struct i2c_adapter adapter;
+ struct i2c_algo_bit_data algo;
+};
+
struct tdfx_par {
u32 max_pixclock;
u32 palette[16];
void __iomem *regbase_virt;
unsigned long iobase;
int mtrr_handle;
+#ifdef CONFIG_FB_3DFX_I2C
+ struct tdfxfb_i2c_chan chan[2];
+#endif
};
#endif /* __KERNEL__ */