25 Nov, 2014
3 commits
-
The v4l2_ctrl_check() helper function is now only used in cx2341x.
Move it there and make it static.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
For some unknown reason several control prototypes where in v4l2-common.c
instead of in v4l2-ctrls.h. Move them and document them.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Several control helper functions are no longer needed since most drivers
are now converted to the control framework. So we can delete them.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
19 Nov, 2013
1 commit
-
Pull i2c changes from Wolfram Sang:
- new drivers for exynos5, bcm kona, and st micro
- bigger overhauls for drivers mxs and rcar
- typical driver bugfixes, cleanups, improvements
- got rid of the superfluous 'driver' member in i2c_client struct This
touches a few drivers in other subsystems. All acked.* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
i2c: bcm-kona: fix error return code in bcm_kona_i2c_probe()
i2c: i2c-eg20t: do not print error message in syslog if no ACK received
i2c: bcm-kona: Introduce Broadcom I2C Driver
i2c: cbus-gpio: Fix device tree binding
i2c: wmt: add missing clk_disable_unprepare() on error
i2c: designware: add new ACPI IDs
i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH
i2c: exynos5: Remove incorrect clk_disable_unprepare
i2c: i2c-st: Add ST I2C controller
i2c: exynos5: add High Speed I2C controller driver
i2c: rcar: fixup rcar type naming
i2c: scmi: remove some bogus NULL checks
i2c: sh_mobile & rcar: Enable the driver on all ARM platforms
i2c: sh_mobile: Convert to clk_prepare/unprepare
i2c: mux: gpio: use reg value for i2c_add_mux_adapter
i2c: mux: gpio: use gpio_set_value_cansleep()
i2c: Include linux/of.h header
i2c: mxs: Fix PIO mode on i.MX23
i2c: mxs: Rework the PIO mode operation
i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller
...
17 Oct, 2013
1 commit
-
Remove the redundant 'const' qualifiers from the function
signature and from the qmenu_int arrays' declarations.Reported-by: Fengguang Wu
Signed-off-by: Sylwester Nawrocki
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
04 Oct, 2013
1 commit
-
The 'driver' field of the i2c_client struct is redundant and is going to be
removed. The results of the expressions 'client->driver.driver->field' and
'client->dev.driver->field' are identical, so replace all occurrences of the
former with the later.Signed-off-by: Lars-Peter Clausen
Acked-by: Hans Verkuil
Signed-off-by: Wolfram Sang
18 Aug, 2013
2 commits
-
changeset d1e9b7c12 added a new ancilliary function to API, but forgot
to add it to the corresponding header file.drivers/media/v4l2-core/v4l2-ctrls.c:568:18: warning: no previous prototype for 'v4l2_ctrl_get_int_menu' [-Wmissing-prototypes]
const s64 const *v4l2_ctrl_get_int_menu(u32 id, u32 *len)Cc: Sylwester Nawrocki
Signed-off-by: Mauro Carvalho Chehab -
v4l2-common.c contained a bunch of dv-timings related functions.
Move that to the new v4l2-dv-timings.c which is a more appropriate
place for them.
There aren't many drivers that do HDTV, so it is a good idea to separate
common code related to that into a module of its own.Signed-off-by: Hans Verkuil
Acked-by: Lad, Prabhakar
Signed-off-by: Mauro Carvalho Chehab
21 Jun, 2013
2 commits
-
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
This function is no longer needed since it is now the responsibility of the
v4l2 core to check if the DBG_G/S_REGISTER and DBG_G_CHIP_INFO ioctls are
called for the bridge driver or not.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
25 Mar, 2013
1 commit
-
It's no longer used, so it can now be removed.
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
21 Dec, 2012
1 commit
-
v4l2_get_timestamp() produces a monotonic timestamp but unlike
ktime_get_ts(), it uses struct timeval instead of struct timespec, saving
the drivers the conversion job when getting timestamps for v4l2_buffer's
timestamp field.Signed-off-by: Sakari Ailus
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
14 Sep, 2012
2 commits
-
These two helper functions detect whether the analog video timings detected
by the video receiver match the VESA CVT or GTF standards.They basically do the inverse of the CVT and GTF modeline calculations.
This patch also adds a helper function that will determine the aspect ratio
based on the provided EDID values. This aspect ratio can be given to the GTF
helper function.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add the v4l_match_dv_timings function that can be used to compare two
v4l2_dv_timings structs.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
12 Aug, 2012
1 commit
-
[mchehab@redhat.com: fix a merge conflict at Documentation/video4linux/v4l2-framework.txt]
Signed-off-by: Michael Jones
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
23 Mar, 2011
1 commit
-
We are going to move priority handling into the v4l2 core. As a consequence
the v4l2_prio helper functions need to be moved into the core videodev
module as well to prevent circular dependencies.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
19 Jan, 2011
1 commit
-
The core.s_config op was meant for legacy drivers that needed to work with old
pre-2.6.26 kernels. This is no longer relevant. Unfortunately, this op was
incorrectly called from several drivers.Replace those occurences with proper i2c_board_info structs and call
v4l2_i2c_new_subdev_board.After these changes v4l2_i2c_new_subdev_cfg() was no longer used, so remove
that function as well.Signed-off-by: Hans Verkuil
Acked-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
30 Dec, 2010
1 commit
-
This prevents checkpatch warnings generated when defining
'static const char *foo[]' arrays. It makes sense to use
const char * const * anyway since the pointers in the array
are indeed const.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
22 Nov, 2010
1 commit
-
The argument isn't used anymore by the functions, remove it.
Signed-off-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
21 Oct, 2010
1 commit
-
This function is an internal API and belongs in v4l2-common.h, not
videodev.h. The return pointer and probe argument should be const as well.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
19 May, 2010
1 commit
-
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
Signed-off-by: Mauro Carvalho Chehab
18 May, 2010
1 commit
-
Add support SPI bus to v4l2. Useful for control some device with SPI bus like
hardware MPEG2 encoders and etc.Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
16 Dec, 2009
1 commit
-
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
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
19 Sep, 2009
1 commit
-
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
Signed-off-by: Mauro Carvalho Chehab
23 Jun, 2009
2 commits
-
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
Signed-off-by: Mauro Carvalho Chehab -
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
Signed-off-by: Mauro Carvalho Chehab
07 Apr, 2009
4 commits
-
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
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
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
Signed-off-by: Mauro Carvalho Chehab -
Add utility function to probe for a single address, rather than a list
of addresses.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
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
Signed-off-by: Mauro Carvalho Chehab
30 Mar, 2009
5 commits
-
The v4l2_ctrl_query_fill_std() function wasn't one the best idea I ever had.
It doesn't add anything valuable that cannot be expressed equally well with
v4l2_ctrl_query_fill and only adds overhead.Replace it with v4l2_ctrl_query_fill() everywhere it is used and remove it
from v4l2_common.c.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add small function to retrieve the i2c address from a v4l2_subdev
pointer.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Control arrays as are used with v4l2_ctrl_next must be sorted from
low to high. Add a comment at the top of all such arrays to warn
about this.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
In order to convert the v4l1 zoran and vino i2c drivers to v4l2 these
extra ops are required.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add v4l2_i2c_tuner_addrs() to obtain the various I2C tuner addresses.
This will be used in several drivers, so make this a common function
as we do not want to have these I2C addresses all over the place.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
03 Jan, 2009
1 commit
-
Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
30 Dec, 2008
1 commit
-
Add helper functions to load i2c sub-devices, integrating them
into the v4l2-framework.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
12 Oct, 2008
3 commits
-
The saa7111 support in saa7115.c was missing some features and did not
properly take some of the differences into account. With this patch
saa7115 can be used in the mxb driver instead of saa7111.c.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
v4l2_ctrl_query_menu_valid_items() makes it easy to handle control menus
that have a lot of invalid 'holes'. For example, many MPEG encoders only
support a limited subset of audio bitrates. In that case a driver can
specify an array listing the set of valid bitrates and pass that to
this function.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab -
Add function that returns the control name. Allows this to be used in
places where the normal v4l2_ctrl_query_fill() function cannot be
used (e.g. uvc).Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab