linux/Documentation/media/v4l-drivers
Mauro Carvalho Chehab c3739983d4 [media] gspca-cardlist.rst: update cardlist from drivers USB IDs
There are several missing USB IDs that are defined on gspca
drivers. Add them.

The missing entries were found/created using the following script:

<script>
use strict;
use File::Find;

my $src = "drivers/media/usb/gspca/";
my $table = 0;
my %data;

my $id;

my $len = 0;

open IN, "Documentation/media/v4l-drivers/gspca-cardlist.rst";
while (<IN>) {
	if (m/^=+\s+=+\s+=+$/) {
		$table++;
		next;
	}
	next if ($table != 2);
	if (m/^(\S+)\s+(\S+)\s+(.*)/) {
		$id = "$1_$2";
		$data{$id}->{driver} = $1;
		$data{$id}->{usb_id} = $2;
		$data{$id}->{name} = $3;
		$data{$id}->{valid} = 0;

		$len = length($3) if (length($3) > $len);
	}
}
close IN;

sub parse_dir {
        my $file = $File::Find::name;

	open IN, $file;

	my $driver = $file;

	$driver =~ s,($src),,;

	$driver =~ s,/.*,,;
	$driver =~ s,\.c$,,;

	while (<IN>) {
		next if (m,/\*.*USB_DEVICE,);
		if (m/USB_DEVICE[^\(]*\(\s*0x(\S+)\s*\,\s*0x(\S+)\)(.*)/) {
			my $n = "$1:$2";
			my $o = $3;
			$id = "${driver}_$n";

			$data{$id}->{valid} = 1;

			next if (defined $data{$id}->{driver});

			$data{$id}->{driver} = $driver;
			$data{$id}->{usb_id} = $n;

			if ($o =~ m,\/\*\s*(.*)\*\/,) {
				$n = $1;
				$n =~ s/\s+//;
				$data{$id}->{name} = $n;
			} else {
				$data{$id}->{name} = "";
			}
		}
	}
	close IN;
}

find({wanted => \&parse_dir, no_chdir => 1}, $src);

print "The gspca cards list\n";
print "====================\n\n";
print "The modules for the gspca webcam drivers are:\n\n";
print "- gspca_main: main driver\n";
print "- gspca\\_\\ *driver*: subdriver module with *driver* as follows\n\n";
print "=========	=========	" . "=" x $len . "\n";
print "*driver*	vend:prod	Device\n";
print "=========	=========	" . "=" x $len . "\n";

foreach my $id (sort { $data{$a}->{usb_id} . $data{$a}->{driver} cmp $data{$b}->{usb_id} . $data{$b}->{driver} } keys %data) {
	next if (!$data{$id}->{valid});

	my $s = sprintf "%-15s %s\t%s\n",
		$data{$id}->{driver}, $data{$id}->{usb_id}, $data{$id}->{name};

	# Replace tabs by spaces
	$s =~ s/[ \t]+$//;
        $s =~ s<^ {8}> <\t>;
        $s =~ s<^ {1,7}\t> <\t>;
        $s =~ s< {1,7}\t> <\t>;

	printf $s;
}
print "=========	=========	" . "=" x $len . "\n";
</script>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-24 07:22:01 -02:00
..
au0828-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
bttv-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
bttv.rst [media] docs-rst: better use the .. note:: tag 2016-08-22 10:02:29 -03:00
cafe_ccic.rst [media] doc-rst: convert cafe_ccic file to rst format 2016-07-17 22:41:13 -03:00
cardlist.rst [media] doc-rst: add gspca cardlist 2016-07-17 22:41:14 -03:00
cpia2.rst [media] docs-rst: v4l2-drivers book: adjust column margins 2016-08-22 10:35:20 -03:00
cx18.rst [media] doc-rst: add documentation for cpia2 driver 2016-07-17 22:49:56 -03:00
cx88-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
cx88.rst [media] doc-rst: Fix some Sphinx warnings 2016-07-23 08:03:24 -03:00
cx2341x.rst [media] cx2341x.rst: add contents of README.vbi 2016-07-18 14:07:10 -03:00
cx23885-cardlist.rst [media] cx23885: Add support for Hauppauge WinTV quadHD ATSC version 2016-08-24 16:20:16 -03:00
davinci-vpbe.rst [media] doc-rst: add davinci-vpbe documentation 2016-07-17 22:49:57 -03:00
em28xx-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
fimc.rst [media] doc-rst: better organize the media books 2016-07-23 08:03:24 -03:00
fourcc.rst [media] v4l-drivers/fourcc.rst: fix typo 2016-09-19 12:54:07 -03:00
gspca-cardlist.rst [media] gspca-cardlist.rst: update cardlist from drivers USB IDs 2016-10-24 07:22:01 -02:00
index.rst [media] doc-rst: Fix license for the media books 2016-07-23 08:03:24 -03:00
ivtv-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
ivtv.rst [media] doc-rst: Add ivtv documentation 2016-07-17 22:49:59 -03:00
meye.rst [media] doc-rst: add meye documentation 2016-07-17 22:49:59 -03:00
omap3isp.rst [media] doc-rst: add omap3isp documentation 2016-07-17 22:50:00 -03:00
omap4_camera.rst [media] doc-rst: add omap4_camera documentation 2016-07-17 22:50:00 -03:00
pvrusb2.rst [media] doc-rst: add documentation for pvrusb2 2016-07-17 22:50:01 -03:00
pxa_camera.rst [media] doc-rst: add pxa_camera documentation 2016-07-17 22:50:01 -03:00
radiotrack.rst [media] doc-rst: add documentation for radiotrack 2016-07-17 22:50:02 -03:00
saa7134-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
saa7134.rst [media] get rid of Documentation/video4linux/lifeview.txt 2016-07-18 14:28:58 -03:00
saa7164-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
sh_mobile_ceu_camera.rst [media] doc-rst: add sh_mobile_ceu_camera crop documentation 2016-07-17 22:51:14 -03:00
si470x.rst [media] doc-rst: add documentation for si470x 2016-07-17 22:51:15 -03:00
si476x.rst [media] docs-rst: v4l2-drivers book: adjust column margins 2016-08-22 10:35:20 -03:00
si4713.rst [media] doc-rst: add documentation for si4713 2016-07-17 22:51:16 -03:00
soc-camera.rst [media] doc-rst: add soc-camera documentation 2016-07-17 22:51:25 -03:00
tm6000-cardlist.rst [media] doc-rst: Fix some Sphinx warnings 2016-07-23 08:03:24 -03:00
tuner-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
tuners.rst [media] doc-rst: add documentation for tuners 2016-07-18 10:38:35 -03:00
usbvision-cardlist.rst [media] doc-rst: move cardlists to media/v4l-drivers 2016-07-17 16:30:33 -03:00
uvcvideo.rst [media] doc-rst: add documentation for uvcvideo 2016-07-17 22:51:26 -03:00
v4l-with-ir.rst [media] v4l-with-ir.rst: update it to reflect the current status 2016-07-17 22:51:28 -03:00
vivid.rst [media] doc-rst: add vivid documentation 2016-07-17 22:51:27 -03:00
zoran.rst [media] doc-rst: add documentation for Zoran driver 2016-07-17 22:51:26 -03:00
zr364xx.rst [media] docs-rst: fix some .. note:: occurrences 2016-08-22 10:36:57 -03:00