The patch number 8058 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Mauro Carvalho Chehab  <[EMAIL PROTECTED]>
v4l-board-dbg: Add registers for em28xx


Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>


---

 v4l2-apps/util/Makefile        |    3 -
 v4l2-apps/util/em28xx-dbg.h    |   84 +++++++++++++++++++++++++++++++++
 v4l2-apps/util/v4l-board-dbg.c |    9 +++
 3 files changed, 95 insertions(+), 1 deletion(-)

diff -r 29f4d60b0b87 -r 50be11af3fdb v4l2-apps/util/Makefile
--- a/v4l2-apps/util/Makefile   Mon Jun 16 18:03:41 2008 -0300
+++ b/v4l2-apps/util/Makefile   Mon Jun 16 18:04:06 2008 -0300
@@ -54,7 +54,8 @@ keytables:
        ./gen_keytables.pl ../../linux/drivers/media/common/ir-keymaps.c
 
 keytable: keytable.c parse.h keytables
-v4l-board-dbg: v4l-board-dbg.c bttv-dbg.h saa7134-dbg.h
+
+v4l-board-dbg: v4l-board-dbg.c bttv-dbg.h saa7134-dbg.h em28xx-dbg.h
 
 v4l2-driverids.cpp: ../../linux/include/linux/i2c-id.h
        @echo "struct driverid { const char *name; unsigned id; } driverids[] = 
{" >$@
diff -r 29f4d60b0b87 -r 50be11af3fdb v4l2-apps/util/em28xx-dbg.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/v4l2-apps/util/em28xx-dbg.h       Mon Jun 16 18:04:06 2008 -0300
@@ -0,0 +1,84 @@
+/*
+    Copyright (C) 2008 Mauro Carvalho Chehab <[EMAIL PROTECTED]>
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation version 2 of the License.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "v4l-board-dbg.h"
+
+#define EM28XX_IDENT "em28xx"
+
+/* Register name prefix */
+#define EM2800_PREFIX "EM2800_"
+#define EM2880_PREFIX "EM2880_"
+#define EM28XX_PREFIX "EM28XX_"
+
+static struct board_regs em28xx_regs[] = {
+       {0x08, EM2800_PREFIX "AUDIOSRC", 1},
+       {0x04, EM2880_PREFIX "GPO", 1},
+       {0x08, EM28XX_PREFIX "GPIO", 1},
+
+       {0x06, EM28XX_PREFIX "I2C_CLK", 1},
+       {0x0a, EM28XX_PREFIX "CHIPID", 1},
+       {0x0c, EM28XX_PREFIX "USBSUSP", 1},
+
+       {0x0e, EM28XX_PREFIX "AUDIOSRC", 1},
+       {0x0f, EM28XX_PREFIX "XCLK", 1},
+
+       {0x10, EM28XX_PREFIX "VINMODE", 1},
+       {0x11, EM28XX_PREFIX "VINCTRL", 1},
+       {0x12, EM28XX_PREFIX "VINENABLE", 1},
+
+       {0x14, EM28XX_PREFIX "GAMMA", 1},
+       {0x15, EM28XX_PREFIX "RGAIN", 1},
+       {0x16, EM28XX_PREFIX "GGAIN", 1},
+       {0x17, EM28XX_PREFIX "BGAIN", 1},
+       {0x18, EM28XX_PREFIX "ROFFSET", 1},
+       {0x19, EM28XX_PREFIX "GOFFSET", 1},
+       {0x1a, EM28XX_PREFIX "BOFFSET", 1},
+
+       {0x1b, EM28XX_PREFIX "OFLOW", 1},
+       {0x1c, EM28XX_PREFIX "HSTART", 1},
+       {0x1d, EM28XX_PREFIX "VSTART", 1},
+       {0x1e, EM28XX_PREFIX "CWIDTH", 1},
+       {0x1f, EM28XX_PREFIX "CHEIGHT", 1},
+
+       {0x20, EM28XX_PREFIX "YGAIN", 1},
+       {0x21, EM28XX_PREFIX "YOFFSET", 1},
+       {0x22, EM28XX_PREFIX "UVGAIN", 1},
+       {0x23, EM28XX_PREFIX "UOFFSET", 1},
+       {0x24, EM28XX_PREFIX "VOFFSET", 1},
+       {0x25, EM28XX_PREFIX "SHARPNESS", 1},
+
+       {0x26, EM28XX_PREFIX "COMPR", 1},
+       {0x27, EM28XX_PREFIX "OUTFMT", 1},
+
+       {0x28, EM28XX_PREFIX "XMIN", 1},
+       {0x29, EM28XX_PREFIX "XMAX", 1},
+       {0x2a, EM28XX_PREFIX "YMIN", 1},
+       {0x2b, EM28XX_PREFIX "YMAX", 1},
+
+       {0x30, EM28XX_PREFIX "HSCALELOW", 1},
+       {0x31, EM28XX_PREFIX "HSCALEHIGH", 1},
+       {0x32, EM28XX_PREFIX "VSCALELOW", 1},
+       {0x33, EM28XX_PREFIX "VSCALEHIGH", 1},
+
+       {0x40, EM28XX_PREFIX "AC97LSB", 1},
+       {0x41, EM28XX_PREFIX "AC97MSB", 1},
+       {0x42, EM28XX_PREFIX "AC97ADDR", 1},
+       {0x43, EM28XX_PREFIX "AC97BUSY", 1},
+
+       {0x02, EM28XX_PREFIX "MASTER_AC97", 1},
+       {0x10, EM28XX_PREFIX "LINE_IN_AC97", 1},
+       {0x14, EM28XX_PREFIX "VIDEO_AC97", 1},
+};
\ No newline at end of file
diff -r 29f4d60b0b87 -r 50be11af3fdb v4l2-apps/util/v4l-board-dbg.c
--- a/v4l2-apps/util/v4l-board-dbg.c    Mon Jun 16 18:03:41 2008 -0300
+++ b/v4l2-apps/util/v4l-board-dbg.c    Mon Jun 16 18:04:06 2008 -0300
@@ -28,6 +28,7 @@
 
 #include "bttv-dbg.h"
 #include "saa7134-dbg.h"
+#include "em28xx-dbg.h"
 
 #define ARRAY_SIZE(arr) ((int)(sizeof(arr) / sizeof((arr)[0])))
 
@@ -57,6 +58,14 @@ struct board_list boards[] = {
                .alt_regs      = NULL,
                .alt_regs_size = 0,
        },
+       [2] = {                         /* From em28xx-dbg.h */
+               .name          = EM28XX_IDENT,
+               .prefix        = sizeof(EM28XX_PREFIX) - 1,
+               .regs          = em28xx_regs,
+               .regs_size     = ARRAY_SIZE(em28xx_regs),
+               .alt_regs      = NULL,
+               .alt_regs_size = 0,
+       },
 };
 
 static int is_get=0, is_set=0;


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/50be11af3fdbe1eb611e3bf2c94ff3e09fed9f84

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to