Commit Graph

362639 Commits

Author SHA1 Message Date
Laurent Pinchart
37b9f2117f [media] mt9p031: Use devm_* managed helpers
Replace kzalloc and gpio_request_one by their managed equivalents.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:59:35 -03:00
Laurent Pinchart
73254c30db [media] mt9m032: Define MT9M032_READ_MODE1 bits
Replace hardcoded values with #define's.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:58:45 -03:00
Laurent Pinchart
a54b80b17a [media] mt9m032: Fix PLL setup
The MT9M032 PLL was assumed to be identical to the MT9P031 PLL but
differs significantly. Update the registers definitions and PLL limits
according to the datasheet.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:55:41 -03:00
Sylwester Nawrocki
b54373c549 [media] exynos4-is: Disable debug trace by default in fimc-isp.c
Make sure the debug level is properly set initially so any debug
information is not printed to the kernel log without explicitly
enabling it.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:52:57 -03:00
Sylwester Nawrocki
03385b8e9d [media] exynos4-is: Remove meaningless test before bit setting
There is no need to check same bit before setting it, since we
always end up with a bit set. Remove some of the tests and make
set unconditional, in every place where all that needs to be done
is just setting a bit.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:52:39 -03:00
Sylwester Nawrocki
3530ef0a6e [media] exynos4-is: Rename the ISP chain configuration data structure
More appropriate names for the ISP chain data structure.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:51:56 -03:00
Sylwester Nawrocki
a6f5635e63 [media] exynos4-is: Improve the ISP chain parameter count calculation
Instead of incrementing p_region_num field each time we set a bit
in the parameter mask calculate the number of bits set only when
this information is needed.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:50:31 -03:00
Sylwester Nawrocki
4c8f0629f5 [media] exynos4-is: Make fimc-lite independent of struct fimc_sensor_info
Make the sensor subdevs host_data hold a pointer to struct fimc_source_info,
which is defined in the driver's public header, rather than a pointer to
struct fimc_sensor_info which is specific to exynos4-is media device driver.
The purpose of this change is to allow easier reuse of the fimc-lite module
in the exynos5-is driver, which should similarly store a pointer to struct
fimc_source_info instance in the sensor's subdev host_data.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:48:44 -03:00
Sylwester Nawrocki
756e6e1448 [media] exynos4-is: Make fimc-lite independent of the pipeline->subdevs array
Get the sensor subdev by walking media graph in both cases: when the
device is used as a subdev only and through video node. This allows
to not dereference the pipeline->subdevs[] array and makes the module
more generic and easier to re-use in other media driver.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:47:44 -03:00
Sylwester Nawrocki
488f29d00e [media] exynos4-is: Move the subdev group ID definitions to public header
Move the sub-device group ID definitions to the driver's public header
so they are available to other media drivers that need to share modules
found in exynos4-is.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:46:40 -03:00
Sylwester Nawrocki
65fccab560 [media] s5p-mfc: Remove potential uninitialized variable usage
Make sure mem_info[] array is not used uninitialized. This prevents
following compiler warning:
drivers/media/platform/s5p-mfc/s5p_mfc.c: In function s5p_mfc_probe:
drivers/media/platform/s5p-mfc/s5p_mfc.c:1032:33: warning: mem_info[0] may be used uninitialized in this function [-Wuninitialized]
drivers/media/platform/s5p-mfc/s5p_mfc.c:1021:15: note: mem_info[0] was declared here
drivers/media/platform/s5p-mfc/s5p_mfc.c:1032:33: warning: mem_info[1] may be used uninitialized in this function [-Wuninitialized]
drivers/media/platform/s5p-mfc/s5p_mfc.c:1021:15: note: mem_info[1] was declared here

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 15:45:58 -03:00
Hans Verkuil
abd50853d9 [media] s5c73m3: Fix s5c73m3-core.c compiler warning
Fix for this compiler warning:
CC [M]  drivers/media/i2c/s5c73m3/s5c73m3-core.o
drivers/media/i2c/s5c73m3/s5c73m3-core.c: In function ‘s5c73m3_load_fw’:
drivers/media/i2c/s5c73m3/s5c73m3-core.c:360:2: warning: format ‘%d’ expects
argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-12 12:41:28 -03:00
Kamil Debski
a34026e75b [media] s5p-mfc: Add support for EOS command and EOS event in video decoder
Add support for V4L2_DEC_CMD_STOP command which will instruct MFC device
to finish decoding and release all remaining frames kept for reference to
the user. After dequeueing last decoded frame the driver will generate an
V4L2_EVENT_EOS event.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyngmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-12 12:38:56 -03:00
Peter Wiese
81e096c8ac [media] budget: Add support for Philips Semi Sylt PCI ref. design
Add support for Philips Semiconductor (now NXP) SAA7146
reference design DVB Sat card, using ALPS BSRU6 tuner.

[mchehab@redhat.com: Merge conflicts fix; email whitespacing unmangling]
Signed-off-by: Peter Wiese <peter.wiese@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:28:01 -03:00
Evgeny Plehov
4a74772e6d [media] cxd2820r_t2: Multistream support (MultiPLP)
MultiPLP filtering support for CXD2820r.

Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:13:02 -03:00
Mauro Carvalho Chehab
752a62b2ec [media] cx24123: improve precision when calculating symbol rate ratio
Symbol rate ratio were using a rough calculus, as the code was
limited to 32 bits arithmetic. Change it to 64 bits, in order
to better estimate the bandwidth low-pass filter on the demod.
This should reduce the noise and improve reception.

Reported-by: Hans-Peter Jansen <hpj@urpla.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:12:44 -03:00
Mauro Carvalho Chehab
0562aef296 [media] mb86a20s: better name temp vars at mb86a20s_layer_bitrate()
Using 'i' for the guard interval temporary var is a bad idea, as
'i' is generally used by "anonymous" indexes.
Let's rename modulation, fec and guard interval temp vars with
a meaningful name, as that makes easier to understand the code
and avoids cut-and-paste types of error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:12:19 -03:00
Mauro Carvalho Chehab
b1f8933119 [media] mb86a20s: Fix estimate_rate setting
As reported by Dan Carpenter <dan.carpenter@oracle.com>:
        Smatch warnings:
        drivers/media/dvb-frontends/mb86a20s.c:644 mb86a20s_layer_bitrate() error: buffer overflow 'state->estimated_rate' 3 <= 3
What happens there is that estimate_rate index should be the layer
number, and not the guard interval.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:11:06 -03:00
Mauro Carvalho Chehab
5cb88ca84a [media] mb86a20s: Use 'layer' instead of 'i' on all places
We're using the anonymous 'i' to indicate the layer number
on several places on the driver. That's not good, as some
cut-and-paste type of change might be doing the wrong thing.
So, call it as "layer" everywhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:10:53 -03:00
Mauro Carvalho Chehab
41c6e9dd09 [media] mb86a20s: fix audio sub-channel check
As reported by Dan Carpenter <dan.carpenter@oracle.com>
FYI, there are new smatch warnings show up in:
	tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next master
	head:   da17d7bda957ae4697b6abc0793f74fb9b50b58f
	commit: 04fa725e7b [media] mb86a20s: Implement set_frontend cache logic
	New smatch warnings:
	drivers/media/dvb-frontends/mb86a20s.c:1897 mb86a20s_set_frontend() error: buffer overflow 'mb86a20s_subchannel' 8 <= 8
	04fa725e Mauro Carvalho Chehab 2013-03-04  1894  		if (c->isdbt_sb_subchannel > ARRAY_SIZE(mb86a20s_subchannel))
	04fa725e Mauro Carvalho Chehab 2013-03-04  1895  			c->isdbt_sb_subchannel = 0;
	04fa725e Mauro Carvalho Chehab 2013-03-04  1896
	04fa725e Mauro Carvalho Chehab 2013-03-04 @1897  		state->subchannel = mb86a20s_subchannel[c->isdbt_sb_subchannel];

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:10:33 -03:00
Mauro Carvalho Chehab
4f62a20dfb [media] mb86a20s: Use a macro for the number of layers
Instead of using the magic number "3", use NUM_LAYERS macro
on all places that are related to the ISDB-T layers.
This makes the source code a little more readable.
No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:10:17 -03:00
Ondrej Zary
1bacb2df3b [media] tda8290: change magic LNA config values to enum
Use enum instead of magic values for LNA config in tda8290.
Update tda827x, tda18271 and saa7134 to use the enum too.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:05:15 -03:00
Ondrej Zary
34fe2784b4 [media] saa7134: Add AverMedia A706 AverTV Satellite Hybrid+FM
Add AverMedia AverTV Satellite Hybrid+FM (A706) card to saa7134 driver.
Working: analog inputs, TV, FM radio and IR remote control.
Untested: DVB-S.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:04:30 -03:00
Ondrej Zary
cdcd141c95 [media] tuner-core: Change config from unsigned int to void *
config looks like a hack that was added to tuner-core to allow some
configuration of TDA8290 tuner (it's not used by any other driver).
But with the new configuration options of tda8290 driver (no_i2c_gate
and std_map), it's no longer sufficient.
Change config to be void * instead, which allows passing tuner-dependent
config struct to drivers.
Also update saa7134 driver to reflect this change (no other driver uses this).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:01:36 -03:00
Ondrej Zary
5b0e5350ce [media] tda8290: Allow custom std_map for tda18271
Allow specifying a custom std_map for tda18271 by external configuration.
This is required by cards that require custom std_map for analog TV or radio,
like AverMedia A706.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:01:15 -03:00
Ondrej Zary
2f719f7a9a [media] tda8290: Allow disabling I2C gate
Allow disabling I2C gate handling by external configuration.
This is required by cards that have all devices on a single I2C bus,
like AverMedia A706.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 07:00:47 -03:00
Mauro Carvalho Chehab
48a8a03b58 [media] cx88: kernel bz#9476: Fix tone setting for Nova-S+ model 92001
Hauppauge Nova-S-Plus DVB-S model 92001 does not lock on horizontal
polarisation. According with the info provided at the BZ, model
92002 does.

The difference is that, on model 92001, the tone select is done via
isl6421, while, on other devices, this is done via cx24123 code.
This patch adds a way to override the demod's set_tone at isl6421
driver. In order to avoid regressions, the override is enabled
only for cx88 Nova S plus model 92001. For all other models and
devices, the set_tone is provided by the demod driver.

Patch originally proposed at bz@9476[1] by Michel Meyers and
John Donoghue but applying the original patch would break support
for all other devices based on isl6421.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=9476

Tested-by: Adam Sampson <ats@offog.org>
Tested-by: Hans-Peter Jansen <hpj@urpla.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 06:56:47 -03:00
Jiri Slaby
a9bd87c232 [media] MEDIA: ttusbir, fix double free
rc_unregister_device already calls rc_free_device to free the passed
device. But in one of ttusbir's probe fail paths, we call
rc_unregister_device _and_ rc_free_device. This is wrong and results
in a double free.
Instead, set rc to NULL resulting in rc_free_device being a noop.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 06:54:01 -03:00
Mauro Carvalho Chehab
fde04ab95d [media] demux.h: Remove duplicated enum
"enum dmx_ts_pes" and "typedef enum dmx_pes_type_t" are just the
same enum declared twice, since Kernel (2.6.12). There's no reason
to duplicate it there, and sparse complains about that:
	drivers/media/dvb-core/dmxdev.c:600:55: warning: mixing different enum types
So, remove the internal define, keeping just the external one.
Internally, use only "enum dmx_ts_pes", as it is too late to drop
dmx_pes_type_t from the userspace API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-08 06:53:15 -03:00
Sylwester Nawrocki
9ea89e2b62 [media] exynos4-is: Ensure proper media pipeline state on device close
Make sure media_entity_pipeline_stop() is called on video device
close in cases where there was VIDIOC_STREAMON ioctl and no
VIDIOC_STREAMOFF. This patch fixes media entities stream_count
state which could prevent links from being disconnected, due to
non-zero stream_count.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:24:32 -03:00
Sylwester Nawrocki
439797980a [media] exynos4-is: Correct input DMA YUV order configuration
This patch fixes erroneous setup of the YUV order caused by not
clearing FIMC_REG_MSCTRL_ORDER422_MASK bit field before setting
proper FIMC_REG_MSCTRL_ORDER422 bits. This resulted in false
colors for YUYV, YVYU, UYVY, VYUY color formats, depending in
what sequence those were configured by user space.
YUV order definitions are corrected so that following convention
is used:
        | byte3 | byte2 | byte1 | byte0
 -------+-------+-------+-------+------
 YCBYCR | CR    | Y     | CB    | Y
 YCRYCB | CB    | Y     | CR    | Y
 CBYCRY | Y     | CR    | Y     | CB
 CRYCBY | Y     | CB    | Y     | CR

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:23:53 -03:00
Sylwester Nawrocki
e90ad659cd [media] exynos4-is: Allow colorspace conversion at FIMC-LITE
The FIMC-LITE output DMA allows to configure different YUV order
than the order at the camera input interface. Thus there is some
limited colorspace conversion possible. This patch makes the
color format variable be per FIMC-LITE input/output, rather than
a global per device. This also fixes incorrect behavior where
color format at the FIMC-LITE.N subdev's source pad is modified
by VIDIOC_S_FMT ioctl on the related video node.
YUV order definitions are corrected so that we use notation:
         | byte3 | byte2 | byte1 | byte0
  -------+-------+-------+-------+------
  YCBYCR | CR    | Y     | CB    | Y
  YCRYCB | CB    | Y     | CR    | Y
  CBYCRY | Y     | CR    | Y     | CB
  CRYCBY | Y     | CB    | Y     | CR

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:23:24 -03:00
Sylwester Nawrocki
9c8399c86c [media] exynos4-is: Use common driver data for all FIMC-LITE IP instances
There is no need to use separate variant data structure for each
FIMC-LITE IP instance. According to my knowledge there are no
differences across them on Exynos4 as well as Exynos5 SoCs. Drop
flite_variant data structure and use struct flite_drvdata instead.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:20:48 -03:00
Sylwester Nawrocki
8cec74c60b [media] exynos4-is: Remove static driver data for Exynos4210 FIMC variants
The Exynos platform will support only device tree based booting
from v3.10. The FIMC variant data will be parsed directly from
the device tree, hence the now unused static data can be removed.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:19:55 -03:00
Sylwester Nawrocki
f998bb7ba9 [media] exynos4-is: Create media links for the FIMC-IS entities
Create disabled links from the FIMC-LITE subdevs to the FIMC-IS-ISP
subdev and from FIMC-IS-ISP to all FIMC subdevs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:19:06 -03:00
Sylwester Nawrocki
e781bbe3fe [media] exynos4-is: Add fimc-is subdevs registration
This patch adds support for registration of the FIMC-IS device
represented by the FIMC-IS-ISP subdev to the top level media device
driver. The FIMC-IS subsystem is available on Exynos4x12 SoCs which
support only device tree based booting.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:17:27 -03:00
Sylwester Nawrocki
0580abc2b5 [media] exynos4-is: Add Exynos4x12 FIMC-IS device tree binding documentation
This patch adds DT binding documentaton for the Imaging Subsystem
(camera ISP) found on Samsung Exynos4x12 SoCs.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:16:02 -03:00
Sylwester Nawrocki
b8d9834a12 [media] exynos4-is: Add common FIMC-IS image sensor driver
This patch adds a common image sensor driver and Makefile/Kconfig
to enable compilation of the whole IS driver.
The sensor subdev driver currently only handles an image sensor's
power supplies and reset signal. There is no I2C communication as
it is handled by the ISP's firmware.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:14:01 -03:00
Sylwester Nawrocki
294781db46 [media] exynos4-is: Add FIMC-IS parameter region definitions
This patch adds the ISP processing parameters interface files.

Signed-off-by: Younghwan Joo <yhwan.joo@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:06:46 -03:00
Sylwester Nawrocki
da114376d3 [media] exynos4-is: Add FIMC-IS ISP I2C bus driver
This patch adds the ISP I2C bus controller driver files.
Creating a standard I2C bus adapter, even if the driver doesn't
actually communicate with the hardware and it is instead
controlled by the ISP firmware running on the Cortex-A5, allows
to use standard hardware description in the device tree. As the
sensor would have actually had a standard V4L2 sub-device driver
run on the host CPU.
This approach allows to adapt the driver with a relatively small
effort should the Imaging Subsystem architecture change so that
the I2C bus is handled by the host's CPU OS, rather than the
internal FIMC-IS ARM CPU firmware. The image sensor driver could
be a standard I2C client driver, as in case of most existing
image sensors.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 20:04:49 -03:00
Sylwester Nawrocki
9a761e4368 [media] exynos4-is: Add Exynos4x12 FIMC-IS driver
This patch adds a set of core files of the Exynos4x12 FIMC-IS
V4L2 driver. This includes main functionality like allocating
memory, loading the firmware, FIMC-IS register interface and
host CPU <-> IS command and error code definitions.
The driver currently exposes a single subdev named FIMC-IS-ISP,
which corresponds to the FIMC-IS ISP and DRC IP blocks.
The FIMC-IS-ISP subdev currently supports only a subset of user
controls. For other controls we need several extensions at the
V4L2 API. The supported standard controls are:
brightness, contrast, saturation, hue, sharpness, 3a_lock,
exposure_time_absolute, white_balance_auto_preset,
iso_sensitivity, iso_sensitivity_auto, exposure_metering_mode.

Signed-off-by: Younghwan Joo <yhwan.joo@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:59:24 -03:00
Sylwester Nawrocki
c6e8d96d42 [media] V4L: Remove incorrect EXPORT_SYMBOL() usage at v4l2-of.c
v4l2_of_parse_parallel_bus() function is now static and
EXPORT_SYMBOL() doesn't apply to it any more. Drop this
meaningless statement, which was supposed to be done in
the original merged patch.
While at it, edit the copyright notice so it is sorted in
both the v4l2-of.c and v4l2-of.h file in newest entries
on top order, and state clearly I'm just the author of
parts of the code, not the copyright owner.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:57:13 -03:00
Sylwester Nawrocki
05a70a4079 [media] exynos4-is: Correct clock properties description at the DT binding documentation
The 'camera' DT node needs to have sclk_cam0/1 and pxl_async0/1 clocks
specified, while 'fimc' nodes should have only "fimc" and "sclk_fimc".
"mux" and "parent" are leftovers from early versions of patches adding
DT support, when the IP bus clock parent clock was being set by the
driver. A better solution is needed to have e.g. clocks driver setting
all required parent clocks, before clock consumers start using the
clocks. Currently this binding doesn't describe parent clocks setup,
it needs to be specified and handled somewhere else.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:56:08 -03:00
Sylwester Nawrocki
b3d8b559b1 [media] exynos4-is: Remove dependency on SYSCON for non-dt platforms
Currently the whole driver depends on MFD_SYSCON, which in turn
depends on OF. To allow to use the driver on non-dt platforms
(S5PV210) the SYSREG support is made conditional (it is needed
only for dt enabled platforms) and MFD_SYSCON is selected if
OF is enabled, instead of depending on OF.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:53:56 -03:00
Arnd Bergmann
474c890d67 [media] exynos: remove unnecessary header inclusions
In multiplatform configurations, we cannot include headers
provided by only the exynos platform. Fortunately a number
of drivers that include those headers do not actually need
them, so we can just remove the inclusions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:52:41 -03:00
Sachin Kamat
992bc797de [media] soc_camera/soc_camera_platform: Fix warning related to spacing
Fixes the following checkpatch warning:
WARNING: please, no space before tabs

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:51:24 -03:00
Sachin Kamat
ca0c4ba72d [media] soc_camera/sh_mobile_ceu_camera: Fix warning related to spacing
Fixes the following checkpatch warning:
WARNING: please, no space before tabs

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:51:02 -03:00
Sachin Kamat
56a4919404 [media] soc_camera/pxa_camera: Constify struct dev_pm_ops
struct dev_pm_ops should be const.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:50:48 -03:00
Sachin Kamat
6003b2add5 [media] soc_camera/pxa_camera: Fix warning related to spacing
Fixes the following checkpatch warning:
WARNING: please, no space before tabs

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:50:31 -03:00
Sachin Kamat
0cb2986884 [media] soc_camera/mx3_camera: Fix warning related to spacing
Silences the following checkpatch warning:
WARNING: please, no space before tabs

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-04 19:50:17 -03:00