summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-05-09 21:28:37 +1000
committerDave Airlie <airlied@linux.ie>2006-06-02 10:03:21 +1000
commit66e2c7c9ee9b4e08ebc86db12de15499b6c7d31b (patch)
treea48dfa0717a5ecfbeb9ffff43a90f2d2a2933727
parentd53c94321e5cce9d70291aac8a73fe39f811de00 (diff)
split sil164 headers
-rw-r--r--src/sil164/Makefile.am3
-rw-r--r--src/sil164/sil164.c1
-rw-r--r--src/sil164/sil164.h45
-rw-r--r--src/sil164/sil164_reg.h75
4 files changed, 78 insertions, 46 deletions
diff --git a/src/sil164/Makefile.am b/src/sil164/Makefile.am
index 46bcff30..bb84d036 100644
--- a/src/sil164/Makefile.am
+++ b/src/sil164/Makefile.am
@@ -12,4 +12,5 @@ sil164_ladir = @moduledir@/drivers
sil164_la_SOURCES = \
sil164.c \
sil164_module.c \
- sil164.h
+ sil164.h \
+ sil164_reg.h
diff --git a/src/sil164/sil164.c b/src/sil164/sil164.c
index 66dc7ac3..9f432a45 100644
--- a/src/sil164/sil164.c
+++ b/src/sil164/sil164.c
@@ -33,6 +33,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86i2c.h"
#include "sil164.h"
+#include "sil164_reg.h"
static Bool sil164ReadByte(SIL164Ptr sil, int addr, unsigned char *ch)
{
diff --git a/src/sil164/sil164.h b/src/sil164/sil164.h
index 842a4ac9..d7b91441 100644
--- a/src/sil164/sil164.h
+++ b/src/sil164/sil164.h
@@ -28,53 +28,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "../i2c_vid.h"
-#define SIL164_VID 0x0001
-#define SIL164_DID 0x0006
-
-#define SIL164_VID_LO 0x00
-#define SIL164_VID_HI 0x01
-#define SIL164_DID_LO 0x02
-#define SIL164_DID_HI 0x03
-#define SIL164_REV 0x04
-#define SIL164_RSVD 0x05
-#define SIL164_FREQ_LO 0x06
-#define SIL164_FREQ_HI 0x07
-
-#define SIL164_REG8 0x08
-#define SIL164_8_VEN (1<<5)
-#define SIL164_8_HEN (1<<4)
-#define SIL164_8_DSEL (1<<3)
-#define SIL164_8_BSEL (1<<2)
-#define SIL164_8_EDGE (1<<1)
-#define SIL164_8_PD (1<<0)
-
-#define SIL164_REG9 0x09
-#define SIL164_9_VLOW (1<<7)
-#define SIL164_9_MSEL_MASK (0x7<<4)
-#define SIL164_9_TSEL (1<<3)
-#define SIL164_9_RSEN (1<<2)
-#define SIL164_9_HTPLG (1<<1)
-#define SIL164_9_MDI (1<<0)
-
-#define SIL164_REGC 0x0c
-
-typedef struct _Sil164SaveRec {
- CARD8 freq_lo;
- CARD8 freq_hi;
- CARD8 reg8;
- CARD8 reg9;
- CARD8 regc;
-} SIL164SaveRec;
-
-typedef struct {
- I2CDevRec d;
- SIL164SaveRec SavedReg;
- SIL164SaveRec ModeReg;
-} SIL164Rec, *SIL164Ptr;
-
#define SIL164_ADDR_1 0x38
#define SIL164_SYMBOL_LIST "SIL164VidOutput"
-#define SILPTR(d) ((SIL164Ptr)(d->DriverPrivate.ptr))
#endif
diff --git a/src/sil164/sil164_reg.h b/src/sil164/sil164_reg.h
new file mode 100644
index 00000000..879363ca
--- /dev/null
+++ b/src/sil164/sil164_reg.h
@@ -0,0 +1,75 @@
+/**************************************************************************
+
+ Copyright 2006 Dave Airlie <airlied@linux.ie>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+on the rights to use, copy, modify, merge, publish, distribute, sub
+license, and/or sell copies of the Software, and to permit persons to whom
+the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+#ifndef SIL164_REG_H
+#define SIL164_REG_H
+
+#define SIL164_VID 0x0001
+#define SIL164_DID 0x0006
+
+#define SIL164_VID_LO 0x00
+#define SIL164_VID_HI 0x01
+#define SIL164_DID_LO 0x02
+#define SIL164_DID_HI 0x03
+#define SIL164_REV 0x04
+#define SIL164_RSVD 0x05
+#define SIL164_FREQ_LO 0x06
+#define SIL164_FREQ_HI 0x07
+
+#define SIL164_REG8 0x08
+#define SIL164_8_VEN (1<<5)
+#define SIL164_8_HEN (1<<4)
+#define SIL164_8_DSEL (1<<3)
+#define SIL164_8_BSEL (1<<2)
+#define SIL164_8_EDGE (1<<1)
+#define SIL164_8_PD (1<<0)
+
+#define SIL164_REG9 0x09
+#define SIL164_9_VLOW (1<<7)
+#define SIL164_9_MSEL_MASK (0x7<<4)
+#define SIL164_9_TSEL (1<<3)
+#define SIL164_9_RSEN (1<<2)
+#define SIL164_9_HTPLG (1<<1)
+#define SIL164_9_MDI (1<<0)
+
+#define SIL164_REGC 0x0c
+
+typedef struct _Sil164SaveRec {
+ CARD8 freq_lo;
+ CARD8 freq_hi;
+ CARD8 reg8;
+ CARD8 reg9;
+ CARD8 regc;
+} SIL164SaveRec;
+
+typedef struct {
+ I2CDevRec d;
+ SIL164SaveRec SavedReg;
+ SIL164SaveRec ModeReg;
+} SIL164Rec, *SIL164Ptr;
+
+#define SILPTR(d) ((SIL164Ptr)(d->DriverPrivate.ptr))
+
+#endif