1
0
Fork 0
Commit Graph

868 Commits (09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a)

Author SHA1 Message Date
Luke Hart b317d0f585 [media] radio-bcm2048.c: Fix some checkpatch.pl errors
Fix the following warnings reported in radio-bcm2048.c:

WARNING: else is not generally useful after a break or return
374: FILE: radio-bcm2048.c:374:
+		return 0;
+	} else {

WARNING: else is not generally useful after a break or return
728: FILE: radio-bcm2048.c:728:
+			return BCM2048_DE_EMPHASIS_75us;
+		else

WARNING: unchecked sscanf return value
1974: FILE: radio-bcm2048.c:1974:
+	sscanf(buf, mask, &value);					\

WARNING: Missing a blank line after declarations
2245: FILE: radio-bcm2048.c:2245:
+		unsigned char tmpbuf[3];
+		tmpbuf[i] = bdev->rds_info.radio_text[bdev->rd_index+i+2];

WARNING: Possible unnecessary 'out of memory' message
2601: FILE: radio-bcm2048.c:2601:
+	if (!bdev) {
+		dev_dbg(&client->dev, "Failed to alloc video device.\n");

The following error was left since it seems to be a false positive:

ERROR: Macros with complex values should be enclosed in parenthesis
+#define DEFINE_SYSFS_PROPERTY(prop, signal, size, mask, check)		\
+property_write(prop, signal size, mask, check)				\
+property_read(prop, size, mask)

Signed-off-by: Luke Hart <luke.hart@birchleys.eu>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:07:05 -03:00
Anil Belur a0f7fe5b14 [media] staging: media: bcm2048: radio-bcm2048.c - removed IRQF_DISABLED macro
- this patch removes IRQF_DISABLED macro, as this is
  deprecated/noop.

Signed-off-by: Anil Belur <askb23@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:05:03 -03:00
Andrey Utkin 63e9b45b03 [media] solo6x10: update GOP size, QP immediately
Previously, it was needed to reopen device to update GOP size and
quantization parameter. Now we update device registers with new values
immediately.

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:04:40 -03:00
Andrey Utkin 5698111605 [media] solo6x10: expose encoder quantization setting as V4L2 control
solo6*10 boards have configurable quantization parameter which takes
values from 0 to 31, inclusively.

This change enables setting it with ioctl VIDIOC_S_CTRL with id
V4L2_CID_MPEG_VIDEO_H264_MIN_QP.

Signed-off-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 20:04:20 -03:00
Geert Uytterhoeven d169e86857 [media] staging/solo6x10: SOLO6X10 should select BITREVERSE
If CONFIG_SOLO6X10=y, but CONFIG_BITREVERSE=m:

    drivers/built-in.o: In function `solo_osd_print':
    (.text+0x1c7a1f): undefined reference to `byte_rev_table'
    make: *** [vmlinux] Error 1

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 19:58:27 -03:00
Laurent Pinchart cb766937e3 [media] v4l: omap4iss: Signal fatal errors to the vb2 queue
When a fatal error occurs in the pipeline signal it to the vb2 queue
with a call to vb2_queue_error(). The queue will then take care to
return -EIO when preparing buffers, remove the driver-specific code that
now duplicates that check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:22:41 -03:00
Laurent Pinchart 1153be56a1 [media] v4l: omap4iss: Use the devm_* managed allocators
This simplifies remove and error code paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:21:40 -03:00
Laurent Pinchart 1866123425 [media] v4l: omap4iss: Add module debug parameter
The parameter is used to initialize the video node debug field and
activate the V4L debug infrastructure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:21:06 -03:00
Laurent Pinchart 2b44ac9e84 [media] v4l: omap4iss: Don't reinitialize the video qlock at every streamon
Initialize the spin lock once only when initializing the video object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:20:50 -03:00
Vitaly Osipov 057ef1e56c [media] v4l: omap4iss: Copy paste error in iss_get_clocks
It makes more sense to return PTR_ERR(iss->iss_ctrlclk) here. The
current code looks like an oversight in pasting the block just above
this one.

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:20:24 -03:00
Arnd Bergmann 3ed1a0023c [media] v4l: omap4iss: tighten omap4iss dependencies
The OMAP4 camera support depends on I2C and VIDEO_V4L2, both
of which can be loadable modules. This causes build failures
if we want the camera driver to be built-in.

This can be solved by turning the option into "tristate",
which unfortunately causes another problem, because the
driver incorrectly calls a platform-internal interface
for omap4_ctrl_pad_readl/omap4_ctrl_pad_writel.

Instead, this patch just forbids the invalid configurations
and ensures that the driver can only be built if all its
dependencies are built-in.

Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 16:19:53 -03:00
Hans Verkuil 0ee58f8487 [media] go7007: add motion detection support
This patch adds motion detection support to the go7007 driver using the new
motion detection controls, events.

The global motion detection works fine, but the regional motion detection
support probably needs more work. There seems to be some interaction between
regions that makes setting correct thresholds difficult. The exact meaning of
the thresholds isn't entirely clear either.

I do not have any documentation, the only information I have is the custom code
in the driver and a modet.c application.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:32 -03:00
Hans Verkuil c5b250ad35 [media] solo6x10: check dma_map_sg() return value
The dma_map_sg() function can fail, so check for the return value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:32 -03:00
Hans Verkuil 761f9aa23f [media] solo6x10: fix 'dma from stack' warning
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:31 -03:00
Hans Verkuil 316d9e84a7 [media] solo6x10: implement the motion detection event
Use the new motion detection event.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:31 -03:00
Hans Verkuil 4063a3c781 [media] solo6x10: implement the new motion detection controls
Replace the custom ioctls to set motion detection thresholds by standard
matrix controls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:30 -03:00
Hans Verkuil 2a9ec37311 [media] v4l2-ctrls: use ptrs for all but the s32 type
Rather than having two unions for all types just keep 'val' and
'cur.val' and use the p_cur and p_new unions to access all others.

The only reason for keeping 'val' and 'cur.val' is that it is used
all over, so converting this as well would be a huge job.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 11:57:17 -03:00
Hans Verkuil 0ba2aeb6da [media] v4l2-ctrls: increase internal min/max/step/def to 64 bit
While VIDIOC_QUERYCTRL is limited to 32 bit min/max/step/def values
for controls, the upcoming VIDIOC_QUERY_EXT_CTRL isn't. So increase
the internal representation to 64 bits in preparation.

Because of these changes the msi3101 driver has been modified slightly
to fix a formatting issue (%d becomes %lld), vivi had to be modified
as well to cope with the new 64-bit min/max values and the PIXEL_RATE
control in a few sensor drivers required proper min/max/def values.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 09:18:09 -03:00
Ramakrishnan Muthukrishnan 95cd5d5ee6 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO
Since all the drivers that use `struct v4l2_fh' use the core
priority checking, the setting of the flag in the drivers can
be removed.

Signed-off-by: Ramakrishnan Muthukrishnan <ramakrmu@cisco.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:14:59 -03:00
Anthony DeStefano 7e49027e62 [media] staging: solo6x10: fix for sparse warning message
Define jpeg_dqt as static.

Signed-off-by: Anthony DeStefano <adx@fastmail.fm>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:11:27 -03:00
Hans Verkuil c0e11a2a24 [media] sn9c102: remove deprecated driver
During the media summit meeting in Edinburgh it was decided to move this
driver to staging as the first step to removing it altogether.

Most webcams covered by this driver are now supported by gspca. Nobody has the
hardware or is willing to convert the remaining devices to gspca.

This driver needs a major overhaul to have it conform to the latest frameworks
and compliancy tests.

Without hardware, however, this is next to impossible. Given the fact that
this driver seems to be pretty much unused (it has been removed from Fedora
several versions ago and nobody complained about that), we decided to drop
this driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:10:57 -03:00
Ovidiu Toader 941a8204d0 [media] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines
This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c

The new version of the file pleases checkpatch.pl when run with "--ignore LONG_LINE".

Signed-off-by: Ovidiu Toader <ovi@phas.ubc.ca>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:09:42 -03:00
Anthony DeStefano 85594960f5 [media] staging: rtl2832_sdr: fixup checkpatch/style issues
rtl2832_sdr.c: fixup checkpatch issues about long lines

Aligned stuff under the ( for this version.

Signed-off-by: Anthony DeStefano <adx@fastmail.fm>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04 16:08:57 -03:00
Linus Torvalds 338c09a94b Merge branch 'topic/omap3isp' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull OMAP3 updates from Mauro Carvalho Chehab:
 "Some driver improvements on OMAP3.  This series depend on some iommu
  patches already merged"

* 'topic/omap3isp' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (26 commits)
  [media] omap3isp: Rename isp_buffer isp_addr field to dma
  [media] omap3isp: Move to videobuf2
  [media] v4l: vb2: Add a function to discard all DONE buffers
  [media] omap3isp: Cancel all queued buffers when stopping the video stream
  [media] omap3isp: Move buffer irqlist to isp_buffer structure
  [media] omap3isp: Move queue irqlock to isp_video structure
  [media] omap3isp: Move queue mutex to isp_video structure
  [media] omap3isp: queue: Don't build scatterlist for kernel buffer
  [media] omap3isp: Use the ARM DMA IOMMU-aware operations
  [media] omap3isp: queue: Use sg_alloc_table_from_pages()
  [media] omap3isp: queue: Map PFNMAP buffers to device
  [media] omap3isp: queue: Fix the dma_map_sg() return value check
  [media] omap3isp: queue: Allocate kernel buffers with dma_alloc_coherent
  [media] omap3isp: queue: Inline the ispmmu_v(un)map functions
  [media] omap3isp: queue: Merge the prepare and sglist functions
  [media] omap3isp: queue: Use sg_table structure
  [media] omap3isp: queue: Move IOMMU handling code to the queue
  [media] omap3isp: video: Set the buffer bytesused field at completion time
  [media] omap3isp: ccdc: Use the DMA API for FPC
  [media] omap3isp: ccdc: Use the DMA API for LSC
  ...
2014-06-12 23:04:28 -07:00
Linus Torvalds aaeb255433 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media into next
Pull media updates from Mauro Carvalho Chehab:
 "This contains:
   - a new frontend/tuner driver set for si2168 and sa2157
   - Videobuf 2 core now supports DVB too
   - A new gspca sub-driver (dtcs033)
   - saa7134 is now converted to use videobuf2
   - add support for 4K timings
   - several other driver fixes and improvements

  PS.  This pull request is shorter than usual, partly because I have
  some other patches on topic branches that I'll be sending you later
  this week"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (286 commits)
  [media] au0828-dvb: restore its permission to 644
  [media] xc5000: delay tuner sleep to 5 seconds
  [media] xc5000: Don't use whitespace before tabs
  [media] xc5000: fix CamelCase
  [media] xc5000: Don't wrap msleep()
  [media] xc5000: get rid of positive error codes
  [media] au0828: reset streaming when a new frequency is set
  [media] au0828: Improve debug messages for urb_completion
  [media] au0828: Cancel stream-restart operation if frontend is disconnected
  [media] dib0700: fix RC support on Hauppauge Nova-TD
  [media] USB: as102_usb_drv.c: Remove useless return variables
  [media] v4l: Fix documentation of V4L2_PIX_FMT_H264_MVC and VP8 pixel formats
  [media] m5mols: Replace missing header
  [media] staging: lirc: Fix sparse warnings
  [media] fix mceusb endpoint type identification/handling
  [media] az6027: Added the PID for a new revision of the Elgato EyeTV Sat DVB-S Tuner
  [media] DocBook media: fix typo
  [media] adv7604: Add missing include to linux/types.h
  [media] v4l: Validate fields in the core code for subdev EDID ioctls
  [media] v4l: Add support for DV timings ioctls on subdev nodes
  ...
2014-06-04 14:24:30 -07:00
Linus Torvalds 1aacb90eaa Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial into next
Pull trivial tree changes from Jiri Kosina:
 "Usual pile of patches from trivial tree that make the world go round"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
  staging: go7007: remove reference to CONFIG_KMOD
  aic7xxx: Remove obsolete preprocessor define
  of: dma: doc fixes
  doc: fix incorrect formula to calculate CommitLimit value
  doc: Note need of bc in the kernel build from 3.10 onwards
  mm: Fix printk typo in dmapool.c
  modpost: Fix comment typo "Modules.symvers"
  Kconfig.debug: Grammar s/addition/additional/
  wimax: Spelling s/than/that/, wording s/destinatary/recipient/
  aic7xxx: Spelling s/termnation/termination/
  arm64: mm: Remove superfluous "the" in comment
  of: Spelling s/anonymouns/anonymous/
  dma: imx-sdma: Spelling s/determnine/determine/
  ath10k: Improve grammar in comments
  ath6kl: Spelling s/determnine/determine/
  of: Improve grammar for of_alias_get_id() documentation
  drm/exynos: Spelling s/contro/control/
  radio-bcm2048.c: fix wrong overflow check
  doc: printk-formats: do not mention casts for u64/s64
  doc: spelling error changes
  ...
2014-06-04 08:50:34 -07:00
Linus Torvalds e5c4ecdc55 USB driver patches for 3.16-rc1
Here is the big USB driver pull request for 3.16-rc1.
 
 Nothing huge here, but lots of little things in the USB core, and in
 lots of drivers.  Hopefully the USB power management will be work better
 now that it has been reworked to do per-port power control dynamically.
 There's also a raft of gadget driver updates and fixes, CONFIG_USB_DEBUG
 is finally gone now that everything has been converted over to the
 dynamic debug inteface, the last hold-out drivers were cleaned up and
 the config option removed.  There were also other minor things all
 through the drivers/usb/ tree, the shortlog shows this pretty well.
 
 All have been in linux-next, including the very last patch, which came
 from linux-next to fix a build issue on some platforms.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlONYEMACgkQMUfUDdst+ynxvgCggMQBhN5icth8Y5hFglNNaISN
 c4AAoMHR2kb62U1plylLbPnboQTjfcl0
 =fG6y
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb into next

Pull USB driver updates from Greg KH:
 "Here is the big USB driver pull request for 3.16-rc1.

  Nothing huge here, but lots of little things in the USB core, and in
  lots of drivers.  Hopefully the USB power management will be work
  better now that it has been reworked to do per-port power control
  dynamically.  There's also a raft of gadget driver updates and fixes,
  CONFIG_USB_DEBUG is finally gone now that everything has been
  converted over to the dynamic debug inteface, the last hold-out
  drivers were cleaned up and the config option removed.  There were
  also other minor things all through the drivers/usb/ tree, the
  shortlog shows this pretty well.

  All have been in linux-next, including the very last patch, which came
  from linux-next to fix a build issue on some platforms"

* tag 'usb-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (314 commits)
  usb: hub_handle_remote_wakeup() only exists for CONFIG_PM=y
  USB: orinoco_usb: remove CONFIG_USB_DEBUG support
  USB: media: lirc: igorplugusb: remove CONFIG_USB_DEBUG support
  USB: media: streamzap: remove CONFIG_USB_DEBUG
  USB: media: redrat3: remove CONFIG_USB_DEBUG usage
  USB: media: redrat3: remove unneeded tracing macro
  usb: qcserial: add additional Sierra Wireless QMI devices
  usb: host: max3421-hcd: Use module_spi_driver
  usb: host: max3421-hcd: Allow platform-data to specify Vbus polarity
  usb: host: max3421-hcd: fix "spi_rd8" uses dynamic stack allocation warning
  usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue()
  usb: qcserial: add Netgear AirCard 341U
  Documentation: dt-bindings: update xhci-platform DT binding for R-Car H2 and M2
  usb: host: xhci-plat: add xhci_plat_start()
  usb: host: max3421-hcd: Fix potential NULL urb dereference
  Revert "usb: gadget: net2280: Add support for PLX USB338X"
  USB: usbip: remove CONFIG_USB_DEBUG reference
  USB: remove CONFIG_USB_DEBUG from defconfig files
  usb: resume child device when port is powered on
  usb: hub_handle_remote_wakeup() depends on CONFIG_PM_RUNTIME=y
  ...
2014-06-03 09:11:20 -07:00
Greg Kroah-Hartman cf24df6061 USB: media: lirc: igorplugusb: remove CONFIG_USB_DEBUG support
The config option is gone, so port the driver over to using the dynamic
debug infrastructure instead, like all other USB drivers.

Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Cc: Matina Maria Trompouki <mtrompou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29 11:22:47 -07:00
Paul Bolle 3746cfb684 staging: lirc: remove checks for CONFIG_LIRC_SERIAL_NSLU2
When support for homebrew serial port receivers was added in v2.6.36 its
code contained checks for CONFIG_LIRC_SERIAL_NSLU2. The related Kconfig
symbol didn't exist then. It still doesn't exist now. Remove these checks.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 20:19:26 -07:00
Paul Bolle 31789538e3 staging: go7007: remove reference to CONFIG_KMOD
The Kconfig symbol KMOD was removed in v2.6.29. Remove CONFIG_KMOD from
this list of options too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-05-27 00:42:51 +02:00
Peter Senna Tschudin 444f8bda81 [media] USB: as102_usb_drv.c: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
- return ret;
+ return C;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 17:39:19 -03:00
Tuomas Tynkkynen 465b8229ac [media] staging: lirc: Fix sparse warnings
Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 16:02:03 -03:00
Laurent Pinchart 0eda185c6c [media] media: staging: davinci: vpfe: Switch to pad-level DV operations
The video-level enum_dv_timings and dv_timings_cap operations are
deprecated in favor of the pad-level versions. All subdev drivers
implement the pad-level versions, switch to them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 12:43:10 -03:00
Ismael Luceno 523d63eb67 [media] solo6x10: Kconfig: Add supported card list to the SOLO6X10 knob
Explicitly list the cards supported by and tested with this driver.

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 12:33:30 -03:00
Ismael Luceno 3a4d339fe8 [media] solo6x10: Reduce OSD writes to the minimum necessary
Instead of unconditionally writing SOLO_EOSD_EXT_SIZE() bytes to the OSD
area (which is 64 or 128 kB depending on the PCI board) we only
write the actual amount of data needed which is 16 * OSD_TEXT_MAX (= 16 * 44).

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 12:33:07 -03:00
Laurent Pinchart fbac1400bd [media] omap3isp: Move to videobuf2
Replace the custom buffers queue implementation with a videobuf2 queue.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-25 11:38:53 -03:00
Laurent Pinchart 8774bed9ce [media] v4l: subdev: Move [gs]_std operation to video ops
The g_std and s_std operations are video-related, move them to the video
ops where they belong.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-24 17:11:26 -03:00
Dan Carpenter 5b340ea0ca [media] Staging: dt3155v4l: set error code on failure
We should be returning -ENOMEM here instead of success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 19:48:28 -03:00
Vitaly Osipov 6ee51a27b2 [media] staging: media: omap24xx: use pr_info() instead of KERN_INFO
tcm825x.c:

changed printk to pr_info

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:54:53 -03:00
Vitaly Osipov e6659ee6e9 [media] staging: media: omap24xx: fix up checkpatch error message
tcm825x.c:

fixing ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:54:27 -03:00
Pali Rohár 5d60122b7e [media] radio-bcm2048: fix wrong overflow check
This patch fixes an off by one check in bcm2048_set_region().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:17:21 -03:00
Jinqiang Zeng cd6ff5c2df [media] fix the code style errors in sn9c102
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:16:03 -03:00
Laurent Pinchart fa7014f569 [media] omap4iss: Relax usleep ranges
Allow the system to merge CPU wakeups by specifying different minimum
and maximum usleep values.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:03:18 -03:00
Laurent Pinchart 05b1b986b5 [media] omap4iss: Use a common macro for all sleep-based poll loops
Instead of implementing usleep_range-based poll loops manually (and
slightly differently), create a generic iss_poll_wait_timeout() macro
and use it through the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:02:57 -03:00
Laurent Pinchart 47a963f102 [media] omap4iss: Add missing white space
The error was reported by checkpatch.pl. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:01:05 -03:00
Laurent Pinchart d14cb130f3 [media] omap4iss: Don't check for DEBUG when printing IRQ debugging messages
Now that the VIDEO_OMAP4_DEBUG Kconfig option has been removed in favour
of dynamic printk, the DEBUG macro isn't defined anymore. Don't check
for it to guard IRQ debugging messages compilation, as they're already
guarded by the ISS_ISR_DEBUG macro.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 12:00:45 -03:00
Paul Bolle 2e509dddc4 [media] omap4iss: Remove VIDEO_OMAP4_DEBUG Kconfig option
The option was supposed to control the definition of the DEBUG macro in
the Makefile but has been left unused by mistake. Given that debugging
should be enabled using dynamic printk, remote the Kconfig option.

[Reworked the commit message]

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-05-23 11:52:08 -03:00
Tuomas Tynkkynen 12a7208386 staging: lirc: Fix sparse warnings
Fix sparse warnings by adding __user and __iomem annotations where
necessary and removing certain unnecessary casts. While at it,
also use u32 in place of __u32.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 21:39:28 +09:00
Pali Rohár 43322faf5f radio-bcm2048.c: fix wrong overflow check
This patch fixes an off by one check in bcm2048_set_region().

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-05-05 15:34:08 +02:00
Hans Verkuil e37559b22c [media] vb2: stop_streaming should return void
The vb2 core ignores any return code from the stop_streaming op.
And there really isn't anything it can do anyway in case of an error.
So change the return type to void and update any drivers that implement it.

The int return gave drivers the idea that this operation could actually
fail, but that's really not the case.

The pwc amd sdr-msi3101 drivers both had this construction:

        if (mutex_lock_interruptible(&s->v4l2_lock))
                return -ERESTARTSYS;

This has been updated to just call mutex_lock(). The stop_streaming op
expects this to really stop streaming and I very much doubt this will
work reliably if stop_streaming just returns without really stopping the
DMA.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-23 10:12:51 -03:00
Lad, Prabhakar 8f7402a304 [media] staging: media: davinci: vpfe: release buffers in case start_streaming call back fails
this patch releases the buffer by calling vb2_buffer_done(),
with state marked as VB2_BUF_STATE_QUEUED if start_streaming()
call back fails.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:26:47 -03:00
Lad, Prabhakar 933fd6e57d [media] staging: media: davinci: vpfe: use v4l2_fh for priority handling
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:26:03 -03:00
Mike Sampson 07002c05c3 [media] sn9c102_hv7131r: fix style warnings flagged by checkpatch.pl
Signed-off-by: Mike Sampson <mike@sambodata.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:25:27 -03:00
ileana@telecom-paristech.fr 576f7d3487 [media] staging: omap24xx: fix coding style
Fix missing parentheses in macros
Errors found by checkpatch.pl

Signed-off-by: Ioana Ileana <ileana@enst.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:21:19 -03:00
Jean Delvare 877ed14306 [media] Prefer gspca_sonixb over sn9c102 for all devices
The sn9c102 driver is deprecated. It was moved to staging in
anticipation of its removal in a future kernel version. However, USB
devices 0C45:6024 and 0C45:6025 are still handled by sn9c102 when
both sn9c102 and gspca_sonixb are enabled.

We must migrate all the users of these devices to the gspca_sonixb
driver now, so that it gets sufficient testing before the sn9c102
driver is finally phased out.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-15 09:59:31 -03:00
Lad, Prabhakar d891ae5ef1 [media] staging: media: davinci: vpfe: make sure all the buffers are released
from commit-id: b3379c6201
"vb2: only call start_streaming if sufficient buffers are queued"
the vb2 framework warns on (WARN_ON()) if all the active buffers
are not released when streaming is stopped, initially the vb2 silently
released the buffer internally if the buffer was not released by
the driver.

This patch fixes following issue:

WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpfe_video Tainted: G        W    3.14.0-rc5-00414-ged97a6f #89
[<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
[<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
[<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
[<c001adec>] (warn_slowpath_null) from [<c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
[<c0252e0c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
[<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpfe_release+0x60/0x230)
[<c025a65c>] (vpfe_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
[<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
[<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
[<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
[<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
[<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
[<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
[<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
---[ end trace 5faa75e8c2f8a6a1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpfe_video Tainted: G        W    3.14.0-rc5-00414-ged97a6f #89
[<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
[<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
[<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
[<c001adec>] (warn_slowpath_null) from [<c0252c28>] (vb2_buffer_done+0x1e0/0x224)
[<c0252c28>] (vb2_buffer_done) from [<c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
[<c0252e3c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
[<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpfe_release+0x60/0x230)
[<c025a65c>] (vpfe_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
[<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
[<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
[<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
[<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
[<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
[<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
[<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
---[ end trace 5faa75e8c2f8a6a2 ]---

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-15 09:54:28 -03:00
Antti Palosaari cf2a320e1f [media] msi3101: check I/O return values on stop streaming
Coverity CID 1196496: Unchecked return value (CHECKED_RETURN)

Calling "msi3101_ctrl_msg" without checking return value (as is done
elsewhere 8 out of 10 times).

Reported-by: <scan-admin@coverity.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06 11:08:19 -03:00
Antti Palosaari 11da6ed691 [media] msi3101: remove unused variable assignment
Coverity CID 1196508: Unused pointer value (UNUSED_VALUE)
Pointer "bandwidth" returned by "v4l2_ctrl_find(&s->hdl, 10619148U)"
is overwritten.

Reported-by: <scan-admin@coverity.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06 11:07:59 -03:00
Antti Palosaari 82932d4cff [media] msi001: fix possible integer overflow
Coverity CID 1196502: Unintentional integer overflow
(OVERFLOW_BEFORE_WIDEN)

Potentially overflowing expression "(f_rf + f_if + f_if1) * lo_div"
with type "unsigned int" (32 bits, unsigned) is evaluated using 32-bit
arithmetic before being used in a context which expects an expression
of type "u64" (64 bits, unsigned). To avoid overflow, cast either
operand to "u64" before performing the multiplication.

Reported-by: <scan-admin@coverity.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06 11:07:45 -03:00
Linus Torvalds 3c83e61e67 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 "The main set of series of patches for media subsystem, including:
   - document RC sysfs class
   - added an API to setup scancode to allow waking up systems using the
     Remote Controller
   - add API for SDR devices.  Drivers are still on staging
   - some API improvements for getting EDID data from media
     inputs/outputs
   - new DVB frontend driver for drx-j (ATSC)
   - one driver (it913x/it9137) got removed, in favor of an improvement
     on another driver (af9035)
   - added a skeleton V4L2 PCI driver at documentation
   - added a dual flash driver (lm3646)
   - added a new IR driver (img-ir)
   - added an IR scancode decoder for the Sharp protocol
   - some improvements at the usbtv driver, to allow its core to be
     reused.
   - added a new SDR driver (rtl2832u_sdr)
   - added a new tuner driver (msi001)
   - several improvements at em28xx driver to fix PM support, device
     removal and to split the V4L2 specific bits into a separate
     sub-driver
   - one driver got converted to videobuf2 (s2255drv)
   - the e4000 tuner driver now follows an improved binding model
   - some fixes at V4L2 compat32 code
   - several fixes and enhancements at videobuf2 code
   - some cleanups at V4L2 API documentation
   - usual driver enhancements, new board additions and misc fixups"

[ NOTE! This merge effective drops commit 4329b93b28 ("of: Reduce
  indentation in of_graph_get_next_endpoint").

  The of_graph_get_next_endpoint() function was moved and renamed by
  commit fd9fdb78a9 ("[media] of: move graph helpers from
  drivers/media/v4l2-core to drivers/of").  It was originally called
  v4l2_of_get_next_endpoint() and lived in the file
  drivers/media/v4l2-core/v4l2-of.c.

  In that original location, it was then fixed to support empty port
  nodes by commit b9db140c1e ("[media] v4l: of: Support empty port
  nodes"), and that commit clashes badly with the dropped "Reduce
  intendation" commit.  I had to choose one or the other, and decided
  that the "Support empty port nodes" commit was more important ]

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (426 commits)
  [media] em28xx-dvb: fix PCTV 461e tuner I2C binding
  Revert "[media] em28xx-dvb: fix PCTV 461e tuner I2C binding"
  [media] em28xx: fix PCTV 290e LNA oops
  [media] em28xx-dvb: fix PCTV 461e tuner I2C binding
  [media] m88ds3103: fix bug on .set_tone()
  [media] saa7134: fix WARN_ON during resume
  [media] v4l2-dv-timings: add module name, description, license
  [media] videodev2.h: add parenthesis around macro arguments
  [media] saa6752hs: depends on CRC32
  [media] si4713: fix Kconfig dependencies
  [media] Sensoray 2255 uses videobuf2
  [media] adv7180: free an interrupt on failure paths in init_device()
  [media] e4000: make VIDEO_V4L2 dependency optional
  [media] af9033: Don't export functions for the hardware filter
  [media] af9035: use af9033 PID filters
  [media] af9033: implement PID filter
  [media] rtl2832_sdr: do not use dynamic stack allocation
  [media] e4000: fix 32-bit build error
  [media] em28xx-audio: make sure audio is unmuted on open()
  [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format
  ...
2014-04-04 09:50:07 -07:00
Linus Torvalds 159d8133d0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree updates from Jiri Kosina:
 "Usual rocket science -- mostly documentation and comment updates"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
  sparse: fix comment
  doc: fix double words
  isdn: capi: fix "CAPI_VERSION" comment
  doc: DocBook: Fix typos in xml and template file
  Bluetooth: add module name for btwilink
  driver core: unexport static function create_syslog_header
  mmc: core: typo fix in printk specifier
  ARM: spear: clean up editing mistake
  net-sysfs: fix comment typo 'CONFIG_SYFS'
  doc: Insert MODULE_ in module-signing macros
  Documentation: update URL to hfsplus Technote 1150
  gpio: update path to documentation
  ixgbe: Fix format string in ixgbe_fcoe.
  Kconfig: Remove useless "default N" lines
  user_namespace.c: Remove duplicated word in comment
  CREDITS: fix formatting
  treewide: Fix typo in Documentation/DocBook
  mm: Fix warning on make htmldocs caused by slab.c
  ata: ata-samsung_cf: cleanup in header file
  idr: remove unused prototype of idr_free()
2014-04-02 16:23:38 -07:00
Linus Torvalds c12e69c6aa Staging driver pull request for 3.15-rc1
Here's the huge drivers/staging/ update for 3.15-rc1.
 
 Loads of cleanup fixes, a few drivers removed, and some new ones added.
 
 All have been in linux-next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlM7BqAACgkQMUfUDdst+ykHUwCguJDlvM7/FGb3QQslAuKN5Np4
 n2YAoJ3C355mo8Wxr/bJah3Jms4f+a7Q
 =4XGY
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the huge drivers/staging/ update for 3.15-rc1.

  Loads of cleanup fixes, a few drivers removed, and some new ones
  added.

  All have been in linux-next for a while"

* tag 'staging-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1375 commits)
  staging: xillybus: XILLYBUS_PCIE depends on PCI_MSI
  staging: xillybus: Added "select CRC32" for XILLYBUS in Kconfig
  staging: comedi: poc: remove obsolete driver
  staging: unisys: replace kzalloc/kfree with UISMALLOC/UISFREE
  staging: octeon-usb: prevent memory corruption
  staging: usbip: fix line over 80 characters
  staging: usbip: fix quoted string split across lines
  Staging: unisys: Remove RETINT macro
  Staging: unisys: Remove FAIL macro
  Staging: unisys: Remove RETVOID macro
  Staging: unisys: Remove RETPTR macro
  Staging: unisys: Remove RETBOOL macro
  Staging: unisys: Remove FAIL_WPOSTCODE_1 macro
  Staging: unisys: Cleanup macros to get rid of goto statements
  Staging: unisys: include: Remove unused macros from timskmod.h
  staging: dgap: fix the rest of the checkpatch warnings in dgap.c
  Staging: bcm: Remove unnecessary parentheses
  staging: wlags49_h2: Delete unnecessary braces
  staging: wlags49_h2: Do not use assignment in if condition
  staging: wlags49_h2: Enclose macro in a do-while loop
  ...
2014-04-01 16:45:00 -07:00
Aybuke Ozdemir a0ecdf0695 staging/media/davinci_vpfe/vpfe_video.h Unnecessary space after function pointer name
Fix checkpatch.pl issues with Unnecessary space after function pointer
name in vpfe_video.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:50:24 -07:00
Aybuke Ozdemir 76924d0699 staging/media/davinci_vpfe/vpfe_video.h Fix missing space after return type
Fix checkpatch.pl issues with
missing space after return type in /vpfe_video.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:50:24 -07:00
Aybuke Ozdemir 8e3a3ce66e staging: as102: as10x_handle.h .Fix Unnecessary space after function pointer name
This patch removes the following checkpatch.pl warning in as10x_handle.h
Warning : Unnecessary space after function pointer name

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 13:41:27 -07:00
Andreea-Cristina Bernat 4f4c965212 Staging: lirc: Fix warning: assignment of bool to 0/1
This patch solves the warning "Assignment of bool to 0/1"

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 12:19:32 -07:00
Aybuke Ozdemir da54e4a520 staging: media: omap24xx: tcm825x.c Fix that open brace { should be on the previous line
The patch fixes the following checkpatch.pl errors:
ERROR: that open brace { should be on the previous line.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:04:45 -07:00
Chi Pham 86a7dacc8f staging:media: Removed assignments from if statements.
The following coccinelle script found the match:

@simple@
expression E1, E2;
statement S1, S2;
@@

+ E1 = E2;
if (
- (E1 = E2)
+ E1
 )
S1 else S2

@left@
expression E0, E1, E2;
statement S0, S1;
@@
- if ((E1 = E2) < E0)
+ E1 = E2;
+ if (E1 < E0)
S1

Signed-off-by: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:03:50 -07:00
Uma Sharma 3e1e788341 staging: media/omap24xx/tcm825x.h removed warning
This patch removes the following checkpatch.pl warning in tcm825x.h
Warning : missing space after return type

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:32:58 -07:00
Uma Sharma 6e878c0299 staging: media/msi3101/sdr-msi3101.c removed warning
This patch removes the following checkpatch.pl warning in sdr-msi3101.c
Warning : Unnecessary space after function pointer name

Signed-off-by: Uma Sharma <uma.sharma523@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:32:51 -07:00
Aybuke Ozdemir 5935caec8c staging: go7007: go7007-v4l2.c Fix line over 80 characters.
Fix checkpatch.pl issues with line over
80 characters in go7007-v4l2.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 21:19:14 -07:00
Kristina Martšenko 5ae7437ead staging: dt3155v4l: make q_ops static
Since q_ops is only referenced in dt3155v4l.c, mark it as static.

This removes the following sparse warning:
drivers/staging/media/dt3155v4l//dt3155v4l.c:302:22: warning: symbol 'q_ops' was not declared. Should it be static?

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:27:48 -07:00
Andreea-Cristina Bernat 0cb6dfd710 Staging: solo6x10: Replace expressions that don't use ALIGN macro
There are some expressions that compute the roundup of a number, but don't use
the existing macro defined in /include/kernel.h. This patch uses the following
Coccinelle semantic patch:
@ haskernel @
@@

@ depends on haskernel @
expression E1, E2;
@@

- (E1 + (E2 - 1)) & ~(E2 - 1)
+ ALIGN(E1, E2)

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 18:00:56 -07:00
Aybuke Ozdemir fa91783ec0 staging: solo6x10: solo6x10-v4l2-enc.c: Fix line over 80 characters.
Fix checkpatch.pl issues with line over 80 characters in solo6x10-v4l2-enc.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-16 17:07:06 -07:00
Antti Palosaari 02b7220017 [media] rtl2832_sdr: do not use dynamic stack allocation
Do not use dynamic stack allocation.

>> drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c:181:1:
warning: 'rtl2832_sdr_wr' uses dynamic stack allocation [enabled by default]

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 20:23:23 -03:00
Antti Palosaari ea4d04f92c [media] rtl2832_sdr: clamp bandwidth to nearest legal value in automode
Clamp bandwidth to nearest legal value in automode in order to pass
v4l2-compliance test.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:39:58 -03:00
Hans Verkuil bc9087549e [media] rtl2832_sdr: fixing v4l2-compliance issues
Fix rtl2832_sdr driver v4l2-compliance issues.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:39:23 -03:00
Antti Palosaari 09143009d4 [media] rtl2832_sdr: expose e4000 controls to user
E4000 tuner driver provides now some controls. Expose those to
userland.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:32:18 -03:00
Antti Palosaari 771138920e [media] rtl2832_sdr: Realtek RTL2832 SDR driver module
Implement SDR driver for Realtek RTL2832U chip as a DVB extension
module. SDR module is attached by DVB USB RTL28XXU driver as a DVB
SEC (satellite equipment controller) module. Abusing unused SEC here
has no harm as that is DVB-T only frontend.

SDR functionality is provided by RTL2832 DVB-T demodulator. I suspect
it is originally planned for DAB and FM, but it could be abused general
SDR, due to modern silicon tuners that has wide frequency range and a
lot of configurable parameters (filters, gains, ...).

http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/44461

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:32:05 -03:00
Andreea-Cristina Bernat 5a9e30eec8 staging: lirc: Add fallthrough comment
This patch adds fallthrough comments for the cases not preceded by
break or fallthrough comment

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 17:37:23 -07:00
Andreea-Cristina Bernat 17e65fbbe2 staging/media/solo6x10: Fix coding-style error
This patch fixes the error "space required after that ';'" for
the file /drivers/staging/media/solo6x10/solo6x10-tx28.c

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
2014-03-13 16:21:12 -07:00
Antti Palosaari c350912c8b [media] msi3101: fix v4l2-compliance issues
Fix msi3101 driver v4l2-compliance issues.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:59:15 -03:00
Antti Palosaari 952a70aa68 [media] msi001: fix v4l2-compliance issues
Fix msi001 driver v4l2-compliance issues.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:58:54 -03:00
Antti Palosaari d287e4e31e [media] msi3101: clamp mmap buffers to reasonable level
That value is coming from the user and we need only ensure it is
reasonable. That was pointed by Hans when reviewing rtl2832_sdr driver.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:53 -03:00
Antti Palosaari 2e68f841a5 [media] msi3101: use msi001 tuner driver
Remove MSi001 RF tuner related code as MSi001 functionality is moved
to own driver.

Implement SPI master adapter.

Attach MSi001 driver via SPI / V4L subdev framework.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:51 -03:00
Antti Palosaari 93203dd6c7 [media] msi001: Mirics MSi001 silicon tuner driver
That RF tuner driver is bound via SPI bus model and it implements V4L
subdev API. I split it out from MSi3101 SDR driver.
MSi3101 = MSi2500 + MSi001.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:50 -03:00
Antti Palosaari 3d0c8fa3c5 [media] msi3101: convert to SDR API
Massive rewrite. Use SDR API. Fix bugs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13 10:26:49 -03:00
Jon Mason 6fb0e403e4 [media] staging/dt3155v4l: use PCI_VENDOR_ID_INTEL
Use PCI_VENDOR_ID_INTEL instead of creating its own vendor ID #define.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11 09:26:53 -03:00
Hans Verkuil b3379c6201 [media] vb2: only call start_streaming if sufficient buffers are queued
In commit 02f142ecd2 support was added to
start_streaming to return -ENOBUFS if insufficient buffers were queued
for the DMA engine to start. The vb2 core would attempt calling
start_streaming again if another buffer would be queued up.

Later analysis uncovered problems with the queue management if start_streaming
would return an error: the buffers are enqueued to the driver before the
start_streaming op is called, so after an error they are never returned to
the vb2 core. The solution for this is to let the driver return them to
the vb2 core in case of an error while starting the DMA engine. However,
in the case of -ENOBUFS that would be weird: it is not a real error, it
just says that more buffers are needed. Requiring start_streaming to give
them back only to have them requeued again the next time the application
calls QBUF is inefficient.

This patch changes this mechanism: it adds a 'min_buffers_needed' field
to vb2_queue that drivers can set with the minimum number of buffers
required to start the DMA engine. The start_streaming op is only called
if enough buffers are queued. The -ENOBUFS handling has been dropped in
favor of this new method.

Drivers are expected to return buffers back to vb2 core with state QUEUED
if start_streaming would return an error. The vb2 core checks for this
and produces a warning if that didn't happen and it will forcefully
reclaim such buffers to ensure that the internal vb2 core state remains
consistent and all buffer-related resources have been correctly freed
and all op calls have been balanced.

__reqbufs() has been updated to check that at least min_buffers_needed
buffers could be allocated. If fewer buffers were allocated then __reqbufs
will free what was allocated and return -ENOMEM. Based on a suggestion from
Pawel Osciak.

__create_bufs() doesn't do that check, since the use of __create_bufs
assumes some advance scenario where the user might want more control.
Instead streamon will check if enough buffers were allocated to prevent
streaming with fewer than the minimum required number of buffers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11 06:56:41 -03:00
Hans Verkuil 0647064293 [media] vb2: change result code of buf_finish to void
The buf_finish op should always work, so change the return type to void.
Update the few drivers that use it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Reviewed-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11 06:56:38 -03:00
Mauro Carvalho Chehab c897df0e2d Linux 3.14-rc5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTE+9XAAoJEHm+PkMAQRiGrMQIAKI2V49Kj8WlnwGchFvsbGJB
 SLALwNi33T/IBKdZRhrfryBu02Zj7eVvZ2ML35dJEnmF88O+dJBDMTkKV1xalrip
 mtkBrjUnfAI04fq/daLQ1TsAy4qqlra5tSTuDCw8ILOnGPwT0VydIEHNdtmoUIfw
 xlZLxHzny1MslZ78d7uR/cUnV9ylKRRajWzfw1HT8hL51fCt8nRWY0sCvwvl+kMJ
 LsK+6I7mHDUuzA7QBmBI+dhzQgos5+JkkrnpmqHAqwmIh+AI3ksmjUCQ4dM7owrO
 IvEx+ZNDqxAdLcm1WAxATNfxddFXHc62JTvKuuKqTVWuaxVfK1Aqt8MjDMIPeAQ=
 =yV5u
 -----END PGP SIGNATURE-----

Merge tag 'v3.14-rc5' into patchwork

Linux 3.14-rc5

* tag 'v3.14-rc5': (1117 commits)
  Linux 3.14-rc5
  drm/vmwgfx: avoid null pointer dereference at failure paths
  drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date.
  drm/vmwgfx: Remove some unused surface formats
  MAINTAINERS: add maintainer entry for Armada DRM driver
  arm64: Fix !CONFIG_SMP kernel build
  arm64: mm: Add double logical invert to pte accessors
  dm cache: fix truncation bug when mapping I/O to >2TB fast device
  perf tools: Fix strict alias issue for find_first_bit
  powerpc/powernv: Fix indirect XSCOM unmangling
  powerpc/powernv: Fix opal_xscom_{read,write} prototype
  powerpc/powernv: Refactor PHB diag-data dump
  powerpc/powernv: Dump PHB diag-data immediately
  powerpc: Increase stack redzone for 64-bit userspace to 512 bytes
  powerpc/ftrace: bugfix for test_24bit_addr
  powerpc/crashdump : Fix page frame number check in copy_oldmem_page
  powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
  kvm, vmx: Really fix lazy FPU on nested guest
  perf tools: fix BFD detection on opensuse
  drm/radeon: enable speaker allocation setup on dce3.2
  ...
2014-03-11 06:55:49 -03:00
Ebru Akagunduz ee3a636674 Staging:media: Fix Sparse warnings incorrect type in lirc_sasem.c
This patch fixes following sparse warning in dgap.c
drivers/staging/media/lirc/lirc_sasem.c:392:32: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/media/lirc/lirc_sasem.c:392:32:    expected void const [noderef] <asn:1>*<noident>
drivers/staging/media/lirc/lirc_sasem.c:392:32:    got char const *buf
drivers/staging/media/lirc/lirc_sasem.c:123:28: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/staging/media/lirc/lirc_sasem.c:123:28:    expected int ( *write )( ... )
drivers/staging/media/lirc/lirc_sasem.c:123:28:    got int ( static [toplevel] *<noident> )( ... )

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:20:48 -08:00
Ebru Akagunduz 04ad3a644e Staging:media: Fix Sparse Warnings "symbol was not declared. Should it be static?"
This patch fixes the Sparse Warnings "symbol was
not declared. Should it be static?"

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:14:15 -08:00
Monam Agarwal 4fe130f2a4 Staging: media/cxd2099: Fix line length over 80 characters
This patch fixes the following checkpatch.pl issues in cxd2099.c
WARNING: line length over 80 characters

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:14:14 -08:00
Himangi Saraogi 41df49e0ca staging:media: remove assignment in if condition
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-07 13:14:14 -08:00
Sakari Ailus ade48681f1 [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags
The timestamp_type field used to contain only the timestamp type. Soon it
will be used for timestamp source flags as well. Rename the field
accordingly.

[m.chehab@samsung.com: do the change also to drivers/staging/media and at s2255]
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-05 16:34:14 -03:00
Michael Opdenacker 381d0a40a4 [media] davinci: vpfe: remove deprecated IRQF_DISABLED
This patch proposes to remove the use of the IRQF_DISABLED flag

It's a NOOP since 2.6.35 and it will be removed one day.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-28 13:36:56 -03:00
Levente Kurusa 57802c5261 [media] staging: davinci_vpfe: fix error check
The check would check the pointer, which is never less than 0.
According to the error message, the correct check would be
to check the return value of ipipe_mode. Check that instead.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Levente Kurusa <levex@linux.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-28 13:36:28 -03:00
Takashi Iwai d01a838c86 Merge branch 'for-linus' into HEAD 2014-02-25 12:12:17 +01:00
Jiri Kosina d4263348f7 Merge branch 'master' into for-next 2014-02-20 14:54:28 +01:00
Paul Bolle c7dcec7dd4 Kconfig: Remove useless "default N" lines
A number of Kconfig entries default to (uppercase) "N". It was clearly
intended to use "default n". But since (lowercase) "n" is the default
anyway, these lines might as well be removed.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-02-20 14:38:06 +01:00
Takashi Iwai 3a3d2afd08 staging/media: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-14 08:14:11 +01:00
Alexey Khoroshilov 50c88544d2 [media] go7007-loader: fix usb_dev leak
There is usb_get_dev() in go7007_loader_probe(),
but there is no usb_put_dev() anywhere.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-04 06:28:00 -02:00
Linus Torvalds b399c46ea0 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 - a new jpeg codec driver for Samsung Exynos (jpeg-hw-exynos4)
 - a new dvb frontend for ds2103 chipset (m88ds2103)
 - a new sensor driver for Samsung S5K5BAF UXGA (s5k5baf)
 - new drivers for R-Car VSP1
 - a new radio driver: radio-raremono
 - a new tuner driver for ts2022 chipset (m88ts2022)
 - the analog part of em28xx is now a separate module that only
   load/runs if the device is not a pure digital TV device
 - added a staging driver for bcm2048 radio devices
 - the omap 2 video driver (omap24xx) was moved to staging.  This driver
   is for an old hardware and uses a deprecated Kernel internal API.  If
   nobody cares enough to fix it, it would be removed on a couple Kernel
   releases
 - the sn9c102 driver was moved to staging.  This driver was replaced by
   gspca, and disabled on some distros, as almost all devices are known
   to work properly with gspca.  It should be removed from kernel on a
   couple Kernel releases
 - lots of driver fixes, improvements and cleanups

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (421 commits)
  [media] media: v4l2-dev: fix video device index assignment
  [media] rc-core: reuse device numbers
  [media] em28xx-cards: properly initialize the device bitmap
  [media] Staging: media: Fix line length exceeding 80 characters in as102_drv.c
  [media] Staging: media: Fix line length exceeding 80 characters in as102_fe.c
  [media] Staging: media: Fix quoted string split across line in as102_fe.c
  [media] media: st-rc: Add reset support
  [media] m2m-deinterlace: fix allocated struct type
  [media] radio-usb-si4713: fix sparse non static symbol warnings
  [media] em28xx-audio: remove needless check before usb_free_coherent()
  [media] au0828: Fix sparse non static symbol warning
  Revert "[media] go7007-usb: only use go->dev after allocated"
  [media] em28xx-audio: provide an error code when URB submit fails
  [media] em28xx: fix check for audio only usb interfaces when changing the usb alternate setting
  [media] em28xx: fix usb alternate setting for analog and digital video endpoints > 0
  [media] em28xx: make 'em28xx_ctrl_ops' static
  em28xx-alsa: Fix error patch for init/fini
  [media] em28xx-audio: flush work at .fini
  [media] drxk: remove the option to load firmware asynchronously
  [media] em28xx: adjust period size at runtime
  ...
2014-01-31 09:31:14 -08:00
Monam Agarwal f52e9828d5 [media] Staging: media: Fix line length exceeding 80 characters in as102_drv.c
This patch fixes the following checkpatch.pl warning in as102/as102_drv.c
WARNING: line over 80 characters in the file

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15 11:45:58 -02:00
Monam Agarwal 15ddb513f2 [media] Staging: media: Fix line length exceeding 80 characters in as102_fe.c
This patch fixes the following checkpatch.pl issues in
as102/as102_fe.c
WARNING: line over 80 characters

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15 11:45:49 -02:00
Monam Agarwal caabb84066 [media] Staging: media: Fix quoted string split across line in as102_fe.c
This patch fixes the following checkpatch.pl issues in
as102/as102_fe.c
WARNING: quoted string split across lines

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-15 11:45:38 -02:00
Mauro Carvalho Chehab b464f6b68e Revert "[media] go7007-usb: only use go->dev after allocated"
This patch conflicts with commits 66a528c1c3, with also fixes the
bug and got merged on v3.13-rc2.

This reverts commit c61c3094a6.
2014-01-15 07:30:41 -02:00
Mauro Carvalho Chehab 986058e1ef [media] lirc_parallel: avoid name conflict on mn10300 arch
The "irq_handler" name is already defined there on a header
file:

/devel/v4l/temp/drivers/staging/media/lirc/lirc_parallel.c:223:13: error: conflicting types for ‘irq_handler’
 static void irq_handler(void *blah)
             ^
In file included from /devel/v4l/temp/arch/mn10300/include/asm/reset-regs.h:16:0,
                 from /devel/v4l/temp/arch/mn10300/include/asm/irq.h:18,
                 from /devel/v4l/temp/include/linux/irq.h:24,
                 from /devel/v4l/temp/arch/mn10300/include/asm/hardirq.h:16,
                 from /devel/v4l/temp/include/linux/preempt_mask.h:5,
                 from /devel/v4l/temp/include/linux/sched.h:25,
                 from /devel/v4l/temp/include/linux/utsname.h:5,
                 from /devel/v4l/temp/arch/mn10300/include/asm/elf.h:15,
                 from /devel/v4l/temp/include/linux/elf.h:4,
                 from /devel/v4l/temp/include/linux/module.h:14,
                 from /devel/v4l/temp/drivers/staging/media/lirc/lirc_parallel.c:29:
/devel/v4l/temp/arch/mn10300/include/asm/exceptions.h:107:24: note: previous declaration of ‘irq_handler’ was here
 extern asmlinkage void irq_handler(void);

/devel/v4l/patchwork/drivers/staging/media/lirc/lirc_serial.c:653:20: error: conflicting types for ‘irq_handler’
 static irqreturn_t irq_handler(int i, void *blah)
                    ^
In file included from /devel/v4l/patchwork/arch/mn10300/include/asm/reset-regs.h:16:0,
                 from /devel/v4l/patchwork/arch/mn10300/include/asm/irq.h:18,
                 from /devel/v4l/patchwork/include/linux/irq.h:24,
                 from /devel/v4l/patchwork/arch/mn10300/include/asm/hardirq.h:16,
                 from /devel/v4l/patchwork/include/linux/preempt_mask.h:5,
                 from /devel/v4l/patchwork/include/linux/sched.h:25,
                 from /devel/v4l/patchwork/include/linux/utsname.h:5,
                 from /devel/v4l/patchwork/arch/mn10300/include/asm/elf.h:15,
                 from /devel/v4l/patchwork/include/linux/elf.h:4,
                 from /devel/v4l/patchwork/include/linux/module.h:14,
                 from /devel/v4l/patchwork/drivers/staging/media/lirc/lirc_serial.c:53:
/devel/v4l/patchwork/arch/mn10300/include/asm/exceptions.h:107:24: note: previous declaration of ‘irq_handler’ was here
 extern asmlinkage void irq_handler(void);

So, rename it, to avoid namespace conflicts.

This patch fixes building media drivers with allyesconfig/almodconfig on
mn10300 arch.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 16:28:20 -02:00
Mauro Carvalho Chehab c61c3094a6 [media] go7007-usb: only use go->dev after allocated
Fixes those warnings:
	drivers/staging/media/go7007/go7007-usb.c: In function 'go7007_usb_probe':
	drivers/staging/media/go7007/go7007-usb.c:1060: warning: 'go' is used uninitialized in this function

While here, comment a code that will never run.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 16:28:17 -02:00
Hans Verkuil 429df502d4 [media] solo6x10: fix broken PAL support
The video_type was never set correctly for PAL: it's not a bool, instead
it is a register value.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: tomdev@freenet.de
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-13 11:21:56 -02:00
Alexey Khoroshilov cd19f7d3e3 [media] as102: fix leaks at failure paths in as102_usb_probe()
Failure handling is incomplete in as102_usb_probe().
The patch implements proper resource deallocations.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:55:58 -02:00
Hans Verkuil 42f8f39e27 [media] [for,v3.14] sn9c102: fix build dependency
This driver should only build if MEDIA_USB_SUPPORT is set.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Jim Davis <jim.epost@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:49:01 -02:00
Hans Verkuil e0a973423e [media] davinci-vpfe: fix compile error
The include for delay.h was missing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:02:51 -02:00
Fengguang Wu 12d1ee1f2d [media] fix coccinelle warnings
drivers/staging/media/bcm2048/radio-bcm2048.c:2255:3-4: Unneeded semicolon

 Removes unneeded semicolon.

Generated by: coccinelle/misc/semicolon.cocci

CC: Hans Verkuil <hans.verkuil@cisco.com>
CC: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:01:11 -02:00
Fengguang Wu 65eccc7a88 [media] fix coccinelle warnings
drivers/staging/media/bcm2048/radio-bcm2048.c:2632:1-7: Replace memcpy with struct assignment
/c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:744:1-7: Replace memcpy with struct assignment
/c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:2360:3-9: Replace memcpy with struct assignment

Generated by: coccinelle/misc/memcpy-assign.cocci

CC: Hans Verkuil <hans.verkuil@cisco.com>
CC: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 08:01:03 -02:00
Hans Verkuil 79aeb3f308 [media] vb2: return ENOBUFS in start_streaming in case of too few buffers
This works together with the retry_start_streaming mechanism to allow userspace
to start streaming even if not all required buffers have been queued.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 07:13:49 -02:00
Wei Yongjun 66c5e59278 [media] radio-bcm2048: fix missing unlock on error in bcm2048_rds_fifo_receive()
Add the missing unlock before return from function bcm2048_rds_fifo_receive()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-07 06:49:51 -02:00
Dan Carpenter f7d40eea8e [media] v4l: omap4iss: Restore irq flags correctly in omap4iss_video_buffer_next()
The spin_lock_irqsave() macro is not nestable.  The second call will
overwrite the first record of "flags" so the IRQs will not be enabled
correctly at the end of the function.

In the current code, this function is always called from the IRQ handler
so everything works fine and this fix doesn't change anything.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-02 15:53:01 -02:00
Dan Carpenter eaf95eeec4 [media] v4l: omap4iss: use snprintf() to make smatch happy
Smatch complains here because name is a 32 character buffer and we
adding the "OMAP4 ISS " prefix as well for a total of 42 characters.
The sd->name buffer can only hold 32 characters.  I've changed it to use
snprintf() to silence the overflow warning.

Also I have removed the call to strlcpy() which is a no-op.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-02 15:52:35 -02:00
Hans Verkuil a03636cb21 [media] omap24xx/tcm825x: move to staging for future removal
The omap24xx driver and the tcm825x sensor driver are the only two
remaining drivers to still use the old deprecated v4l2-int-device API.

Nobody maintains these drivers anymore. But unfortunately the v4l2-int-device
API is used by out-of-tree drivers (MXC platform). This is a very bad situation
since as long as this deprecated API stays in the kernel there is no reason for
those out-of-tree drivers to convert.

This patch moves v4l2-int-device and the two drivers that depend on it to
staging in preparation for their removal.

If someone would be interested in getting these drivers to work, then start with
this since it's not very far from the state where they used to work:

<URL:http://vihersipuli.retiisi.org.uk/cgi-bin/gitweb.cgi?p=~sailus/linux-omap/.git;a=summary>

The branch is n800-cam. Porting to up-to-date APIs can then be done. David
might have done some work in that area, so check with him first.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: David Cohen <dacohen@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-20 13:45:22 -02:00
Hans Verkuil b8da9d3aaf [media] sn9c102: prepare for removal by moving it to staging
During the last media summit meeting it was decided to move this driver to
staging as the first step to removing it altogether.

Most webcams covered by this driver are now supported by gspca. Nobody has the
hardware to convert the remaining devices to gspca.

This driver needs a major overhaul to have it conform to the latest frameworks
and compliancy tests.

Without hardware, however, this is next to impossible. Given the fact that
this driver seems to be pretty much unused (it has been removed from Fedora
several versions ago and nobody complained about that), we decided to drop
this driver.

This patch moves it to staging. Some time in 2014 we will drop it completely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-20 13:41:36 -02:00
Lisa Nguyen 3e6e3b3d3d [media] staging: media: davinci_vpfe: Rewrite return statement in vpfe_video.c
Rewrite the return statement in vpfe_video.c. This will prevent
the checkpatch.pl script from generating a warning saying
to remove () from this particular return statement.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:28:13 -02:00
Lisa Nguyen c324981d3b [media] staging: media: davinci_vpfe: Remove spaces before semicolons
Remove unnecessary spaces before semicolons to meet kernel
coding style.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18 06:27:59 -02:00
Paul Gortmaker 885a947e5b staging: delete non-required instances of include <linux/init.h>
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>.  Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-17 10:08:14 -08:00
Laurent Pinchart bea7791529 [media] v4l: omap4iss: resizer: Fix comment regarding bypass mode
The comment explaining the usage of the bypass bit is wrong, fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:05:47 -02:00
Laurent Pinchart 112da08512 [media] v4l: omap4iss: Cancel streaming when a fatal error occurs
When a fatal error that prevents any further video streaming occurs in a
pipeline, all queued buffers must be marked as erroneous and new buffers
must be prevented from being queued. Implement this behaviour with a new
omap4iss_pipeline_cancel_stream() function that can be used by
submodules to cancel streaming.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:05:32 -02:00
Laurent Pinchart 216814fb01 [media] v4l: omap4iss: csi2: Replace manual if statement with a subclk field
Instead of manually checking whether the CSI2 module is CSI2a or CSI2b
in order to select the right subclock to enable/disable, add a subclk
field to the iss_csi2 structure, initialize it with the corresponding
subclock value and use it at runtime.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:04:39 -02:00
Laurent Pinchart f3632ba850 [media] v4l: omap4iss: Reset the ISS when the pipeline can't be stopped
When a failure to stop a module in the pipeline is detected, the only
way to recover is to reset the ISS. However, as other users can be using
a different pipeline with other modules, the ISS can't be reset
synchronously with the error detection.
Keep track of modules that have failed to stop, and reset the ISS
accordingly when the last user releases the last reference to the ISS.
Refuse to start streaming on a pipeline that contains a crashed module,
as the hardware wouldn't work anyway.
Modify the omap4iss_pipeline_set_stream() function to record the new ISS
pipeline state only when no error occurs, except when stopping the
pipeline in which case the pipeline is still marked as stopped.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 09:03:51 -02:00
Laurent Pinchart af15d025ec [media] v4l: omap4iss: Enable/disabling the ISP interrupts globally
ISP interrupts are enabled/disabled when starting/stopping the IPIPEIF
or resizer. This doesn't permit using the two modules in separate
pipelines. Fix it by enabling/disabling the ISP interrupts at the same
time as the ISS interrupts, in the ISS device get/put operations.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:03:33 -02:00
Laurent Pinchart 6016498f2b [media] v4l: omap4iss: Propagate stop timeouts from submodules to the driver core
Return an error from the s_stream handlers when stopping the stream
failed instead of just logging the error and ignoring it. While we're
at it, move the logging code from submodules to the driver code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:02:54 -02:00
Laurent Pinchart 0b1d424966 [media] v4l: omap4iss: Add enum_fmt_vid_cap ioctl support
List the pixel formats compatible with the active format currently
configured on the connected pad.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:02:21 -02:00
Laurent Pinchart cc3c2ac291 [media] v4l: omap4iss: Make __iss_video_get_format() return a v4l2_mbus_framefmt
The function will be used by a caller that needs the media bus format
instead of the pixel format currently returned. Move the media bus
format to pixel format conversion to the existing caller.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:02:02 -02:00
Laurent Pinchart a1d4eab06d [media] v4l: omap4iss: Add description field to iss_format_info structure
The field stores the format description in a human-readable form.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:01:13 -02:00
Laurent Pinchart 3c4ee96b5f [media] v4l: omap4iss: Convert hexadecimal constants to lower case
The Linux kernel recommends lower case for hexadecimal constants.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:00:51 -02:00
Laurent Pinchart 82043ff6af [media] v4l: omap4iss: resizer: Stop the whole resizer to avoid FIFO overflows
When stopping the resizer due to a buffer underrun, disabling RZA only
produces input FIFO overflows, most probably when the next frame is
received. Disable the whole resizer to work around the problem.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:00:34 -02:00
Laurent Pinchart 97059524ba [media] v4l: omap4iss: csi: Create and use register access functions
Replace the direct readl/writel calls with helper functions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 07:00:00 -02:00
Laurent Pinchart 11abbfd30f [media] v4l: omap4iss: Create and use register access functions
Replace the direct readl/writel calls with helper functions that take an
ISS pointer and compute the register memory address. Also add bit clear,
set and update helpers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:59:20 -02:00
Laurent Pinchart 1be9ba20e1 [media] v4l: omap4iss: csi2: Enable automatic ULP mode transition
Automatically switch between ULP and ON states based on ULPM signal from
complex I/O.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:58:01 -02:00
Laurent Pinchart 86efc50432 [media] v4l: omap4iss: ipipeif: Shift input data according to the input format
Input samples must be left-aligned on the ISIF 16-bit data bus.
Configure the 16-to-16-bit selector to shift data according to the input
format.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:57:49 -02:00
Laurent Pinchart 74536b2ff0 [media] v4l: omap4iss: isif: Ignore VD0 interrupts when no buffer is available
The ISIF generates VD0 interrupts even when writes are disabled.
Disabling the ISIF when no buffer is available is thus not be enough, we
need to handle the situation explicitly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:57:23 -02:00
Laurent Pinchart cd782f9d6d [media] v4l: omap4iss: Fix operators precedence in ternary operators
The ternary operator ? : has a low precedence. Use parenthesis where
needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:56:44 -02:00
Laurent Pinchart 380df42b57 [media] v4l: omap4iss: Don't make IRQ debugging functions inline
Let the compiler decide.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:56:26 -02:00
Laurent Pinchart 5122f6a26d [media] v4l: omap4iss: Enhance IRQ debugging
Add a pretty print function for ISP IRQs and remove the _INT suffix from
interrupt names to enhance readability.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:56:14 -02:00
Laurent Pinchart 54d0059c7b [media] v4l: omap4iss: isif: Define more VDINT registers
Use a macro to get the VDINT indexed registers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:55:33 -02:00
Laurent Pinchart ade1ec3736 [media] v4l: omap4iss: Define more ISS and ISP IRQ register bits
Add more register definitions at iss_regs.h and improve some register
names.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:53:31 -02:00
Laurent Pinchart 29ee626163 [media] v4l: omap4iss: Remove double semicolon at end of line
Pure CodingStyle fixes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:53:26 -02:00
Laurent Pinchart a0fe029ccc [media] v4l: omap4iss: Restrict line lengths to 80 characters where possible
Pure CodingStyle fixes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:53:14 -02:00
Laurent Pinchart 499226fb19 [media] v4l: omap4iss: Don't split log strings on multiple lines
Non-split strings help grepping for messages.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:50:22 -02:00
Laurent Pinchart 4cd89e91bb [media] v4l: omap4iss: Replace printk by dev_err
dev_err is preferred over printk(KERN_ERR) when a device pointer is
available.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-11 06:49:37 -02:00
Mauro Dreissig cdfe3e352b [media] staging: as102: Remove ENTER/LEAVE debugging macros
Too much noise, also does not cover every possible code paths.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-10 15:59:13 -02:00
Mauro Dreissig f1ff7c49f4 [media] staging: as102: Declare local variables as static
As pointed out by sparse:
drivers/staging/media/as102/as102_fw.c:29:6: warning: symbol 'as102_st_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:30:6: warning: symbol 'as102_st_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:31:6: warning: symbol 'as102_dt_fw1' was not declared. Should it be static?
drivers/staging/media/as102/as102_fw.c:32:6: warning: symbol 'as102_dt_fw2' was not declared. Should it be static?
drivers/staging/media/as102/as102_usb_drv.c:194:25: warning: symbol 'as102_priv_ops' was not declared. Should it be static?
Also use the const qualifier on the firmware name strings.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-10 15:58:17 -02:00
Mauro Carvalho Chehab 356ba0213d [media] radio-bcm2048: fix signal of value
As value can be initialized with a value lower than zero, change it
to int, to avoid those warnings:

drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_rds_pi_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  struct bcm2048_device *bdev = dev_get_drvdata(dev);  \
         ^
drivers/staging/media/bcm2048/radio-bcm2048.c:2070:1: note: in expansion of macro 'property_read'
 property_read(rds_pi, unsigned int, "%x")
 ^
drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_fm_rds_flags_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  struct bcm2048_device *bdev = dev_get_drvdata(dev);  \
         ^
drivers/staging/media/bcm2048/radio-bcm2048.c:2074:1: note: in expansion of macro 'property_read'
 property_read(fm_rds_flags, unsigned int, "%u")
 ^
drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_region_bottom_frequency_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  struct bcm2048_device *bdev = dev_get_drvdata(dev);  \
         ^
drivers/staging/media/bcm2048/radio-bcm2048.c:2077:1: note: in expansion of macro 'property_read'
 property_read(region_bottom_frequency, unsigned int, "%u")
 ^
drivers/staging/media/bcm2048/radio-bcm2048.c: In function 'bcm2048_region_top_frequency_read':
drivers/staging/media/bcm2048/radio-bcm2048.c:1989:9: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  struct bcm2048_device *bdev = dev_get_drvdata(dev);  \
         ^
drivers/staging/media/bcm2048/radio-bcm2048.c:2078:1: note: in expansion of macro 'property_read'
 property_read(region_top_frequency, unsigned int, "%u")

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-09 14:55:48 -02:00
Hans Verkuil d44250fd17 [media] bcm2048: add TODO file for this staging driver
Describe the tasks to be done for this driver to be promoted to a
non-staging one.

[m.chehab@samsung.com: Add a patch description; add a note about the
 CodingStyle issues and make sure that the README lines are not bigger
 than 80 cols.]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-09 10:12:05 -02:00
Hans Verkuil 899127b67d [media] This adds support for the BCM2048 radio module found in Nokia N900
Add suport for Nokia N900 radio. This driver is far from being ready
to be added at the main tree, as it creates its own sysfs interface,
and violates lots of Coding Style rules, doing even evil things like
returning from a function inside a macro.

So, it is being added at staging with the condition that it will be
soon be fixed.

[m.chehab@samsung.com: added a description for the patch]
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Nils Faerber <nils.faerber@kernelconcepts.de>
Signed-off-by: Joni Lapilainen <joni.lapilainen@gmail.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: moved to staging, added slab.h include]

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-09 10:07:38 -02:00
Laurent Pinchart 16422f552d [media] v4l: omap4iss: Implement VIDIOC_S_INPUT
The ioctl is (at least currently) mandatory.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:56:23 -02:00
Laurent Pinchart c3dbc70d82 [media] v4l: omap4iss: Move code out of mutex-protected section
The pad::get_fmt call must be protected by a mutex, but preparing its
arguments doesn't need to be. Move the non-critical code out of the
mutex-protected section.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:55:32 -02:00
Laurent Pinchart 4a62361f82 [media] v4l: omap4iss: Translate -ENOIOCTLCMD to -ENOTTY
Translating -ENOIOCTLCMD to -EINVAL is invalid, the correct ioctl return
value is -ENOTTY.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:54:55 -02:00
Laurent Pinchart e43484e42d [media] v4l: omap4iss: Don't check for missing get_fmt op on remote subdev
The remote subdev of any video node in the OMAP4 ISS is an internal
subdev that is guaranteed to implement get_fmt. Don't check the return
value for -ENOIOCTLCMD, as this can't happen.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:53:38 -02:00
Laurent Pinchart 2b16b44a1c [media] v4l: omap4iss: Simplify error paths
Get rid of a goto statement for a simple error path that can be inlined,
and split spaghetti error code to a separate section.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:53:02 -02:00
Laurent Pinchart 245d6b2d50 [media] v4l: omap4iss: Don't initialize fields to 0 manually
The iss_device structure is allocated with kzalloc, there's no need to
initialize its fields to 0 explicitly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:51:56 -02:00
Laurent Pinchart 4334fd18e2 [media] v4l: omap4iss: Make loop counters unsigned where appropriate
Loop counters that can only take positive values should be unsigned.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:51:33 -02:00
Laurent Pinchart 68c03a666c [media] v4l: omap4iss: Make omap4iss_isp_subclk_(en|dis)able() functions void
The functions always succeed, there's no need to return an error value.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:51:02 -02:00
Laurent Pinchart ca6f19b1cf [media] v4l: omap4iss: Replace udelay/msleep with usleep_range
The only udelay() call takes place in a sleepable context, we can sleep
instead. Use usleep_range().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:50:28 -02:00
Laurent Pinchart 57da5e47cc [media] v4l: omap4iss: Remove unneeded status variable
The failure variable is initialized with 0 and used as a return value
without ever being modified. Remove it and return 0 directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:49:58 -02:00
Laurent Pinchart 2b7f0b641a [media] v4l: omap4iss: Remove duplicate video_is_registered() check
The video_unregister_device() function checks if the video device is
registered before proceeding, remote the duplicate check from the
driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:49:26 -02:00
Laurent Pinchart bb4e7d6ea2 [media] v4l: omap4iss: Set the vb2 timestamp type
Timestamps use the monotonic clock, configure the vb2 queue accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:49:00 -02:00
Laurent Pinchart f33354f045 [media] v4l: omap4iss: Remove iss_video streaming field
The vb2 queue already keeps track of the streaming state, there's no
need to duplicate that in the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:48:40 -02:00
Laurent Pinchart 35c71be8c7 [media] v4l: omap4iss: Report device caps in response to VIDIOC_QUERYCAP
Set the v4l2_capability capabilities and device_caps fields correctly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:48:01 -02:00
Laurent Pinchart cce093ee55 [media] v4l: omap4iss: Move common code out of switch...case
Code common to all cases can be moved out of the switch...case
statement.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:45:51 -02:00
Laurent Pinchart ea72717e96 [media] v4l: omap4iss: Don't use v4l2_g_ext_ctrls() internally
Instead of using the extended control API internally to get the sensor
pixel rate, use the dedicated in-kernel APIs (find the control with
v4l2_ctrl_find() and get its value with v4l2_ctrl_g_ctrl_int64()).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:45:02 -02:00
Laurent Pinchart d632dfefd3 [media] v4l: omap4iss: Add support for OMAP4 camera interface - Build system
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds and updates Kconfig's and Makefile's, as well as a TODO
list.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:43:58 -02:00
Sergio Aguirre 69c536b2c2 [media] v4l: omap4iss: Add support for OMAP4 camera interface - Resizer
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds resizer support.
[Port the driver to v3.12-rc3, including the following changes
- Don't include plat/ headers
- Don't use cpu_is_omap44xx() macro
- Don't depend on EXPERIMENTAL
- Fix s_crop operation prototype
- Update link_notify prototype
- Rename media_entity_remote_source to media_entity_remote_pad]

Signed-off-by: Sergio Aguirre <sergio.a.aguirre@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:37:59 -02:00
Sergio Aguirre 714148260d [media] v4l: omap4iss: Add support for OMAP4 camera interface - IPIPE(IF)
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds the IPIPEIF and IPIPE processing blocks support.

Signed-off-by: Sergio Aguirre <sergio.a.aguirre@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:35:10 -02:00
Sergio Aguirre b4a0477c0b [media] v4l: omap4iss: Add support for OMAP4 camera interface - CSI receivers
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds CSI receivers support.

Signed-off-by: Sergio Aguirre <sergio.a.aguirre@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:29:42 -02:00
Sergio Aguirre fc96d58c10 [media] v4l: omap4iss: Add support for OMAP4 camera interface - Video devices
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds video devices support.

Signed-off-by: Sergio Aguirre <sergio.a.aguirre@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:25:50 -02:00
Sergio Aguirre 59f0ad8076 [media] v4l: omap4iss: Add support for OMAP4 camera interface - Core
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.
Check Documentation/video4linux/omap4_camera.txt for details.
This commit adds the driver core, registers definitions and
documentation.

Signed-off-by: Sergio Aguirre <sergio.a.aguirre@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-12-03 17:21:04 -02:00
Jingoo Han 41e043fcfa staging: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02 22:32:35 -08:00
Greg Kroah-Hartman 06749f192b Merge v3.13-rc2 into staging-next
we want these fixes in here.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02 16:39:07 -08:00
Greg Kroah-Hartman e6bbda9da9 Staging: go7007: fix up some remaining go->dev issues
This fixes up the remaining "dev is used before it is set" issues in the
go7007 driver that were originally caused by commit
b6ea5ef80a but not fixed up by reverting
it due to other patches later on adding these "fixes".

Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 09:29:32 -08:00
Greg Kroah-Hartman 66a528c1c3 Revert "staging:media: Use dev_dbg() instead of pr_debug()"
This reverts commit b6ea5ef80a.

Turns out to have lots of run-time issues in that the structure is not
initialized before it is used in the debugging messages.

Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-25 09:21:55 -08:00
Greg Kroah-Hartman 82d939ecf0 Merge branch 'opw-next' into staging-next
This pulls in all of the staging patches applied during the opw
application process, and some other staging patches that were submitted
during that period of time.  All of these are for 3.14-rc1.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-22 14:28:31 -08:00
Linus Torvalds 3ea369eea0 Merge branch 'topic/kbuild-fixes-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media build fixes from Mauro Carvalho Chehab:
 "A series of patches that fix compilation on non-x86 archs.

  While most of them are just build fixes, there are some fixes for real
  bugs, as there are a number of drivers using dynamic stack allocation.
  A few of those might be considered a security risk, if the i2c-dev
  module is loaded, as someone could be sending very long I2C data that
  could potentially overflow the Kernel stack.  Ok, as using /dev/i2c-*
  devnodes usually requires root on usual distros, and exploiting it
  would require a DVB board or USB stick, the risk is not high"

* 'topic/kbuild-fixes-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (28 commits)
  [media] platform drivers: Fix build on frv arch
  [media] lirc_zilog: Don't use dynamic static allocation
  [media] mxl111sf: Don't use dynamic static allocation
  [media] af9035: Don't use dynamic static allocation
  [media] af9015: Don't use dynamic static allocation
  [media] dw2102: Don't use dynamic static allocation
  [media] dibusb-common: Don't use dynamic static allocation
  [media] cxusb: Don't use dynamic static allocation
  [media] v4l2-async: Don't use dynamic static allocation
  [media] cimax2: Don't use dynamic static allocation
  [media] tuner-xc2028: Don't use dynamic static allocation
  [media] tuners: Don't use dynamic static allocation
  [media] av7110_hw: Don't use dynamic static allocation
  [media] stv090x: Don't use dynamic static allocation
  [media] stv0367: Don't use dynamic static allocation
  [media] stb0899_drv: Don't use dynamic static allocation
  [media] dvb-frontends: Don't use dynamic static allocation
  [media] dvb-frontends: Don't use dynamic static allocation
  [media] s5h1420: Don't use dynamic static allocation
  [media] uvc/lirc_serial: Fix some warnings on parisc arch
  ...
2013-11-18 15:10:05 -08:00
Linus Torvalds a310410f61 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 "This series include:
   - a new Remote Controller driver for ST SoC with the corresponding DT
     bindings
   - a new frontend (cx24117)
   - a new I2C camera flash driver (lm3560)
   - a new mem2mem driver for TI SoC (ti-vpe)
   - support for Raphael r828d added to r820t driver
   - some improvements on buffer allocation at VB2 core
   - usual driver fixes and improvements

  PS this time, we have a smaller number of patches.  While it is hard
  to pinpoint to the reasons, I believe that it is mainly due to:

   1) there are several patch series ready, but depending on DT review.
      I decided to grant some extra time for DT maintainers to look on
      it, as they're expecting to have more time with the changes agreed
      during ARM mini-summit and KS.  If they can't review in time for
      3.14, I'll review myself and apply for the next merge window.

   2) I suspect that having both LinuxCon EU and LinuxCon NA happening
      during the same merge window affected the development
      productivity, as several core media developers participated on
      both events"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (151 commits)
  [media] media: st-rc: Add ST remote control driver
  [media] gpio-ir-recv: Include linux/of.h header
  [media] tvp7002: Include linux/of.h header
  [media] tvp514x: Include linux/of.h header
  [media] ths8200: Include linux/of.h header
  [media] adv7343: Include linux/of.h header
  [media] v4l: Fix typo in v4l2_subdev_get_try_crop()
  [media] media: i2c: add driver for dual LED Flash, lm3560
  [media] rtl28xxu: add 15f4:0131 Astrometa DVB-T2
  [media] rtl28xxu: add RTL2832P + R828D support
  [media] rtl2832: add new tuner R828D
  [media] r820t: add support for R828D
  [media] media/i2c: ths8200: fix build failure with gcc 4.5.4
  [media] Add support for KWorld UB435-Q V2
  [media] staging/media: fix msi3101 build errors
  [media] ddbridge: Remove casting the return value which is a void pointer
  [media] ngene: Remove casting the return value which is a void pointer
  [media] dm1105: remove unneeded not-null test
  [media] sh_mobile_ceu_camera: remove deprecated IRQF_DISABLED
  [media] media: rcar_vin: Add preliminary r8a7790 support
  ...
2013-11-18 15:08:02 -08:00
Wolfram Sang 16735d022f tree-wide: use reinit_completion instead of INIT_COMPLETION
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.

[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:21 +09:00
Linus Torvalds 8ceafbfa91 Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm
Pull DMA mask updates from Russell King:
 "This series cleans up the handling of DMA masks in a lot of drivers,
  fixing some bugs as we go.

  Some of the more serious errors include:
   - drivers which only set their coherent DMA mask if the attempt to
     set the streaming mask fails.
   - drivers which test for a NULL dma mask pointer, and then set the
     dma mask pointer to a location in their module .data section -
     which will cause problems if the module is reloaded.

  To counter these, I have introduced two helper functions:
   - dma_set_mask_and_coherent() takes care of setting both the
     streaming and coherent masks at the same time, with the correct
     error handling as specified by the API.
   - dma_coerce_mask_and_coherent() which resolves the problem of
     drivers forcefully setting DMA masks.  This is more a marker for
     future work to further clean these locations up - the code which
     creates the devices really should be initialising these, but to fix
     that in one go along with this change could potentially be very
     disruptive.

  The last thing this series does is prise away some of Linux's addition
  to "DMA addresses are physical addresses and RAM always starts at
  zero".  We have ARM LPAE systems where all system memory is above 4GB
  physical, hence having DMA masks interpreted by (eg) the block layers
  as describing physical addresses in the range 0..DMAMASK fails on
  these platforms.  Santosh Shilimkar addresses this in this series; the
  patches were copied to the appropriate people multiple times but were
  ignored.

  Fixing this also gets rid of some ARM weirdness in the setup of the
  max*pfn variables, and brings ARM into line with every other Linux
  architecture as far as those go"

* 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
  ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
  ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
  ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
  ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
  ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
  ARM: DMA-API: better handing of DMA masks for coherent allocations
  ARM: 7857/1: dma: imx-sdma: setup dma mask
  DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
  DMA-API: dcdbas: update DMA mask handing
  DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
  DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
  DMA-API: crypto: remove last references to 'static struct device *dev'
  DMA-API: crypto: fix ixp4xx crypto platform device support
  DMA-API: others: use dma_set_coherent_mask()
  DMA-API: staging: use dma_set_coherent_mask()
  DMA-API: usb: use new dma_coerce_mask_and_coherent()
  DMA-API: usb: use dma_set_coherent_mask()
  DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
  DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
  DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
  ...
2013-11-14 07:55:21 +09:00
Linus Torvalds c2d3306991 GPIO bulk changes for the v3.13 development cycle
- Merged the GPIO descriptor API from Alexandre Courbot.
   This is a first step toward trying to get rid of the
   global GPIO numberspace for the future.
 
 - Add an API so that driver can flag that a certain GPIO
   line is being used by a irqchip backend for generating
   IRQs, so that we can enforce checks, like not allowing
   users to switch that line to an output at runtime, since
   this makes no sense. Implemented corresponding calls
   in a few select drivers.
 
 - ACPI GPIO cleanups, refactorings and switch to using the
   descriptor-based interface.
 
 - Support for the TPS80036 Palmas GPIO variant.
 
 - A new driver for the Broadcom Kona GPIO SoC IP block.
 
 - Device tree support for the PCF857x driver.
 
 - A set of ARM GPIO refactorings with the goal of getting
   rid of a bunch of custom GPIO implementations from the
   arch/arm/* tree:
 
   - Move the IOP GPIO driver to the GPIO subsystem and
     fix all users to use the gpiolib API for accessing
     GPIOs. Delete the old custom GPIO implementation.
 
   - Delete the unused custom PXA GPIO implemention.
 
   - Convert all users of the IXP4 custom GPIO
     implementation to use gpiolib and delete the custom
     implementation.
 
   - Delete the custom Gemini GPIO implementation, also
     completely unused.
 
 - Various cleanups and renamings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSgNF3AAoJEEEQszewGV1zPiwP/RdQTL8KTe2ULL2QpKAj2TSP
 wuqbvSfW0AOUVf7SvUwXYctxnA718orH2rFKRM9UjK2XFEYgNrtsL4e2Igtbo057
 uZ1sr+dytxgLC67CqkbYTfFxQZZ97ZCO3j8VWtVRxcpMEpoE10Y09ZW7nzvF3Lhq
 0lRd+Cf4KirurOAVfQOVA0Fv+zKuSKSD0i8FLq60li/5EaxXPrYlene4SNY/B+ue
 IWvLJfeDRkv8dR11LYdI/WIET7ljMfIb4MEA5FQ0hae0SSlQtZHQBQi8PjnWnHX0
 n+kxFBFMhWPqBDVwbheD4u6U0RFrm8IVfgdVG94G7wlIQXd5TY4d9Nzd2Y5+bzDF
 THHZiM9PdzU2rjV2QN5gV+AHJuLw/7tSB9pBpcAtKbwb0FFholUDImWI45YoJAdx
 d949YAblh7QZ2nFJJtNgzerco0XAT6BA5/Bs9TPx3L4tij2e+YZzhJbW/EeNmICo
 rE98wUdpV9pk6siv56bsoLowCjNOwaWmI6aYErBdh21mTNx65kwd40xWb3ylM3sy
 X1QC/oLhqxc7Il/KvF9DbGvpgg5QUB1mY9eb2B+gOhRO0cg+qiWvvvqi0dcTHkaT
 aqg7BPXVGUMO73qSsV1x7hmOWsqSFxCBSkVFyWJO7GxqarmWvsXiVh72E85pK60P
 RSyJ/5TghCiGAPFWsg/7
 =881E
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO changes from Linus Walleij:
 "Here is the bulk of GPIO changes for the v3.13 development cycle.

  I've got ACKs for the things that affect other subsystems (or it's my
  own subsystem, like pinctrl).  Most of that pertain to an attempt from
  my side to consolidate and get rid of custom GPIO implementations in
  the ARM tree.  I will continue doing this.

  The main change this time is the new GPIO descriptor API, background
  for this can be found in Corbet's summary from this january in LWN:

    http://lwn.net/Articles/533632/

  Summary:

   - Merged the GPIO descriptor API from Alexandre Courbot.  This is a
     first step toward trying to get rid of the global GPIO numberspace
     for the future.

   - Add an API so that driver can flag that a certain GPIO line is
     being used by a irqchip backend for generating IRQs, so that we can
     enforce checks, like not allowing users to switch that line to an
     output at runtime, since this makes no sense.  Implemented
     corresponding calls in a few select drivers.

   - ACPI GPIO cleanups, refactorings and switch to using the
     descriptor-based interface.

   - Support for the TPS80036 Palmas GPIO variant.

   - A new driver for the Broadcom Kona GPIO SoC IP block.

   - Device tree support for the PCF857x driver.

   - A set of ARM GPIO refactorings with the goal of getting rid of a
     bunch of custom GPIO implementations from the arch/arm/* tree:

     * Move the IOP GPIO driver to the GPIO subsystem and fix all users
       to use the gpiolib API for accessing GPIOs.  Delete the old
       custom GPIO implementation.

     * Delete the unused custom PXA GPIO implemention.

     * Convert all users of the IXP4 custom GPIO implementation to use
       gpiolib and delete the custom implementation.

     * Delete the custom Gemini GPIO implementation, also completely
       unused.

   - Various cleanups and renamings"

* tag 'gpio-v3.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (85 commits)
  gpio: gpio-mxs: Remove unneeded dt checks
  gpio: pl061: don't depend on CONFIG_ARM
  gpio: bcm-kona: add missing .owner to struct gpio_chip
  gpiolib: provide a declaration of seq_file in gpio/driver.h
  gpiolib: include gpio/consumer.h in of_gpio.h for desc_to_gpio()
  gpio: provide stubs for devres gpio functions
  gpiolib: devres: add missing headers
  gpiolib: make GPIO_DEVRES depend on GPIOLIB
  gpiolib: devres: fix devm_gpiod_get_index()
  gpiolib / ACPI: document the GPIO descriptor based interface
  gpiolib / ACPI: allow passing GPIOF_ACTIVE_LOW for GpioInt resources
  gpiolib / ACPI: add ACPI support for gpiod_get_index()
  gpiolib / ACPI: convert to gpiod interfaces
  gpiolib: add gpiod_get() and gpiod_put() functions
  gpiolib: port of_ functions to use gpiod
  gpiolib: export descriptor-based GPIO interface
  Fixup "MAINTAINERS: GPIO-INTEL-MID: add maintainer"
  gpio: bcm281xx: Don't print addresses of GPIO area in probe()
  gpio: tegra: use new gpio_lock_as_irq() API
  gpio: rcar: Include linux/of.h header
  ...
2013-11-12 15:50:46 +09:00
Matina Maria Trompouki c79bfed605 Staging: lirc: fix line over 80 characters
This patch removes the following warning reported by checkpatch.pl

WARNING: line over 80 characters
drivers/staging/media/lirc/lirc_imon.c

Signed-off-by: Matina Maria Trompouki <mtrompou@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 15:49:31 -08:00
Matina Maria Trompouki 70a51d284b Staging: lirc: fix quoted string split across lines
This patch removes the following warning reported by checkpatch.pl

WARNING: quoted string split across lines

drivers/staging/media/lirc/lirc_igorplugusb.c
drivers/staging/media/lirc/lirc_imon.c
drivers/staging/media/lirc/lirc_serial.c
drivers/staging/media/lirc/lirc_zilog.c

Signed-off-by: Matina Maria Trompouki <mtrompou@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-11 15:49:31 -08:00
Archana kumari 430dfd55ee staging: media: davinci_vpfe:Removed space before semicolon in dm365_ipipe_hw.c
This patch fixes "space prohibted before semicolon" warning in dm365_ipipe_hw.cdetected via checkpatch.pl

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:43:59 -08:00
Himangi Saraogi 432b29c417 staging:media:go7007:saa7134-go7007.c: Remove space before tabs
This patch removes the checkpatch.pl warning "please, no space before
tabs" in saa7134-go7007.c by converting space followed by tab to tab
followed by tab.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:42:52 -08:00
Himangi Saraogi 5c72afd8f4 staging:media:go7007:go7007-fw.c: move trailing statement to next line
This patch removes the checkpatch.pl error "trailing statements should
be on next line" in go7007-fw.c.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:41:47 -08:00
Ebru Akagunduz 8bf961c8c2 Staging: media: fix space prohibited before semicolon
Fix checkpatch.pl issues with space prohibited before semicolon in dm365_ipipe.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:40:59 -08:00
Archana kumari 05323e7816 staging: media: lirc: fixed sparse warnings by adding __user annotations in lirc_serial.c
This patch fixes sparse warning by adding __user annotations in
lirc_serial.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:18:18 -08:00
Mauro Carvalho Chehab ac5b4b6bf0 [media] lirc_zilog: Don't use dynamic static allocation
Dynamic static allocation is evil, as Kernel stack is too low, and
ompilation complains about it on some archs:
	drivers/staging/media/lirc/lirc_zilog.c:967:1: warning: 'read' uses dynamic stack allocation [enabled by default]
Instead, let's enforce a limit for the buffer to be 64. That should
be more than enough.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-08 09:45:46 -02:00
Mauro Carvalho Chehab ce01cbdc54 [media] uvc/lirc_serial: Fix some warnings on parisc arch
On this arch, usec is not unsigned long. So, we need to typecast,
in order to remove those warnings:
	drivers/media/usb/uvc/uvc_video.c: In function 'uvc_video_clock_update':
	drivers/media/usb/uvc/uvc_video.c:678:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 9 has type '__kernel_suseconds_t' [-Wformat]
	drivers/staging/media/lirc/lirc_serial.c: In function 'irq_handler':
	drivers/staging/media/lirc/lirc_serial.c:707:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type '__kernel_suseconds_t' [-Wformat]
	drivers/staging/media/lirc/lirc_serial.c:707:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type '__kernel_suseconds_t' [-Wformat]
	drivers/staging/media/lirc/lirc_serial.c:719:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type '__kernel_suseconds_t' [-Wformat]
	drivers/staging/media/lirc/lirc_serial.c:719:5: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type '__kernel_suseconds_t' [-Wformat]
	drivers/staging/media/lirc/lirc_serial.c:728:6: warning: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type '__kernel_suseconds_t' [-Wformat]
	drivers/staging/media/lirc/lirc_serial.c:728:6: warning: format '%lx' expects argument of type 'long unsigned int', but argument 7 has type '__kernel_suseconds_t' [-Wformat]

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-08 09:45:37 -02:00
Linus Torvalds 0b1e73ed22 Staging driver update for 3.13-rc1
Here's the big drivers/staging/ update for 3.13-rc1.
 
 Nothing major here, just a _ton_ of fixes and cleanups, mostly driven by
 the new round of OPW applicants, but also there are lots of other people
 doing staging tree cleanups these days in order to help get the drivers
 into mergable shape.
 
 We also merge, and then revert, the ktap code, as Ingo and the other
 perf/ftrace developers feel it should go into the "real" part of the
 kernel with only a bit more work, so no need to put it in staging for
 now.
 
 All of this has been in linux-next for a while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlJ6xPsACgkQMUfUDdst+ykAbwCg1hOktgHPFZp/t6xmsSj6cZHj
 AfQAnRN/lr/TFw5SKUek2sluAzO4Fz7c
 =g/MD
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver update from Greg KH:
 "Here's the big drivers/staging/ update for 3.13-rc1.

  Nothing major here, just a _ton_ of fixes and cleanups, mostly driven
  by the new round of OPW applicants, but also there are lots of other
  people doing staging tree cleanups these days in order to help get the
  drivers into mergable shape.

  We also merge, and then revert, the ktap code, as Ingo and the other
  perf/ftrace developers feel it should go into the "real" part of the
  kernel with only a bit more work, so no need to put it in staging for
  now.

  All of this has been in linux-next for a while with no reported
  issues"

* tag 'staging-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1045 commits)
  staging: drm/imx: fix return value check in ipu_add_subdevice_pdata()
  Staging: zram: Fix access of NULL pointer
  Staging: zram: Fix variable dereferenced before check
  Staging: rtl8187se: space prohibited before semicolon in r8185b_init.c
  Staging: rtl8187se: fix space prohibited after that open parenthesis '(' in r8185b_init.c
  Staging: rtl8187se: fix braces {} are not necessary for single statement blocks in r8185b_init.c
  Staging: rtl8187se: fix trailing whitespace in r8185b_init.c
  Staging: rtl8187se: fix please, no space before tabs in r8185b_init.c
  drivers/staging/nvec/Kconfig: remove trailing whitespace
  Staging: dwc2: Fix variable dereferenced before check
  Staging: xgifb: fix braces {} are not necessary for any arm of this statement
  staging: rtl8192e: remove unneeded semicolons
  staging: rtl8192e: use true and false for bool variables
  staging: ft1000: return values corrected in scram_start_dwnld
  staging: ft1000: change values of status return variable in write_dpram32_and_check
  staging: bcm: Remove unnecessary pointer casting
  imx-drm: ipuv3-crtc: Invert IPU DI0 clock polarity
  staging: r8188eu: Fix sparse warnings in rtl_p2p.c
  staging: r8188eu: Fix sparse warnings in rtw_mlme_ext.c
  staging: r8188eu: Fix sparse warnings in rtl8188e.cmd.c
  ...
2013-11-07 15:07:58 +09:00
Russell King 68788979c2 DMA-API: media: dt3155v4l: replace dma_set_mask()+dma_set_coherent_mask() with new helper
Replace the following sequence:

	dma_set_mask(dev, mask);
	dma_set_coherent_mask(dev, mask);

with a call to the new helper dma_set_mask_and_coherent().

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-10-31 14:48:27 +00:00
Randy Dunlap c6dd1ef8f8 [media] staging/media: fix msi3101 build errors
Fix build error when VIDEOBUF2_CORE=m and USB_MSI3101=y.
drivers/built-in.o: In function `msi3101_buf_queue':
sdr-msi3101.c:(.text+0x1298d6): undefined reference to `vb2_buffer_done'
drivers/built-in.o: In function `msi3101_cleanup_queued_bufs':
sdr-msi3101.c:(.text+0x1299c7): undefined reference to `vb2_buffer_done'
drivers/built-in.o: In function `msi3101_isoc_handler':
sdr-msi3101.c:(.text+0x12a08d): undefined reference to `vb2_plane_vaddr'
sdr-msi3101.c:(.text+0x12a0b9): undefined reference to `vb2_buffer_done'
drivers/built-in.o: In function `msi3101_probe':
sdr-msi3101.c:(.text+0x12a1c5): undefined reference to `vb2_vmalloc_memops'
sdr-msi3101.c:(.text+0x12a1d7): undefined reference to `vb2_queue_init'
drivers/built-in.o:(.rodata+0x34cf0): undefined reference to `vb2_ioctl_reqbufs'
drivers/built-in.o:(.rodata+0x34cf4): undefined reference to `vb2_ioctl_querybuf'
drivers/built-in.o:(.rodata+0x34cf8): undefined reference to `vb2_ioctl_qbuf'
drivers/built-in.o:(.rodata+0x34d00): undefined reference to `vb2_ioctl_dqbuf'
drivers/built-in.o:(.rodata+0x34d04): undefined reference to `vb2_ioctl_create_bufs'
drivers/built-in.o:(.rodata+0x34d08): undefined reference to `vb2_ioctl_prepare_buf'
drivers/built-in.o:(.rodata+0x34d18): undefined reference to `vb2_ioctl_streamon'
drivers/built-in.o:(.rodata+0x34d1c): undefined reference to `vb2_ioctl_streamoff'
drivers/built-in.o:(.rodata+0x35580): undefined reference to `vb2_fop_read'
drivers/built-in.o:(.rodata+0x35588): undefined reference to `vb2_fop_poll'
drivers/built-in.o:(.rodata+0x35598): undefined reference to `vb2_fop_mmap'
drivers/built-in.o:(.rodata+0x355a0): undefined reference to `vb2_fop_release'
drivers/built-in.o:(.data+0x23b40): undefined reference to `vb2_ops_wait_prepare'
drivers/built-in.o:(.data+0x23b44): undefined reference to `vb2_ops_wait_finish'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-31 04:55:33 -02:00
Dulshani Gunawardhana b6ea5ef80a staging:media: Use dev_dbg() instead of pr_debug()
Use dev_dbg() instead of pr_debug() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:43:02 -07:00
Dulshani Gunawardhana a152e879e0 staging:media: Use dev_info() instead of pr_info()
Use dev_info instead of pr_info() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:43:02 -07:00
Dulshani Gunawardhana 44ee8e8011 staging: media: Use dev_err() instead of pr_err()
Use dev_err() instead of pr_err() in go7007-usb.c.

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:43:02 -07:00
Archana kumari 5619d97722 staging: media: lirc: Replaced printk macro with dev_info(dev,....) in lirc_imon.c
This patch replaces printk macro with dev_info(dev,....)
in lirc_imon.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27 06:42:00 -07:00
Krzysztof Hałasa cfd736adf6 [media] SOLO6x10: Fix video frame type (I/P/B)
Mask v4l2_buf.flags to indicate only I/P/B frames.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 05:50:00 -03:00
Greg Kroah-Hartman dc070641ee Revert "staging:media:lirc: quoted string split across lines"
This reverts commit 7db78438d9.

It broke the build, and isn't ok.

Cc: Archana kumari <archanakumari959@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-15 09:40:57 -07:00
Krzysztof Hałasa 39e30a22d2 [media] SOLO6x10: Fix video headers on certain hardware
On certain platforms a sequence of dma_map_sg() and dma_unmap_sg()
discards data previously stored in the buffers. Build video headers
only after the DMA is completed.

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:33:22 -03:00
Krzysztof Hałasa 4a61ad3c4a [media] SOLO6x10: Fix video encoding on big-endian systems
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
[hans.verkuil@cisco.com: fix merge problems due to the recent solo sg_table changes]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:32:42 -03:00
Krzysztof Hałasa a3d2d196e1 [media] SOLO6x10: Remove unused #define SOLO_DEFAULT_GOP
Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:32:25 -03:00
Krzysztof Hałasa 4518274606 [media] SOLO6x10: don't do DMA from stack in solo_dma_vin_region()
[m.chehab@samsung.com: Fix CodingStyle: don't use 2 statements on just one line]

Signed-off-by: Krzysztof Ha?asa <khalasa@piap.pl>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-14 06:32:04 -03:00
Sachin Kamat 440ca3f0c5 staging: lirc: Do not use 0 for NULL pointer
Do not use 0 for NULL pointer.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jarod Wilson <jarod@wilsonet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:36:31 -07:00
Dulshani Gunawardhana 860276a738 staging:go7007:Fix warning on quoted string on multiple lines
Fix checkpatch.pl warning on quoted string on multiple lines in
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:39:30 -07:00
Dulshani Gunawardhana a3404dc796 staging:go7007:Fix line over 80 character warning
Fix "line over 80 characters" warning generated by checkpatch.pl for
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:39:30 -07:00
Dulshani Gunawardhana 2cd32ac3c0 staging:go7007 : Replace KERN_INFO with pr_info
Replace KERN_INFO with pr_info in go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:39:30 -07:00
Dulshani Gunawardhana 335ade0909 staging:go7007:Replace KERN_ERR with pr_err
Replace KERN_ERR with pr_err in go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:30:54 -07:00
Dulshani Gunawardhana 68095f1803 staging:go7007:Remove driver-specific debugging defines in favor of pr_debug
Remove driver-specific debugging defines in favor of pr_debug in
go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:30:54 -07:00
Archana kumari 7db78438d9 staging:media:lirc: quoted string split across lines
Fix checkpatch.pl issues with quoted string split across lines in lirc_imon.c

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:26:13 -07:00
Dulshani Gunawardhana 0350a1bd26 staging/media/go7007:Replace kern_debug with pr_debug
Replace kern_debug with pr_debug in go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-06 22:07:30 -07:00
Ben Hutchings cfd66ab729 [media] lirc_bt829: Note in TODO why it can't be a normal PCI driver yet
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-03 14:05:57 -03:00
Ben Hutchings cfe1b7a703 [media] lirc_bt829: Enable and disable device
We must not assume that the PCI device is already enabled.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-03 14:05:32 -03:00
Ben Hutchings fd39abee9e [media] lirc_bt829: Fix iomap and PCI device leaks
We must call iounmap() and pci_dev_put() when removed and on
the probe failure path.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-03 14:05:20 -03:00
Ben Hutchings d06d3ea783 [media] lirc_bt829: Fix physical address type
Use phys_addr_t and log format %pa.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-03 14:05:03 -03:00
Linus Walleij b336cb29ae staging: media/lirc: switch to use gpiolib
The lirc serial module has special hooks to work with NSLU2,
switch these over to use gpiolib, as that is available on the
ixp4 platform.

Not even compile tested as there is no way to select this
driver from menuconfig on the ixp4 platform.

Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-09-27 14:15:32 +02:00
Ricardo Ribalda 2230124759 [media] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table
Replace the private struct vb2_dma_sg_desc with the struct sg_table so
we can benefit from all the helping functions in lib/scatterlist.c for
things like allocating the sg or compacting the descriptor.
marvel-ccic and solo6x10 drivers, that use this API have been updated.

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
[s.nawrocki@samsung.com: minor corrections of the changelog]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-09-26 07:33:59 -03:00
Antti Palosaari c0c7203640 [media] msi3101: correct max videobuf2 alloc
There was too small buffers requested in worst case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-09-24 13:30:35 -03:00
Antti Palosaari d3480d2763 [media] msi3101: Kconfig select VIDEOBUF2_VMALLOC
[linuxtv-media:master 395/499] sdr-msi3101.c:undefined reference to
`vb2_vmalloc_memops'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-09-24 13:22:14 -03:00
Fengguang Wu 6648ef1914 [media] msi3101: msi3101_ioctl_ops can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-09-24 13:21:57 -03:00
Mauro Carvalho Chehab 04e40bdd67 [media] msi3101: Fix compilation on i386
as reported by: kbuild test robot <fengguang.wu@intel.com>:
	[linuxtv-media:master 459/499] sdr-msi3101.c:undefined reference to `__umoddi3'

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-24 13:35:14 -03:00
Antti Palosaari c59e6d5650 [media] msi3101: few improvements for RF tuner
* Fix AM_MODE. Now it could work at least in theory, cannot test.
* Use greatest common divisor algo to divide PLL fractional parts.
* Fix IF frequency mode.
* + some very minor "style" issues

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:09:04 -03:00
Antti Palosaari 0046079812 [media] msi3101: change stream format 384
After feeding different signal levels using RF generator and looking
GNU Radio FFT sink I made decision to change bit shift 3 to bit shift
2 as there was very (too) huge visible leap in FFT sink GUI. Now it
looks more natural.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:08:47 -03:00
Antti Palosaari 61198dfd08 [media] msi3101: implement stream format 504
That stream format carries 504 x I+Q samples per 1024 USB frame.
Sample resolution is 8-bit signed. Default it when sampling rate
is 9Msps or over.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:08:25 -03:00
Antti Palosaari 00e049b05a [media] msi3101: a lot of small cleanups
Add comments, remove useless code and so. House cleaning party.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:08:11 -03:00
Antti Palosaari 093cdc79a9 [media] msi3101: changes for tuner PLL freq limits
I made some tuner freq limit tests against RF signal generator.
Adjust some PLL limits according to these test results.
Here are the results, taken from two different devices.
Ranges are measured RF limits + calculated VCO limits.
Mirics MSi3101 SDR Dongle:
VHF_MODE  52 - 132  1664 - 4224
B3_MODE  103 - 263  1648 - 4208
B45_MODE 413 - 960  1652 - 3840
Hauppauge WinTV 133559 LF:
VHF_MODE  49 - 130  1568 - 4160
B3_MODE   98 - 259  1568 - 4144
B45_MODE 391 - 960  1564 - 3840

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:07:54 -03:00
Antti Palosaari 8e2efac7d2 [media] msi3101: add stream format 336 I+Q pairs per frame
That one seem to have 12-bit resolution. Use it for streams that
has sampling rate 6 <= rate (Msps) < 8, between 6 and 8Msps.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:07:29 -03:00
Antti Palosaari 35111f5bc9 [media] msi3101: fix overflow in freq setting
Higher frequencies were not possible to set correctly as that value
overflows.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:07:07 -03:00
Antti Palosaari c5a431d02c [media] msi3101: init bits 23:20 on PLL register
It is not sure what is meaning of that number, but it is better
to try do as Windows driver. It seems to have small effect for
signal when looking FM FFT.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:06:56 -03:00
Antti Palosaari 554cbfbe3b [media] msi3101: add support for stream format "252" I+Q per frame
That one seems to have 14-bit ADC resolution, wow!
It is now used when sampling rate is below 6 Msps.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:06:33 -03:00
Antti Palosaari 23df427e33 [media] msi3101: improve tuner synth calc step size
Allow stepless synthesizer configuration. With that change we lose
precision a little bit, as it is now between +-500Hz from the target.
It could be better but on that case calculation algorithm goes more
complex and atm there is more important things to do.
Two approach to improve which comes to my mind are:
1) select and use biggest suitable step
2) use greatest common divisor algo to find divisor for thresh & frac
when possible to avoid rounding errors, which is root of cause of
current +-500Hz inaccuracy.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:04:50 -03:00
Antti Palosaari 22ca680e02 [media] msi3101: correct ADC sampling rate calc a little bit
No need to compare numbers, we could just store that fractional
value MSB directly.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:01:52 -03:00
Antti Palosaari 6450e5091c [media] msi3101: add debug dump for unknown stream data
Dump all unknown 'garbage' data - maybe we will discover someday if there
is something rational...
Also fix comment in USB frame description.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:01:28 -03:00
Antti Palosaari 42fc5b4230 [media] msi3101: add 2040:d300 Hauppauge WinTV 133559 LF
It is based Mirics MSi3101 reference design and will just work
without any changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 16:01:09 -03:00
Antti Palosaari d0fadf4033 [media] msi3101: fix stream re-start halt
Restarting stream fails quite often. Small delay is between urb killing
and stream stop command - likely to give harware some time to process
killed urbs.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 15:59:18 -03:00
Antti Palosaari 020046812f [media] msi3101: enhance sampling results
It looks like there is some extra data carried to enhance sampling
results. When you tune to some some weak/empty channel those bits
are always zeroes. When you tune to some channel where is very
strong signals those bits are all zeroes.
Examining those 32-bits reveals shortly there is 16 pieces of 2-bit
numbers. Number seen are 0, 1 and 3 - for some reason 2 is not used.
I used that number to shift bits given amount to left, "increasing"
sampling resolution by 3-bits. It may be wrong, but after some testing
it still provides better signal.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:58:55 -03:00
Antti Palosaari 3673b35cfa [media] msi3101: add sampling mode control
Whilst Quadrature Sampling is most common sampling technique used in
radio technology there is others too. Add control user could select
sampling mode. We currently support only quadrature sampling.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:40:54 -03:00
Antti Palosaari b15208573d [media] msi3101: fix sampling rate calculation
These calculations seem to give 100% correct results. Calculation
formulas could be still a little bit wrong as I have no knowledge
what kind of dividers, multipliers and VCO limits there really is.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:33:46 -03:00
Antti Palosaari 34599b9b53 [media] msi3101: sample is correct term for sample
Just fix wrong term name. No functional changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:33:19 -03:00
Antti Palosaari 977e444f59 [media] Mirics MSi3101 SDR Dongle driver
It is first Kernel software defined radio receiver driver.
That device is sold as a digital television solution.
MSi3101 is reference design which consists of two chips:
1) MSi2500 USB ADC
2) MSi001 RF-tuner
Driver is put to staging as API is not ready.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-08-20 13:23:58 -03:00
Dan Carpenter 1444fbf268 [media] staging: lirc: clean error handling in probe()
We have reorganized the error handling into a simpler and more canonical
format.
Additionally we removed extra empty lines, switched to devm_kzalloc(), and
substitute 'minor' by 'ret' in the igorplugusb_remote_probe() function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-07-29 10:17:33 -03:00
Linus Torvalds 858655116b Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 "This series contain:
   - new i2c video drivers: ml86v7667 (video decoder),
                            ths8200 (video encoder)
   - a new video driver for EasyCap cards based on Fushicai USBTV007
   - Improved support for OF and embedded systems, with V4L2 async
     initialization and a better support for clocks
   - API cleanups on the ioctls used by the v4l2 debug tool
   - Lots of cleanups
   - As usual, several driver improvements and new cards additions
   - Revert two changesets that change the minimal symbol rate for
     stv0399, as request by Manu
   - Update MAINTAINERS and other files to point to my new e-mail"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (378 commits)
  MAINTAINERS & ABI: Update to point to my new email
  [media] stb0899: restore minimal rate to 5Mbauds
  [media] exynos4-is: Correct colorspace handling at FIMC-LITE
  [media] exynos4-is: Set valid initial format on FIMC.n subdevs
  [media] exynos4-is: Set valid initial format on FIMC-IS-ISP subdev pads
  [media] exynos4-is: Fix format propagation on FIMC-IS-ISP subdev
  [media] exynos4-is: Set valid initial format at FIMC-LITE
  [media] exynos4-is: Fix format propagation on FIMC-LITE.n subdevs
  [media] MAINTAINERS: Update S5P/Exynos FIMC driver entry
  [media] Documentation: Update driver's directory in video4linux/fimc.txt
  [media] exynos4-is: Change fimc-is firmware file names
  [media] exynos4-is: Add support for Exynos5250 MIPI-CSIS
  [media] exynos4-is: Add Exynos5250 SoC support to fimc-lite driver
  [media] exynos4-is: Drop drvdata handling in fimc-lite for non-dt platforms
  [media] media: i2c: tvp514x: remove manual setting of subdev name
  [media] media: i2c: tvp7002: remove manual setting of subdev name
  [media] mem2mem: set missing v4l2_dev pointer
  [media] wl128x: add missing struct v4l2_device
  [media] tvp514x: Fix init seqeunce
  [media] saa7134: Fix sparse warnings by adding __user annotation
  ...
2013-07-13 12:09:57 -07:00
Linus Torvalds ab53485739 Merge branch 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull "exotic" arch fixes from Geert Uytterhoeven:
 "This is a collection of several exotic architecture fixes, and a few
  other fixes for issues that were detected while doing the former"

* 'exotic-arch-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (35 commits)
  lib: Move fonts from drivers/video/console/ to lib/fonts/
  console/font: Refactor font support code selection logic
  Revert "staging/solo6x10: depend on CONFIG_FONTS"
  input: cros_ec_keyb_clear_keyboard() depends on CONFIG_PM_SLEEP
  score: Wire up asm-generic/xor.h
  score: Remove unneeded <asm/dma-mapping.h>
  openrisc: Wire up asm-generic/xor.h
  h8300/boot: Use POSIX "$((..))" instead of bashism "$[...]"
  h8300: Mark H83002 and H83048 CPU support broken
  h8300: Switch h8300 to drivers/Kconfig
  h8300: Limit timer channel ranges in Kconfig
  h8300: Wire up asm-generic/xor.h
  h8300: Fill the system call table using a CALL() macro
  h8300: Fix <asm/tlb.h>
  h8300: Hardcode symbol prefixes in asm sources
  h8300: add missing definition for read_barries_depends()
  frv: head.S - Remove commented-out initialization code
  cris: Wire up asm-generic/vga.h
  parport: disable PC-style parallel port support on cris
  console: Disable VGA text console support on cris
  ...
2013-07-03 11:12:08 -07:00
Greg Kroah-Hartman b5aef682e0 Merge 3.10-rc7 into driver-core-next
We want the firmware merge fixes, and other bits, in here now.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-24 15:14:43 -07:00
Geert Uytterhoeven d1e183c8dd console/font: Refactor font support code selection logic
The current Makefile rules to build font support are messy and buggy.
Replace them by Kconfig rules:
  - Introduce CONFIG_FONT_SUPPORT, which controls the building of all font
    code,
  - Select CONFIG_FONT_SUPPORT for all drivers that use fonts,
  - Select CONFIG_FONT_8x16 for all drivers that default to the VGA8x16
    font,
  - Drop the bogus console dependency for CONFIG_VIDEO_VIVI,
  - Always process drivers/video/console/Makefile, as some drivers need
    fonts even if CONFIG_VT is not set.

This fixes (if CONFIG_SOLO6X10=y and there are no built-in console
drivers):

drivers/built-in.o: In function `solo_osd_print':
drivers/staging/media/solo6x10/solo6x10-enc.c:144: undefined reference to `.find_font'

This fixes (if CONFIG_VT=n):

drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [original part]
Acked-by: Randy Dunlap <rdunlap@infradead.org> [drivers/video/Makefile]
2013-06-23 15:55:16 +02:00
Geert Uytterhoeven 866f321339 Revert "staging/solo6x10: depend on CONFIG_FONTS"
This reverts commit 8c090cfbf9.

CONFIG_FONTS is not about enabling font support, but about enabling
manual selection of built-in fonts.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-23 15:55:15 +02:00
Alexey Khoroshilov 5e7db0389f [media] go7007: fix return 0 for unsupported devices in go7007_usb_probe()
probe() should not return 0 for unsupported devices, but go7007_usb_probe() does.
The patch fixes it to return -ENODEV.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-21 11:33:06 -03:00
Mauro Carvalho Chehab 37c1d2e409 Merge branch 'linus' into patchwork
* linus: (1465 commits)
  ARM: tegra30: clocks: Fix pciex clock registration
  lseek(fd, n, SEEK_END) does *not* go to eof - n
  Linux 3.10-rc6
  smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().
  powerpc: Fix missing/delayed calls to irq_work
  powerpc: Fix emulation of illegal instructions on PowerNV platform
  powerpc: Fix stack overflow crash in resume_kernel when ftracing
  snd_pcm_link(): fix a leak...
  use can_lookup() instead of direct checks of ->i_op->lookup
  move exit_task_namespaces() outside of exit_notify()
  fput: task_work_add() can fail if the caller has passed exit_task_work()
  xfs: don't shutdown log recovery on validation errors
  xfs: ensure btree root split sets blkno correctly
  xfs: fix implicit padding in directory and attr CRC formats
  xfs: don't emit v5 superblock warnings on write
  mei: me: clear interrupts on the resume path
  mei: nfc: fix nfc device freeing
  mei: init: Flush scheduled work before resetting the device
  sctp: fully initialize sctp_outq in sctp_outq_init
  netiucv: Hold rtnl between name allocation and device registration.
  ...
2013-06-20 05:19:09 -03:00
Sakari Ailus 7bb151b23b [media] davinci_vpfe: Clean up media entity after unregistering subdev
media_entity_cleanup() frees the links array which will be accessed by
media_entity_remove_links() called by v4l2_device_unregister_subdev().

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-19 08:58:39 -03:00
Linus Torvalds aad7601365 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
 "Series of fixes for 3.10.  There are some usual driver fixes (mostly
  on s5p/exynos playform drivers), plus some fixes at V4L2 core"

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits)
  [media] soc_camera: error dev remove and v4l2 call
  [media] sh_veu: fix the buffer size calculation
  [media] sh_veu: keep power supply until the m2m context is released
  [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted
  [media] v4l2-ioctl: don't print the clips list
  [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls
  [media] cx88: fix NULL pointer dereference
  [media] DocBook/media/v4l: update version number
  [media] exynos4-is: Remove "sysreg" clock handling
  [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev
  [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured
  [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded
  [media] s5p-mfc: Add NULL check for allocated buffer
  [media] s5p-mfc: added missing end-of-lines in debug messages
  [media] s5p-mfc: v4l2 controls setup routine moved to initialization code
  [media] s5p-mfc: separate encoder parameters for h264 and mpeg4
  [media] s5p-mfc: Remove special clock usage in driver
  [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function
  [media] v4l2: mem2mem: save irq flags correctly
  [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support
  ...
2013-06-18 06:25:08 -10:00
Alexey Khoroshilov e049ca5e85 [media] staging/media: lirc_imon: fix leaks in imon_probe()
Error handling of usb_submit_urb() is not as all others in imon_probe().
It just unlocks mutexes and returns nonzero leaving all already
allocated resources unfreed.
The patch makes sure all the resources are deallocated.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 15:52:20 -03:00
Ismael Luceno 8460d519bc [media] solo6x10: reimplement SAA712x setup routine
This cleans up the saa712x setup code and there are no functional changes.

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
[hans.verkuil@cisco.com: add clarification that this is cleanup only]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 09:53:09 -03:00
Hans Verkuil 8f73d3bbf8 [media] dt3155v4l: remove deprecated current_norm
Since this driver provides a g_std op the current_norm field isn't used
anyway, so just drop it.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 09:39:27 -03:00
Andrzej Hajda 1bddf1b3ac [media] media: Rename media_entity_remote_source to media_entity_remote_pad
Function media_entity_remote_source actually returns the remote pad to
the given one, regardless if this is the source or the sink pad.
Name media_entity_remote_pad is more adequate for this function.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08 21:47:11 -03:00
Stephen Rothwell 40b313608a Finally eradicate CONFIG_HOTPLUG
Ever since commit 45f035ab9b ("CONFIG_HOTPLUG should be always on"),
it has been basically impossible to build a kernel with CONFIG_HOTPLUG
turned off.  Remove all the remaining references to it.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Doug Thompson <dougthompson@xmission.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-03 14:20:18 -07:00
Xiong Zhou 6719a49746 [media] staging/solo6x10: select the desired font
Make sure FONT_8x16 can be found by find_font().

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-27 09:38:57 -03:00
Lad, Prabhakar 4498757560 [media] drivers/staging: davinci: vpfe: fix dependency for building the driver
from commit 3778d05036
[media: davinci: kconfig: fix incorrect selects]
VIDEO_VPFE_CAPTURE was removed but there was a negative
dependancy for building the DM365 VPFE MC based capture driver
(VIDEO_DM365_VPFE), This patch fixes this dependency by replacing
the VIDEO_VPFE_CAPTURE with VIDEO_DM365_ISIF, so as when older DM365
ISIF v4l driver is selected the newer media controller driver for
DM365 isnt visible.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-27 09:38:32 -03:00
Ismael Luceno 88107675fb [media] solo6x10: Approximate frame intervals with non-standard denominator
Instead of falling back to 1/25 (PAL) or 1/30 (NTSC).

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21 08:21:54 -03:00
Wei Yongjun 96f83b3f27 [media] davinci: vpfe: fix error return code in vpfe_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21 07:57:48 -03:00
Arnd Bergmann 8c090cfbf9 staging/solo6x10: depend on CONFIG_FONTS
The new SOLO6X10 driver needs the built-in console fonts, specifically
the VGA8x16 font and building it without console support results in
a link error error.

drivers/built-in.o: In function `solo_osd_print':
 :(.text+0x7d3424): undefined reference to `find_font'

This adds a dependency on the CONFIG_FONTS symbol and changes the
console code to always build the base driver even if there are
no specific fonts built-in.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 15:37:50 -07:00
Linus Torvalds 99bece775f Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c changes from Wolfram Sang:

 - an arbitration driver.  While the driver is quite simple, it caused
   discussion if we need additional arbitration on top of the one
   specified in the I2C standard.  Conclusion is that I accept a few
   generic mechanisms, but not very specific ones.

 - the core lost the detach_adapter() call.  It has no users anymore and
   was in the way for other cleanups.  attach_adapter() is sadly still
   there since there are users waiting to be converted.

 - the core gained a bus recovery infrastructure.  I2C defines a way to
   recover if the data line is stalled.  This mechanism is now in the
   core and drivers can now pass some data to make use of it.

 - bigger driver cleanups for designware, s3c2410

 - removing superfluous refcounting from drivers

 - removing Ben Dooks as second maintainer due to inactivity.  Thanks
   for all your work so far, Ben!

 - bugfixes, feature additions, devicetree fixups, simplifications...

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
  i2c: xiic: must always write 16-bit words to TX_FIFO
  i2c: octeon: use HZ in timeout value
  i2c: octeon: Fix i2c fail problem when a process is terminated by a signal
  i2c: designware-pci: drop superfluous {get|put}_device
  i2c: designware-plat: drop superfluous {get|put}_device
  i2c: davinci: drop superfluous {get|put}_device
  MAINTAINERS: Ben Dooks is inactive regarding I2C
  i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver
  i2c: at91: convert to dma_request_slave_channel_compat()
  i2c: mxs: do error checking and handling in PIO mode
  i2c: mxs: remove races in PIO code
  i2c-designware: switch to use runtime PM autosuspend
  i2c-designware: use usleep_range() in the busy-loop
  i2c-designware: enable/disable the controller properly
  i2c-designware: use dynamic adapter numbering on Lynxpoint
  i2c-designware-pci: use managed functions pcim_* and devm_*
  i2c-designware-pci: use dev_err() instead of printk()
  i2c-designware: move to managed functions (devm_*)
  i2c: remove CONFIG_HOTPLUG ifdefs
  i2c: s3c2410: Add SMBus emulation for block read
  ...
2013-05-02 14:38:53 -07:00
Ismael Luceno 16af690fb0 [media] solo6x10: Fix pixelformat accepted/reported by the encoder
The 6010 produces MPEG-4 part 2, while 6110 produces H.264.

Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22 10:10:53 -03:00
Dan Carpenter 8c93c40080 [media] go7007: dubious one-bit signed bitfields
Because they're signed, "is_video" and "is_audio" can be 0 and -1
instead of 0 and 1 as intended.  It doesn't cause a bug, but it makes
Sparse complain:
drivers/staging/media/go7007/go7007-priv.h:94:31: error: dubious one-bit signed bitfield
drivers/staging/media/go7007/go7007-priv.h:95:31: error: dubious one-bit signed bitfield

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22 10:10:20 -03:00
Ismael Luceno cdcfe40a5f [media] solo6x10: Update the encoder mode on VIDIOC_S_FMT
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22 10:05:18 -03:00
Randy Dunlap 16b196e5b2 [media] staging/media: fix go7007 dependencies and build
VIDEO_GO7007 uses usb interfaces so it should depend on USB.
It also selects CYPRESS_FIRMWARE, which depends on USB.
Fixes build errors and a kconfig warning:
go7007-loader.c:(.text+0xcc7d0): undefined reference to `usb_get_dev'
go7007-loader.c:(.init.text+0x49f0): undefined reference to `usb_register_driver'
go7007-loader.c:(.exit.text+0x17ce): undefined reference to `usb_deregister'
warning: (DVB_USB_AZ6007 && VIDEO_GO7007) selects CYPRESS_FIRMWARE which has unmet direct dependencies (MEDIA_SUPPORT && USB)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16 18:27:03 -03:00
Hans Verkuil 0dcb953a6e [media] dt3155v4l: fix timestamp handling
Use the monotonic clock and set the timestamp_type that vb2 expects.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 20:03:24 -03:00
Hans Verkuil 228b791bfd [media] dt3155v4l: fix incorrect mutex locking
A mutex_unlock was missing in the 'success' path of the open() call,
and also at one error path in the same function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-14 20:03:09 -03:00
Lars-Peter Clausen bf51a8c5e0 i2c: Ignore return value of i2c_del_adapter()
i2c_del_adapter() always returns 0. So all checks testing whether it will be
non zero will always evaluate to false and the conditional code is dead code.
This patch updates all callers of i2c_del_mux_adapter() to ignore the return
value and assume that it will always succeed (which it will). In a subsequent
patch the return type of i2c_del_adapter() will be made void.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-04-02 07:06:03 +02:00
Hans Verkuil 79a63c60a6 [media] media: move dvb-usb-v2/cypress_firmware.c to media/common
Loading the cypress firmware is not dvb specific and should be common
functionality. Move the source to media/common and make it a standalone
module.
As a result we can remove the dependency on dvb-usb in go7007, which has
nothing to do with dvb.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 11:35:06 -03:00
Hans Verkuil 9e7664e082 [media] solo6x10: The size of the thresholds ioctls was too large
On powerpc the maximum size for the ioctl argument is 8191, and it was
8192. However, the 64x64 array of threshold values is more than is actually
needed in practice for PAL and NTSC formats. A 45x45 array will do just fine.
So change the size accordingly to fix this problem.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 08:34:23 -03:00
Mauro Carvalho Chehab 6d43be7789 [media] ioctl numbers are unsigned int
ioctl's number is unsigned int. Fix it at vidioc_default.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 08:18:36 -03:00
Masanari Iida 2f9e96c39f [media] staging: davinci: Fix typo in staging/media/davinci
Correct spelling typo in staging/media/davinci

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-29 07:46:49 -03:00
Wei Yongjun 02745f6344 [media] go7007: fix invalid use of sizeof in go7007_usb_i2c_master_xfer()
sizeof() when applied to a pointer typed expression gives the
size of the pointer, not that of the pointed data.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-26 08:37:46 -03:00
Hans Verkuil 7bce33daea [media] solo6x10: prefix sources with 'solo6x10-'
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:54:05 -03:00
Hans Verkuil dad7fab933 [media] solo6x10: rename headers
Prefix the headers with 'solo6x10-'.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:52:40 -03:00
Hans Verkuil f5df0b7ff5 [media] solo6x10: clean up motion detection handling
An earlier patch temporarily disabled regional motion detection. This patch
adds it back: the 'Motion Detection Enable' control is now a 'Motion Detection Mode'.
And to set/get the regional thresholds two new ioctls were added to get/set those
thresholds.
The BUF_FLAG constants were also updated to prevent clashing with existing buffer
flags.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:51:50 -03:00
Hans Verkuil 6999687347 [media] solo6x10: disable the 'priv' abuse
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:50:22 -03:00
Hans Verkuil 15513c12e3 [media] solo6x10: fix sequence handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:49:48 -03:00
Hans Verkuil 9a8bfe9fe9 [media] solo6x10: use V4L2_PIX_FMT_MPEG4, not _FMT_MPEG
FMT_MPEG is for multiplexed streams, not elementary streams. The same is
true for the V4L2_CID_MPEG_VIDEO_ENCODING control.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:49:34 -03:00
Hans Verkuil 225642853a [media] solo6x10: small big-endian fix
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:48:59 -03:00
Hans Verkuil 4718892f0f [media] solo6x10: also stop DMA if the SOLO_PCI_ERR_P2M_DESC is raised
Otherwise the computer will hang.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:48:28 -03:00
Hans Verkuil 4c211ed7e5 [media] solo6x10: drop video_type and add proper s_std support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:48:10 -03:00
Hans Verkuil f43afb1e21 [media] solo6x10: add call to pci_dma_mapping_error
Check the result of the dma mapping.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:47:21 -03:00
Hans Verkuil ff82ad223d [media] solo6x10: fix 'BUG: key ffff88081a2a9b58 not in .data!'
Caused by a missing sysfs_attr_init().

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:47:08 -03:00
Hans Verkuil a4056c2fb4 [media] solo6x10: convert the display node to vb2
As a consequence the ioctl op has been replaced by unlocked_ioctl.
Since we are now using the core lock the locking scheme has been
simplified as well.
The main reason for converting this driver to vb2 was that the locking
scheme in v4l2.c was hopeless. It was easier to just convert the driver
then to try and salvage a threading and videobuf nightmare.
The videobuf2 framework is far, far superior compared to the old videobuf.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:46:42 -03:00
Hans Verkuil 382c31a943 [media] solo6x10: convert encoder nodes to vb2
As a consequence the ioctl op has been replaced by unlocked_ioctl.
Since we are now using the core lock the locking scheme has been
simplified as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:46:03 -03:00
Hans Verkuil a7eb931d63 [media] solo6x10: move global fields in solo_enc_fh to solo_enc_dev
All fields in solo_enc_fh do not belong there since they refer to global
properties. After moving all these fields to solo_enc_dev the solo_dev_fh
struct can be removed completely.
Note that this also kills the 'listener' feature of this driver. This
feature (where multiple filehandles can read the video) is illegal in the
V4L2 API. Do this in userspace: it's much more efficient to copy memory
than it is to DMA to every listener.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:45:10 -03:00
Hans Verkuil 6a2e65d54e [media] solo6x10: move global fields in solo_dev_fh to solo_dev
All fields in solo_dev_fh do not belong there since they refer to global
properties. After moving all these fields to solo_dev the solo_dev_fh
struct can be removed completely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:44:37 -03:00
Hans Verkuil 941604977c [media] solo6x10: add support for prio and control event handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:44:08 -03:00
Hans Verkuil 016afda4fb [media] solo6x10: fix various format-related compliancy issues
- try_fmt should never return -EBUSY.
- invalid pix->field values were not mapped to a valid value.
- the priv field of struct v4l2_pix_format wasn't zeroed.
- the try_fmt error code was not checked in set_fmt.
- enum_framesizes/intervals is valid for both MJPEG and MPEG pixel formats.
- enum_frameintervals didn't check width and height and reported the
  wrong range.
- s_parm didn't set readbuffers.
- don't fail on invalid colorspace, just replace with the valid colorspace.
- bytesperline should be 0 for compressed formats.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:43:34 -03:00
Hans Verkuil c813bd3c8d [media] solo6x10: add control framework
Note that the MOTION_THRESHOLD functionality has been temporarily reduced:
only the global threshold can be set, not the per-block. This will be
addressed in a later patch: controls are not the proper way to do this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:42:22 -03:00
Hans Verkuil d9ebd623c1 [media] solo6x10: add v4l2_device
Add support for struct v4l2_device.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:40:29 -03:00
Hans Verkuil 20c5f4925e [media] solo6x10: fix querycap and update driver version
Setup correct bus_info, let the v4l2 core set the version and add device_caps
support.
Also update the module version to 3.0.0 since this is a major upgrade.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:26:07 -03:00
Hans Verkuil dcae5dacbc [media] solo6x10: sync to latest code from Bluecherry's git repo
Synced to commit e9815ac5503ae60cfbf6ff8037035de8f62e2846 from
branch next in git repository https://github.com/bluecherrydvr/solo6x10.git
Only removed some code under #if LINUX_VERSION_CODE < some-kernel-version,
renamed the driver back to solo6x10 from solo6x10-edge, removed the
unnecessary compat.h header and kept the slab.h includes.
Otherwise the code is identical.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:25:07 -03:00
Alexander Shiyan c535cc6c71 [media] staging: lirc_sir: remove dead code
lirc_sir uses the CONFIG_SA1100_BITSY Kconfig macro. But its Kconfig
symbol was removed in v2.4.13. So remove dead code associated with it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:21:20 -03:00
Chen Gang 136d9f3a41 [media] go7007: using strlcpy instead of strncpy
For NUL terminated string, need always set '\0' in the end.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:12:54 -03:00
Sachin Kamat 70f31c91e1 [media] go7007: Remove unneeded version.h header include
version.h header inclusion is not necessary as detected by
versioncheck.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:12:27 -03:00
Hans Verkuil 59aea928d5 [media] go7007: don't continue if firmware can't be loaded
The go7007 driver would continue during probe if no firmware could be
loaded. Without firmware the probe() should return an error, so do that.
Also move the registration of devices to the end of the probe() sequence:
once devices appear the full driver functionality should be available.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:10:55 -03:00
Hans Verkuil 7118b4431b [media] go7007: update the README
Include the patch required to add support for the go7007 to saa7134.
To be applied once the driver is moved out of staging.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:09:18 -03:00
Hans Verkuil 0a522228c1 [media] saa7134-go7007: convert to a subdev and the control framework
The only thing missing after this to make the Sensoray model 614 board work is
to hook it up to the saa7134 driver, but that will have to wait until this
driver goes out of staging.

Signed-off-by: Pete Eberlein <pete@sensoray.com>
[hans.verkuil@cisco.com: updated to make it merge correctly]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-25 08:08:26 -03:00
Hans Verkuil 1f1aed2ed4 [media] go7007: add support for ADS Tech DVD Xpress DX2
Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 13:07:08 -03:00
Hans Verkuil 0a6ecbb40e [media] go7007: drop firmware name in board config, make configs const
The firmware is always the same, so drop it from the board configs. Also make
the board configs const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 13:00:54 -03:00
Hans Verkuil ac41fa2a41 [media] go7007: correct a header check: MPEG4 has a different GOP code
Actually it's called "Group of VOP" start code in MPEG4 terminology.
Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:59:58 -03:00
Hans Verkuil 778ca51153 [media] go7007: add back 'repeat sequence header' control
But now as a proper standard MPEG control.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:59:42 -03:00
Volokh Konstantin 7e4bfb9ec0 [media] go7007: Restore b_frame control
Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:59:22 -03:00
Hans Verkuil 3e4c8478d4 [media] go7007: a small improvement to querystd handling
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:58:51 -03:00
Hans Verkuil 0ee3d4d53e [media] go7007-loader: add support for the other devices and move fw files
Add support for the other devices that need to load the boot firmware.
All firmware files are now placed in a single go7007 directory.
Also remove the device_extension_s stuff: this is clearly a left-over from
the olden days.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:57:02 -03:00
Hans Verkuil e129c97494 [media] go7007-loader: renamed from s2250-loader
All s2250 names are renamed to go7007. This will be the generic go7007
firmware loader for any go7007 device, not just for the s2250/1.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:55:24 -03:00
Hans Verkuil b20cc073c2 [media] s2250: add comment describing the hardware
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:54:04 -03:00
Hans Verkuil 793d7b7ffe [media] go7007: remove cropping functions
Remove these dummy cropping functions: cropping was never implemented.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:51:47 -03:00
Hans Verkuil 6bb0e65d67 [media] go7007: embed struct video_device
Do not allocate it, but just embed in the go7007 struct.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:51:35 -03:00
Hans Verkuil ffcc1c082f [media] go7007: convert to core locking and vb2
Convert this driver to videobuf2 and core locking.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:51:08 -03:00
Hans Verkuil 899eb84ce3 [media] go7007: drop struct go7007_file
Remove struct go7007_file: all fields contained in that struct are moved to
the go7007 struct since they are really global values. The lock has just
been deleted (what's the point of a per-fh lock??).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:49:40 -03:00
Hans Verkuil b95dd82cd1 [media] go7007: set up the saa7115 audio clock correctly
The s_crystal_freq operation has to be called for the saa7115 to
set up the audio clock correctly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:49:07 -03:00
Hans Verkuil 9ff76e36dc [media] go7007: simplify the PX-TV402U board ID handling
There really is no need to split out the board IDs for each tuner.
That's what the tuner_type is for, after all.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:48:45 -03:00
Hans Verkuil 35d2d76dbe [media] go7007: standardize MPEG handling support
The go7007 produces elementary streams, so we shouldn't use the STREAM_TYPE
control, since that is for multiplexed streams.
Instead use V4L2_PIX_FMT_MPEG1/2/4.
Initially set up all the values for MPEG-2 dvd-mode, and select the dvd_mode
field if those values match that setup precisely.
Clean up lots of obsolete code relating to the custom ioctls for the MPEG
support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:48:19 -03:00
Hans Verkuil 50deb74905 [media] go7007: tuner/std related fixes
- The Adlink is initially detected as a sensor board, so the driver config
  is set up as if it was a sensor. Later the driver discovers that it really
  is a video capture card and that means that the driver configuration has
  to be updated for a PAL/NTSC capture card.
- Setup the correct initial std based on the TV tuner type.
- Remember the exact std the user selected, don't map it to STD_PAL or NTSC.
- Use v4l2_disable_ioctl to disable ioctls based on the board config and
  drop a lot of checking code in each of those ioctls since that is no longer
  needed.
- enum_input should use tvnorms to fill its std field.
- configure the input, std and initial tuner frequency at driver initialization.
- fix std handling in the s2250 driver.
- the code handling scaling for devices without a scaler was broken. This is
  now fixed.
- correctly set readbuffers and capability in g/s_parm.
- remove the bogus test for capturemode in s_parm.
- correctly implement enum_framesizes/intervals.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:47:27 -03:00
Hans Verkuil 59d7b91a1d [media] go7007: add log_status support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:45:05 -03:00
Hans Verkuil bae7432060 [media] go7007: add prio and control event support
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:44:47 -03:00
Hans Verkuil d3b2ccd9e3 [media] s2250: convert to the control framework
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:44:26 -03:00
Hans Verkuil 9b8451d5af [media] go7007: convert to the control framework and remove obsolete JPEGCOMP support
Just add a read-only V4L2_CID_JPEG_ACTIVE_MARKER control to replace
the JPEGCOMP support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:43:59 -03:00
Hans Verkuil d5d3a7cc12 [media] go7007: fix unregister/disconnect handling
- use the v4l2_device's release() callback
- remove the unnecessary ref_count
- don't free usb data structures on disconnect, only do that in the final
  release callback.
This is the correct way in order to safely handle disconnect and removal
of modules.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:42:58 -03:00
Hans Verkuil 95ef39403f [media] go7007: remember boot firmware
Don't load it everytime you stop encoding. Instead remember it.
Another reason for not loading it every time is that this could
be called from within the release() file operation, which turns
out to be deadly.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:41:56 -03:00
Hans Verkuil 9b6ebf3309 [media] go7007: fix DMA related errors
- Don't pass data allocated on the stack to usb_control_msg.
- Use dma_mapping_error after calling dma_map_page().

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:41:27 -03:00
Hans Verkuil fabfd71153 [media] go7007: remove current_norm
It's deprecated and replaced by g_std. Since this driver already implements
g_std the use of current_norm can just be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:40:39 -03:00
Hans Verkuil 4d217b83fe [media] go7007: go7007: add device_caps and bus_info support to querycap
And don't set the version field, the core does that for you.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:40:25 -03:00
Hans Verkuil c046981f1a [media] s2250-loader: use usbv2_cypress_load_firmware
The v2 of this function doesn't do DMA to objects on the stack like
its predecessor does.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:39:57 -03:00
Hans Verkuil 5e4105467b [media] go7007: add audio input ioctls
Since we now know what audio inputs there are, we can also get/set and
enumerate them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:36:28 -03:00
Hans Verkuil 94c0c67659 [media] go7007: remove all wis* drivers
These are now no longer used and so they can be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:35:50 -03:00
Hans Verkuil 3acd16ab5c [media] go7007: switch to standard tuner/i2c subdevs
Instead of using the wis-* drivers we now use the standard 'proper' subdev
drivers.
The board configuration tables now also list the possible audio inputs,
this will be used later to implement audio inputs.
Special mention deserves a little change in set_capture_size() where the
height passed to s_mbus_fmt is doubled: that is because the saa7115 driver
expects to see the frame height, not the field height as the wis_saa7115
driver did.
Another change is that the tuner input is moved from last to the first
input, which is consistent with the common practice in other video drivers.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:33:44 -03:00
Volokh Konstantin dcafb6dea6 [media] go7007: i2c initialization changes for tw2804
Do i2c initialization via struct item as tw2804 has a 0x00 i2c address,
so we need to use the I2C_CLIENT_TEN flag for validity.

Signed-off-by: Volokh Konstantin <volokh84@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:31:51 -03:00
Hans Verkuil e4d2a6162d [media] tuner: add Sony BTF tuners
This adds support for three Sony BTF tuners:
TUNER_SONY_BTF_PG472Z: PAL+SECAM
TUNER_SONY_BTF_PK467Z: NTSC-M-JP
TUNER_SONY_BTF_PB463Z: NTSC-M
These come from the go7007 staging driver where they were implemented in
the wis-sony-tuner i2c driver.
Adding support for these tuners to tuner-types.c is the first step towards
removing the wis-sony-tuner driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:11:35 -03:00
Hans Verkuil ffb9749346 [media] go7007: fix i2c_xfer return codes
The i2c_xfer functions didn't return the proper error codes and (especially
important) on success they returned 0 instead of the number of transferred
messages.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 12:10:36 -03:00
Hans Verkuil 314527acbb [media] v4l2: pass std by value to the write-only s_std ioctl
This ioctl is defined as IOW, so pass the argument by value instead of by
reference. I could have chosen to add const instead, but this is 1) easier
to handle in drivers and 2) consistent with the s_std subdev operation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 06:47:00 -03:00
Hans Verkuil 2f73c7c582 [media] v4l2: add const to argument of write-only s_tuner ioctl
This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 06:31:23 -03:00
Hans Verkuil b530a447bb [media] v4l2: add const to argument of write-only s_frequency ioctl
This ioctl is defined as IOW, so pass the argument as const.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-24 06:25:34 -03:00
Silviu-Mihai Popescu 69aa6f4ec6 [media] drivers: staging: davinci_vpfe: use resource_size()
This uses the resource_size() function instead of explicit computation.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:35:44 -03:00
Wei Yongjun b279265cfd [media] davinci: vpfe: fix return value check in vpfe_enable_clock()
In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL. The NULL test in the return value
check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 11:28:21 -03:00
Chen Gang 1c3fc152b8 [media] drivers/staging/media/go7007: using strlcpy instead of strncpy
for NUL terminated string, need always set 0 in the end.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23 10:37:18 -03:00
Sachin Kamat 18ace0e273 [media] davinci_vpfe: Use module_platform_driver macro
module_platform_driver() eliminates the boilerplate and simplifies
the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 14:02:37 -03:00
Alexandru Gheorghiu 01c8132303 [media] Drivers: staging: media: davinci_vpfe: Use resource_size function
Use resource_size function on resource object instead of explicit
computation.

Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 13:50:00 -03:00
Ismael Luceno 70b8ff3c3d [media] solo6x10: Update TODO (maintainer change)
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 13:48:44 -03:00
Hans Verkuil 4bd3bb7129 [media] davinci_vpfe: fix copy-paste errors in several comments
This removes some incorrect dv_preset references left over from copy-and-paste
errors.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-19 16:09:18 -03:00
Chen Gang a2262508cb [media] drivers/staging/media/as102: using ccflags-y instead of EXTRA_FLAGS in Makefile
need using ccflags-y instead of EXTRA_CFLAGS
    can reference scripts/checkpatch.pl (1755..1766)
  when make EXTRA_CFLAGS=-W, the compiling issue will be occured.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18 17:16:54 -03:00