summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
AgeCommit message (Collapse)Author
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-11Merge tag 'media/v3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Two new dvb frontend drivers: mn88472 and mn88473 - A new driver for some PCIe DVBSky cards - A new remote controller driver: meson-ir - One LIRC staging driver got rewritten and promoted to mainstream: igorplugusb - A new tuner driver (m88rs6000t) - The old omap2 media driver got removed from staging. This driver uses an old DMA API and it is likely broken on recent kernels. Nobody cared enough to fix it - Media bus format moved to a separate header, as DRM will also use the definitions there - mem2mem_testdev were renamed to vim2m, in order to use the same naming convention taken by the other virtual test driver (vivid) - Added a new driver for coda SoC (coda-jpeg) - The cx88 driver got converted to use videobuf2 core - Make DMABUF export buffer to work with DMA Scatter/Gather and Vmalloc cores - Lots of other fixes, improvements and cleanups on the drivers. * tag 'media/v3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (384 commits) [media] mn88473: One function call less in mn88473_init() after error [media] mn88473: Remove uneeded check before release_firmware() [media] lirc_zilog: Deletion of unnecessary checks before vfree() [media] MAINTAINERS: Add myself as img-ir maintainer [media] img-ir: Don't set driver's module owner [media] img-ir: Depend on METAG or MIPS or COMPILE_TEST [media] img-ir/hw: Drop [un]register_decoder declarations [media] img-ir/hw: Fix potential deadlock stopping timer [media] img-ir/hw: Always read data to clear buffer [media] redrat3: ensure dma is setup properly [media] ddbridge: remove unneeded check before dvb_unregister_device() [media] si2157: One function call less in si2157_init() after error [media] tuners: remove uneeded checks before release_firmware() [media] arm: omap2: rx51-peripherals: fix build warning [media] stv090x: add an extra protetion against buffer overflow [media] stv090x: Remove an unreachable code [media] stv090x: Some whitespace cleanups [media] em28xx: checkpatch cleanup: whitespaces/new lines cleanups [media] si2168: add support for firmware files in new format [media] si2168: debug printout for firmware version ...
2014-12-04[media] img-ir: Don't set driver's module ownerJames Hogan
Don't bother setting .owner = THIS_MODULE, since it's already handled by the platform_driver_register macro. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04[media] img-ir: Depend on METAG or MIPS or COMPILE_TESTJames Hogan
The ImgTec Infrared decoder block which img-ir drives is only used in IMGWorks SoCs so far, such as the TZ1090 (Meta based) and the upcoming Pistachio (MIPS based). Therefore make the driver depend on METAG (for TZ1090) or MIPS (for Pistachio) or COMPILE_TEST (so that it is included in x86 allmodconfig builds), to avoid cluttering the Kconfig menu with drivers for hardware that isn't yet available on other platforms. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04[media] img-ir/hw: Drop [un]register_decoder declarationsJames Hogan
The img_ir_register_decoder() and img_ir_unregister_decoder() functions were dropped prior to the img-ir driver being applied to simplify the protocol decoder setup. However the declarations of these functions in img-ir-hw.h were still included. Delete them since they're completely unused. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04[media] img-ir/hw: Fix potential deadlock stopping timerJames Hogan
The end timer is used for switching back from repeat code timings when no repeat codes have been received for a certain amount of time. When the protocol is changed, the end timer is deleted synchronously with del_timer_sync(), however this takes place while holding the main spin lock, and the timer handler also needs to acquire the spin lock. This opens the possibility of a deadlock on an SMP system if the protocol is changed just as the repeat timer is expiring. One CPU could end up in img_ir_set_decoder() holding the lock and waiting for the end timer to complete, while the other CPU is stuck in the timer handler spinning on the lock held by the first CPU. Lockdep also spots a possible lock inversion in the same code, since img_ir_set_decoder() acquires the img-ir lock before the timer lock, but the timer handler will try and acquire them the other way around: ========================================================= [ INFO: possible irq lock inversion dependency detected ] 3.18.0-rc5+ #957 Not tainted --------------------------------------------------------- swapper/0/0 just changed the state of lock: (((&hw->end_timer))){+.-...}, at: [<4006ae5c>] _call_timer_fn+0x0/0xfc but this lock was taken by another, HARDIRQ-safe lock in the past: (&(&priv->lock)->rlock#2){-.....} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(((&hw->end_timer))); local_irq_disable(); lock(&(&priv->lock)->rlock#2); lock(((&hw->end_timer))); <Interrupt> lock(&(&priv->lock)->rlock#2); *** DEADLOCK *** This is fixed by releasing the main spin lock while performing the del_timer_sync() call. The timer is prevented from restarting before the lock is reacquired by a new "stopping" flag which img_ir_handle_data() checks before updating the timer. --------------------------------------------------------- swapper/0/0 just changed the state of lock: (((&hw->end_timer))){+.-...}, at: [<4006ae5c>] _call_timer_fn+0x0/0xfc but this lock was taken by another, HARDIRQ-safe lock in the past: (&(&priv->lock)->rlock#2){-.....} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(((&hw->end_timer))); local_irq_disable(); lock(&(&priv->lock)->rlock#2); lock(((&hw->end_timer))); <Interrupt> lock(&(&priv->lock)->rlock#2); *** DEADLOCK *** This is fixed by releasing the main spin lock while performing the del_timer_sync() call. The timer is prevented from restarting before the lock is reacquired by a new "stopping" flag which img_ir_handle_data() checks before updating the timer. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Sifan Naeem <sifan.naeem@imgtec.com> Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04[media] img-ir/hw: Always read data to clear bufferDylan Rajaratnam
A problem was found on Polaris where if the unit it booted via the power button on the infrared remote then the next button press on the remote would return the key code used to power on the unit. The sequence is: - The polaris powered off but with the powerdown controller (PDC) block still powered. - Press power key on remote, IR block receives the key. - Kernel starts, IR code is in IMG_IR_DATA_x but neither IMG_IR_RXDVAL or IMG_IR_RXDVALD2 are set. - Wait any amount of time. - Press any key. - IMG_IR_RXDVAL or IMG_IR_RXDVALD2 is set but IMG_IR_DATA_x is unchanged since the powerup key data was never read. This is worked around by always reading the IMG_IR_DATA_x in img_ir_set_decoder(), rather than only when the IMG_IR_RXDVAL or IMG_IR_RXDVALD2 bit is set. Signed-off-by: Dylan Rajaratnam <dylan.rajaratnam@imgtec.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04[media] redrat3: ensure dma is setup properlySean Young
This fixes the driver on arm. Reported-by: Steven Guitton <keltiek@gmail.com> Tested-by: Steven Guitton <keltiek@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-26[media] media: rc: add driver for Amlogic Meson IR remote receiverBeniamino Galvani
Amlogic Meson SoCs include a infrared remote control receiver that can operate in two modes: "NEC" mode in which the hardware decodes frames using the NEC IR protocol, and "general" mode in which the receiver simply reports the duration of pulses and spaces for software decoding. This is a driver for the IR receiver that implements software decoding of received frames. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Acked-by: Carlo Caione <carlo@caione.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25[media] rc: Deletion of unnecessary checks before two function callsMarkus Elfring
The functions input_free_device() and rc_close() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21[media] rc-core: fix toggle handling in the rc6 decoderDavid Härdeman
The toggle bit shouldn't be cleared before the toggle value is calculated. This should probably go into 3.17.x as well. Fixes: 120703f9eb32 ([media] rc-core: document the protocol type) Cc: stable@vger.kernel.org # For v3.17 Tested-by: Stephan Raue <mailinglists@openelec.tv> Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-11Merge tag 'v3.18-rc4' into patchworkMauro Carvalho Chehab
Needed due to some important regression fixes at RC core. * commit 'v3.18-rc4': (587 commits) Linux 3.18-rc4 ARM: dts: zynq: Enable PL clocks for Parallella tiny: rename ENABLE_DEV_COREDUMP to ALLOW_DEV_COREDUMP tiny: reverse logic for DISABLE_DEV_COREDUMP i2c: core: Dispose OF IRQ mapping at client removal time i2c: at91: don't account as iowait i2c: remove FSF address USB: Update default usb-storage delay_use value in kernel-parameters.txt sysfs: driver core: Fix glue dir race condition by gdp_mutex MIPS: Fix build with binutils 2.24.51+ xfs: track bulkstat progress by agino xfs: bulkstat error handling is broken xfs: bulkstat main loop logic is a mess xfs: bulkstat chunk-formatter has issues xfs: bulkstat chunk formatting cursor is broken xfs: bulkstat btree walk doesn't terminate mm: Fix comment before truncate_setsize() USB: cdc-acm: add quirk for control-line state requests tty: Fix pty master poll() after slave closes v2 MIPS: R3000: Fix debug output for Virtual page number ... Conflicts: drivers/media/rc/rc-main.c
2014-11-05[media] rc-main: Fix rc_type handlingMauro Carvalho Chehab
As reported by smatch: drivers/media/rc/rc-main.c:1426 rc_register_device() warn: should '1 << rc_map->rc_type' be a 64 bit type? Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-04[media] media/rc: Send sync space information on the lirc deviceAustin Lund
Userspace expects to see a long space before the first pulse is sent on the lirc device. Currently, if a long time has passed and a new packet is started, the lirc codec just returns and doesn't send anything. This makes lircd ignore many perfectly valid signals unless they are sent in quick sucession. When a reset event is delivered, we cannot know anything about the duration of the space. But it should be safe to assume it has been a long time and we just set the duration to maximum. Signed-off-by: Austin Lund <austin.lund@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] rc: port IgorPlug-USB to rc-coreSean Young
This is a complete re-write inspired by the original lirc driver. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] imon: fix other RC type protocol supportUlrich Eckhardt
With kernel 3.17 the imon remote control for device 15c2:0034 does not work anymore, which uses the OTHER protocol. Only the front panel buttons which uses the RC6 protocol are working. Adds the missing comparison for the RC_BIT_OTHER. Cc: stable@vger.kernel.org # for Kernel 3.17 Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] ir-hix5hd2 fix build warningZhangfei Gao
Change CONFIG_PM to CONFIG_PM_SLEEP to solve warning: 'hix5hd2_ir_suspend' & 'hix5hd2_ir_resume' defined but not used Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] rc-main: fix lockdep splash for rc-mainTomas Melin
lockdep reports a potential circular dependecy deadlock when registering input device. Unlock mutex rc_dev->lock prior to calling ir_raw_event_register to avoid the circular dependency since that function also calls input_register_device and rc_open. ====================================================== [ INFO: possible circular locking dependency detected ] 3.17.0-rc7+ #24 Not tainted ------------------------------------------------------- modprobe/647 is trying to acquire lock: (input_mutex){+.+.+.}, at: [<ffffffff812ed81c>] input_register_device+0x2ba/0x381 but task is already holding lock: (ir_raw_handler_lock){+.+.+.}, at: [<ffffffff813186ed>] ir_raw_event_register+0x102/0x190 which lock already depends on the new lock. [cut text] other info that might help us debug this: Chain exists of: input_mutex --> &dev->lock --> ir_raw_handler_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ir_raw_handler_lock); lock(&dev->lock); lock(ir_raw_handler_lock); lock(input_mutex); *** DEADLOCK *** 4 locks held by modprobe/647: #0: (&dev->mutex){......}, at: [<ffffffff812d19f3>] device_lock+0xf/0x11 #1: (&dev->mutex){......}, at: [<ffffffff812d19f3>] device_lock+0xf/0x11 #2: (&dev->lock){+.+.+.}, at: [<ffffffff81317fff>] rc_register_device+0x55d/0x58a #3: (ir_raw_handler_lock){+.+.+.}, at: [<ffffffff813186ed>] ir_raw_event_register+0x102/0x190 stack backtrace: CPU: 0 PID: 647 Comm: modprobe Not tainted 3.17.0-rc7+ #24 Call Trace: [<ffffffff81489d6a>] dump_stack+0x46/0x58 [<ffffffff81487699>] print_circular_bug+0x1f8/0x209 [<ffffffff81074353>] __lock_acquire+0xb54/0xeda [<ffffffff81080f17>] ? console_unlock+0x34d/0x399 [<ffffffff81074c01>] lock_acquire+0xd9/0x111 [<ffffffff812ed81c>] ? input_register_device+0x2ba/0x381 [<ffffffff8148e650>] mutex_lock_interruptible_nested+0x57/0x381 [<ffffffff812ed81c>] ? input_register_device+0x2ba/0x381 [<ffffffff81124e03>] ? kfree+0x7c/0x96 [<ffffffff812ed81c>] ? input_register_device+0x2ba/0x381 [<ffffffff81072531>] ? trace_hardirqs_on+0xd/0xf [<ffffffff812ed81c>] input_register_device+0x2ba/0x381 [<ffffffff8131a537>] ir_mce_kbd_register+0x109/0x139 [<ffffffff81318728>] ir_raw_event_register+0x13d/0x190 [<ffffffff81317e40>] rc_register_device+0x39e/0x58a [<ffffffff81072531>] ? trace_hardirqs_on+0xd/0xf [<ffffffffa00cf2e3>] nvt_probe+0x5ad/0xd52 [nuvoton_cir] [<ffffffffa00ced36>] ? nvt_resume+0x80/0x80 [nuvoton_cir] [<ffffffff81296003>] pnp_device_probe+0x8c/0xa9 [<ffffffff812d1b94>] ? driver_sysfs_add+0x6e/0x93 [<ffffffff812d203a>] driver_probe_device+0xa1/0x1e3 [<ffffffff812d217c>] ? driver_probe_device+0x1e3/0x1e3 [<ffffffff812d21ca>] __driver_attach+0x4e/0x6f [<ffffffff812d075b>] bus_for_each_dev+0x5a/0x8c [<ffffffff812d1b24>] driver_attach+0x19/0x1b [<ffffffff812d1879>] bus_add_driver+0xf1/0x1d6 [<ffffffff812d2817>] driver_register+0x87/0xbe [<ffffffffa0120000>] ? 0xffffffffa0120000 [<ffffffff81295da4>] pnp_register_driver+0x1c/0x1e [<ffffffffa0120010>] nvt_init+0x10/0x1000 [nuvoton_cir] [<ffffffff8100030e>] do_one_initcall+0xea/0x18c [<ffffffff8111497f>] ? __vunmap+0x9d/0xc7 [<ffffffff810a3ca1>] load_module+0x1c21/0x1f2c [<ffffffff810a0bce>] ? show_initstate+0x44/0x44 [<ffffffff810a404e>] SyS_init_module+0xa2/0xb1 [<ffffffff81490ed2>] system_call_fastpath+0x16/0x1b Signed-off-by: Tomas Melin <tomas.melin@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] rc5-decoder: BZ#85721: Fix RC5-SZ decodingMauro Carvalho Chehab
Changeset e87b540be2dd broke RC5-SZ decoding, as it forgot to add the extra bit check for the enabled protocols at the beginning of the logic. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] rc-core: fix protocol_change regression in ir_raw_event_registerTomas Melin
IR receiver using nuvoton-cir and lirc required additional configuration steps after upgrade from kernel 3.16 to 3.17-rcX. Bisected regression to commit da6e162d6a4607362f8478c715c797d84d449f8b ("[media] rc-core: simplify sysfs code"). The regression comes from adding function change_protocol in ir-raw.c. It changes behaviour so that only the protocol enabled by driver's map_name will be active after registration. This breaks user space behaviour, lirc does not get key press signals anymore. Enable lirc protocol by default for ir raw decoders to restore original behaviour. Cc: stable@vger.kernel.org # for v3.17 Signed-off-by: Tomas Melin <tomas.melin@iki.fi> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-20media: rc: img-ir: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20media: rc: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-10Merge tag 'media/v3.18-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new IR driver: hix5hd2-ir - the virtual test driver (vivi) was replaced by vivid, with has an almost complete set of features to emulate most v4l2 devices and properly test all sorts of userspace apps - the as102 driver had several bugs fixed and was properly split into a frontend and a core driver. With that, it got promoted from staging into mainstream - one new CI driver got added for CIMaX SP2/SP2HF (sp2 driver) - one new frontend driver for Toshiba ISDB-T/ISDB-S demod (tc90522) - one new PCI driver for ISDB-T/ISDB-S (pt3 driver) - saa7134 driver got support for go7007-based devices - added a new PCI driver for Techwell 68xx chipsets (tw68) - a new platform driver was added (coda) - new tuner drivers: mxl301rf and qm1d1c0042 - a new DVB USB driver was added for DVBSky S860 & similar devices - added a new SDR driver (hackrf) - usbtv got audio support - several platform drivers are now compiled with COMPILE_TEST - a series of compiler fixup patches, making sparse/spatch happier with the media stuff and removing several warnings, especially on those platform drivers that didn't use to compile on x86 - Support for several new modern devices got added - lots of other fixes, improvements and cleanups * tag 'media/v3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (544 commits) [media] ir-hix5hd2: fix build on c6x arch [media] pt3: fix DTV FE I2C driver load error paths Revert "[media] media: em28xx - remove reset_resume interface" [media] exynos4-is: fix some warnings when compiling on arm64 [media] usb drivers: use %zu instead of %zd [media] pci drivers: use %zu instead of %zd [media] dvb-frontends: use %zu instead of %zd [media] s5p-mfc: Fix several printk warnings [media] s5p_mfc_opr: Fix warnings [media] ti-vpe: Fix typecast [media] s3c-camif: fix dma_addr_t printks [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 [media] em28xx: Fix identation [media] drxd: remove a dead code [media] saa7146: remove return after BUG() [media] cx88: remove return after BUG() [media] cx88: fix cards table CodingStyle [media] radio-sf16fmr2: declare some structs as static [media] radio-sf16fmi: declare pnp_attached as static ...
2014-10-09[media] ir-hix5hd2: fix build on c6x archMauro Carvalho Chehab
While not all archs have readl_relaxed, we need to add a hack at the driver to allow it to COMPILE_TEST on all archs: drivers/media/rc/ir-hix5hd2.c: In function ‘hix5hd2_ir_config’: drivers/media/rc/ir-hix5hd2.c:100:2: error: implicit declaration of function ‘readl_relaxed’ [-Werror=implicit-function-declaration] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-03Documentation: fix broken v4l-utils URLMichael Opdenacker
This replaces http://git.linuxtv.org/v4l-utils/ (broken link) by http://git.linuxtv.org/cgit.cgi/v4l-utils.git/ Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-26[media] st_rc: fix address space castingMauro Carvalho Chehab
drivers/media/rc/st_rc.c:107:38: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/st_rc.c:107:38: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:107:38: got void * drivers/media/rc/st_rc.c:110:53: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/st_rc.c:110:53: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:110:53: got void * drivers/media/rc/st_rc.c:116:54: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:116:54: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:116:54: got void * drivers/media/rc/st_rc.c:120:45: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/st_rc.c:120:45: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:120:45: got void * drivers/media/rc/st_rc.c:121:43: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/st_rc.c:121:43: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:121:43: got void * drivers/media/rc/st_rc.c:150:46: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/st_rc.c:150:46: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:150:46: got void * drivers/media/rc/st_rc.c:153:42: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:153:42: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:153:42: got void * drivers/media/rc/st_rc.c:174:32: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:174:32: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:174:32: got void * drivers/media/rc/st_rc.c:177:48: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:177:48: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:177:48: got void * drivers/media/rc/st_rc.c:187:48: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:187:48: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:187:48: got void * drivers/media/rc/st_rc.c:204:42: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:204:42: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:204:42: got void * drivers/media/rc/st_rc.c:205:35: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:205:35: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:205:35: got void * drivers/media/rc/st_rc.c:215:35: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:215:35: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:215:35: got void * drivers/media/rc/st_rc.c:216:35: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:216:35: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:216:35: got void * drivers/media/rc/st_rc.c:269:22: warning: incorrect type in assignment (different address spaces) drivers/media/rc/st_rc.c:269:22: expected void *base drivers/media/rc/st_rc.c:269:22: got void [noderef] <asn:2>* drivers/media/rc/st_rc.c:349:46: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:349:46: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:349:46: got void * drivers/media/rc/st_rc.c:350:46: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:350:46: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:350:46: got void * drivers/media/rc/st_rc.c:371:61: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:371:61: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:371:61: got void * drivers/media/rc/st_rc.c:372:54: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/st_rc.c:372:54: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/st_rc.c:372:54: got void * Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] ir-hix5hd2: fix address space castingMauro Carvalho Chehab
drivers/media/rc/ir-hix5hd2.c:99:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:99:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:99:41: got void * drivers/media/rc/ir-hix5hd2.c:100:16: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:100:16: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:100:16: got void * drivers/media/rc/ir-hix5hd2.c:117:40: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:117:40: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:117:40: got void * drivers/media/rc/ir-hix5hd2.c:119:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:119:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:119:41: got void * drivers/media/rc/ir-hix5hd2.c:121:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:121:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:121:41: got void * drivers/media/rc/ir-hix5hd2.c:147:18: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:147:18: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:147:18: got void * drivers/media/rc/ir-hix5hd2.c:155:28: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:155:28: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:155:28: got void * drivers/media/rc/ir-hix5hd2.c:157:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:157:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:157:25: got void * drivers/media/rc/ir-hix5hd2.c:159:61: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:159:61: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:159:61: got void * drivers/media/rc/ir-hix5hd2.c:167:28: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:167:28: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:167:28: got void * drivers/media/rc/ir-hix5hd2.c:169:36: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/ir-hix5hd2.c:169:36: expected void const volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:169:36: got void * drivers/media/rc/ir-hix5hd2.c:188:64: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:188:64: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:188:64: got void * drivers/media/rc/ir-hix5hd2.c:190:68: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:190:68: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:190:68: got void * drivers/media/rc/ir-hix5hd2.c:220:20: warning: incorrect type in assignment (different address spaces) drivers/media/rc/ir-hix5hd2.c:220:20: expected void *base drivers/media/rc/ir-hix5hd2.c:220:20: got void [noderef] <asn:2>* drivers/media/rc/ir-hix5hd2.c:315:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:315:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:315:41: got void * drivers/media/rc/ir-hix5hd2.c:316:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:316:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:316:41: got void * drivers/media/rc/ir-hix5hd2.c:317:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:317:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:317:41: got void * drivers/media/rc/ir-hix5hd2.c:318:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/rc/ir-hix5hd2.c:318:41: expected void volatile [noderef] <asn:2>*addr drivers/media/rc/ir-hix5hd2.c:318:41: got void * Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] media: st-rc: Remove .owner field for driverSrinivas Kandagatla
There is no need to init .owner field. Based on the patch from Peter Griffin <peter.griffin@linaro.org> "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Acked-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] media: st-rc: move pm ops setup out of conditional compilationSrinivas Kandagatla
This patch moves setting of pm_ops out of the CONFIG_PM_SLEEP condition. Setting pm ops under CONFIG_PM_SLEEP does not make any sense. This patch also remove unnecessary also remove CONFIG_PM condition for pm member in st_rc_driver structure. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] media: st-rc: move to using reset_control_get_optionalSrinivas Kandagatla
This patch fixes a compilation error while building with the random kernel configuration. drivers/media/rc/st_rc.c: In function 'st_rc_probe': drivers/media/rc/st_rc.c:281:2: error: implicit declaration of function 'reset_control_get' [-Werror=implicit-function-declaration] rc_dev->rstc = reset_control_get(dev, NULL); drivers/media/rc/st_rc.c:281:15: warning: assignment makes pointer from integer without a cast [enabled by default] rc_dev->rstc = reset_control_get(dev, NULL); Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] rc: Introduce hix5hd2 IR transmitter driverGuoxiong Yan
IR transmitter driver for Hisilicon hix5hd2 soc By default all protocols are disabled. For example nec decoder can be enabled by either 1. ir-keytable -p nec 2. echo nec > /sys/class/rc/rc0/protocols See see Documentation/ABI/testing/sysfs-class-rc [mchehab@osg.samsung.com: Add a fixup for the driver to compile on archs that don't provide writel_relaxed() macro] Signed-off-by: Guoxiong Yan <yanguoxiong@huawei.com> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] rc: add a map for DVBSky devices.nibble.max
This is a RC5 remote controller map for DVBSky S860/960 devices. Signed-off-by: Nibble Max <nibble.max@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] imon: fix usbdev leaksAlexey Khoroshilov
imon_probe() does three usb_get_dev(), but there is no any usb_put_dev() in the driver. The patch adds usb_put_dev() to error paths, to imon_disconnect() and to imon_probe() as far as usbdev is not saved anywhere. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] mceusb: fix usbdev leakAlexey Khoroshilov
mceusb_init_rc_dev() does usb_get_dev(), but there is no any usb_put_dev() in the driver. The patch tries to straighten logic. It moves usb_get_dev() directly to mceusb_dev_probe() and adds usb_put_dev() to an error path and to mceusb_dev_disconnect(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] mceusb: add support for more cx231xx devicesMatthias Schwarzott
Add support for the si2161-based cx231xx devices: [2040:b138] Hauppauge WinTV HVR-900-H (model 111xxx) [2040:b139] Hauppauge WinTV HVR-901-H (model 1114xx) They're similar to the already supported: [2040:b130] Hauppauge WinTV 930C-HD (model 1113xx) Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] rc-core: use USB API functions rather than constantsHimangi Saraogi
This patch introduces the use of !usb_endpoint_dir_in(epd) and !usb_endpoint_xfer_int(epd). The Coccinelle semantic patch that makes these changes is as follows: - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) != - \(USB_DIR_IN\|0x80\)) + !usb_endpoint_dir_in(epd) @@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) != - \(USB_ENDPOINT_XFER_INT\|3\)) + !usb_endpoint_xfer_int(epd) Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] media/rc/imon.c: use USB API functions rather than constantsHimangi Saraogi
This patch introduces the use of the function usb_endpoint_type. The Coccinelle semantic patch that makes these changes is as follows: @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-03[media] nuvoton-cir: just return 0 instead of using a varMauro Carvalho Chehab
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] ite-cir: just return 0 instead of using a varMauro Carvalho Chehab
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] fintek-cir: just return 0 instead of using a varMauro Carvalho Chehab
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] ene_ir: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] lirc_dev: fix sparse warningsHans Verkuil
drivers/media/rc/lirc_dev.c:598:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:606:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:616:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:625:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:634:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:643:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:739:45: warning: cast removes address space of expression drivers/media/rc/lirc_dev.c:739:58: warning: incorrect type in argument 1 (different address spaces) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] imon: fix sparse warningsHans Verkuil
drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] img-ir: fix sparse warningsHans Verkuil
drivers/media/rc/img-ir/img-ir-nec.c:111:23: warning: symbol 'img_ir_nec' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-jvc.c:54:23: warning: symbol 'img_ir_jvc' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-sony.c:120:23: warning: symbol 'img_ir_sony' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-sharp.c:75:23: warning: symbol 'img_ir_sharp' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-sanyo.c:82:23: warning: symbol 'img_ir_sanyo' was not declared. Should it be static? Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] enable COMPILE_TEST for media driversMauro Carvalho Chehab
There are several arch-specific media drivers that don't require asm-specific includes and can be successfully compiled on x86. Add COMPILE_TEST dependency for them, in order to allow a broader test on those drivers. That helps static analysis tools like Coverity to discover eventual troubles there. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21[media] imon: Fix not working front panelUlrich Eckhardt
Make the front panel buttons working after another button on the remote was pressed. Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21[media] imon: Add internal key table for 15c2:0034Ulrich Eckhardt
Add the key table for the Thermaltake DH-102 to the USB-Id 15c2:0034. Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21[media] imon: Define keytables per USB Device IdUlrich Eckhardt
This patch defines the keytables per USB Device ID. Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] ir-rc5-decoder: print where decoding failsMauro Carvalho Chehab
The IR dprintk message that prints a RC5 decoding failure is not much helpful, as it doesn't tell on what bit the error occurred. Add such information, in order to make the debug message more useful. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] rc-main: allow raw protocol drivers to restrict the allowed protosMauro Carvalho Chehab
On some hardware (au0828/au8522), the hardware is broken with regards to the initial pulse detection. So, the driver needs to produce a fake start pulse. That limits the acceptable protocols, as it is not possible to produce a fake pulse that would cover all supported protocols. So, allow the driver to explicitly set the allowed protocols. If the driver doesn't specify, keep the old behavior. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>