summaryrefslogtreecommitdiff
path: root/drivers/media/rc
AgeCommit message (Collapse)Author
2017-03-18rc: raw decoder for keymap protocol is not loaded on registerSean Young
commit 413808685dd7c9b54bbc5af79da2eaddd0fc3cb2 upstream. When the protocol is set via the sysfs protocols attribute, the decoder is loaded. However, when it is not when a device is first plugged in or registered. Fixes: acc1c3c ("[media] media: rc: load decoder modules on-demand") Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12lirc_dev: LIRC_{G,S}ET_REC_MODE do not workSean Young
commit bd291208d7f5d6b2d6a033fee449a429230b06df upstream. Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these ioctls no longer work. Signed-off-by: Sean Young <sean@mess.org> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-26ite-cir: initialize use_demodulator before using itNicolas Iooss
commit 7ec03e60ef81c19b5d3a46dd070ee966774b860f upstream. Function ite_set_carrier_params() uses variable use_demodulator after having initialized it to false in some if branches, but this variable is never set to true otherwise. This bug has been found using clang -Wsometimes-uninitialized warning flag. Fixes: 620a32bba4a2 ("[media] rc: New rc-based ite-cir driver for several ITE CIRs") Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-11Merge tag 'media/v4.9-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Documentation improvements: conversion of all non-DocBook documents to Sphinx and lots of fixes to the uAPI media book - New PCI driver for Techwell TW5864 media grabber boards - New SoC driver for ATMEL Image Sensor Controller - Removal of some obsolete SoC drivers (s5p-tv driver and soc_camera drivers) - Addition of ST CEC driver - Lots of drivers fixes, improvements and additions * tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits) [media] ttusb_dec: avoid the risk of go past buffer [media] cx23885: Fix some smatch warnings [media] si2165: switch to regmap [media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging [media] si2165: Remove legacy attach [media] cx231xx: attach si2165 driver via i2c_client [media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers [media] cx23885: attach si2165 driver via i2c_client [media] si2165: support i2c_client attach [media] si2165: avoid division by zero [media] rcar-vin: add R-Car gen2 fallback compatibility string [media] lgdt3306a: remove 20*50 msec unnecessary timeout [media] cx25821: Remove deprecated create_singlethread_workqueue [media] cx25821: Drop Freeing of Workqueue [media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported [media] redrat3: hardware-specific parameters [media] redrat3: remove hw_timeout member [media] cxd2841er: BER and SNR reading for ISDB-T [media] dvb-usb: avoid link error with dib3000m{b,c| [media] dvb-usb: split out common parts of dibusb ...
2016-10-08Merge tag 'armsoc-drivers' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "Driver updates for ARM SoCs, including a couple of newly added drivers: - The Qualcomm external bus interface 2 (EBI2), used in some of their mobile phone chips for connecting flash memory, LCD displays or other peripherals - Secure monitor firmware for Amlogic SoCs, and an NVMEM driver for the EFUSE based on that firmware interface. - Perf support for the AppliedMicro X-Gene performance monitor unit - Reset driver for STMicroelectronics STM32 - Reset driver for SocioNext UniPhier SoCs Aside from these, there are minor updates to SoC-specific bus, clocksource, firmware, pinctrl, reset, rtc and pmic drivers" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (50 commits) bus: qcom-ebi2: depend on HAS_IOMEM pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181 clk: mvebu: Add clk support for the orion5x SoC mv88f5181 dt-bindings: EXYNOS: Add Exynos5433 PMU compatible clocksource: exynos_mct: Add the support for ARM64 perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Documentation: Add documentation for APM X-Gene SoC PMU DTS binding MAINTAINERS: Add entry for APM X-Gene SoC PMU driver bus: qcom: add EBI2 driver bus: qcom: add EBI2 device tree bindings rtc: rtc-pm8xxx: Add support for pm8018 rtc nvmem: amlogic: Add Amlogic Meson EFUSE driver firmware: Amlogic: Add secure monitor driver soc: qcom: smd: Reset rx tail rather than tx memory: atmel-sdramc: fix a possible NULL dereference reset: hi6220: allow to compile test driver on other architectures reset: zynq: add driver Kconfig option reset: sunxi: add driver Kconfig option reset: stm32: add driver Kconfig option reset: socfpga: add driver Kconfig option ...
2016-09-22[media] redrat3: hardware-specific parametersSean Young
Add these options as module parameters for now; should other drivers need similar options we could add it to the LIRC api. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] redrat3: remove hw_timeout memberSean Young
This is a duplicate of the timeout in rc_dev. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] rc: split nec protocol into its three variantsSean Young
Currently we do not know what variant (bit length) of the nec protocol is used, other than from guessing from the length of the scancode. Now nec will be handled the same way as the sony protocol or the rc6 protocol; one variant per bit length. In the future we might want to expose the rc protocol type to userspace and we don't want to be introducing this world of pain into userspace too. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] rc: rc6 decoder should report protocol correctlySean Young
When reporting decoded protocol use the enum rather than the bitmap. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] media: rc: nuvoton: simplify nvt_get_rx_ir_data a littleHeiner Kallweit
Simplify the code a little. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] media: rc: nuvoton: remove unneeded call to ir_raw_event_handleHeiner Kallweit
ir_raw_event_handle is called anyway after the hw fifo content stored in nvt->buf[] has been written to the kfifo. There is not really a benefit in the potential additional call to ir_raw_event_handle whilst nvt->buf[] is being processed. Getting rid of this additional call allows to simplify the code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] media: rc: nuvoton: remove usage of b_idx in nvt_get_rx_ir_dataHeiner Kallweit
The call to nvt_get_rx_ir_data and nvt_process_rx_ir_data from the ISR is protected with spinlock nvt->lock. Therefore it's guaranteed that nvt->pkts is 0 when entering nvt_get_rx_ir_data (as nvt->pkts is set to 0 at the end of nvt_process_rx_ir_data). Having said that we can remove b_idx. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] media: rc: nuvoton: ignore spurious interrupt when logical device is ↵Heiner Kallweit
being disabled When removing module nuvoton-cir I get a fifo overrun warning. It turned out to be caused by a spurious interrupt when the logical CIR device is being disabled (although no interrupt source bit being set). Reading the interrupt status register returns 0xff, therefore the fifo overrun bit is mistakenly interpreted as being set. Fix this by ignoring interrupts when interrupt source and status register reads return 0xff. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] media: rc: fix deadlock when module ir_lirc_codec is removedHeiner Kallweit
When removing module ir_lirc_codec I got this deadlock warning. Fix this by introducing a separate mutex to protect access to available_protocols instead of using ir_raw_handler_lock for this purpose. ====================================================== [ INFO: possible circular locking dependency detected ] 4.7.0-next-20160729 #1 Not tainted ------------------------------------------------------- rmmod/2542 is trying to acquire lock: (&dev->lock){+.+.+.}, at: [<ffffffffa03b1267>] ir_raw_handler_unregister+0x77/0xd0 [rc_core] but task is already holding lock: (ir_raw_handler_lock){+.+.+.}, at: [<ffffffffa03b1212>] ir_raw_handler_unregister+0x22/0xd0 [rc_core] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (ir_raw_handler_lock){+.+.+.}: [<ffffffff810ab1f2>] lock_acquire+0xb2/0x1e0 [<ffffffff815c087f>] mutex_lock_nested+0x5f/0x360 [<ffffffffa03b1403>] ir_raw_get_allowed_protocols+0x13/0x30 [rc_core] [<ffffffffa03af8ea>] store_protocols+0x2fa/0x480 [rc_core] [<ffffffff8143e143>] dev_attr_store+0x13/0x20 [<ffffffff81213c50>] sysfs_kf_write+0x40/0x50 [<ffffffff81212f60>] kernfs_fop_write+0x150/0x1e0 [<ffffffff81197613>] __vfs_write+0x23/0x120 [<ffffffff81198740>] vfs_write+0xb0/0x190 [<ffffffff81199a34>] SyS_write+0x44/0xa0 [<ffffffff815c55a5>] entry_SYSCALL_64_fastpath+0x18/0xa8 -> #0 (&dev->lock){+.+.+.}: [<ffffffff810aac8c>] __lock_acquire+0x10fc/0x1270 [<ffffffff810ab1f2>] lock_acquire+0xb2/0x1e0 [<ffffffff815c087f>] mutex_lock_nested+0x5f/0x360 [<ffffffffa03b1267>] ir_raw_handler_unregister+0x77/0xd0 [rc_core] [<ffffffffa03c8c05>] ir_lirc_codec_exit+0x10/0x12 [ir_lirc_codec] [<ffffffff810e1b88>] SyS_delete_module+0x168/0x220 [<ffffffff815c55a5>] entry_SYSCALL_64_fastpath+0x18/0xa8 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ir_raw_handler_lock); lock(&dev->lock); lock(ir_raw_handler_lock); lock(&dev->lock); *** DEADLOCK *** 1 lock held by rmmod/2542: #0: (ir_raw_handler_lock){+.+.+.}, at: [<ffffffffa03b1212>] ir_raw_handler_unregister+0x22/0xd0 [rc_core] stack backtrace: CPU: 0 PID: 2542 Comm: rmmod Not tainted 4.7.0-next-20160729 #1 Hardware name: ZOTAC ZBOX-CI321NANO/ZBOX-CI321NANO, BIOS B246P105 06/01/2015 0000000000000000 ffff88006e607cc0 ffffffff812715f5 ffffffff8232b230 ffffffff8232b230 ffff88006e607d00 ffffffff810a846e 00000000790107f0 ffff880079010818 ffff8800790107f0 1efeb9f4f0dd2e6f ffff880079010000 Call Trace: [<ffffffff812715f5>] dump_stack+0x68/0x93 [<ffffffff810a846e>] print_circular_bug+0x1be/0x210 [<ffffffff810aac8c>] __lock_acquire+0x10fc/0x1270 [<ffffffff810bcead>] ? debug_lockdep_rcu_enabled+0x1d/0x20 [<ffffffff810ab1f2>] lock_acquire+0xb2/0x1e0 [<ffffffffa03b1267>] ? ir_raw_handler_unregister+0x77/0xd0 [rc_core] [<ffffffff815c087f>] mutex_lock_nested+0x5f/0x360 [<ffffffffa03b1267>] ? ir_raw_handler_unregister+0x77/0xd0 [rc_core] [<ffffffff810a980e>] ? trace_hardirqs_on_caller+0xee/0x1b0 [<ffffffffa03b1267>] ir_raw_handler_unregister+0x77/0xd0 [rc_core] [<ffffffffa03c8c05>] ir_lirc_codec_exit+0x10/0x12 [ir_lirc_codec] [<ffffffff810e1b88>] SyS_delete_module+0x168/0x220 [<ffffffff815c55a5>] entry_SYSCALL_64_fastpath+0x18/0xa8 Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-22[media] Partly revert "[media] rc-core: allow calling rc_open with device ↵Ole Ernst
not initialized" This partly reverts commit 078600f514a12fd763ac84c86af68ef5b5267563. Due to the relocation of input_register_device() call, holding down a button on an IR remote no longer resulted in repeated key down events. Signed-off-by: Ole Ernst <olebowle@gmx.com> Tested-by: Matthias Reichl <hias@horus.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19[media] rc/streamzap: fix spelling mistake "sumbiting" -> "submitting"Colin Ian King
Trivial fix to spelling mistake in dev_err message. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-30media: rc: redrat3: don't print error when allocating urb failsWolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-30media: rc: imon: don't print error when allocating urb failsWolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-29media: rc: meson-ir: Add support for newer versions of the IR decoderNeil Armstrong
Newer SoCs (Meson 8b and GXBB) are using REG2 (offset 0x20) instead of REG1 to configure the decoder mode. This makes it necessary to introduce new bindings so the driver knows which register has to be used. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
2016-08-25[media] redrat3: fix sparse warningHans Verkuil
Fix this sparse warning: drivers/media/rc/redrat3.c:490:18: warning: incorrect type in assignment (different base types) drivers/media/rc/redrat3.c:495:9: warning: cast to restricted __be32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24[media] media: rc: redrat3: don't print error when allocating urb failsWolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24[media] media: rc: imon: don't print error when allocating urb failsWolfram Sang
kmalloc will print enough information in case of failure. Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-01Merge tag 'armsoc-drivers' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "Driver updates for ARM SoCs. A slew of changes this release cycle. The reset driver tree, that we merge through arm-soc for historical reasons, is also sizable this time around. Among the changes: - clps711x: Treewide changes to compatible strings, merged here for simplicity. - Qualcomm: SCM firmware driver cleanups, move to platform driver - ux500: Major cleanups, removal of old mach-specific infrastructure. - Atmel external bus memory driver - Move of brcmstb platform to the rest of bcm - PMC driver updates for tegra, various fixes and improvements - Samsung platform driver updates to support 64-bit Exynos platforms - Reset controller cleanups moving to devm_reset_controller_register() APIs - Reset controller driver for Amlogic Meson - Reset controller driver for Hisilicon hi6220 - ARM SCPI power domain support" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (100 commits) ARM: ux500: consolidate base platform files ARM: ux500: move soc_id driver to drivers/soc ARM: ux500: call ux500_setup_id later ARM: ux500: consolidate soc_device code in id.c ARM: ux500: remove cpu_is_u* helpers ARM: ux500: use CLK_OF_DECLARE() ARM: ux500: move l2x0 init to .init_irq mfd: db8500 stop passing around platform data ASoC: ab8500-codec: remove platform data based probe ARM: ux500: move ab8500_regulator_plat_data into driver ARM: ux500: remove unused regulator data soc: raspberrypi-power: add CONFIG_OF dependency firmware: scpi: add CONFIG_OF dependency video: clps711x-fb: Changing the compatibility string to match with the smallest supported chip input: clps711x-keypad: Changing the compatibility string to match with the smallest supported chip pwm: clps711x: Changing the compatibility string to match with the smallest supported chip serial: clps711x: Changing the compatibility string to match with the smallest supported chip irqchip: clps711x: Changing the compatibility string to match with the smallest supported chip clocksource: clps711x: Changing the compatibility string to match with the smallest supported chip clk: clps711x: Changing the compatibility string to match with the smallest supported chip ...
2016-07-15[media] redrat3: make hardware timeout configurableSean Young
Instead of hardcoding a timeout, let userspace change it dynamically by adding a s_timeout ops. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-15[media] redrat3: fix timeout handlingSean Young
The redrat3 sends an usb packet to the host either when the minimum pause or the timeout occurs, so we can always add a trailing space in our processing. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-15[media] rc: make s_tx_carrier consistentSean Young
LIRC_SET_SEND_CARRIER should return 0 on success or -errno. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-15[media] rc: make s_tx_mask consistentSean Young
When s_tx_mask is given an invalid bitmask, the number of transmitters should be returned. See the LIRC_SET_TRANSMITTER_MASK lirc ioctl documentation. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] rc: nuvoton: fix hang if chip is configured for alternative EFM IO ↵Heiner Kallweit
address If a system configures the Nuvoton chip to use the alternative EFM IO address (CR_EFIR2) then after probing the primary EFM IO address (CR_EFIR) this region is not released. If a driver for another function of the Nuvoton Super I/O chip uses the same probing mechanism then it will hang if loaded after the nuvoton-cir driver. This was reported for the nct6775 hwmon driver. Fix this by properly releasing the region after probing CR_EFIR. This regression was introduced with kernel 4.6 so cc it to stable. Reported-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Antti Seppälä <a.seppala@gmail.com> Cc: <stable@vger.kernel.org> # 4.6.x- Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: use LIRC_CAN_REC() define to check if the device can receiveAndi Shyti
The LIRC_CAN_REC() returns a boolean "flag & LIRC_CAN_REC_MASK" to check whether the device can receive data. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: fix potential segfaultAndi Shyti
When opening or closing a lirc character device, the framework provides to the user the possibility to keep track of opening or closing of the device by calling two functions: - set_use_inc() when opening the device - set_use_dec() when closing the device if those are not set by the lirc user, the system segfaults. Check the pointer value before calling the above functions. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: extremely trivial comment style fixAndi Shyti
Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: fix error return valueAndi Shyti
If ioctl is called, it cannot be a case of invalid system call number (ENOSYS), that is a ENOTTY case which means that the device doesn't support that specific ioctl command. So, replace ENOSYS with ENOTTY. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: fix variable constant comparisonsAndi Shyti
When comparing a variable with a constant, the comparison should start from the variable and not from the constant. It's also written in the human DNA. Swap the terms of comparisons whenever the constant comes first and fix the following checkpatch warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: merge three if statements in only oneAndi Shyti
The three if statements check the same thing, merge them in only one statement. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: remove double if ... else statementAndi Shyti
There are two if ... else which check the same thing in different part of the code, they can be merged in a single check. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: simplify if statement in lirc_add_to_bufAndi Shyti
The whole function is inside an 'if' statement ("if (ir->d.add_to_buf)"). Check the opposite of that statement at the beginning and exit, this way we can have one level less of indentation. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: do not use goto to create loopsAndi Shyti
... use "do .. while" instead. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: simplify goto pathsAndi Shyti
The code can be rearranged so that some goto paths can be removed Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: replace printk with pr_* or dev_*Andi Shyti
This patch mutes also all the checkpatch warnings related to printk. Reword all the printouts so that the string doesn't need to be split, which fixes the following checkpatch warning: WARNING: quoted string split across lines Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: remove unnecessary debug printsAndi Shyti
Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: allow bufferless driver registrationAndi Shyti
Transmitters don't necessarily need to have a FIFO managed buffer for their transfers. When registering the driver, before allocating the buffer, check whether the device is a transmitter or receiver. Allocate the buffer only for receivers. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13[media] lirc_dev: place buffer allocation on separate functionAndi Shyti
During the driver registration, move the buffer allocation on a separate function. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] Convert Wideview WT220 DVB USB driver to rc-coreJonathan McDowell
Converts the dtt200u DVB USB driver over to the rc-core infrastructure for its handling of IR remotes. This device can receive generic NEC / NEC Extended signals and the switch to the newer core enables the easy use of tools such as ir-keytable to modify the active key map. Signed-off-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-09[media] Fix RC5 decoding with Fintek CIR chipsetJonathan McDowell
Fix RC5 decoding with Fintek CIR chipset Commit e87b540be2dd02552fb9244d50ae8b4e4619a34b tightened up the RC5 decoding by adding a check for trailing silence to ensure a valid RC5 command had been received. Unfortunately the trailer length checked was 10 units and the Fintek CIR device does not want to provide details of a space longer than 6350us. This meant that RC5 remotes working on a Fintek setup on 3.16 failed on 3.17 and later. Fix this by shortening the trailer check to 6 units (allowing for a previous space in the received remote command). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117221 Signed-off-by: Jonathan McDowell <noodles@earth.li> Cc: stable@vger.kernel.org Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] rc-cec: Add HDMI CEC keymap moduleKamil Debski
Add the keymap module for HDMI CEC remote control commands. Signed-off-by: Kamil Debski <kamil@wypas.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08Merge branch 'topic/cec' into patchworkMauro Carvalho Chehab
* topic/cec: [media] DocBook/media: add CEC documentation [media] s5p_cec: get rid of an unused var [media] move s5p-cec to staging [media] vivid: add CEC emulation [media] cec: s5p-cec: Add s5p-cec driver [media] cec: adv7511: add cec support [media] cec: adv7842: add cec support [media] cec: adv7604: add cec support [media] cec: add compat32 ioctl support [media] cec/TODO: add TODO file so we know why this is still in staging [media] cec: add HDMI CEC framework (api) [media] cec: add HDMI CEC framework (adapter) [media] cec: add HDMI CEC framework (core) [media] cec-funcs.h: static inlines to pack/unpack CEC messages [media] cec.h: add cec header [media] cec-edid: add module for EDID CEC helper functions [media] cec.txt: add CEC framework documentation [media] rc: Add HDMI CEC protocol handling
2016-07-08[media] media: rc: nuvoton: remove two unused elements in struct nvt_devHeiner Kallweit
These two fields are not used and can be removed. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: remove unneeded check in nvt_get_rx_ir_dataHeiner Kallweit
If the logical device is disabled then it can not generate interrupts. Therefore this check is not needed. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: simplify interrupt handling codeHeiner Kallweit
Simplify interupt handling code. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08[media] media: rc: nuvoton: remove study statesHeiner Kallweit
Study states have never been used and are not needed. Remove them. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>