patch-2.1.120 linux/drivers/char/pms.c

Next file: linux/drivers/char/psaux.c
Previous file: linux/drivers/char/pc_keyb.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.119/linux/drivers/char/pms.c linux/drivers/char/pms.c
@@ -255,20 +255,6 @@
 	}
 }
 
-static void pms_hstart(short start)
-{
-	switch(decoder)
-	{
-		case PHILIPS1:
-			i2c_write(0x8A, 0x05, start);
-			i2c_write(0x8A, 0x18, start);
-			break;
-		case PHILIPS2:
-			i2c_write(0x42, 0x05, start);
-			i2c_write(0x42, 0x18, start);
-			break;
-	}
-}
 
 static void pms_format(short format)
 {
@@ -303,6 +289,29 @@
 	}
 }
 
+#ifdef FOR_FUTURE_EXPANSION
+
+/*
+ *	These features of the PMS card are not currently exposes. They
+ *	could become a private v4l ioctl for PMSCONFIG or somesuch if 
+ *	people need it. We also don't yet use the PMS interrupt.
+ */
+
+static void pms_hstart(short start)
+{
+	switch(decoder)
+	{
+		case PHILIPS1:
+			i2c_write(0x8A, 0x05, start);
+			i2c_write(0x8A, 0x18, start);
+			break;
+		case PHILIPS2:
+			i2c_write(0x42, 0x05, start);
+			i2c_write(0x42, 0x18, start);
+			break;
+	}
+}
+
 /*
  *	Bandpass filters
  */
@@ -347,14 +356,6 @@
 		i2c_andor(0x42, 0x10, 0xFC, noise&3);
 }
 
-static void pms_secamcross(short cross)
-{
-	if(decoder==PHILIPS2)
-		i2c_andor(0x8A, 0x0F, 0xDF, (cross&1)<<5);
-	else if(decoder==PHILIPS1)
-		i2c_andor(0x42, 0x0F, 0xDF, (cross&1)<<5);
-}
-
 static void pms_forcecolour(short colour)
 {
 	if(decoder==PHILIPS2)
@@ -409,20 +410,6 @@
 	}
 }
 
-static void pms_swsense(short sense)
-{
-	if(decoder==PHILIPS2)
-	{
-		i2c_write(0x8A, 0x0A, sense);
-		i2c_write(0x8A, 0x0B, sense);
-	}
-	else if(decoder==PHILIPS1)
-	{
-		i2c_write(0x42, 0x0A, sense);
-		i2c_write(0x42, 0x0B, sense);
-	}
-}
-
 static void pms_chromagain(short chroma)
 {
 	if(decoder==PHILIPS2)
@@ -446,6 +433,38 @@
 	mvv_write(0x3A, data);
 }
 
+static void pms_vstart(short start)
+{
+	mvv_write(0x16, start);
+	mvv_write(0x17, (start>>8)&0x01);
+}
+
+#endif
+
+static void pms_secamcross(short cross)
+{
+	if(decoder==PHILIPS2)
+		i2c_andor(0x8A, 0x0F, 0xDF, (cross&1)<<5);
+	else if(decoder==PHILIPS1)
+		i2c_andor(0x42, 0x0F, 0xDF, (cross&1)<<5);
+}
+
+
+static void pms_swsense(short sense)
+{
+	if(decoder==PHILIPS2)
+	{
+		i2c_write(0x8A, 0x0A, sense);
+		i2c_write(0x8A, 0x0B, sense);
+	}
+	else if(decoder==PHILIPS1)
+	{
+		i2c_write(0x42, 0x0A, sense);
+		i2c_write(0x42, 0x0B, sense);
+	}
+}
+
+
 static void pms_framerate(short frr)
 {
 	int fps=(standard==1)?30:25;
@@ -586,11 +605,6 @@
 	mvv_write(0x33, MVVMEMORYWIDTH);
 }
 
-static void pms_vstart(short start)
-{
-	mvv_write(0x16, start);
-	mvv_write(0x17, (start>>8)&0x01);
-}
 
 /*
  *	Set Input

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov