19 Jun, 2019
1 commit
-
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundationthis program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 4122 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Enrico Weigelt
Reviewed-by: Kate Stewart
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman
28 Nov, 2017
1 commit
-
The most common place to find POLL... bitmaps: return values
of ->poll() and its subsystem counterparts.Signed-off-by: Al Viro
22 Mar, 2017
1 commit
-
All remaining soc-camera drivers use videobuf2, drop support for
videobuf1.Signed-off-by: Laurent Pinchart
Signed-off-by: Hans Verkuil
[hans.verkuil@cisco.com: also drop 'select VIDEOBUF_GEN' from Kconfig]Signed-off-by: Mauro Carvalho Chehab
24 Aug, 2016
1 commit
-
Replace all calls to g/s_crop by calls to the get/set_selection pad ops.
Remove the old g/s_crop video ops since they are now no longer used.
The cropcap video op is now only used to pass pixelaspect information,
and is only needed if the pixelaspect is not 1:1.Signed-off-by: Hans Verkuil
Cc: Guennadi Liakhovetski
Acked-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
01 Oct, 2015
1 commit
-
Make videobuf2-v4l2 as a wrapper of videobuf2-core for v4l2-use.
And replace videobuf2-core.h with videobuf2-v4l2.h.
This renaming change should be accompanied by the modifications
of all device drivers that include videobuf2-core.h.
It can be done with just running this shell script.replace()
{
str1=$1
str2=$2
dir=$3
for file in $(find $dir -name *.h -o -name *.c -o -name Makefile)
do
echo $file
sed "s/$str1/$str2/g" $file > $file.out
mv $file.out $file
done
}replace "videobuf2-core" "videobuf2-v4l2" "include/media/"
replace "videobuf2-core" "videobuf2-v4l2" "drivers/media/"
replace "videobuf2-core" "videobuf2-v4l2" "drivers/usb/gadget/"
replace "videobuf2-core" "videobuf2-v4l2" "drivers/staging/media/"Signed-off-by: Junghak Sung
Signed-off-by: Geunyoung Kim
Acked-by: Seung-Woo Kim
Acked-by: Inki Dae
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
15 Nov, 2014
1 commit
-
In order to have subsytem agnostic media bus format definitions we've
moved media bus definition to include/uapi/linux/media-bus-format.h and
prefixed values with MEDIA_BUS_FMT instead of V4L2_MBUS_FMT.Reference new definitions in all platform drivers.
Signed-off-by: Boris Brezillon
Acked-by: Hans Verkuil
Acked-by: Sakari Ailus
Acked-by: Sekhar Nori
Acked-by: Lad, Prabhakar
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
31 Oct, 2013
2 commits
-
Some non soc-camera drivers, e.g. em28xx, use subdevice drivers, originally
written for soc-camera, which use soc_camera_power_on() and
soc_camera_power_off() helpers to implement their .s_power() methods. Those
helpers in turn can enable and disable a clock, if it is supplied to them
as a parameter. This works well when camera host drivers balance their
calls to subdevices' .s_power() methods. However, some such drivers fail to
do that, which leads to unbalanced calls to v4l2_clk_enable() /
v4l2_clk_disable(), which then in turn produce kernel warnings. Such
behaviour is wrong and should be fixed, however, sometimes it is difficult,
because some of those drivers are rather old and use lots of subdevices,
which all should be tested after such a fix. To support such drivers this
patch adds a work-around, allowing host drivers or platforms to set a flag,
in which case soc-camera helpers will only enable the clock, if it is
disabled, and disable it only once on the first call to .s_power(0).Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
This prepares soc-camera to use struct v4l2_subdev_platform_data for its
subdevice-facing API, which would allow subdevice driver re-use.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
29 Jun, 2013
1 commit
-
In scan_async_group() if the size parameter is negative, the sasd pointer
will be used uninitialised:
drivers/media/platform/soc_camera/soc_camera.c: In function "soc_camera_host_register":
drivers/media/platform/soc_camera/soc_camera.c:1514:55: warning: "sasd" may
be used uninitialized in this function [-Wmaybe-uninitialized]
sasd->asd.match.i2c.adapter_id, sasd->asd.match.i2c.address);
^
drivers/media/platform/soc_camera/soc_camera.c:1464:34: note: "sasd" was
declared here
struct soc_camera_async_subdev *sasd;
Fix this by making "size" and the array, from which it is assigned unsigned.Signed-off-by: Guennadi Liakhovetski
Acked-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
22 Jun, 2013
4 commits
-
Add support for asynchronous subdevice probing, using the v4l2-async API.
The legacy synchronous mode is still supported too, which allows to
gradually update drivers and platforms. The selected approach adds a
notifier for each struct soc_camera_device instance, i.e. for each video
device node, even when there are multiple such instances registered with a
single soc-camera host simultaneously.Signed-off-by: Guennadi Liakhovetski
Acked-by: Hans Verkuil
Acked-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
Instead of centrally enabling and disabling subdevice master clocks in
soc-camera core, let subdevice drivers do that themselves, using the
V4L2 clock API and soc-camera convenience wrappers.Signed-off-by: Guennadi Liakhovetski
Acked-by: Hans Verkuil
Acked-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
Currently soc-camera uses a single camera host callback to activate the
interface master clock and to configure the interface for a specific
client. However, during probing we might not have the information about
a client, we just need to activate the clock. Add new camera host driver
callbacks to only start and stop the clock without and client-specific
configuration.Signed-off-by: Guennadi Liakhovetski
Acked-by: Hans Verkuil
Acked-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab -
All soc-camera host drivers include a pointer to an soc-camera device in
their host private struct to check, that only one client is connected.
Move this common code to soc_camera.c.Signed-off-by: Guennadi Liakhovetski
Acked-by: Hans Verkuil
Acked-by: Laurent Pinchart
Signed-off-by: Mauro Carvalho Chehab
21 Jun, 2013
1 commit
-
The parent field will eventually disappear to be replaced by v4l2_dev.
soc_camera does provide a v4l2_device struct but did not point to it in
struct video_device. This is now fixed.
Now the video nodes can be found under the correct platform bus, and
the advanced debug ioctls work correctly as well (the core implementation
of those ioctls requires that v4l2_dev is set correctly).Signed-off-by: Hans Verkuil
Acked-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
05 Apr, 2013
1 commit
-
Based on work done by Katsuya Matsubara.
Signed-off-by: Phil Edworthy
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
05 Jan, 2013
3 commits
-
struct soc_camera_link currently contains fields, used both by sensor and
bridge drivers. To make subdevice driver re-use simpler, split it into a
host and a subdevice parts.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Currently soc-camera has a per-device node lock, used for video operations
and a per-host lock for code paths, modifying host's pipeline. Manipulating
the two locks increases complexity and doesn't bring any advantages. This
patch removes the per-device lock and uses the per-host lock for all
operations.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
The recently introduced host_lock causes lockdep warnings, besides, list
enumeration in scan_add_host() must be protected by holdint the list_lock.
OTOH, holding .video_lock in soc_camera_open() isn't enough to protect
the host during its building of the pipeline, because .video_lock is per
soc-camera device. If, e.g. more than one sensor can be attached to a host
and the user tries to open both device nodes simultaneously, host's .add()
method can be called simultaneously for both sensors. Fix these problems
by holding list_lock instead of .host_lock in scan_add_host() and taking
it shortly at the beginning of soc_camera_open(), and using .host_lock to
protect host's .add() and .remove() operations only.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
26 Sep, 2012
1 commit
-
Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_crop.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
16 Aug, 2012
2 commits
-
Add .get_selection() and .set_selection() soc-camera host driver
operations. Additionally check, that the user is not trying to change the
output sizes during a running capture.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Instead of forcing all soc-camera drivers to go through the mid-layer to
handle power management, create soc_camera_power_[on|off]() functions
that can be called from the subdev .s_power() operation to manage
regulators and platform-specific power handling. This allows non
soc-camera hosts to use soc-camera-aware clients.Signed-off-by: Laurent Pinchart
[g.liakhovetski@gmx.de: fix compile breakage]
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
16 May, 2012
1 commit
-
Add a capabilities field to the soc_camera_host structure to flag hosts
that support user-configurable line strides. soc_camera_try_fmt() then
passes the user-provided bytesperline and sizeimage format fields to
such hosts, and expects the host to check (and fix if needed) the
values.Signed-off-by: Laurent Pinchart
[g.liakhovetski@gmx.de: fix a typo in mx2_camera.c]
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
15 May, 2012
1 commit
-
Use "enum_framesizes" instead of "enum_fsizes" to more precisely follow
the name of the respective ioctl().Signed-off-by: Guennadi Liakhovetski
Reviewed-by: Sergio Aguirre
Signed-off-by: Mauro Carvalho Chehab
26 Apr, 2012
1 commit
-
If multiple clients are registered on a single camera host interface,
the user-space hot-plug software can try to access the one, that probed
first, before probing of the second one has completed. This can be
handled by individual host drivers, but it is even better to hold back
the user-space until all the probing on this host has completed. This
fixes a race on ecovec with two clients registered on the CEU1 host, which
otherwise triggers a BUG() in sh_mobile_ceu_remove_device().Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
06 Jan, 2012
1 commit
-
The "pixfmt" parameter of the struct soc_camera_host_ops::set_bus_param()
method is redundant, because at the time, when this method is called,
pixfmt is guaranteed to be equal to icd->current_fmt->host_fmt->fourcc.
Remove this parameter and update all drivers accordingly.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
11 Dec, 2011
1 commit
-
On 64-bit platforms assigning a pointer to a 32-bit variable causes a
compiler warning and cannot actually work. Soc-camera currently doesn't
support any 64-bit systems, but such platforms can be added in the
and in any case compiler warnings should be avoided.Signed-off-by: Guennadi Liakhovetski
Acked-by: Janusz Krzysztofik
Signed-off-by: Mauro Carvalho Chehab
04 Nov, 2011
9 commits
-
The most important change in this patch is direct linking to struct
soc_camera_link via the client->dev.platform_data pointer. This makes most
of the soc-camera client drivers also usable outside of the soc-camera
framework. After this change all what is needed for these drivers to
function are inclusions of soc-camera headers for some convenience macros,
suitably configured platform data, which is anyway always required, and
loaded soc-camera core module for library functions. If desired, these
library functions can be made generic in the future and moved to a more
neutral location.The only two client drivers, that still depend on soc-camera are:
mt9t031: it uses struct video_device for its PM. Since no hardware is
available, alternative methods cannot be tested.ov6650: it uses struct soc_camera_device to pass its sense data back to
the bridge driver. A generic v4l2-subdevice approach should be developed
to perform this.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Using the internally cached pixel code, instead of the one, provided by
the soc-camera, removes one more use of struct soc_camera_device in these
drivers. Also remove the no longer needed soc_camera_from_i2c() inline
function.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Remove most trivial uses of struct soc_camera_device from most client
drivers, abstracting some of them inside inline functions. Next steps
will eliminate remaining uses and modify inline functions to not use
struct soc_camera_device.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Signed-off-by: Hans Verkuil
[g.liakhovetski@gmx.de: mt9m001 hunk moved to an earlier patch]
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
And since this is the last and only host driver that uses controls, also
remove the now obsolete control fields from soc_camera.h.Signed-off-by: Hans Verkuil
[g.liakhovetski@gmx.de: moved code around, fixed problems]
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
The soc_camera framework is switched over to use the control framework.
After this patch none of the controls in subdevs or host drivers are available,
until those drivers are also converted to the control framework.Signed-off-by: Hans Verkuil
[g.liakhovetski@gmx.de: moved code around, fixed problems]
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
soc-camera has been completely ported over to V4L2 subdevice mbus-config
operations, soc-camera client bus-param operations and supporting code
can now be removed.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
With the new subdevice media-bus configuration methods bus-width is not
configured along with other bus parameters, instead, it is derived from
the data format. With those methods it is convenient to specify
supported bus-widths in the platform data as (1 << (width - 1)). We
redefine SOCAM_DATAWIDTH_* flags to use the same convention to make
platform data seemlessly reusable.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
Add helper functions to process the new media bus configuration type
similar to soc_camera_apply_sensor_flags() and
soc_camera_bus_param_compatible().Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab
28 Jul, 2011
5 commits
-
Now that v4l2 subdevices have got their own device objects, having
one more device in soc-camera clients became redundant and confusing.
This patch removes those devices and the soc-camera bus, they used to
reside on.Signed-off-by: Guennadi Liakhovetski
Acked-by: Paul Mundt
Signed-off-by: Mauro Carvalho Chehab -
The soc-camera bus is now completely local again.
Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
soc-camera host drivers shall be implementing their PM, using standard
kernel methods, soc-camera specific hooks can die.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
This patch removes .enum_input(), .suspend() and .resume() soc-camera
client operations.Functionality, provided by .enum_input(), if needed, can be implemented
using the v4l2-subdev API.As for .suspend() and .resume(), the only client driver, implementing
these methods has been mt9m111, and the only host driver, using them
has been pxa-camera. Now that both those drivers have been converted
to the standard subdev .s_power() operation, .suspend() and .resume()
can be removed.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab -
SOCAM_MIPI_[1234]LANE flags are not board-specific sensor flags, they
are bus configuration flags.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Mauro Carvalho Chehab