summaryrefslogtreecommitdiff
path: root/drivers/media/video/cafe_ccic.c
AgeCommit message (Collapse)Author
2008-04-24V4L/DVB (7094): static memoryDouglas Schilling Landgraf
- Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04V4L/DVB (6395): cafe_ccic: Add a pointer to the data sheetJonathan Corbet
Add a pointer to the (recently posted) Cafe data sheet. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04V4L/DVB (6394): Fix a cafe_ccic resume bugJonathan Corbet
If the system is suspended while the camera is streaming, it will not continue streaming on resume. Save the state properly so that resume works. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6252): Adapt drivers to use the newer videobuf modulesMauro Carvalho Chehab
PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo. Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct. So, to access it, a subroutine call is needed. This patch renames all occurences of those function calls to be consistent with the video-buf split. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981 Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
2007-10-09V4L/DVB (6235): cafe_ccic: default to allocating DMA buffers at probe timeAndres Salomon
By default, we allocate DMA buffers when actually reading from the video capture device. On a system with 128MB or 256MB of ram, it's very easy for that memory to quickly become fragmented. We've had users report having 30+MB of memory free, but the cafe_ccic driver is still unable to allocate DMA buffers. Our workaround has been to make use of the 'alloc_bufs_at_load' parameter to allocate DMA buffers during device probing. This patch makes DMA buffer allocation happen during device probe by default, and changes the parameter to 'alloc_bufs_at_read'. The camera hardware is there, if the cafe_ccic driver is enabled/loaded it should do its best to ensure that the camera is actually usable; delaying DMA buffer allocation saves an insignicant amount of memory, and causes the driver to be much less useful. Signed-off-by: Andres Salomon <dilinger@debian.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-20V4L/DVB (6028): Turn an unnecessary mdelay() into msleep().Marcelo Tosatti
Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-20V4L/DVB (6027): Get rid of an ill-behaved msleep in i2c writeJonathan Corbet
Configuring the OLPC camera requires something over 150 register writes. Unfortunately, querying the CAFE i2c controller too soon after a write causes the hardware to flake. The problem had been "solved" with an msleep() call, but, between the number of registers and how msleep() behaves, that resulted in a 3-second delay on camera initialization. Instead, we hand-code a wait for the completion interrupt which avoids reading the status registers. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-20V4L/DVB (6026): Avoid powering up the camera on resumeChris Ball
Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22V4L/DVB (5690): Cafe_ccic: Properly power down the sensorJonathan Corbet
The proper method for powering down the sensor on OLPC systems has changed somewhat; in particular, the sensor must be powered down completely (rather than simply told to power down) or the associated "camera active" LED will stay on. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5557): Cafe_ccic: check return value of pci_enable_deviceTrent Piepho
Remove warnings Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5469a): Copyright and maintainer tweaksJonathan Corbet
Fix up Cafe/ov7670 copyrights and maintainer entries Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5467): Add suspend/resume support to the Cafe CCICJonathan Corbet
Add suspend/resume support to the Cafe CCIC driver. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5466): Fix up some Cafe CCIC delay issuesJonathan Corbet
Fix up unsociable Cafe CCIC delays. The Cafe CCIC driver contains some lengthy delays, some of which are unnecessary and some of which are done under lock. Some were marked with comments, but the comments somehow failed to make the issue go away. So fix it for real. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5465): Remove an obsolete PCI IDJonathan Corbet
Remove an obsolete PCI ID. The CAFE driver includes three PCI IDs, one of which corresponds to a development board which is no longer in use. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5464): Set the PCI device in the V4L2 deviceJonathan Corbet
Set the PCI dev in the V4L2 dev so that the proper sysfs link gets made Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27V4L/DVB (5306): Add support for VIDIOC_G_CHIP_IDENTHans Verkuil
VIDIOC_G_CHIP_IDENT improves debugging of card problems: it can be used to detect which chips are on the board and based on that information selected register dumps can be made, making it easy to debug complicated media chips containing tens or hundreds of registers. This ioctl replaces the internal VIDIOC_INT_G_CHIP_IDENT ioctl. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01V4L/DVB (5258): Cafe_ccic: fix compiler warningJean Delvare
Fix the following warning: drivers/media/video/cafe_ccic.c: In function `cafe_vidioc_reqbufs': drivers/media/video/cafe_ccic.c:1197: warning: 'ret' might be used uninitialized in this function Probably not a real bug, but the warning can be avoided easily. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21V4L/DVB (5198): Cafe_ccic.c fix warningJonathan Corbet
Quiet a spurious gcc warning. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-13i2c: Declare more i2c_adapter parent devicesJean Delvare
Declare the parent device of i2c_adapter devices each time we can easily do so. It makes the i2c_adapter appear at the right place in the device tree, rather than as a platform device. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Len Brown <len.brown@intel.com> Cc: Jordan Crouse <jordan.crouse@amd.com> Cc: Jody McIntyre <scjody@modernduck.com> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: v4l-dvb-maintainer@linuxtv.org Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
2007-02-12[PATCH] mark struct file_operations const 4Arjan van de Ven
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. [akpm@sdl.org: dvb fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-27V4L/DVB (4991): Cafe_ccic.c: fix NULL dereferenceAdrian Bunk
We shouldn't dereference "cam" when we already know it's NULL. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4909): Add s/g_parm to cafe_ccicJonathan Corbet
Add s/g_parm support allowing applications to tweak the frame rate. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4908): Remove the fake RGB32 format from cafe_ccicJonathan Corbet
Remove RGB32, useful for debugging, but with no place in production. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4861): Remove the need of a STD array for drivers using video_ioctl2Mauro Carvalho Chehab
video_ioctl2 will auto-generate standard entries at ENUM_FMT. Also, now, a driver may return a subset of the video array at the return, to be stored as the current_norm. For example, a driver may ask for V4L2_STD_PAL. At return, driver may change it to V4L2_STD_PAL_B. This way, a futher call to G_STD will return the exact detected video std. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4842): Updated camera driverJonathan Corbet
A couple of Cafe driver fixes, and support for the hue and saturation controls. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4834): Cafe_ccic.c: make a function staticAdrian Bunk
This patch makes the needlessly global cafe_v4l_dev_release() static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4797): Marvell 88ALP01 "cafe" driverJonathan Corbet
A driver for the Marvell M88ALP01 "CAFE" CMOS integrated camera controller. This driver has been renamed "cafe_ccic" since my previous patch set. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>