summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cafe_ccic.c
AgeCommit message (Collapse)Author
2007-10-23 cafe_ccic: Add a pointer to the data sheetMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-10-23 Fix a cafe_ccic resume bugMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-08-23Adapt 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-09-19 cafe_ccic: default to allocating DMA buffers at probe timeMauro Carvalho Chehab
From: Andres Salomon <dilinger@queued.net> 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-08-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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-17Turn an unnecessary mdelay() into msleep().Mauro Carvalho Chehab
From: Marcelo Tosatti <marcelo@kvack.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-17Get rid of an ill-behaved msleep in i2c writeMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-17Avoid powering up the camera on resumeMauro Carvalho Chehab
From: Chris Ball <cjb@laptop.org> 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-22Cafe_ccic: Properly power down the sensorMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-27Backport copyright changesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-25cafe_ccic: check return value of pci_enable_deviceMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> 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-03-254/7 Add suspend/resume support to the Cafe CCICMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-03-253/7 Fix up some Cafe CCIC delay issuesMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-03-252/7 Remove an obsolete PCI IDMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-03-251/7 Set the PCI device in the V4L2 deviceMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-02-25Remove V4L2_CHIP_MATCH_ALWAYS.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> V4L2_CHIP_MATCH_ALWAYS turned out to be confusing and also unnecessary. It's now removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-24Add support for VIDIOC_G_CHIP_IDENTHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> 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> CC: Jonathan Corbet <corbet@lwn.net>
2007-02-21backport changeset 12a917f69d1468c91d646dbad8408dd0d39d6207Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport changeset from Jean Delvare <khali@linux-fr.org> that declare i2c_adapter parent devices. kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21Backport: make file_operations constMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport a kernel patch by Arjan van de Ven <arjan@linux.intel.com> that made all file_operations instances const. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-13cafe_ccic: fix compiler warningMichael Krufky
From: Jean Delvare <khali@linux-fr.org> 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>
2007-02-06Cafe_ccic.c fix warningMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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>
2006-12-20Cafe_ccic.c: fix NULL dereferenceMauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> 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-01Add s/g_parm to cafe_ccicMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-01Remove the fake RGB32 format from cafe_ccicMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-11-20Remove the need of a STD array for drivers using video_ioctl2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> CC: Jonathan Corbet <corbet@lwn.net> 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-11-19Updated camera driverMauro Carvalho Chehab
From: Jonathan Corbet <corbet@lwn.net> 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-11-17Cafe_ccic.c: make a function staticMauro Carvalho Chehab
From: Adrian Bunk <bunk@stusta.de> 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-11-04Whitespace cleanupsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-04Make ov7670 and cafe_ccic compile at v4l-dvb treeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Those driver are developed using some stuff from newer kernels. Maybe they may compile with kernels lower than 2.6.19, but upper than 2.6.16. Anyway,since the targeted OLPC hardware is not available yet, IMO, it doesn't make much sense to work on backporting the drivers to kernels lower than kernel 2.6.19. CC: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-04Marvell 88ALP01 "cafe" driverMauro Carvalho Chehab
From: Jonathan Corbet <corbet-v4l@lwn.net> 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>