1
0
Fork 0
Commit Graph

669 Commits (6909ba14c25b4db6be2ff89f4fa0fac2d70151a0)

Author SHA1 Message Date
Márton Németh e26b314491 V4L/DVB: The first two parameters of soc_camera_limit_side() are usually pointers to struct v4l2_rect elements. They are signed, so adjust the prototype accordingly
This will remove the following sparse warning (see "make C=1"):

 * incorrect type in argument 1 (different signedness)
       expected unsigned int *start
       got signed int *<noident>

as well as a couple more signedness mismatches.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:44:09 -03:00
Hans Verkuil 03b1930efd V4L/DVB: saa7146: fix regression of the av7110/budget-av driver
An earlier regression fix for the mxb driver (V4L/DVB: saa7146_vv: fix
regression where v4l2_device was registered too late) caused a new
regression in the av7110 driver.

Reverted the old fix and fixed the problem in the mxb driver instead.
Tested on mxb and budget-av cards.

The real problem is that the saa7146 framework has separate probe()
and attach() driver callbacks which should be rolled into one. This
is now done for the mxb driver, but others should do the same. Lack
of hardware makes this hard to do, though. I hope to get hold of some
hexium cards and then I can try to improve the framework to prevent
this from happening again.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-06 19:20:50 -03:00
Jiri Kosina 318ae2edc3 Merge branch 'for-next' into for-linus
Conflicts:
	Documentation/filesystems/proc.txt
	arch/arm/mach-u300/include/mach/debug-macro.S
	drivers/net/qlge/qlge_ethtool.c
	drivers/net/qlge/qlge_main.c
	drivers/net/typhoon.c
2010-03-08 16:55:37 +01:00
Andy Walls dbb9de9bc1 V4L/DVB: tuner-types: Add Sony BTF-Pxn01Z tuner type used on GigaPocket cards
Sony makes custome tuners for its GigaPocket line of ivtv based capture
cards.  This adds an entry to the tuner-types list for such tuners.
Parameters are based on experiments by Eric Anderson <rico99@sbcglobal.net>.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:07 -03:00
Murali Karicheri 85b848caf7 V4L/DVB: V4L - vpfe capture - vpss driver enhancements for DM365
Enhancements to support DM365 ISP5 and VPSS module configuration.
Also cleaned up the driver by removing redundant variables.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Murali Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:06 -03:00
Murali Karicheri e8417683eb V4L/DVB: V4L - vpfe capture - header files for ISIF driver
This is the header file for ISIF driver on DM365.  ISIF driver is equivalent
to CCDC driver on DM355 and DM644x. This driver is tested for
YUV capture from TVP514x driver. This patch contains the header files required
for this driver.

Reviewed-by: Nori, Sekhar <nsekhar@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Murali Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:06 -03:00
Hans Verkuil 340dde817a V4L/DVB: saa7115: fix saa7111a support
When the saa7111 driver was merged into saa7115 several bugs were introduced,
in particular with the saa7111a support as is used in the mxb.c driver.
This patch fixes the saa7111a support. This was tested with the mxb driver.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:05 -03:00
Hans Verkuil cd7d9beb09 V4L/DVB: saa7146_vv: fix regression where v4l2_device was registered too late
v4l2_device_register needs to be called before the i2c subdevs are loaded.
However, it was called afterwards in the saa7146 driver. This caused an oops
when loading the mxb and hexium drivers. The vv_init function is now split
into two: one registers the v4l2_device, the other does the rest of the
initialization. The three drivers that depend on this have been updated to
call the new vv_devinit function.

Thanks to Michael Hunold for reporting this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:05 -03:00
Franklin Meng 9a0a75a5ab V4L/DVB: Add an entry for Kworld 315U remote
Signed-off-by: Franklin Meng <fmeng2002@yahoo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:02 -03:00
Santiago Nunez-Corrales d2da2611cc V4L/DVB: Definitions for TVP7002 in DM365
This patch provides the required definitions for the TVP7002 driver
in DM365.

Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:01 -03:00
Santiago Nunez-Corrales ff9118a516 V4L/DVB: Support for TVP7002 in v4l2 definitions
This patch provides required chip identification definitions
within v4l2. Included only definitions for TVP7002.

Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:01 -03:00
Guennadi Liakhovetski c9f6ef6986 soc-camera: add support for VIDIOC_S_PARM and VIDIOC_G_PARM ioctls
Just pass VIDIOC_S_PARM and VIDIOC_G_PARM down to host drivers. So far no
special handling in soc-camera core.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:00 -03:00
Kuninori Morimoto 3675c750cf soc-camera: ov772x: Modify buswidth control
This patch removes "buswidth" struct member, and sets the default buswidth
to the natively supported 10 bit. You can select 8 bit buswidth by new flag.
This patch also modify ap325rxa/migor setup.c

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:11:00 -03:00
Guennadi Liakhovetski 906b101886 tw9910: use TABs for indentation
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:59 -03:00
Richard Röjfors d44d1f3bfa V4L/DVB: radio: Add radio-timb
This patch add supports for the radio system on the Intel Russellville board.

It's a In-Vehicle Infotainment board with a radio tuner and DSP.

This umbrella driver has the DSP and tuner as V4L2 subdevs and calls them
when needed.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:56 -03:00
Richard Röjfors ee4b9dbb83 V4L/DVB: radio: add support for SAA7706H Car Radio DSP
Initial support for the SAA7706H Car Radio DSP.

It is a I2C device and currently the mute control is supported.

When the device is unmuted it is brought out of reset and initiated using
the proposed intialisation sequence.

When muted the DSP is brought into reset state.

[akpm@linux-foundation.org: include delay.h]

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Cc: Douglas Schilling Landgraf <dougsland@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:52 -03:00
Magnus Alm ca39d84d43 V4L/DVB: em28xx: fix for "Leadtek winfast tv usbii deluxe"
fix Video/Sound support "Leadtek winfast tv usbii deluxe".

Now, it is working Stereo, IR, Radio, TV, Svideo and Composite.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:51 -03:00
Andy Walls 3ccc646b56 V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio
This change attempts to fix the ivtv tinny audio problem by keeping digitizer
to encoder audio clocks running, while disabling the video clocks as needed to
avoid unpredictable PCI bus hangs.

To accomplish this, for the cx25840 module enabling of audio streaming had
to be separated from enabling video streaming, requiring an additional
v4l2_subdev_audio_op and calls to this new op in the pvrusb2 and ivtv drivers.

The cx231xx and cx23885 driver use the cx25840 module for affecting only
video on s_stream calls, so those drivers needed no change.

The CX23418 hardware does not exhibit either the tinny audio problem nor the PCI
bus hang, so the cx18 driver did not need corresponding changes.

CX2341[56] based cards that are not using the CX2584x family of chips
do not seem to be affected by the tinny audio problem, and this change should
not affect how they are configured. It will delay their first capture by
starting by another 300 msec though.

Many thanks go to Argus <pthorn-ivtvd@styx2002.no-ip.org> and
Martin Dauskardt <martin.dauskardt@gmx.de> whose persistent testing and
investigation of this problem will hopefully fix this problem once and for all
for many ivtv users.

Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Reported-by: Argus <pthorn-ivtvd@styx2002.no-ip.org>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:41 -03:00
Mauro Carvalho Chehab 8719cfdb4a V4L/DVB (13833): ir-core: some functions can be static
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:25 -03:00
Mauro Carvalho Chehab 971e8298de V4L/DVB (13680): ir: use unsigned long instead of enum
When preparing the linux-next patches, I got those errors:

include/media/ir-core.h:29: warning: left shift count >= width of type
In file included from include/media/ir-common.h:29,
                 from drivers/media/video/ir-kbd-i2c.c:50:
drivers/media/video/ir-kbd-i2c.c: In function ‘ir_probe’:
drivers/media/video/ir-kbd-i2c.c:324: warning: left shift count >= width of type

Unfortunately, enum is 32 bits on i386. As we define IR_TYPE_OTHER as 1<<63,
it won't work on non 64 bits arch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:24 -03:00
Mauro Carvalho Chehab 53f870228d V4L/DVB (13635): ir-core: Implement protocol table type reading
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Mauro Carvalho Chehab e93854da88 V4L/DVB (13634): ir-core: allow passing IR device parameters to ir-core
Adds an structure to ir_input_register to contain IR device characteristics,
like supported protocols and a callback to handle protocol event changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Mauro Carvalho Chehab 4714eda877 V4L/DVB (13633): ir-core: create a new class for remote controllers
Add sysfs skeleton to export remote controller information via
/sys/class/irrcv.

For now, the code doesn't do much. It just exports an attribute that
is meant to  report and control the IR protocol used by the keytable.
However, the callbacks for this new attribute weren't set yet.

Also, it lacks symlinks to the used event interface.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:23 -03:00
Daniel Mack 3ad2f3fbb9 tree-wide: Assorted spelling fixes
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-09 11:13:56 +01:00
Kuninori Morimoto 858424b998 V4L/DVB (13670): soc-camera: Add mt9t112 camera driver
create mode 100644 drivers/media/video/mt9t112.c
 create mode 100644 include/media/mt9t112.h

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:41 -02:00
Kuninori Morimoto 85dc1cff0d V4L/DVB (13665): sh_mobile_ceu_camera: Add support for sync polarity selection
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:35 -02:00
Guennadi Liakhovetski a6b5f2008a V4L/DVB (13661): rj54n1cb0c: Add cropping, auto white balance, restrict sizes, add platform data
It has been experimentally found out, that the sensor only supports up to
512x384 video output and also has some restrictions on minimum scale. We
disable non-working size ranges until, maybe, someone finds out how to properly
set them up. Also add cropping support, an auto white balance control, platform
data to specify master clock frequency and polarity of the IOCTL pin.

 create mode 100644 include/media/rj54n1cb0c.h

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:30 -02:00
Guennadi Liakhovetski 760697beca V4L/DVB (13659): soc-camera: convert to the new mediabus API
Convert soc-camera core and all soc-camera drivers to the new mediabus
API. This also takes soc-camera client drivers one step closer to also be
usable with generic v4l2-subdev host drivers.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:29 -02:00
Guennadi Liakhovetski 9a74251d8b V4L/DVB (13658): v4l: add a media-bus API for configuring v4l2 subdev pixel and frame formats
Video subdevices, like cameras, decoders, connect to video bridges over
specialised busses. Data is being transferred over these busses in various
formats, which only loosely correspond to fourcc codes, describing how video
data is stored in RAM. This is not a one-to-one correspondence, therefore we
cannot use fourcc codes to configure subdevice output data formats. This patch
adds codes for several such on-the-bus formats and an API, similar to the
familiar .s_fmt(), .g_fmt(), .try_fmt(), .enum_fmt() API for configuring those
codes. After all users of the old API in struct v4l2_subdev_video_ops are
converted, it will be removed. Also add helper routines to support generic
pass-through mode for the soc-camera framework.

 create mode 100644 drivers/media/video/soc_mediabus.c
 create mode 100644 include/media/soc_mediabus.h
 create mode 100644 include/media/v4l2-mediabus.h

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:27 -02:00
Guennadi Liakhovetski 0f4482940a V4L/DVB (13650): soc-camera: switch drivers and platforms to use .priv in struct soc_camera_link
After this change drivers can be further extended to not fail, if they don't
get platform data, but to use defaults.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:19 -02:00
Guennadi Liakhovetski 3fd7ceffdd V4L/DVB (13648): soc-camera: add a private field to struct soc_camera_link
Up to now, if a client driver needed platform data apart from those contained
in struct soc_camera_link, it had to embed the struct into its own object. This
makes the use of such a driver in configurations other than soc-camera

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:18 -02:00
Guennadi Liakhovetski 5d28d52545 V4L/DVB (13645): soc-camera: fix multi-line comment coding style
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:15 -02:00
Guennadi Liakhovetski 325361088b V4L/DVB (13644): v4l: add new v4l2-subdev sensor operations, use g_skip_top_lines in soc-camera
Introduce new v4l2-subdev sensor operations, move .enum_framesizes() and
.enum_frameintervals() methods to it, add a new .g_skip_top_lines() method
and switch soc-camera to use it instead of .y_skip_top soc_camera_device
member, which can now be removed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:13 -02:00
Guennadi Liakhovetski 11e3d1adbe V4L/DVB (13643): soc-camera: remove no longer needed struct members
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 09:27:12 -02:00
Muralidharan Karicheri 2e535ed5a1 V4L/DVB (13618): v4l2: Adding helper function to get dv preset description
This patch adds a helper function to get description of a digital
video preset added by the video timing API. This will be useful for drivers
implementing the above API.

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:47 -02:00
Mauro Carvalho Chehab 579e7d60ba V4L/DVB (13617): ir: move input_register_device() to happen inside ir_input_register()
We'll need to register a sysfs class for the IR devices. As such, the better
is to have the input_register_device()/input_unregister_device() inside
the ir register/unregister functions.

Also, solves a naming problem with V4L ir_input_init() function, that were,
in fact, registering a device.

While here, do a few cleanups at budget-ci IR logic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:45 -02:00
Mauro Carvalho Chehab 38ef6aa884 V4L/DVB (13616): IR: rename ir_input_free as ir_input_unregister
Now, ir_input_free does more than just freeing the keytab. Better to
rename it as ir_input_unregister.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:44 -02:00
Mauro Carvalho Chehab 75543cce0c V4L/DVB (13615): ir-core: create ir_input_register
Move non-V4L specific stuff from ir-functions ir_input_init() into
a new function to register ir devices: ir_input_register().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:44 -02:00
Mauro Carvalho Chehab 446e4a64d2 V4L/DVB (13613): IR: create ir-core module
Split the ir-common into two separate modules:
	- ir-core: it is the IR-independent functions;
	- ir-common: has the common part used by V4L drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:42 -02:00
Muralidharan Karicheri b6456c0cfe V4L/DVB (13571): v4l: Adding Digital Video Timings APIs
This adds the above APIs to the v4l2 core. This is based on version v1.2
of the RFC titled "V4L - Support for video timings at the input/output interface"
Following new ioctls are added:-

        - VIDIOC_ENUM_DV_PRESETS
        - VIDIOC_S_DV_PRESET
        - VIDIOC_G_DV_PRESET
        - VIDIOC_QUERY_DV_PRESET
        - VIDIOC_S_DV_TIMINGS
        - VIDIOC_G_DV_TIMINGS

Please refer to the RFC for the details. This code was tested using vpfe
capture driver on TI's DM365. Following is the test configuration used :-

Blu-Ray HD DVD source -> TVP7002 -> DM365 (VPFE) ->DDR

A draft version of the TVP7002 driver (currently being reviewed in the mailing
list) was used that supports V4L2_DV_1080I60 & V4L2_DV_720P60 presets.

A loopback video capture application was used for testing these APIs. This calls
following IOCTLS :-

 -  verify the new v4l2_input capabilities flag added
 -  Enumerate available presets using VIDIOC_ENUM_DV_PRESETS
 -  Set one of the supported preset using VIDIOC_S_DV_PRESET
 -  Get current preset using VIDIOC_G_DV_PRESET
 -  Detect current preset using VIDIOC_QUERY_DV_PRESET
 -  Using stub functions in tvp7002, verify VIDIOC_S_DV_TIMINGS
    and VIDIOC_G_DV_TIMINGS ioctls are received at the sub device.
 -  Tested on 64bit platform by Hans Verkuil

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:18:03 -02:00
Laurent Pinchart 327ae59757 V4L/DVB (13557): v4l: Remove unneeded video_device::minor usage in drivers
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-16 00:17:58 -02:00
Laurent Pinchart 957b4aa9f7 V4L/DVB (13552): v4l: Replace video_is_unregistered with video_is_registered
Replace the video_is_unregistered function by a video_is_registered
function. The V4L2_FL_UNREGISTERED flag is replaced by a
V4L2_FL_REGISTERED flag.

This change makes the video_is_registered function return coherent
results when called on an initialize but not yet registered video_device
instance. The function can now be used instead of checking
video_device::minor.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:55 -02:00
Laurent Pinchart eac8ea536a V4L/DVB (13549): v4l: Add video_device_node_name function
Many drivers access the device number (video_device::v4l2_devnode::num)
in order to print the video device node name. Add and use a helper
function to retrieve the video_device node name.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:54 -02:00
Mauro Carvalho Chehab cda4303f55 V4L/DVB (13546): ir-keymaps: Add table for Terratec Cinergy XS FM
This IR uses NEC protocol, with address=0x14. This keymap is similar
to the existing Terratec Cinergy XS, except that:
	- it contains the full address/command code;
	- the Music button were mapped as KEY_RADIO;
	- some keycodes from the previous entry were wrong, IMHO.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:53 -02:00
Mauro Carvalho Chehab d30a3fe896 V4L/DVB (13543): ir-common: Associate a table with a given protocol type
While here, convert the protocol types into an enum
and define 0 as unknown.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16 00:17:52 -02:00
Mauro Carvalho Chehab 7fee03e487 V4L/DVB (13540): ir-common: Cleanup get key evdev code
The same loop to seek for a key were used on different places. Also,
no spinlock were protecting it to avoid the risk of replacing a keycode
while seeking for a new code.

This cleanup does:
	- create an unique function to seek for a code;
	- adds an spinlock to protect the table lookup;
	- remove some unused code;
	- simplifies to code to make it easier to understand.

Basically no change in behavior should be noticed after this patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:22 -02:00
Mauro Carvalho Chehab a53e212571 V4L/DVB (13539): ir-common: add __func__ for debug messages
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:22 -02:00
Mauro Carvalho Chehab f6fc504940 V4L/DVB (13538): ir-common: Use a dynamic keycode table
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:21 -02:00
Mauro Carvalho Chehab 055cd55601 V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation
Currently, the IR table is initialized by calling ir_input_init(). However,
this function doesn't return any error code, nor has a function to be called
when de-initializing the IR's.

Change the return argment to integer and make sure that each driver will
handle the error code. Also adds a function to free any resources that may
be allocating there: ir_input_free().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:21 -02:00
Mauro Carvalho Chehab 35d1988c6e V4L/DVB (13535): ir-common: Add a hauppauge new table with the complete RC5 code
Now that V4L drivers can support more than 7 bits for scan code, let's
add a modified version for the Hauppauge Grey IR containing the full IR
scancode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:20 -02:00
Mauro Carvalho Chehab 6d691237e6 V4L/DVB (13534): ir-common: Remove some unused fields/structs
Now that the IR conversion to dynamic tables has finished, we can get
rid of some fields and definitions that aren't used anymore.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:20 -02:00
Mauro Carvalho Chehab 8573b74af2 V4L/DVB (13533): ir: use dynamic tables, instead of static ones
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:19 -02:00
Mauro Carvalho Chehab ef53a1159d V4L/DVB (13532): ir-common: Add infrastructure to use a dynamic keycode table
V4L drivers use an static keycode vector with 128 entries, where the scancode
indexes the keycode. While this works, it limits the scancodes to have only
7 bits, not allowing for example full RC5 codes.

Instead of implementing the same code on every V4L driver, provide a common
infrastructure to handle the bigger tables, minimizing the changes inside
each driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:19 -02:00
Mauro Carvalho Chehab 4e89217b94 V4L/DVB (13531): ir-common: rename the debug routine to allow exporting it
As newer IR common code will be added on other files, we need a global
debug var inside the module.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:18 -02:00
Hans Verkuil dbc8e34a32 V4L/DVB (13477): v4l2-subdev: remove unnecessary check
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:05 -02:00
Vaibhav Hiremath e53a70b472 V4L/DVB (13464): Davinci VPFE Capture: add i2c adapter id in platform data
The I2C adapter ID is actually depends on Board and may vary, Davinci
uses id=1, but in case of AM3517 id=3.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:01 -02:00
Jonathan Corbet f8b0bca1a7 V4L/DVB (13417): Fix videobuf_queue_vmalloc_init() prototype
For whatever reason, the device structure pointer to
videobuf_queue_vmalloc_init is typed "void *", even though it's passed
right through to videobuf_queue_core_init(), which expects a struct
device pointer.  The other videobuf implementations use struct device *;
I think vmalloc should too.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:47 -02:00
Jonathan Corbet 38a54f35a0 V4L/DVB (13377): make struct videobuf_queue_ops constant
The videobuf_queue_ops function vector is not declared constant, but
there's no need for the videobuf layer to ever change it.  Make it const
so that videobuf users can make their operations const without warnings.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:35 -02:00
Laurent Pinchart 622b828ab7 V4L/DVB (13238): v4l2_subdev: rename tuner s_standby operation to core s_power
Upcoming I2C v4l2_subdev drivers need a way to control the subdevice
power state from the core. This use case is already partially covered by
the tuner s_standby operation, but no way to explicitly come back from
the standby state is available.

Rename the tuner s_standby operation to core s_power, and fix tuner
drivers accordingly. The tuner core will call s_power(0) instead of
s_standby(). No explicit call to s_power(1) is required for tuners as
they are supposed to wake up from standby automatically.

[mchehab@redhat.com: CodingStyle fix]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:03 -02:00
David T.L. Wong fb29ab9698 V4L/DVB (13206): cx25840: add component support
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:52 -02:00
Richard Röjfors eea85b0a62 V4L/DVB (13177): radio: Add support for TEF6862 tuner
This patch adds support for TEF6862 Car Radio Enhanced Selectivity Tuner.

It's implemented as a subdev, supporting checking signal strength
and setting and getting frequency.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:43 -02:00
Igor M. Liplianin 9d2ba7ad80 V4L/DVB (13135): Add support for TeVii remotes
The patch brings infrared remote support for some cx88 based cards.
Such as TeVii S460,S420.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:29 -02:00
Igor M. Liplianin d8d8622552 V4L/DVB (13134): Add support for TBS-likes remotes
The patch brings infrared remote support for some cx88 based cards.
Such as:
TeVii S460,S420; Omicom SS4; SatTrade ST4200;
TBS 8920,8910; Prof 7300,6200.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:29 -02:00
Guennadi Liakhovetski 8f37cf25ba V4L/DVB (13130): soc-camera: add a new driver for the RJ54N1CB0C camera sensor from Sharp
This adds an soc-camera / v4l2-subdev driver for the RJ54N1CB0C CMOS camera
sensor from Sharp. The sensor is very picky about initialisation and
configuration sequences. The driver limits artificially maximum window size by
800x600, although the sensor supports 1600x1200. Sizes above 800x600 don't seem
to work correctly, besides, examples from the system integrator use sizes above
640x480 only for still photography. Unfortunately, I had to use "magic"
register-value pairs for undocumented and "reserved" registers. This version of
the driver also omits some functionality, like cropping, which hasn't been
sufficiently tested yet and will be added later.

 create mode 100644 drivers/media/video/rj54n1cb0c.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:28 -02:00
Michael Krufky 9133aee09e V4L/DVB (13103): create a standard method for dvb adapter drivers to override frontend ioctls
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls 1d23a00243 V4L/DVB (13099): ir-functions: Export ir_rc5_decode() for use by the cx23885 module
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:21 -02:00
Andy Walls 1d986add96 V4L/DVB (13096): v4l2-subdev: Add v4l2_subdev_ir_ops and IR notify defines for v4l2_device
Add v4l2_subdev_ir_ops and IR notify defines for v4l2_device.  This change
is specifically needed at this time to support the integrated IR controller in
the CX2388[58] chips.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:19 -02:00
Andy Walls f56db93cef V4L/DVB (13084): v4l2-chip-ident: Add ID's needed for the cx23885 and cx25840 modules
Add identifiers for CX2388[578] chips, CX2310[012] chips, integrated
A/V decoders cores, integrated IR controller core, and the CX23417
MPEG encoder.  The cx23885 module and cx25840 module will use these
identifiers in upcoming changes.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:16 -02:00
Marek Vasut 8d64827172 V4L/DVB (13040): V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV9640 sensor
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:01 -02:00
Richard Röjfors 6789cb5230 V4L/DVB (13019): video: initial support for ADV7180
This is an initial driver for Analog Devices ADV7180 Video Decoder.
So far it only supports query standard.

[akpm@linux-foundation.org: remove unneeded cast]
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:53:39 -03:00
Hans Verkuil 6b5270d212 V4L/DVB (12725): v4l: warn when desired devnodenr is in use & add _no_warn function
Warn when the desired device node number is already in use, except when
the new video_register_device_no_warn function is called since in some
use-cases that warning is not relevant.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:34 -03:00
Hans Verkuil 7ae0cd9bc7 V4L/DVB (12541): v4l: remove video_register_device_index
video_register_device_index is never actually called, instead the
stream index number is always calculated automatically.

This patch removes this function and simplifies the internal get_index
function since that can now always just return the first free index.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:26 -03:00
Hans Verkuil 53dacb1570 V4L/DVB (12540): v4l: simplify v4l2_i2c_new_subdev and friends
Rewrite v4l2_i2c_new_subdev as a simplified version of v4l2_i2c_new_subdev_cfg
and remove v4l2_i2c_new_probed_subdev and v4l2_i2c_new_probed_subdev_addr.

This simplifies this API substantially.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:24 -03:00
Guennadi Liakhovetski 96c7539954 V4L/DVB (12536): soc-camera: remove .gain and .exposure struct soc_camera_device members
This makes the soc-camera interface for V4L2 subdevices thinner yet. Handle
gain and exposure internally in each driver just like all other controls.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:20 -03:00
Guennadi Liakhovetski a4c56fd889 V4L/DVB (12535): soc-camera: remove .init() and .release() methods from struct soc_camera_ops
Remove unneeded soc-camera operations, this also makes the soc-camera API to
v4l2 subdevices thinner.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:18 -03:00
Guennadi Liakhovetski 6a6c878672 V4L/DVB (12534): soc-camera: V4L2 API compliant scaling (S_FMT) and cropping (S_CROP)
The initial soc-camera scaling and cropping implementation turned out to be
incompliant with the V4L2 API, e.g., it expected the user to specify cropping
in output window pixels, instead of input window pixels. This patch converts
the soc-camera core and all drivers to comply with the standard.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:17 -03:00
Guennadi Liakhovetski c9c1f1c0db V4L/DVB (12530): soc-camera: switch to using v4l2_subdev_call()
Use v4l2_subdev_call() instead of v4l2_device_call_until_err() in all host
drivers and in soc-camera core.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:07 -03:00
Guennadi Liakhovetski 08590b9613 V4L/DVB (12529): soc-camera: switch to s_crop v4l2-subdev video operation
Remove set_crop soc-camera device method and switch to s_crop from v4l2-subdev
video operations. Also extend non-i2c drivers to also hold a pointer to their
v4l2-subdev instance in control device driver-data, i.e., in
dev_get_drvdata((struct device *)to_soc_camera_control(icd))

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:19:06 -03:00
Guennadi Liakhovetski a12222a73e V4L/DVB (12521): soc-camera: use .s_std() from struct v4l2_subdev_core_ops
Remove .set_std() method from struct soc_camera_ops, use .s_std() from
struct v4l2_subdev_core_ops instead.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:53 -03:00
Guennadi Liakhovetski fa48984e36 V4L/DVB (12519): soc-camera: put pixel format initialisation back in probe, add .put_formats()
The move of format translation initialisation into soc_camera_open() was
temporary for the soc-camera as platform driver intermediate step, put it back
into soc_camera_probe(). Also add a .put_formats() method to
soc_camera_host_ops to free any resources host driver might have allocated in
.get_formats().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:49 -03:00
Guennadi Liakhovetski a0705b07f1 V4L/DVB (12515): soc-camera: use struct v4l2_rect in struct soc_camera_device
Switch to using struct v4l2_rect in struct soc_camera_device for uniformity and
simplicity.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:43 -03:00
Guennadi Liakhovetski 2840d2497b V4L/DVB (12513): soc-camera: add support for camera-host controls
Until now soc-camera only supported client (sensor) controls. This patch
enables camera-host drivers to implement their own controls too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:39 -03:00
Guennadi Liakhovetski 979ea1ddf8 V4L/DVB (12510): soc-camera: (partially) convert to v4l2-(sub)dev API
Convert the soc-camera framework to use the v4l2-(sub)dev API. Start using
v4l2-subdev operations. Only a part of the interface between the
soc_camera core, soc_camera host drivers on one side and soc_camera device
drivers on the other side is replaced so far. The rest of the interface
will be replaced in incremental steps, and will require extensions and,
possibly, modifications to the v4l2-subdev code.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:35 -03:00
Guennadi Liakhovetski dd4f0ad4b0 V4L/DVB (12508): soc-camera: remove unused .iface from struct soc_camera_platform_info
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:31 -03:00
Guennadi Liakhovetski 40e2e09270 V4L/DVB (12506): soc-camera: convert to platform device
Convert soc-camera core and all drivers to platform device API. We already
converted platforms to register a platform device for each soc-camera client,
now we remove the compatibility code and switch completely to the new scheme.
This is a preparatory step for the v4l2-subdev conversion.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:27 -03:00
Guennadi Liakhovetski bc1937b41d V4L/DVB (12505): soc_camera_platform: pass device pointer from soc-camera core on .add_device()
Add a struct device pointer to struct soc_camera_platform_info and let the user
(ap325rxa) pass it down to soc_camera_platform.c in its .add_device() method.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:25 -03:00
Guennadi Liakhovetski c41debafc6 V4L/DVB (12504): soc-camera: prepare soc_camera_platform.c and its users for conversion
soc_camera_platform.c is only used by y SuperH ap325rxa board. This patch
converts soc_camera_platform.c and its users for the soc-camera platform-
device conversion and also extends soc-camera core to handle non-I2C cameras.

Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:24 -03:00
Muralidharan Karicheri 7b140b8930 V4L/DVB (12253): v4l: common vpss module for video drivers
This is a new module added for vpss library functions that are
used for configuring vpss system module. All video drivers will
include vpss.h header file and call functions defined in this
module to configure vpss system module.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:19 -03:00
Muralidharan Karicheri 92ee438b8e V4L/DVB (12252): v4l: ccdc types used across ccdc modules for vpfe capture driver
common types used across CCDC modules

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:18 -03:00
Muralidharan Karicheri 5f15fbb68f V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver
This is the hw module for DM644x CCDC. This registers with the
vpfe capture driver and provides a set of hw_ops to configure
CCDC for a specific decoder device connected to the VPFE.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:16 -03:00
Muralidharan Karicheri dd2ceb1a40 V4L/DVB (12250): v4l: dm355 ccdc module for vpfe capture driver
Adds ccdc hw module for DM355 CCDC. This registers with the bridge
driver a set of hw_ops for configuring the CCDC for a specific
decoder device connected to vpfe.

Reviewed by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Mauro Carvalho Chehab <mchehab@infradead.org>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:15 -03:00
Muralidharan Karicheri 7da8a6cb3e V4L/DVB (12248): v4l: vpfe capture bridge driver for DM355 and DM6446
This the vpfe capture bridge driver for doing video
capture on DM355 and DM6446 evms. The ccdc hw modules register with the
driver and are used for configuring the CCD Controller for a specific
decoder interface. The driver also registers the sub devices required
for a specific evm. More than one sub devices can be registered.
This allows driver to switch dynamically to capture video from
any sub device that is registered. Currently only one sub device
(tvp5146) is supported. But in future this driver is expected
to do capture from sensor devices such as Micron's MT9T001, MT9T031
and MT9P031 etc. The driver currently supports MMAP based IO.

Reviewed by: Laurent Pinchart <laurent.pinchart@skynet.be>
Reviewed by: Alexey Klimov <klimov.linux@gmail.com>

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:12 -03:00
Muralidharan Karicheri 62ef80a1f3 V4L/DVB (12246): tvp514x: Migration to sub-device framework
This patch converts TVP514x driver to sub-device framework
from V4L2-int framework.

[hverkuil@xs4all.nl: remove inline from the dump_reg function]
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Hardik Shah <hardik.shah@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:18:09 -03:00
Michael Krufky 93463895ae V4L/DVB (12964): tuner-core: add support for NXP TDA18271 without TDA829X demod
Add support for NXP TDA18271 as a standalone tuner, allowing the use of
analog demodulators other than the Philips/NXP TDA829x.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:16:01 -03:00
Antti Palosaari e558170a91 V4L/DVB (12950): tuner-simple: add Philips CU1216L
add Philips CU1216L NIM

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:15:27 -03:00
Mauro Carvalho Chehab 715a223323 V4L/DVB (12595): common/ir: use a struct for keycode tables
Currently, V4L uses a scancode table whose index is the scancode and
the value is the keycode. While this works, it has some drawbacks:

1) It requires that the scancode to be at the range 00-7f;

2) keycodes should be masked on 7 bits in order for it to work;

3) due to the 7 bits approach, sometimes it is not possible to replace
the default keyboard to another one with a different encoding rule;

4) it is different than what is done with dvb-usb approach;

5) it requires a typedef for it to work. This is not a recommended
Linux CodingStyle.

This patch is part of a larger series of IR changes. It basically
replaces the IR_KEYTAB_TYPE tables by a structured table:
struct ir_scancode {
       u16     scancode;
       u32     keycode;
};

This is very close to what dvb does. So, a further integration with DVB
code will be easy.

While we've changed the tables, for now, the IR keycode handling is still
based on the old approach.

The only notable effect is the redution of about 35% of the ir-common
module size:

   text    data     bss     dec     hex filename
   6721   29208       4   35933    8c5d old/ir-common.ko
   5756   18040       4   23800    5cf8 new/ir-common.ko

In thesis, we could be using above u8 for scancode, reducing even more the size
of the module, but defining it as u16 is more convenient, since, on dvb, each
scancode has up to 16 bits, and we currently have a few troubles with rc5, as their
scancodes are defined with more than 8 bits.

This patch itself shouldn't be doing any functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:47 -03:00
Mauro Carvalho Chehab 6d888a66be V4L/DVB (12591): em28xx: Add entry for GADMEI UTV330+ and related IR keymap
[mchehab@redhat.com: Fix a few wrong IR keymaps]
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:44 -03:00
Eduardo Valentin 02bee89e79 V4L/DVB (12552): FM TX: si4713: Add files to handle si4713 i2c device
This patch adds files to control si4713 devices.
Internal functions to control device properties
and initialization procedures are into these files.
Also, a v4l2 subdev interface is also exported.
This way other drivers can use this as v4l2 i2c subdevice.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:20 -03:00
Eduardo Valentin 1fd2121c08 V4L/DVB (12551): FM TX: si4713: Add files to add radio interface for si4713
This patch adds files which creates the radio interface
for si4713 FM transmitter (modulator) devices.

In order to do the real access to device registers, this
driver uses the v4l2 subdev interface exported by si4713 i2c driver.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:19 -03:00
Eduardo Valentin d6bacea6cf V4L/DVB (12547): v4l2-subdev.h: Add g/s_modulator callbacks to subdev api
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:17 -03:00
Igor M. Liplianin ecfcfec804 V4L/DVB (12463): Add support for Compro VideoMate S350 DVB-S PCI card.
Add Compro VideoMate S350 DVB-S driver.
The card uses zl10313, zl10039, saa7130 integrated circuits.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:57 -03:00
Devin Heitmueller 8cd9aaefad V4L/DVB (12444): em28xx: add support for Terratec Cinergy Hybrid T USB XS remote control
Add support for the remote control that comes with the Cinergy Hybrid T USB XS

Thanks to Jelle de Jong for providing sample hardware to test with.

Cc: Jelle de Jong <jelledejong@powercraft.nl>
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:52 -03:00
Andy Walls 1b6e59e3f4 V4L/DVB (12366): ir-kbd-i2c: Allow use of ir-kdb-i2c internal get_key funcs and set ir_type
This patch augments the init data passed by bridge drivers to
ir-kbd-i2c, so that the ir_type can be set explicitly, and so
ir-kbd-i2c internal get_key functions can be reused without
requiring symbols from ir-kbd-i2c in the bridge driver.

Signed-off-by: Andy Walls <awalls@radix.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:25 -03:00
Andy Walls e3e1920b28 V4L/DVB (12334): tuner-simple: Add an entry for the Partsnic PTI-5NF05 NTSC tuner
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:18:10 -03:00
Guennadi Liakhovetski b7f2cef0c8 V4L/DVB (12158): v4l: add cropping prototypes to struct v4l2_subdev_video_ops
Add g_crop, s_crop and cropcap methods to video v4l2-subdev operations.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:15 -03:00
Brian Johnson 26e744b6b6 V4L/DVB (12283): gspca - sn9c20x: New subdriver for sn9c201 and sn9c202 bridges.
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-24 14:03:30 -03:00
Mauro Carvalho Chehab 7dfba00d05 V4L/DVB (12135): Add a driver for mt9v011 sensor
Adds driver for mt9v011 based on its datasheet, available at:
	http://download.micron.com/pdf/datasheets/imaging/MT9V011.pdf

The driver was tested with a webcam that will be added on a next patch.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-07-05 14:30:02 -03:00
Trent Piepho b0d3159be9 V4L/DVB (11901): v4l2: Create helper function for bounding and aligning images
Most hardware has limits on minimum and maximum image dimensions and also
requirements about alignment.  For example, image width must be even or a
multiple of four.  Some hardware has requirements that the total image size
(width * height) be a multiple of some power of two.

v4l_bound_align_image() will enforce min and max width and height, power of
two alignment on width and height, and power of two alignment on total
image size.

It uses an efficient algorithm that will try to find the "closest" image
size that meets the requirements.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:21:18 -03:00
Hans Verkuil f0222c7d86 V4L/DVB (12125): v4l2: add new s_config subdev ops and v4l2_i2c_new_subdev_cfg/board calls
Add a new s_config core ops call: this is called with the irq and platform
data to be used to initialize the subdev.

Added new v4l2_i2c_new_subdev_cfg and v4l2_i2c_new_subdev_board calls
that allows you to pass these new arguments.

The existing v4l2_i2c_new_subdev functions were modified to also call
s_config.

In the future the existing v4l2_i2c_new_subdev functions will be replaced
by a single v4l2_i2c_new_subdev function similar to v4l2_i2c_new_subdev_cfg
but without the irq and platform_data arguments.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:15:47 -03:00
Hans Verkuil 719cd4ab96 V4L/DVB (12108): v4l2-i2c-drv.h: add comment describing when not to use this header.
Make it very clear that this header should not be used for i2c drivers that
do not need to be compiled for pre-2.6.26 kernels.

As soon as the minimum supported kernel in the v4l-dvb repository becomes
2.6.26 or up, then this header should be removed entirely.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:14:39 -03:00
Devin Heitmueller a4c473033b V4L/DVB (12102): em28xx: add Remote control support for EVGA inDtube
Add an IR profile for the EVGA inDtube remote control (which is an NEC type
remote)

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-23 03:14:25 -03:00
Andy Walls 5ddc9b100f V4L/DVB (11933): tuner-simple, tveeprom: Add Philips FQ1216LME MK3 analog tuner
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:07:25 -03:00
Jean Delvare 4d7a2d6721 V4L/DVB (11845): ir-kbd-i2c: Use initialization data
For specific boards, pass initialization data to ir-kbd-i2c instead
of modifying the settings after the device is initialized. This is
more efficient and easier to read.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:21:11 -03:00
Jean Delvare c668f32dca V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model
Let card drivers probe for IR receiver devices and instantiate them if
found. Ultimately it would be better if we could stop probing
completely, but I suspect this won't be possible for all card types.

There's certainly room for cleanups. For example, some drivers are
sharing I2C adapter IDs, so they also had to share the list of I2C
addresses being probed for an IR receiver. Now that each driver
explicitly says which addresses should be probed, maybe some addresses
can be dropped from some drivers.

Also, the special cases in saa7134-i2c should probably be handled on a
per-board basis. This would be more efficient and less risky than always
probing extra addresses on all boards. I'll give it a try later.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:21:11 -03:00
Jean Delvare 1df8e9861c V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needs
In the standard device driver binding model, the name field of
struct i2c_client is used to match devices to their drivers, so we
must stop using it for internal purposes. Define a separate field
in struct IR_i2c as a replacement, and use it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:21:11 -03:00
Dmitri Belimov 8475cbcb0f V4L/DVB (11775): tuner: add support Philips MK5 tuner
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:21:04 -03:00
Chaithrika U S 06e61f8d5f V4L/DVB (11743): Analog Devices ADV7343 video encoder driver
Add ADV7343 I2C based video encoder driver. This follows the
v4l2-subdev framework. This driver has been tested on TI DM646x EVM. It
has been tested for Composite and Component outputs.

Updates as per review by Mauro Chehab, added support for more standards
supported by the encoder. Also adding the missed out signed-offs.Tested
only NTSC and PAL standards.

[hverkuil@xs4all.nl: s_routing API changed, updated driver to use new API]
Signed-off-by: Manjunath Hadli <mrh@ti.com>
Signed-off-by: Brijesh Jadav <brijesh.j@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:59 -03:00
Chaithrika U S 40199c50b8 V4L/DVB (11742): TI THS7303 video amplifier driver code
This patch adds driver for TI THS7303 video amplifier. This driver is
implemented as a v4l2 sub device. Tested on TI DM646x EVM.

This version has updates based on review comments by Mauro Chehab.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:59 -03:00
Guennadi Liakhovetski 0fd327bd0d V4L/DVB (11705): soc-camera: prepare for the platform driver conversion
Add a platform driver to soc_camera.c. This way we preserve backwards
compatibility with existing platforms and can start converting them one by one
to the new platform-device soc-camera interface.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:54 -03:00
Hans Verkuil b5b2b7ed56 V4L/DVB (11673): v4l2-device: unregister i2c_clients when unregistering the v4l2_device.
Until now I relied on i2c_del_adapter to unregister the i2c_clients for
me, however, if the i2c bus is a platform bus then it is never deleted.

So instead I need to unregister i2c clients when unregistering the
v4l2_device.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:51 -03:00
Hans Verkuil 102e781364 V4L/DVB (11671): v4l2: add v4l2_device_set_name()
Add a utility function that can be used to setup the v4l2_device's name
field in a standard manner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:50 -03:00
Guennadi Liakhovetski eff505fa15 V4L/DVB (11609): soc-camera: remove an extra device generation from struct soc_camera_host
Make camera devices direct children of host platform devices, move the
inheritance management into the soc_camera.c core driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:43 -03:00
Guennadi Liakhovetski 594bb46dbc V4L/DVB (11607): soc-camera: add a free_bus method to struct soc_camera_link
Currently pcm990 camera bus-width management functions request a GPIO and never
free it again. With this approach the GPIO extender driver cannot be unloaded
once camera drivers have been loaded, also unloading theb i2c-pxa bus driver
produces errors, because the GPIO extender driver cannot unregister properly.
Another problem is, that if camera drivers are once loaded before the GPIO
extender driver, the platform code marks the GPIO unavailable and only a reboot
helps to recover. Adding an explicit free_bus method and using it in mt9m001
and mt9v022 drivers fixes these problems.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:43 -03:00
Kay Sievers 1351a58ce0 V4L/DVB (11517): v4l: remove driver-core BUS_ID_SIZE
The name size limit is gone from the driver core, the BUS_ID_SIZE
value will be removed.

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 18:20:31 -03:00
Hans Verkuil 6c31e59836 V4L/DVB (11381): ivtv/cx18: remove VIDIOC_INT_S_AUDIO_ROUTING debug support.
Remove support for the debug call VIDIOC_INT_S_AUDIO_ROUTING from cx18
and ivtv. These internal ioctls shouldn't be exposed. These were only
used through the cx18-ctl and ivtv-ctl utilities, and only when testing
a new card variant.

This cleanup allows the removal of this ioctl from v4l2-common.h.

Cc: Andy Walls <awalls@radix.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:28 -03:00
Hans Verkuil 5325b4272a V4L/DVB (11380): v4l2-subdev: change s_routing prototype
It is no longer needed to use a struct pointer as argument, since v4l2_subdev
doesn't require that ioctl-like approach anymore. Instead just pass the input,
output and config (new!) arguments directly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:27 -03:00
Hans Verkuil 3ff4ad815c V4L/DVB (11377): v4l: increase version numbers of drivers converted to v4l2_subdev.
With all the v4l2_subdev changes that were made to these drivers it is a
good idea to increase the version number of each driver.

It's just the patch level that is increased, except for the zoran and saa7146
drivers where the minor number was increased due to the more substantial
changes that were made to those two drivers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:26 -03:00
Hans Verkuil 940088a162 V4L/DVB (11376): tvaudio.h: add static inline to retrieve the list of possible i2c addrs.
Rather than duplicating this list everywhere, just put it in tvaudio.h.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:25 -03:00
Hans Verkuil e6574f2fbe V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on
i2c_get_adapdata to return the v4l2_device. However, this is not always
possible on embedded platforms. So modify the API to pass the v4l2_device
pointer explicitly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:24 -03:00
Hans Verkuil 868f985c2f V4L/DVB (11374): v4l2-common: add v4l2_i2c_new_probed_subdev_addr
Add utility function to probe for a single address, rather than a list
of addresses.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:24 -03:00
Hans Verkuil acebc70d4a V4L/DVB (11372): v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22
Originally the intention was to switch to the new style i2c API starting with
the introduction of the API in 2.6.22. However, the i2c_new_probed_device()
function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately,
it was only fixed in the stable series of 2.6.25 and 2.6.26.

Given the fact that the new i2c API also changed starting with 2.6.26 (the
addition of i2c_device_id), it is easiest to switch APIs starting with
2.6.26.

This patch updates all the legacy code accordingly.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:23 -03:00
Hans Verkuil 0c84674353 V4L/DVB (11371): v4l2: remove legacy fields in v4l2-i2c-drv.h.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:22 -03:00
Hans Verkuil f41737ece4 V4L/DVB (11370): v4l2-subdev: move s_std from tuner to core.
s_std didn't belong in the tuner ops. Stricly speaking it should be part of
the video ops, but it is used by audio and tuner devices as well, so it is
more efficient to make it part of the core ops.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:22 -03:00
Hans Verkuil cc26b076cf V4L/DVB (11369): v4l2-subdev: add load_fw and use that instead of abusing core->init.
The init callback was used in several places to load firmware. Make a separate
load_fw callback for that. This makes the code a lot more understandable.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:21 -03:00
Hans Verkuil 7c9fc9d50f V4L/DVB (11368): v4l2-subdev: move s_standby from core to tuner.
s_standby is only used to put the tuner in powersaving mode, so move it
from core to tuner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:20 -03:00
Hans Verkuil 78a3b4db2e V4L/DVB (11367): v4l2-common: remove legacy code
Now that all drivers are converted to v4l2_subdev we can remove legacy code
in v4l2-common. Also move the documentation of the internal API to
v4l2-subdev.h where it really belongs.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:20 -03:00
Hans Verkuil b74c0aac35 V4L/DVB (11366): v4l: remove obsolete header and source
v4l2-subdev.c and v4l2-i2c-drv-legacy.h were used to support the old i2c
API. All v4l drivers are now converted to v4l2_subdev, so these two files
can be removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:44:19 -03:00
Kuninori Morimoto db6cbc8cf2 V4L/DVB (11327): ov772x: add edge contrl support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-06 21:43:49 -03:00
Hans Verkuil 4b2ce11a1e V4L/DVB (11313): v4l2-subdev: add enum_framesizes and enum_frameintervals.
These callbacks are needed for omap.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:49 -03:00
Daniel Glöckner c01f1a5a24 V4L/DVB (11242): allow v4l2 drivers to provide a get_unmapped_area handler
Shared memory mappings on nommu machines require a get_unmapped_area
file operation that suggests an address for the mapping. This patch
adds a way for v4l2 drivers to provide this callback.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:43 -03:00
Hans Verkuil 69d94f7ec5 V4L/DVB (11118): cafe_ccic: replace debugfs with g/s_register ioctls.
Using VIDIOC_DBG_S/G_REGISTER is the standard way of reading/writing register
for advanced debugging under v4l2. In addition, using this means that the
cafe_ccic driver doesn't need to have knowledge about the used sensor: the
debug ioctl can be passed on to the sensor if it isn't for the host.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:30 -03:00
Hans Verkuil 2da9479aaa V4L/DVB (11112): v4l2-subdev: add support for TRY_FMT, ENUM_FMT and G/S_PARM.
These ops are used by the ov7670 driver, so these need to be added.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:30 -03:00
Devin Heitmueller d9109bef4b V4L/DVB (11076): au0828: make g_chip_ident call work properly
Make the g_chip_ident call work for the au0828/au8522.  Discovered when testing
with the v4l2_compliance tool

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
[mchehab@redhat.com: fix merge conflict, due to a path change for analog demod]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:26 -03:00
Hans Verkuil ae6cfaace1 V4L/DVB (11044): v4l2-device: add v4l2_device_disconnect
Call v4l2_device_disconnect when the parent of a hotpluggable device
disconnects. This ensures that you do not have a pointer to a device that
is no longer present.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Sascha Hauer d42574d1d2 V4L/DVB (11034): soc-camera: remove now unused gpio member of struct soc_camera_link
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:22 -03:00
Sascha Hauer 28f59339f7 V4L/DVB (11030): soc-camera: add board hook to specify the buswidth for camera sensors
Camera sensors have a native bus width say support, but on some
boards not all sensor data lines are connected to the image
interface and thus support a different bus width than the sensors
native one. Some boards even have a bus driver which dynamically
switches between different bus widths with a GPIO.

This patch adds a hook which board code can use to support different
bus widths.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Guennadi Liakhovetski 025c18a19d V4L/DVB (11027): soc-camera: configure drivers with a default format at probe time
Currently soc-camera doesn't set up any image format without an explicit
S_FMT. According to the API this should be supported, for example,
capture-example.c from v4l2-apps by default doesn't issue an S_FMT. This
patch moves negotiating of available host-camera format translations to
probe() time, and restores the state from the last close() on the next
open(). This is needed for some drivers, which power down or reset
hardware after the last user closes the interface. This patch also has a
nice side-effect of avoiding multiple allocation anf freeing of format
translation tables.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Guennadi Liakhovetski 09e231b351 V4L/DVB (11024): soc-camera: separate S_FMT and S_CROP operations
As host and camera drivers become more complex, differences between S_FMT and
S_CROP functionality grow, this patch separates them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Hans Verkuil 1cd3c0fa92 V4L/DVB (11022): zoran/bt819: use new notify functionality.
Bt819 needs the parent driver to drive a GPIO pin low and high in order to
reset its fifo. Use the new notify callback for this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:21 -03:00
Hans Verkuil 98ec633972 V4L/DVB (11021): v4l2-device: add a notify callback.
Add a notify callback to v4l2_device to let sub-devices notify their
parent of special events.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:20 -03:00