Commit Graph

6476 Commits (2066930de6296ef7470de11eaa9b8bc9129721e8)

Author SHA1 Message Date
Baruch Siach 2066930de6 mx2_camera: Add soc_camera support for i.MX25/i.MX27
This is the soc_camera support developed by Sascha Hauer for the i.MX27.  Alan
Carvalho de Assis modified the original driver to get it working on more recent
kernels. I modified it further to add support for i.MX25. This driver has been
tested on i.MX25 and i.MX27 based platforms.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-28 09:28:36 +02:00
Linus Torvalds 7a9b149212 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
  USB: remove unused usb_buffer_alloc and usb_buffer_free macros
  usb: musb: update gfp/slab.h includes
  USB: ftdi_sio: fix legacy SIO-device header
  USB: kl5usb105: reimplement using generic framework
  USB: kl5usb105: minor clean ups
  USB: kl5usb105: fix memory leak
  USB: io_ti: use kfifo to implement write buffering
  USB: io_ti: remove unsused private counter
  USB: ti_usb: use kfifo to implement write buffering
  USB: ir-usb: fix incorrect write-buffer length
  USB: aircable: fix incorrect write-buffer length
  USB: safe_serial: straighten out read processing
  USB: safe_serial: reimplement read using generic framework
  USB: safe_serial: reimplement write using generic framework
  usb-storage: always print quirks
  USB: usb-storage: trivial debug improvements
  USB: oti6858: use port write fifo
  USB: oti6858: use kfifo to implement write buffering
  USB: cypress_m8: use kfifo to implement write buffering
  USB: cypress_m8: remove unused drain define
  ...

Fix up conflicts (due to usb_buffer_alloc/free renaming) in
	drivers/input/tablet/acecad.c
	drivers/input/tablet/kbtab.c
	drivers/input/tablet/wacom_sys.c
	drivers/media/video/gspca/gspca.c
	sound/usb/usbaudio.c
2010-05-20 21:26:12 -07:00
Alan Stern beb7b04a09 USB: remove leftover references to udev->autosuspend_disabled
This patch (as1373) fixes a couple of drivers outside the USB
subtree.  Devices are now disabled or enabled for autosuspend by
calling a core function instead of setting a flag.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20 13:21:40 -07:00
Daniel Mack 997ea58eb9 USB: rename usb_buffer_alloc() and usb_buffer_free() users
For more clearance what the functions actually do,

  usb_buffer_alloc() is renamed to usb_alloc_coherent()
  usb_buffer_free()  is renamed to usb_free_coherent()

They should only be used in code which really needs DMA coherency.

All call sites have been changed accordingly, except for staging
drivers.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20 13:21:38 -07:00
Randy Dunlap 6b46c3977c V4L/DVB: vivi and mem2mem_testdev need slab.h to build
Fix vivi and mem2mem_testdev build errors: need to #include <linux/slab.h>:

drivers/media/video/vivi.c:1144: error: implicit declaration of function 'kfree'
drivers/media/video/vivi.c:1156: error: implicit declaration of function 'kzalloc'
drivers/media/video/vivi.c:1156: warning: assignment makes pointer from integer without a cast
drivers/media/video/mem2mem_testdev.c:862: error: implicit declaration of function 'kzalloc'
drivers/media/video/mem2mem_testdev.c:862: warning: assignment makes pointer from integer without a cast
drivers/media/video/mem2mem_testdev.c:874: error: implicit declaration of function 'kfree'
drivers/media/video/mem2mem_testdev.c:944: warning: assignment makes pointer from integer without a cast

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:18 -03:00
Dan Carpenter 8b661b508b V4L/DVB: s2255drv: remove dead code
My concern initially was we dereference "dev" in the parameter list to
s2255_dev_err() but it turns out that code path is never used.
The s2255_stop_readpipe() is only called from one place and "dev" is
never null.  So this patch just removes the whole condition here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: linux-dev@sensoray.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:14 -03:00
Dan Carpenter aab9796f55 V4L/DVB: s2255drv: return if vdev not found
The original code didn't handle the case where vdev was not found so I
added a check for that.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: linux-dev@sensoray.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:14 -03:00
Dan Carpenter b9245d80c3 V4L/DVB: ov511: cleanup: remove unneeded null check
We dereference "ov" unconditionally throughout the function so there is
no way it can be NULL here.  This code has been around for ages so if
it were possible for "ov" to be NULL someone would have complained.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:13 -03:00
Dan Carpenter 16ee9bb100 V4L/DVB: media/mem2mem: dereferencing free memory
We dereferenced "ctx" on the error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:13 -03:00
Mats Randgaard 6fa7dac4b8 V4L/DVB: tvp7002.c: fix some copy-paste errors in the comments
Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:02 -03:00
Mats Randgaard 37eb446499 V4L/DVB: tvp7002.c: Add support for enum_dv_presets
Implement enum_dv_presets in tvp7002.

Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:02 -03:00
Brian Johnson 6ea23bd0bb V4L/DVB: gspca - sn9c20x: Fix non working mt9v111 sensor
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:01 -03:00
Brian Johnson 33ddc16f10 V4L/DVB: gspca - sn9c20x: HAS_BUTTON flag -> HAS_NO_BUTTON flag
Reverse HAS_BUTTON logic since most webcams either have a button or if
they don't don't bother to send any interrupts. However I have at least
one model that appears to leave the button GPIO floating and can send
a bogus interrupt.

Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:59:00 -03:00
Brian Johnson 5d26ed9102 V4L/DVB: gspca - sn9c20x: Add another MSI laptop to upsidedown device list
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:59 -03:00
Brian Johnson e077f86bac V4L/DVB: gspca - sn9c20x: Add another laptop to upsidedown device list
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:59 -03:00
Hans Verkuil 3e56b0f09c V4L/DVB: ivtv: fix VIDIOC_S_PRIORITY handling
VIDIOC_S_PRIORITY is also part of the ioctls that need to check the
access priority.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:58 -03:00
Hans Verkuil 4d6c871ac3 V4L/DVB: usbvision: add delay before detecting the saa711x
The detection of the saa711x often failed. Adding a small delay before
attempting to detect it fixed this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:58 -03:00
Hans Verkuil aeb506aaaa V4L/DVB: usbvision: don't use usb_set_intfdata, let v4l2_device_register handle this
v4l2_device_register already sets intfdata, no need to do this again.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:57 -03:00
Hans Verkuil f2b305cd67 V4L/DVB: hdpvr: fix disconnect sequence
Disconnecting the HDPVR caused a kernel oops if lockdep was enabled.
In addition, if an app still had video0 open and attempted to call ioctl
when the device was already disconnected the system would crash.

Move the freeing and cleanup code to the release function: that is the
right place for it since you know when you get there that nobody is
using the device.

Also removed usb_set_intfdata: v4l2_device_register sets this already
to v4l2_dev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:57 -03:00
Hans Verkuil dd0daf2a6f V4L/DVB: v4l2-dev: remove unnecessary lock around atomic clear_bit
No need to lock when unregistering the device: clear_bit is already an
atomic operation.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:56 -03:00
Hans Verkuil 0eed42e48a V4L/DVB: em28xx: g_tuner must set type field
The 'type' field was undefined but should be set to ANALOG_TV.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:55 -03:00
Hans Verkuil cf19cd3d8a V4L/DVB: tvp7002: fix query_dv_preset
If no signal or valid format is detected, then VIDIOC_QUERY_DV_PRESET must
return 0 and set the preset to V4L2_DV_INVALID.

This driver returned an error instead.

Also simplified the kernel messages a bit: change v4l2_err to v4l2_dbg (not
detecting a signal/valid format is not an error, so only print this info when
debug == 1) and do not call v4l_fill_dv_preset_info: it's overkill to do this
just for a debug message.

Thanks to Mats Randgaard for bringing this to my attention.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:54 -03:00
Hans Verkuil ffb4877ba0 V4L/DVB: v4l2-common: simplify prio utility functions
v4l2_prio_init/open/close returned an int when in fact they would
always return 0. Make these void functions.

v4l2_prio_close and v4l2_prio_check pass an enum v4l2_priority as a
pointer for no good reason. Replace with a normal enum v4l2_priority
argument.

These changes will simplify the work of moving priority handling into
the v4l core.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:54 -03:00
Hans Verkuil 530d2d3206 V4L/DVB: bttv: remove bogus prio check in g_frequency
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:53 -03:00
Hans Verkuil aae6e33f8d V4L/DVB: cx18/cx25840/saa7115/tvp5150: remove vbi support from s_fmt
Now that s_fmt is no longer used for VBI format setup in subdevs, remove
the VBI support from s_fmt.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:52 -03:00
Hans Verkuil 4a61ecbd34 V4L/DVB: em28xx: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:51 -03:00
Hans Verkuil 7e87ddb101 V4L/DVB: cx231xx: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:51 -03:00
Hans Verkuil 09419af39b V4L/DVB: pvrusb2: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:50 -03:00
Hans Verkuil add632cd25 V4L/DVB: cx18: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:50 -03:00
Hans Verkuil 4ff0790b6d V4L/DVB: ivtv: switch to new vbi subdev ops
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:49 -03:00
Hans Verkuil d37dad497c V4L/DVB: tvp5150: support new vbi ops to set/get VBI format
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:49 -03:00
Hans Verkuil 1dbf85397a V4L/DVB: saa7127: support new vbi ops to set/get VBI format
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:48 -03:00
Hans Verkuil 1585927de6 V4L/DVB: cx18: support new vbi ops to set/get VBI format
Also removed the bogus zeroing of fmt.sliced when setting up raw VBI.
This should have been removed in ivtv, but it was just copied-and-pasted
into cx18.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:48 -03:00
Hans Verkuil 5393db43f4 V4L/DVB: cx25840: support new vbi ops to set/get VBI format
Also removed the bogus zeroing of fmt.sliced when setting up raw VBI.

Switching between raw and sliced VBI changed in 2.6.28 and this memset
should have been removed at that time. It was never noticed because
the bridge driver will fill in the fmt.vbi values anyway.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:47 -03:00
Hans Verkuil 63d8adccec V4L/DVB: saa7115: support new vbi ops to set/get VBI format
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:46 -03:00
Hans Verkuil 32cd527f59 V4L/DVB: v4l: move vbi-specific video ops to a new vbi ops struct
Only a relatively small number of video receivers and transmitters actually
support VBI. So start moving the vbi specific ops to an ops struct of their
own.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:45 -03:00
Jean-François Moine b26d6e2178 V4L/DVB: gspca - main: Convert wMaxPacketSize from little endian 16 to cpu
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:45 -03:00
Laurent Pinchart cf7a50eeb6 V4L/DVB: uvcvideo: Prevent division by 0 when control step value is 0
The control step values reported by the device are used as a divisor
unchecked, which can result in a division by zero.

Check the step value and make it 1 when null.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:44 -03:00
Laurent Pinchart a90ef69c1f V4L/DVB: uvcvideo: Flag relative controls as write-only
The UVC relative controls (exposure time, iris, focus, zoom, pan/tilt)
are write-only (despite the UVC specification stating that the GET_CUR
request is mandatory). Mark the controls as such, and report the related
V4L2 controls V4L2_CTRL_FLAG_WRITE_ONLY.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:43 -03:00
Laurent Pinchart 6142120683 V4L/DVB: uvcvideo: Add support for V4L2_PIX_FMT_Y16
The Miricle 307K (17dc:0202) camera reports a 16-bit greyscale format,
support it in the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:42 -03:00
Randy Dunlap acc8cc4386 V4L/DVB: [-next] media: fix vivi build error
vivi uses find_font(), which is only available when FONTS
is enabled, so make vivi depend on FONTS.

ERROR: "find_font" [drivers/media/video/vivi.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:42 -03:00
Dmitri Belimov 0faa2ed5bf V4L/DVB: saa7134: Add support new Behold TV cards
[dougsland@redhat.com: Fixed cards numbers reject due changes in saa7134.h]

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:41 -03:00
Pawel Osciak 9b55843413 V4L/DVB: videobuf: make poll() report proper flags for output video devices
According to the V4L2 specification, poll() should set POLLOUT | POLLWRNORM
flags for output devices after the frame has been displayed.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:40 -03:00
Arnout Vandecappelle fc7f8fd42c V4L/DVB: buf-dma-sg.c: don't assume nr_pages == sglen
videobuf_pages_to_sg() and videobuf_vmalloc_to_sg() happen to create
a scatterlist element for every page.  However, this is not true for
bus addresses, so other functions shouldn't rely on the length of the
scatter list being equal to nr_pages.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:40 -03:00
Mauro Carvalho Chehab c06b062bea V4L/DVB: videobuf-vmalloc: remove __videobuf_sync()
videobuf-core checks if .sync ops is defined before calling.

So, we don't need a do-nothing function.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:39 -03:00
Mauro Carvalho Chehab 97f8105dcd V4L/DVB: videobuf-dma-sg: remove external function videobuf_dma_sync()
While analyzing one of the videobuf patches, I noticed that
videobuf_dma_sync is only used internally inside videobuf-dma-sg.
So, let's remove this function, merging the code at __videobuf_dma_sync()

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:38 -03:00
Hans Verkuil b2dfd1a45f V4L/DVB: videobuf: Add support for V4L2_BUF_FLAG_ERROR
For recoverable stream errors dqbuf() now returns 0 and the error flag
is set instead of returning EIO.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:37 -03:00
Kirill Smelkov b7589ac4ae V4L/DVB: bttv: Add another ids for IVC-200
I have 3 IVC-200 cards (with 4 video channels on each).

2 of the cards identify theirselves as 000[0-3]:a155 (ids already in
cardlist) and another one identifies itself as 080[0-3]:a155, which ids
were unknown so far.

Note - it's IVC-200, not IVC-200G.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:29 -03:00
Pierre Gronlier 16bfdaa41b V4L/DVB: Read MAC for TeVii S470 PCI-e DVB-S2 card
This patch retrieve the correct mac address from the eeprom for TeVii
S470 card.

Signed-off-by: Pierre Gronlier <pierre.gronlier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:28 -03:00
Mauro Carvalho Chehab 5013318ca4 V4L/DVB: em28xx: fix locks during dvb init sequence
Serialize DVB initialization, to avoid it to happen while analog
initialization is still happening.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:28 -03:00