summaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/sn9c20x.c
AgeCommit message (Collapse)Author
2010-05-18V4L/DVB: gspca - sn9c20x: Add support for cameras using the MT9M112 sensorBrian Johnson
Adds the following models: - 0c45:624c - 0c45:628c - 0458:704a - 0458:704c Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: gspca - sn9c20x: Add upside down detectionBrian Johnson
Add support for detecting webcams that are mounted upside down in laptops. Currently the only two known are two MSI modesl using the 0c45:624f. Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: gspca - sn9c20x: Add support for camera LEDsBrian Johnson
Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: gspca - sn9c20x: use gspca's input device handlingMauro Carvalho Chehab
Drop custom code for handling the input button in favor of using gspca's input hanlding mechinism. Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18V4L/DVB: gspca - sn9c20x: Fix exposure control for HV7131R sensorGerman Galkin
Make the range of exposure values (0-0x1770) distribute evenly through HV7131R's exposure control bytes. Signed-off-by: German Galkin <galkinga@gmail.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06V4L/DVB: gspca - sn9c20x: Correct onstack wait_queue_head declarationYong Zhang
Use DECLARE_WAIT_QUEUE_HEAD_ONSTACK to make lockdep happy Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> CC: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-02-26V4L/DVB (13869): gspca - sn9c20x: Cleanup code.Jean-Francois Moine
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26V4L/DVB (13899): gspca - all subdrivers: Make control descriptors constant.Marton Nemeth
The ctrls field of struct sd_desc is declared as const in gspca.h. It is worth to initialize the content also with constant values. Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-01-17V4L/DVB (13868): gspca - sn9c20x: Fix test of unsigned.Roel Kluin
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> CC: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13626): gspca - many subdrivers: Fix some warnings.Jean-Francois Moine
- gl860.c:332:15: warning: cast to restricted __le16 - gl860.c:333:15: warning: cast to restricted __le16 - gl860-mi1320.c:348:5: warning: symbol 'mi1320_camera_settings' was not declared. Should it be static? - gl860-mi2020.c:772:5: warning: symbol 'mi2020_camera_settings' was not declared. Should it be static? - m5602_ov9650.c:444:7: warning: symbol 'data' shadows an earlier one - m5602_core.c:84:5: warning: symbol 'm5602_wait_for_i2c' was not declared. Should it be static? - m5602_core.c:391:6: warning: symbol 'm5602_disconnect' was not declared. Should it be static? - m5602_s5k4aa.c:530:23: warning: dubious: x | !y - m5602_s5k4aa.c:575:23: warning: dubious: x | !y - gspca.c:1196:13: warning: potentially expensive pointer subtraction - mr97310a.c:70:5: warning: symbol 'force_sensor_type' was not declared. Should it be static? - ov519.c:2025:4: warning: do-while statement is not a compound statement - ov519.c:2063:4: warning: do-while statement is not a compound statement - ov519.c:2089:4: warning: do-while statement is not a compound statement - ov519.c:1985:34: warning: incorrect type in assignment (different base types) - sn9c20x.c:1164:5: warning: symbol 'i2c_r1' was not declared. Should it be static? - sn9c20x.c:1189:5: warning: symbol 'i2c_r2' was not declared. Should it be static? - sn9c20x.c:2237:27: warning: right shift by bigger than source value - sn9c20x.c:2237:27: warning: right shift by bigger than source value Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in driversLaurent Pinchart
The video_device::minor field is used where it shouldn't, either to - test for error conditions that can't happen anymore with the current v4l-dvb core, - store the value in a driver private field that isn't used anymore, - check the video device type where video_device::vfl_type should be used, or - create the name of a kernel thread that should get a stable name. Remove or fix those use cases. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13453): gspca - all subdrivers: Remove the unused frame ptr from ↵Jean-Francois Moine
pkt_scan(). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12707): gspca - sn9c20x: Add SXGA support to MT9M111Brian Johnson
Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12706): gspca - sn9c20x: disable exposure/gain controls for MT9M111 ↵Brian Johnson
sensors. Using the MT9M111's IFP to handle exposure/gain gives better results. Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12705): gspca - sn9c20x: Add SXGA support to SOI968Brian Johnson
Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12703): gspca - sn9c20x: Reduces size of objectJoe Perches
Use s16 instead of int where possible. Use struct instead of arrays Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12704): gspca - sn9c20x: Fix exposure on SOI968 sensorsBrian Johnson
Fixes broken exposure on SOI968 webcams that was causing the camera to display a black screen Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12V4L/DVB (12351): gspca - sn9c20x: Misc fixesBrian Johnson
* use i2c_w instead of reg_w * return error on failure * read the correct number of bytes Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-24V4L/DVB (12286): sn9c20x: reorder includes to be like other driversMauro Carvalho Chehab
This is not just pure cosmetic, since the order affects the out-of-tree module build at the -hg development tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-24V4L/DVB (12283): gspca - sn9c20x: New subdriver for sn9c201 and sn9c202 bridges.Brian Johnson
Signed-off-by: Brian Johnson <brijohn@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>