Commit graph

1294 commits

Author SHA1 Message Date
Marek Vasut de2e04569d [media] media: imx: Drop warning upon multiple S_STREAM disable calls
Calling S_STREAM OFF multiple times on a video device is valid, although
dubious, practice. Instead of warning about it and setting stream count
lower than zero, just ignore the subsequent S_STREAM calls and correct
the stream count to zero.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:12:20 -03:00
Steve Longerbeam 21e54111d2 [media] media: imx: set and propagate default field, colorimetry
This patch adds a call to imx_media_fill_default_mbus_fields() in the
*_try_fmt() functions at the sink pads, to set empty field order and
colorimetry parameters.

If the field order is set to ANY, choose the currently set field order
at the sink pad. If the colorspace is set to DEFAULT, choose the
current colorspace at the sink pad.  If any of xfer_func, ycbcr_enc
or quantization are set to DEFAULT, either choose the current sink pad
setting, or the default setting for the new colorspace, if non-DEFAULT
colorspace was given.

If a format is destined to be routed through the Image Converter,
fixed quantization and Y`CbCr encoding must be set.

Colorimetry is also propagated from sink to source pads anywhere
this has not already been done.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:03:57 -03:00
Russell King c24858c307 [media] media: imx: capture: add frame sizes/interval enumeration
Add support for enumerating frame sizes and frame intervals from the
first subdev via the V4L2 interfaces.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:02:56 -03:00
Russell King 949ffdbfdb [media] media: imx: csi: add frame size/interval enumeration
Add frame size and frame interval enumeration to CSI.

CSI can downscale the image independently horizontally and vertically by a
factor of two, which enumerates to four different frame sizes at the
output pads. The input pad supports a range of frame sizes.

CSI can also drop frames, resulting in frame rate reduction, so
enumerate the resulting possible output frame rates.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 08:02:24 -03:00
Philipp Zabel 69e78611ff [media] media: imx: csi: add sink selection rectangles
Move the crop rectangle to the sink pad and add a sink compose rectangle
to configure scaling. Also propagate rectangles from sink pad to crop
rectangle, to compose rectangle, and to the source pads both in ACTIVE
and TRY variants of set_fmt/selection, and initialize the default crop
and compose rectangles.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:52:53 -03:00
Philipp Zabel fb30ee7955 [media] media: imx: csi: add frame skipping support
The CSI can skip any out of up to 6 input frames, allowing to reduce the
frame rate at the output pads by small fractions.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:45:55 -03:00
Philipp Zabel 6f30359239 [media] media: imx: csi: increase burst size for YUV formats
The IDMAC supports burst sizes of up to 32 pixels for interleaved YUV
formats and up to 64 pixels for planar YUV formats.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:43:41 -03:00
Russell King c8da8c03d2 [media] media: imx: csi: add support for bayer formats
Bayer formats must be treated as generic data and passthrough mode must
be used.  Add the correct setup for these formats.

- added check to csi_link_validate() to verify that destination is
  IDMAC output pad when passthrough conditions exist: bayer formats
  and 16-bit parallel buses.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:43:15 -03:00
Steve Longerbeam f5138526e4 [media] media: imx: Add MIPI CSI-2 Receiver subdev driver
Adds MIPI CSI-2 Receiver subdev driver. This subdev is required
for sensors with a MIPI CSI2 interface.

- Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs.
- Add the function csi2ipu_gasket_init() to initialize the gasket at
  s_power(ON). The gasket needs to be programmed with the correct color
  component ordering to handle UYVY vs. YUYV ordered mbus formats from
  sensors. Note that the description of the CSI2IPU_GASKET register in
  the i.MX6 reference manual is wrong w.r.t bit 2 (the manual refers to
  this register as CSI2_SW_RST): setting bit 2 selects YUYV order, not UYVY.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Suggested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:42:41 -03:00
Steve Longerbeam f0d9c8924e [media] media: imx: Add IC subdev drivers
This is a set of three media entity subdevice drivers for the i.MX
Image Converter:

- Pre-process Router: Takes input frames from CSI0, CSI1, or VDIC.
  Two output pads enable either or both of the preprocess tasks
  below. If the input is from one of the CSIs, both proprocess task
  links can be enabled to process frames from that CSI simultaneously.
  If the input is the VDIC, only the Pre-processing Viewfinder task
  link can be enabled.

- Pre-processing Encode task: video frames are routed directly from
  the CSI and can be scaled, color-space converted, and rotated.
  Scaled output is limited to 1024x1024 resolution. Output frames
  are routed to the prpenc capture device.

- Pre-processing Viewfinder task: this task can perform the same
  conversions as the pre-process encode task, but in addition can
  be used for hardware motion compensated deinterlacing. Frames can
  come either directly from the CSI or from the VDIC. Scaled output
  is limited to 1024x1024 resolution. Output frames are routed to
  the prpvf capture device.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:41:24 -03:00
Steve Longerbeam 93dae31149 [media] media: imx: Add VDIC subdev driver
This is a media entity subdevice driver for the i.MX Video De-Interlacing
or Combining Block. So far this entity does not implement the Combining
function but only motion compensated deinterlacing. Video frames are
received from the CSI and are routed to the IC PRPVF entity.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:39:05 -03:00
Steve Longerbeam 4a34ec8e47 [media] media: imx: Add CSI subdev driver
This is a media entity subdevice for the i.MX Camera
Sensor Interface module.

- Added support for negotiation of frame intervals.
- Fixed cropping rectangle negotiation at input and output pads.
- Added support for /2 downscaling, if the output pad dimension(s)
  are 1/2 the crop dimension(s) at csi_setup() time.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[hans.verkuil@cisco.com: add linux/pinctrl/consumer.h include]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:37:53 -03:00
Steve Longerbeam 64b5a49df4 [media] media: imx: Add Capture Device Interface
This is the capture device interface driver that provides the v4l2
user interface. Frames can be received from various sources:

- directly from CSI for capturing unconverted images directly from
  camera sensors.

- from the IC pre-process encode task.

- from the IC pre-process viewfinder task.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:34:22 -03:00
Steve Longerbeam 543933ee34 [media] media: imx: Add a TODO file
Add a TODO file.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:31:52 -03:00
Steve Longerbeam e130291212 [media] media: Add i.MX media core driver
Add the core media driver for i.MX SOC.

Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs.
Add the bayer formats to imx-media's list of supported pixel and bus
formats.

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20 07:30:38 -03:00
Mauro Carvalho Chehab acc490bbb7 [media] atomisp: use correct dialect to disable warnings
There's a Macro that checks if gcc supports a warning before
disabling it. Use it, in order to avoid warnings when building
with older gcc versions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08 14:51:58 -03:00
Mauro Carvalho Chehab 703ecba4db [media] staging: css2400/Makefile: don't include non-existing files
The atomisp css2400/Makefile includes a Makefile.common:

	include $(srctree)/$(src)/../Makefile.common

Well, this file doesn't exist at the Kernel tree :-)

So, don't include it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-08 12:39:03 -03:00
Hans de Goede af822177d6 [media] staging: atomisp: Fix endless recursion in hmm_init
hmm_init calls hmm_alloc to set dummy_ptr, hmm_alloc calls
hmm_init when dummy_ptr is not yet set, which is the case in
the call from hmm_init, so it calls hmm_init again, this continues
until we have a stack overflow due to the recursion.

This commit fixes this by adding a separate flag for tracking if
hmm_init has been called. Not pretty, but it gets the job done,
eventually we should be able to remove the hmm_init call from
hmm_alloc.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:51:49 -03:00
Chen Guanqiao f1e627a41d [media] staging: atomisp: lm3554: fix sparse warnings(was not declared. Should it be static?)
Fix "symbol 'xxxxxxx' was not declared. Should it be static?" sparse warnings.

Signed-off-by: Chen Guanqiao <chen.chenchacha@foxmail.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:50:22 -03:00
Hans de Goede ef14aa3bc1 [media] staging: atomisp: Make ov2680 driver less chatty
There is no reason for all this printk spamming and certainly
not at an error log level.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:49:56 -03:00
Hans de Goede da3e18059b [media] staging: atomisp: Ignore errors from second gpio in ov2680 driver
As the existing comment in the driver indicates the sensor has only 1 pin,
but some boards may have 2 gpios defined and we toggle both as we we don't
know which one is the right one. However if the ACPI resources table
defines only 1 gpio (as expected) the gpio1_ctrl call will always fail,
causing the probing of the driver to file.

This commit ignore the return value of the gpio1_ctrl call, fixing this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:49:23 -03:00
Hans de Goede 22b2807dae [media] staging: atomisp: Add OVTI2680 ACPI id to ov2680 driver
Add OVTI2680 ACPI id to ov2680 driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:48:36 -03:00
Hans de Goede 6706e9008d [media] staging: atomisp: Add INT0310 ACPI id to gc0310 driver
Add INT0310 ACPI id to gc0310 driver

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:48:13 -03:00
Hans de Goede 42c6d864ac [media] staging: atomisp: Set step to 0 for mt9m114 menu control
menu controls are not allowed to have a step size, set step to 0 to
fix an oops from the WARN_ON in v4l2_ctrl_new_custom() triggering
because of this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:47:47 -03:00
Hans de Goede 797f91e641 [media] staging: atomisp: Do not call dev_warn with a NULL device
Do not call dev_warn with a NULL device, this silence the following 2
warnings:

[   14.392194] (NULL device *): Failed to find gmin variable gmin_V2P8GPIO
[   14.392257] (NULL device *): Failed to find gmin variable gmin_V1P8GPIO

We could switch to using pr_warn for dev == NULL instead, but as comments
in the source indicate, the check for these 2 special gmin variables with
a NULL device is a workaround for 2 specific evaluation boards, so
completely silencing the missing warning for these actually is a good
thing.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:47:17 -03:00
Hans de Goede 008d8e1005 [media] staging: atomisp: Fix calling efivar_entry_get() with unaligned arguments
efivar_entry_get has certain alignment requirements and the atomisp
platform code was not honoring these, causing an oops by triggering the
WARN_ON in arch/x86/platform/efi/efi_64.c: virt_to_phys_or_null_size().

This commit fixes this by using the members of the efivar struct embedded
in the efivar_entry struct we kzalloc as arguments to efivar_entry_get(),
which is how all the other callers of efivar_entry_get() do this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:46:46 -03:00
Alan Cox fc99349413 [media] atomisp: de-duplicate sh_css_mmu_set_page_table_base_index
Between the ISP2400 and ISP2401 code base this function moved file. The merge
of the drivers left us with two version in ifdefs. Resolve this down to a
single copy.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:46:00 -03:00
Alan Cox 4950cfecd1 [media] atomisp: remove sh_css_irq - it contains nothing
We won't be adding abstractions or moving them here so kill it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:45:13 -03:00
Alan Cox 29a323ea90 [media] atomisp: Unify lut free logic
ISP2401 introduced a helper for this which we can use just as well on the
ISP2400 and remove some more noise differences.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:44:39 -03:00
Alan Cox b1c056e05b [media] atomisp: Unify load_preview_binaries for the most part
ISP2401 introduced a rather sensible change to cut through the structure
spaghetti. Adopt that for the ISP2400 as well. It makes no difference to the
actual code other than readability.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:44:09 -03:00
Alan Cox 0ef9e6e555 [media] atomisp: unify sh_css_hmm_buffer_record_acquire
The ISP2401 version of this function returns a pointer to the buffer, whilst
the ISP2400 version returns a boolean if a slot is found. We can trivially
unify the code to use the ISP2401 version.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:43:24 -03:00
Alan Cox 4a2fcc0c91 [media] atomisp: eliminate dead code under HAS_RES_MGR
This define is never set and these code paths are never used so they can go
away.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:42:37 -03:00
Dan Carpenter 9dff81436d [media] atomisp2: off by one in atomisp_s_input()
The isp->inputs[] array has isp->input_cnt elements which have been
initialized so this > should be >=.

This bug is harmless.  The check against ATOM_ISP_MAX_INPUTS prevents us
from reading beyond the end of the array.  The uninitialized elements
are zeroed out so we will end up returning -EINVAL a few lines later
because the .camera pointer is NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:42:03 -03:00
Alan Cox 94e23b6148 [media] atomisp2: tidy up confused ifdefs
The two drivers were machine merged and in this case the machine output was to
say the least not optimal.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:41:40 -03:00
Alan Cox f16595ae20 [media] atomisp2: remove HRT_UNSCHED
HRT_UNSCHED is never defined or set in the driver, so this is dead code that
can be retired, simplifying the code a bit further.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:40:58 -03:00
Alan Cox 2310ae5c12 [media] atomisp: remove NUM_OF_BLS
With the removal of the HAS_BL bootloader code the value of NUM_OF_BLS is an
invariant zero. So let's get rid of it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:40:10 -03:00
Alan Cox 5c9f9d602e [media] atompisp: HAS_BL is never defined so lose it
Kill off the HAS_BL define and the code and includes it brackets. We never
define HAS_BL or use that functionality.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:39:42 -03:00
Juan Antonio Pedreira Martos 4518c3fe7c [media] staging: media: atomisp: fix non static symbol warnings
Fix a couple of sparse warnings:
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:59:14: warning: symbol 'repool_pgnr' was not declared. Should it be static?
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:387:6: warning: symbol 'punit_ddr_dvfs_enable' was not declared. Should it be static?

Mark these symbols as static, so they are no longer incorrectly exported.

Signed-off-by: Juan Antonio Pedreira Martos <juanpm1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:39:12 -03:00
Paolo Cretaro e1b28f1326 [media] atomisp: use NULL instead of 0 for pointers
Fix warning issued by sparse: Using plain integer as NULL pointer

Signed-off-by: Paolo Cretaro <melko@frugalware.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:38:44 -03:00
Christoph Fanelsa 74058c596b [media] staging: media: cxd2099: Fix checkpatch issues
Fix checkpatch warnings of prefered using '%s..", __func__' as function
name in a string

Signed-off-by: Christoph Fanelsa <eddi1983@gmx.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-07 12:33:41 -03:00
Sean Young 614d651e1a [media] staging: remove todo and replace with lirc_zilog todo
The lirc_zilog driver is the last remaining lirc driver, so the existing
todo is no longer relevant.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:18:08 -03:00
Ricardo Silva da731edb5b [media] lirc_zilog: Fix unbalanced braces around if/else
Fix all checkpatch reported issues for:

 * CHECK: "braces {} should be used on all arms of this statement".
 * CHECK: "Unbalanced braces around else statement".

Make sure all if/else statements are balanced in terms of braces. Most
cases in code are, but a few were left unbalanced, so put them all
consistent with the recommended style.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:13:06 -03:00
Ricardo Silva d44e07c752 [media] lirc_zilog: Use sizeof(*p) instead of sizeof(struct P)
Fix all checkpatch reported issues for "CHECK: Prefer
kzalloc(sizeof(*<p>)...) over kzalloc(sizeof(struct <P>)...)".

Other similar case in the code already using recommended style, so make
it all consistent with the recommended practice.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:12:13 -03:00
Ricardo Silva 41a603f8d9 [media] lirc_zilog: Use __func__ for logging function name
Fix all checkpatch reported issues for "CHECK: Prefer using '"%s...",
__func__' to using '<func_name>', ..."

Use recommended style. Additionally, __func__ was already used in
similar cases throughout the code, so make it all consistent.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:11:48 -03:00
Ricardo Silva 28b671b4ba [media] lirc_zilog: Fix NULL comparisons style
Fix all checkpatch reported issues for "CHECK: Comparison to NULL could
be written...".

Do these comparisons using the recommended coding style and consistent
with other similar cases in the file, which already used the recommended
way.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:11:13 -03:00
Ricardo Silva 32ddcbb5b8 [media] lirc_zilog: Fix whitespace style checks
Fix style issues reported by checkpatch, affecting whitespace only:

 * CHECK: "Please don't use multiple blank lines".
   Two of these still triggering and left untouched because used for
   separating logical blocks (vars from functions, etc.).

 * CHECK: "spaces preferred around that '<operator>'".
   All fixed.

 * CHECK: "Alignment should match open parenthesis".
   All fixed except one on line 1161, left untouched for readability.

Move towards recommended coding style without compromising readability.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:10:46 -03:00
David Härdeman bd16168da8 [media] lirc_zilog: remove module parameter minor
Always let the kernel decide what minor the lirc chardev gets.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:03:39 -03:00
David Härdeman c3104e1b42 [media] lirc_dev: remove sampling kthread
There are no drivers which use this functionality.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 09:00:56 -03:00
David Härdeman 52e809f9fe [media] lirc_dev: remove pointless functions
drv->set_use_inc and drv->set_use_dec are already optional so we can
remove all dummy functions.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-06 08:59:28 -03:00
Mauro Carvalho Chehab 4c9ef4f150 [media] atomisp: disable several warnings when W=1
The atomisp currently produce hundreds of warnings when W=1.

It is a known fact that this driver is currently in bad
shape, and there are lot of things to be done here.

We don't want to be bothered by those "minor" stuff for now,
while the driver doesn't receive a major cleanup. So,
disable those warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-19 08:57:05 -03:00