mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 12:25:31 +00:00
c3739983d4
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> |
||
---|---|---|
.. | ||
au0828-cardlist.rst | ||
bttv-cardlist.rst | ||
bttv.rst | ||
cafe_ccic.rst | ||
cardlist.rst | ||
cpia2.rst | ||
cx18.rst | ||
cx88-cardlist.rst | ||
cx88.rst | ||
cx2341x.rst | ||
cx23885-cardlist.rst | ||
davinci-vpbe.rst | ||
em28xx-cardlist.rst | ||
fimc.rst | ||
fourcc.rst | ||
gspca-cardlist.rst | ||
index.rst | ||
ivtv-cardlist.rst | ||
ivtv.rst | ||
meye.rst | ||
omap3isp.rst | ||
omap4_camera.rst | ||
pvrusb2.rst | ||
pxa_camera.rst | ||
radiotrack.rst | ||
saa7134-cardlist.rst | ||
saa7134.rst | ||
saa7164-cardlist.rst | ||
sh_mobile_ceu_camera.rst | ||
si470x.rst | ||
si476x.rst | ||
si4713.rst | ||
soc-camera.rst | ||
tm6000-cardlist.rst | ||
tuner-cardlist.rst | ||
tuners.rst | ||
usbvision-cardlist.rst | ||
uvcvideo.rst | ||
v4l-with-ir.rst | ||
vivid.rst | ||
zoran.rst | ||
zr364xx.rst |