linux/Documentation/media
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
..
dvb-drivers [media] doc-rst: Fix license for the media books 2016-07-23 08:03:24 -03:00
kapi [media] get rid of a number of problems at the cross references 2016-09-22 10:00:23 -03:00
media_api_files [media] docs-rst: re-generate typical_media_device.pdf 2016-08-22 10:06:06 -03:00
uapi [media] Documentation: Add HSV encodings 2016-10-21 15:53:19 -02:00
v4l-drivers [media] gspca-cardlist.rst: update cardlist from drivers USB IDs 2016-10-24 07:22:01 -02:00
audio.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
ca.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
cec.h.rst.exceptions [media] docs-rst: fix cec bad cross-references 2016-09-09 09:54:21 -03:00
conf_nitpick.py [media] conf_nitpick.py: ignore C domain data used on vb2 2016-09-09 10:18:07 -03:00
conf.py doc-rst: define PDF's of the media folder 2016-09-01 08:49:33 -06:00
dmx.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
frontend.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
index.rst [media] index.rst: Fix LaTeX error in interactive mode on Sphinx 1.4.x 2016-08-22 21:23:59 -03:00
intro.rst [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
lirc.h.rst.exceptions
Makefile Documentation/sphinx: build the media intermediate rst files for all outputs 2016-08-12 15:24:25 -06:00
media_kapi.rst [media] docs-rst: move cec kAPI documentation to the media book 2016-08-22 10:26:17 -03:00
media_uapi.rst [media] doc-rst: better organize the media books 2016-07-23 08:03:24 -03:00
media.h.rst.exceptions
net.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
video.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
videodev2.h.rst.exceptions [media] Documentation: Add HSV encodings 2016-10-21 15:53:19 -02:00