[PATCH 4/8] [media] staging: sir: use usleep_range() rather than busy looping

2017-03-25 Thread Sean Young
usleep_range() is perfect for this. Signed-off-by: Sean Young --- drivers/staging/media/lirc/lirc_sir.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index 3a2bac9..9b09c25

[PATCH 2/8] [media] staging: sir: remove unselectable Tekram and Actisys

2017-03-25 Thread Sean Young
Support for these sir ports is not compiled in by default, it has to be enabled by manually defining LIRC_TEKRAM, LIRC_SIR_ACTISYS_ACT200L or LIRC_SIR_ACTISYS_ACT220L somewhere. This cannot be done from Kconfig at all so remove them from the driver. Signed-off-by: Sean Young --- drivers/staging

[PATCH 7/8] [media] rc: promote lirc_sir out of staging

2017-03-25 Thread Sean Young
Rename lirc_sir to sir_ir in the process. Signed-off-by: Sean Young --- drivers/media/rc/Kconfig | 9 + drivers/media/rc/Makefile| 1 + drivers/{staging/media/lirc/lirc_sir.c => media/rc/sir_ir.c} | 0 driv

[PATCH 3/8] [media] staging: sir: fix checkpatch strict warnings

2017-03-25 Thread Sean Young
Make the code more readable and clean up the includes list. Signed-off-by: Sean Young --- drivers/staging/media/lirc/lirc_sir.c | 46 ++- 1 file changed, 8 insertions(+), 38 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media

[PATCH 8/8] [media] staging: lirc_sasem: remove

2017-03-25 Thread Sean Young
write a new driver. Signed-off-by: Sean Young Cc: Oliver Stabel Cc: Tim Davies --- drivers/staging/media/lirc/Kconfig | 6 - drivers/staging/media/lirc/Makefile | 1 - drivers/staging/media/lirc/lirc_sasem.c | 899 3 files changed, 906 deletions

[PATCH 1/8] [media] staging: sir: fill in missing fields and fix probe

2017-03-25 Thread Sean Young
Some fields are left blank. Cc: sta...@vger.kernel.org # v4.11 Signed-off-by: Sean Young --- drivers/staging/media/lirc/lirc_sir.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc

[PATCH 5/8] [media] staging: sir: remove unnecessary messages

2017-03-25 Thread Sean Young
No need to warn when kmalloc fails. Signed-off-by: Sean Young --- drivers/staging/media/lirc/lirc_sir.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index 9b09c25..c9ca86f

[PATCH 6/8] [media] staging: sir: make sure we are ready to receive interrupts

2017-03-25 Thread Sean Young
Ensure that the timer is ready before we request interrupts. Signed-off-by: Sean Young --- drivers/staging/media/lirc/lirc_sir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_sir.c b/drivers/staging/media/lirc/lirc_sir.c index c9ca86f

[PATCH 0/8] Lirc staging cleanup

2017-03-25 Thread Sean Young
This patch series promotes lirc_sir out of staging and removes lirc_sasem; this only leaves lirc_zilog in staging. I'm attempting to write a new driver for this, maybe we should keep that until that work completes. Sean Young (8): [media] staging: sir: fill in missing fields and fix

Re: [PATCH] staging: media: lirc: coding style fix use octal instead of symbolic permission

2017-03-24 Thread Sean Young
On Sun, Feb 12, 2017 at 03:39:42PM +0900, Chetan Sethi wrote: > This is a patch to the lirc_sir.c file that fixes coding style warning > found by checkpatch.pl > > Signed-off-by: Chetan Sethi Another patch was merged which already fixed this, I'm sorry. Sean > --- >

[GIT PULL for v4.12] RC fixes

2017-03-20 Thread Sean Young
Hi Mauro, Various small RC fixes and documentation fixes. The most controversial is the changing of the return code of lirc ioctls. I've tested lirc. If you can think of anything else which needs testing, please let me know. Thanks, Sean The following changes since c

[GIT PULL for v4l-utils] rc fixes

2017-03-20 Thread Sean Young
Hi Just musl compile fixes and a fix for streamzap keymap not loading. Thanks, Sean The following changes since commit 646bb9c368a8b65cdea6d934c9022067541d13a9: cec-follower: don't Feature Abort msgs from Unregistered (2017-02-28 14:14:31 +0100) are available in the git reposito

[GIT PULL FOR v4.12] media/rc: fixes and improvements

2017-03-06 Thread Sean Young
Hi Mauro, Some RC and lirc documentation fixes, a userspace lirc API for sending IR using the encoders, and lirc userspace API for reading decoded scancodes. Thanks, Sean The following changes since commit 700ea5e0e0dd70420a04e703ff264cc133834cba: Merge tag 'v4.11-rc1' into patch

[PATCH] [media] lirc: introduce LIRC_SET_POLL_MODE

2017-03-06 Thread Sean Young
printf("space %u\n", LIRC_VAL(sample))); if (LIRC_IS_PULSE(sample)) printf("pulse %u\n", LIRC_VAL(sample))); } } Note that LIRC_SET_REC_MODE will also affect the poll mode, so you must set it again before calling poll.

Re: [PATCH v3 17/19] [media] lirc: implement reading scancode

2017-03-02 Thread Sean Young
On Sat, Feb 25, 2017 at 11:51:32AM +, Sean Young wrote: > @@ -362,10 +394,15 @@ static unsigned int ir_lirc_poll(struct file *filep, > > poll_wait(filep, &lirc->wait_poll, wait); > > - if (!lirc->drv.attached) > + if (!lirc->drv.attached) { &

Re: ir-keytable: infinite loops, segfaults

2017-02-28 Thread Sean Young
On Sat, Feb 25, 2017 at 02:08:39AM +1100, Vincent McIntyre wrote: > On 2/22/17, Sean Young wrote: > > > So it's still using the old keymap. I've attached a new one. > > That works, thanks. > > >> # vol down > >> 1487676637.74634

[PATCH v3 14/19] [media] lirc: implement scancode sending

2017-02-25 Thread Sean Young
e)); close(fd); } Note that toggle (rc5, rc6) and repeats (nec) are not implemented. Nor is there a method for holding down a key for a period. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 64 ++--- drivers/media/rc/rc-core-priv.h | 1 +

[PATCH v3 13/19] [media] lirc: use plain kfifo rather than lirc_buffer

2017-02-25 Thread Sean Young
ivers which use it. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 136 --- drivers/media/rc/lirc_dev.c | 5 +- drivers/media/rc/rc-core-priv.h | 33 ++ include/media/rc-core.h | 2 + 4 files changed, 107 inser

[PATCH v3 05/19] [media] gpio-ir: do not allow a timeout of 0

2017-02-25 Thread Sean Young
According to the documentation, a timeout of 0 turns off timeouts, which is not the case. Signed-off-by: Sean Young --- drivers/media/rc/gpio-ir-recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index

[PATCH v3 12/19] [media] lirc: exorcise struct irctl

2017-02-25 Thread Sean Young
. We also remove the duplicate chunk_size member. In addition, the members of irctl are now visible elsewhere. Tested send, receive and rmmod with lirc_zilog and various rc-core devices. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c| 3 +- drivers/media/rc/lirc_dev.c

[PATCH v3 11/19] [media] lirc: lirc interface should not be a raw decoder

2017-02-25 Thread Sean Young
re to avoid circular dependencies. Since ir-lirc-codec no longer exists as separate codec module, there is no need for RC_DRIVER_IR_RAW_TX type drivers to call ir_raw_event_register(). Signed-off-by: Sean Young --- drivers/media/rc/Kconfig | 15 ++-- drivers/media/rc/Makefile

[PATCH v3 06/19] [media] rc: lirc keymap no longer makes any sense

2017-02-25 Thread Sean Young
The lirc keymap existed once upon a time to select the lirc protocol. Since '275ddb4 [media] rc-core: remove the LIRC "protocol"', IR is always passed to the lirc decoder so this keymap is no longer needed. Signed-off-by: Sean Young --- drivers/media/rc/keymaps/Makefile |

[PATCH v3 09/19] [media] serial_ir: iommap is a memory address, not bool

2017-02-25 Thread Sean Young
This has been broken for a long time, so presumably it is not used. I have no hardware to test this on. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=61401 Fixes: 90ab5ee ("module_param: make bool parameters really bool") Signed-off-by: Sean Young --- drivers/media/rc/seria

[PATCH v3 07/19] [media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve

2017-02-25 Thread Sean Young
This feature was never set. The ioctl should fail if no resolution is set. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 235d74a

[PATCH v3 08/19] [media] mce_kbd: add encoder

2017-02-25 Thread Sean Young
Split the protocol into two variants, one for keyboard and one for mouse data. Note that the mce_kbd protocol cannot be used on the igorplugusb, since the IR is too long. Signed-off-by: Sean Young --- drivers/media/rc/igorplugusb.c| 2 +- drivers/media/rc/ir-mce_kbd-decoder.c | 49

[PATCH v3 10/19] [media] lirc: use refcounting for lirc devices

2017-02-25 Thread Sean Young
If a lirc device is unplugged, the struct rc_dev is freed even though userspace can still have a file descriptor open on the lirc chardev. The rc_dev structure can be used in a subsequent, or even currently executing ioctl, read or write. Signed-off-by: Sean Young --- drivers/media/rc

[PATCH v3 19/19] [media] lirc: document LIRC_MODE_SCANCODE

2017-02-25 Thread Sean Young
Lirc supports a new mode which requires documentation. Signed-off-by: Sean Young --- Documentation/media/lirc.h.rst.exceptions | 49 ++ Documentation/media/uapi/rc/lirc-dev-intro.rst | 25 +++ Documentation/media/uapi/rc/lirc-get-features.rst | 15

[PATCH v3 17/19] [media] lirc: implement reading scancode

2017-02-25 Thread Sean Young
REPEAT)); } close(fd); } Note that the translated KEY_* is not included, that information is published to the input device. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 115 +++--- drivers/media/rc/ir-mce_kbd-decoder.c | 6

[PATCH v3 15/19] [media] rc: use the correct carrier for scancode transmit

2017-02-25 Thread Sean Young
If the lirc device supports it, set the carrier for the protocol. Signed-off-by: Sean Young --- drivers/media/rc/ir-jvc-decoder.c | 1 + drivers/media/rc/ir-lirc-codec.c | 28 drivers/media/rc/ir-mce_kbd-decoder.c | 1 + drivers/media/rc/ir-nec-decoder.c

[PATCH v3 16/19] [media] rc: auto load encoder if necessary

2017-02-25 Thread Sean Young
When sending scancodes, load the encoder if we need it. Signed-off-by: Sean Young --- drivers/media/rc/rc-core-priv.h | 1 + drivers/media/rc/rc-ir-raw.c| 2 ++ drivers/media/rc/rc-main.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/rc-core

[PATCH v3 18/19] [media] lirc: scancode rc devices should have a lirc device too

2017-02-25 Thread Sean Young
Now that the lirc interface supports scancodes, RC scancode devices can also have a lirc device, except for cec devices which have their own /dev/cecN interface. Signed-off-by: Sean Young --- drivers/media/rc/rc-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH v3 03/19] [media] lirc: return ENOTTY when device does support ioctl

2017-02-25 Thread Sean Young
If timeouts or carrier range is not supported, return proper error. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 637b583..235d74a 100644 --- a

[PATCH v3 04/19] [media] winbond: allow timeout to be set

2017-02-25 Thread Sean Young
The drivers sets the hardware to idle when a timeout occurs. This can be any reasonable value. Signed-off-by: Sean Young --- drivers/media/rc/winbond-cir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c

[PATCH v3 01/19] [media] lirc: document lirc modes better

2017-02-25 Thread Sean Young
LIRC_MODE_MODE2 and LIRC_MODE_LIRCCODE were not covered at all. Signed-off-by: Sean Young --- Documentation/media/lirc.h.rst.exceptions | 1 - Documentation/media/uapi/rc/lirc-dev-intro.rst | 53 +++--- Documentation/media/uapi/rc/lirc-get-features.rst | 13

[PATCH v3 02/19] [media] lirc: return ENOTTY when ioctl is not supported

2017-02-25 Thread Sean Young
We shouldn't be using ENOSYS when a feature is not available. I've tested lirc; nothing is broken as far as I can make out. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 20 ++-- drivers/media/rc/lirc_dev.c | 2 +- 2 files changed, 11 inserti

[PATCH v3 00/19] Teach lirc how to send and receive scancodes

2017-02-25 Thread Sean Young
port any at the moment but might as well future-proof it http://www.hifi-remote.com/wiki/index.php?title=DecodeIR - Various small fixes. - Added documentation Sean Young (19): [media] lirc: document lirc modes better [media] lirc: return ENOTTY when ioctl is not supported [media] l

[PATCH] [media] serial_ir: ensure we're ready to receive interrupts

2017-02-25 Thread Sean Young
: # 4.10 Signed-off-by: Sean Young --- drivers/media/rc/serial_ir.c | 243 +-- 1 file changed, 118 insertions(+), 125 deletions(-) diff --git a/drivers/media/rc/serial_ir.c b/drivers/media/rc/serial_ir.c index 923fb22..22144b4 100644 --- a/drivers/media/rc

Re: [WARNING: A/V UNSCANNABLE][Merge tag 'media/v4.11-1' of git] ff58d005cd: BUG: unable to handle kernel NULL pointer dereference at 0000039c

2017-02-25 Thread Sean Young
that faults. So this is > the faulting source code: > > drivers/media/rc/serial_ir.c: 402 > > mod_timer(&serial_ir.timeout_timer, > jiffies + nsecs_to_jiffies(serial_ir.rcdev->timeout)); > > ir_raw_event_handle(serial_ir.rcdev); > > return IRQ_HANDLED; > > and serial_ir.rcdev is NULL when ti tries to look up the timeout. ir_raw_event_handle() call will also go bang if passed a null pointer, so this problem existed before (since v4.10). Thanks for debugging this, I'll send a patch as a reply to this email. Sean

[GIT PULL FOR v4.11] RC fixes

2017-02-23 Thread Sean Young
Hi Mauro, Two fixes for setting up the keymap when a RC device is plugged in; this has been broken since v4.5. When ir-keytable is run from udev, the problem wasn't visible since the protocols file was written again with the right protocol. Thanks, Sean The following changes since c

[PATCH] [media] rc: protocol is not set on register for raw IR devices

2017-02-23 Thread Sean Young
split setup and unregister functions") Signed-off-by: Sean Young --- drivers/media/rc/rc-main.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index a158b32..d845336 100644 --- a/drivers/media/rc

[PATCH] [media] rc: raw decoder for keymap protocol is not loaded on register

2017-02-22 Thread Sean Young
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 Cc: # v4.5+ --- drivers/media/rc

Re: Bug: decoders referenced in kernel rc-keymaps not loaded on boot

2017-02-22 Thread Sean Young
On Tue, Feb 21, 2017 at 11:52:24PM +0100, Matthias Reichl wrote: > On Tue, Feb 21, 2017 at 07:34:39PM +0000, Sean Young wrote: > > On Tue, Feb 21, 2017 at 07:49:29PM +0100, Matthias Reichl wrote: > > > There seems to be a bug in on-demand loading of IR protocol decoders. > &g

Re: [PATCH v2 17/19] [media] lirc: implement reading scancode

2017-02-22 Thread Sean Young
On Wed, Feb 22, 2017 at 08:14:50AM +0800, kbuild test robot wrote: > Hi Sean, > > [auto build test ERROR on linuxtv-media/master] > [also build test ERROR on next-20170221] > [cannot apply to v4.10] > [if your patch is applied to the wrong git tree, please drop us a note to

[PATCH v2 16/19] [media] rc: auto load encoder if necessary

2017-02-21 Thread Sean Young
When sending scancodes, load the encoder if we need it. Signed-off-by: Sean Young --- drivers/media/rc/rc-core-priv.h | 1 + drivers/media/rc/rc-ir-raw.c| 2 ++ drivers/media/rc/rc-main.c | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/rc-core

[PATCH v2 07/19] [media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve

2017-02-21 Thread Sean Young
This feature was never set. The ioctl should fail if no resolution is set. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 235d74a

[PATCH v2 08/19] [media] lirc: use refcounting for lirc devices

2017-02-21 Thread Sean Young
If a lirc device is unplugged, the struct rc_dev is freed even though userspace can still have a file descriptor open on the lirc chardev. The rc_dev structure can be used in a subsequent, or even currently executing ioctl, read or write. Signed-off-by: Sean Young --- drivers/media/rc

[PATCH v2 09/19] [media] mce_kbd: add encoder

2017-02-21 Thread Sean Young
Split the protocol into two variants, one for keyboard and one for mouse data. Note that the mce_kbd protocol cannot be used on the igorplugusb, since the IR is too long. Signed-off-by: Sean Young --- drivers/media/rc/igorplugusb.c| 2 +- drivers/media/rc/ir-mce_kbd-decoder.c | 49

[PATCH v2 17/19] [media] lirc: implement reading scancode

2017-02-21 Thread Sean Young
REPEAT)); } close(fd); } Note that the translated KEY_* is not included, that information is published to the input device. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 107 +++--- drivers/media/rc/ir-mce_kbd-decoder.c | 7

[PATCH v2 15/19] [media] rc: use the correct carrier for scancode transmit

2017-02-21 Thread Sean Young
If the lirc device supports it, set the carrier for the protocol. Signed-off-by: Sean Young --- drivers/media/rc/ir-jvc-decoder.c | 1 + drivers/media/rc/ir-lirc-codec.c | 28 drivers/media/rc/ir-mce_kbd-decoder.c | 1 + drivers/media/rc/ir-nec-decoder.c

[PATCH v2 18/19] [media] lirc: scancode rc devices should have a lirc device too

2017-02-21 Thread Sean Young
Now that the lirc interface supports scancodes, RC scancode devices can also have a lirc device, except for cec devices which have their own /dev/cecN interface. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 106 ++ drivers/media/rc/ir

[PATCH v2 11/19] [media] lirc: lirc interface should not be a raw decoder

2017-02-21 Thread Sean Young
re to avoid circular dependencies. Since ir-lirc-codec no longer exists as separate codec module, there is no need for RC_DRIVER_IR_RAW_TX type drivers to call ir_raw_event_register(). Signed-off-by: Sean Young --- drivers/media/rc/Kconfig | 15 ++-- drivers/media/rc/Makefile

[PATCH v2 12/19] [media] lirc: exorcise struct irctl

2017-02-21 Thread Sean Young
. We also remove the duplicate chunk_size member. In addition, the members of irctl are now visible elsewhere. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c| 3 +- drivers/media/rc/lirc_dev.c | 353 +++- drivers/staging/media/lirc

[PATCH v2 14/19] [media] lirc: implement scancode sending

2017-02-21 Thread Sean Young
t toggle (rc5, rc6) and repeats (nec) are not implemented. Nor is there a method for holding down a key for a period. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 64 ++--- drivers/media/rc/rc-core-priv.h | 2 +- include/media/rc-ma

[PATCH v2 10/19] [media] serial_ir: iommap is a memory address, not bool

2017-02-21 Thread Sean Young
This has been broken for a long time, so presumably it is not used. I have no hardware to test this on. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=61401 Fixes: 90ab5ee ("module_param: make bool parameters really bool") Signed-off-by: Sean Young --- drivers/media/rc/seria

[PATCH v2 13/19] [media] lirc: use plain kfifo rather than lirc_buffer

2017-02-21 Thread Sean Young
ivers which use it. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 102 +-- drivers/media/rc/lirc_dev.c | 5 +- drivers/media/rc/rc-core-priv.h | 26 ++ 3 files changed, 96 insertions(+), 37 deletions(-) diff --git a/drivers/

[PATCH v2 19/19] [media] lirc: document LIRC_MODE_SCANCODE

2017-02-21 Thread Sean Young
Lirc supports a new mode which requires documentation. Signed-off-by: Sean Young --- Documentation/media/uapi/rc/lirc-dev-intro.rst | 20 Documentation/media/uapi/rc/lirc-get-features.rst | 15 +++ Documentation/media/uapi/rc/lirc-get-rec-mode.rst | 8

[PATCH v2 03/19] [media] lirc: return ENOTTY when device does support ioctl

2017-02-21 Thread Sean Young
If timeouts or carrier range is not supported, return proper error. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 637b583..235d74a 100644 --- a

[PATCH v2 04/19] [media] winbond: allow timeout to be set

2017-02-21 Thread Sean Young
The drivers sets the hardware to idle when a timeout occurs. This can be any reasonable value. Signed-off-by: Sean Young --- drivers/media/rc/winbond-cir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c

[PATCH v2 02/19] [media] lirc: return ENOTTY when ioctl is not supported

2017-02-21 Thread Sean Young
We shouldn't be using ENOSYS when a feature is not available. I've tested lirc; nothing is broken as far as I can make out. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 20 ++-- drivers/media/rc/lirc_dev.c | 2 +- 2 files changed, 11 inserti

[PATCH v2 00/19] Teach lirc how to send and receive scancodes

2017-02-21 Thread Sean Young
its; we don't support any at the moment but might as well future-proof it http://www.hifi-remote.com/wiki/index.php?title=DecodeIR - Various small fixes. - Added documentation Sean Young (19): [media] lirc: document lirc modes better [media] lirc: return ENOTTY when ioctl is not s

[PATCH v2 05/19] [media] gpio-ir: do not allow a timeout of 0

2017-02-21 Thread Sean Young
According to the documentation, a timeout of 0 turns off timeouts, which is not the case. Signed-off-by: Sean Young --- drivers/media/rc/gpio-ir-recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index

[PATCH v2 06/19] [media] rc: lirc keymap no longer makes any sense

2017-02-21 Thread Sean Young
The lirc keymap existed once upon a time to select the lirc protocol. Since '275ddb4 [media] rc-core: remove the LIRC "protocol"', IR is always passed to the lirc decoder so this keymap is no longer needed. Signed-off-by: Sean Young --- drivers/media/rc/keymaps/Makefile |

[PATCH v2 01/19] [media] lirc: document lirc modes better

2017-02-21 Thread Sean Young
LIRC_MODE_MODE2 and LIRC_MODE_LIRCCODE were not covered at all. Signed-off-by: Sean Young --- Documentation/media/uapi/rc/lirc-dev-intro.rst | 53 +++--- Documentation/media/uapi/rc/lirc-get-features.rst | 13 -- Documentation/media/uapi/rc/lirc-get-length.rst| 3

Re: Bug: decoders referenced in kernel rc-keymaps not loaded on boot

2017-02-21 Thread Sean Young
tocol decoder. Hmm this seems to be working fine for me. If you write to the protocols file, eg. "echo +nec > /sys/class/rc/rc0/protocols", is ir-nec-decoder loaded and do you get any messages in dmesg (you should). What's your config? Thanks, Sean

Re: ir-keytable: infinite loops, segfaults

2017-02-21 Thread Sean Young
On Wed, Feb 22, 2017 at 12:07:07AM +1100, Vincent McIntyre wrote: > On 2/21/17, Sean Young wrote: > >> $ sudo cat /sys/class/rc/rc1/protocols > >> nec > >> $ sudo sh > >> # echo "+rc-5 +nec +rc-6 +jvc +sony +rc-5-sz +sanyo +sharp +xmp" > >

Re: ir-keytable: infinite loops, segfaults

2017-02-20 Thread Sean Young
s > bash: echo: write error: Invalid argument > # cat /sys/class/rc/rc1/protocols > nec > In kern.log I got: > kernel: [ 2293.491534] rc_core: Normal protocol change requested > kernel: [ 2293.491538] rc_core: Protocol switching not supported > > # echo "+nec" > /sys/class/rc/rc1/protocols > bash: echo: write error: Invalid argument > kernel: [ 2390.832476] rc_core: Normal protocol change requested > kernel: [ 2390.832481] rc_core: Protocol switching not supported That is expected. Does the the keymap actually work? ir-keytable -r -t Thanks, Sean

Re: [PATCH] v4l-utils: fix invalid protocol in streamzap keymap

2017-02-18 Thread Sean Young
less pernickety about how the protocol is specified. ir-ctl also does this. How about the following patch. Sean From: Sean Young Subject: [PATCH] [PATCH v4l-utils] ir-keytable: be more permissive on protocol name Allowed the protocol to be specified with or without underscores or dashes. Thi

Re: [PATCH] staging: media: use octal permissions

2017-02-16 Thread Sean Young
> > diff --git a/drivers/staging/media/lirc/lirc_parallel.c lirc_parallel has been dropped, I'm afraid so the patch no longer applies. Thanks Sean

[GIT PULL FOR v4.11] RC deadlocks

2017-02-15 Thread Sean Young
Hi Mauro, Two deadlocks which would be nice to have fixed for v4.11. Both were introduced by the wakeup changes; I guess that teaches me for working without lockdep enabled. Thanks, Sean The following changes since commit 9eeb0ed0f30938f31a3d9135a88b9502192c18dd: [media] mtk-vcodec: fix

Re: [regression] dvb_usb_cxusb (was Re: ir-keytable: infinite loops, segfaults)

2017-02-15 Thread Sean Young
On Wed, Feb 08, 2017 at 10:30:30PM +1100, Vincent McIntyre wrote: > Hi > > I have been working with Sean on figuring out the protocol used by a > dvico remote. > I thought the patch he sent was at fault but I backed it out and tried again. > > I've attached a full d

Re: [PATCH] [MEDIA] add device ID to ati remote

2017-02-13 Thread Sean Young
OR_ID, FIREFLY_REMOTE_PRODUCT_ID), > .driver_info = (unsigned long)&type_firefly > }, > + { > + USB_DEVICE(ATI_REMOTE_VENDOR_ID, REYCOM_REMOTE_PRODUCT_ID), > + .driver_info = (unsigned long)&type_firefly > + }, > {} /* Terminating entry */ > }; Your email client replaced all tabs with spaces so the patch no longer applies. Thanks, Sean

[PATCH] [media] lirc: fix dead lock between open and wakeup_filter

2017-02-13 Thread Sean Young
u_read_lock_sched_held+0x4a/0x80 ? rcu_sync_lockdep_assert+0x2f/0x60 ? __sb_start_write+0x10c/0x220 ? vfs_write+0x195/0x1e0 ? security_file_permission+0x3b/0xc0 vfs_write+0xc8/0x1e0 SyS_write+0x58/0xc0 entry_SYSCALL_64_fastpath+0x1f/0xc2 Signed-off-by: Sean Young --- drivers/media/rc/l

Re: [PATCH] media: rc: nuvoton: fix deadlock in nvt_write_wakeup_codes

2017-02-13 Thread Sean Young
1. Would you mind testing the new wakeup_protocols interface on the nuvoton please? cd /sys/class/rc/rc0 echo rc-5 > wakeup_protocols echo 0x > wakeup_filter_mask echo 0x1e01 > wakeup_filter (replace as needed) Thanks! Sean

Re: [regression] dvb_usb_cxusb (was Re: ir-keytable: infinite loops, segfaults)

2017-02-08 Thread Sean Young
Hi Vincent, On Wed, Feb 08, 2017 at 10:30:30PM +1100, Vincent McIntyre wrote: > Hi > > I have been working with Sean on figuring out the protocol used by a > dvico remote. > I thought the patch he sent was at fault but I backed it out and tried again. > > I've attached

[GIT PULL FOR v4.11] More RC updates

2017-02-03 Thread Sean Young
Hi Mauro, Some last minute changes which would be nice to have in v4.11, nothing controversial here. Thanks, Sean The following changes since commit e7b3a2b22176d01db0c3b31d6389ccf542ba1967: [media] st-hva: hva_dbg_summary() should be static (2017-01-31 12:02:33 -0200) are available in the

Re: ir-keytable: infinite loops, segfaults

2017-02-02 Thread Sean Young
Hi Vincent, On Thu, Feb 02, 2017 at 10:18:52PM +1100, Vincent McIntyre wrote: > On 11/30/16, Vincent McIntyre wrote: > > On Sun, Nov 27, 2016 at 07:35:10PM +0000, Sean Young wrote: > >> > >> > I wanted to mention that the IR protocol is still showing as unknown. >

[PATCH] [media] mce_kbd: add missing keys from UK layout

2017-02-02 Thread Sean Young
The UK layout of the Microsoft Remote Keyboard has two missing keys: the hash key, and the messenger key which is sent using rc6 mce. Signed-off-by: Sean Young --- drivers/media/rc/ir-mce_kbd-decoder.c | 2 +- drivers/media/rc/keymaps/rc-rc6-mce.c | 1 + 2 files changed, 2 insertions(+), 1

[PATCH] [media] lirc: cannot read from tx-only device

2017-02-02 Thread Sean Young
Bail out early, otherwise we follow a null pointer. Signed-off-by: Sean Young --- drivers/media/rc/lirc_dev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 0030ce0..a54ca53 100644 --- a/drivers/media/rc/lirc_dev.c +++ b

Re: [PATCH v2] Documentation: devicetree: meson-ir: "linux,rc-map-name" is supported

2017-02-01 Thread Sean Young
en you merge the patch - or do you want > me to push this to some git repo from which you can pull? I'll apply it to my rc-tree and fix up any problems. Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[GIT PULL FOR v4.11] More RC updates

2017-01-30 Thread Sean Young
Hi Mauro, This includes a fix for my embarrassing ir-rx51 build failure, the mediatek IR driver, a keymap and some important fixes for tx-only drivers. Thanks, Sean The following changes since commit a052af2a548decf1da5cccf9e777aa02321e3ffb: [media] staging/media/s5p-cec

Re: [linuxtv-media:master 1071/1091] arch/arm/mach-omap2/pdata-quirks.c:536:49: error: 'rx51_lirc_data' undeclared here (not in a function)

2017-01-30 Thread Sean Young
nclude/linux/of_platform.h:52:21: note: in definition of macro > 'OF_DEV_AUXDATA' >.platform_data = _pdata } Oh dear, that should have been rx51_ir_data. The patch below fixes it. Sean >From 7813bce59dca0eb7f9af1626fc9cd6ef1ddea9a5 Mon Sep 17 00:00:00 2001 From: Se

Re: [PATCH RESEND] staging: media: lirc: use new parport device model

2017-01-30 Thread Sean Young
Prevoius patch is at https://patchwork.kernel.org/patch/7883591/ Since noone ported lirc_parallel to rc-core, the lirc_parallel staging driver has been droppped from the current media tree. I have ported a few other lirc drivers to rc-core but I never found anyone using lirc_parallel or the hardware itself. Sean

Re: [PATCH] Staging: media: lirc: style fix, using octal file permissions

2017-01-30 Thread Sean Young
ot;); > > static void free_imon_context(struct imon_context *context) In the current media tree, drivers/staging/media/lirc/lirc_imon.c has been merged with drivers/media/rc/imon.c already, I'm afraid. This patch no longer applies. Sean -- To unsubscribe from this list: send the line &qu

Re: [PATCH 0/9] Teach lirc how to send and receive scancodes

2017-01-29 Thread Sean Young
On Fri, Jan 06, 2017 at 12:49:03PM +, Sean Young wrote: > This patch series introduces a new lirc mode, LIRC_MODE_SCANCODE. This > allows scancodes to be sent and received. This depends on earlier > series which introduces IR encoders. I've been testing these patches fu

[PATCH 0/4] IR fixes for v4.11

2017-01-20 Thread Sean Young
Testing of lirc uncovered some issue with tx-only devices, and some other minor issues. Sean Young (4): [media] lirc: fix transmit-only read features [media] rc: remove excessive spaces from error message [media] lirc: LIRC_GET_MIN_TIMEOUT should be in range [media] lirc: fix null

[PATCH 3/4] [media] lirc: LIRC_GET_MIN_TIMEOUT should be in range

2017-01-20 Thread Sean Young
LIRC_SET_REC_TIMEOUT can fail if the value returned by LIRC_GET_MIN_TIMEOUT is set due to rounding errors. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir

[PATCH 1/4] [media] lirc: fix transmit-only read features

2017-01-20 Thread Sean Young
An RC device which is transmit-only shouldn't have the LIRC_CAN_REC_MODE2 feature. Signed-off-by: Sean Young --- drivers/media/rc/ir-lirc-codec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c

[PATCH 4/4] [media] lirc: fix null dereference for tx-only devices

2017-01-20 Thread Sean Young
tx-only RC devices do not have a receive buffer. Signed-off-by: Sean Young --- drivers/media/rc/lirc_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 7f5d109..18b4dae 100644 --- a/drivers/media/rc

[PATCH 2/4] [media] rc: remove excessive spaces from error message

2017-01-20 Thread Sean Young
rc_core: Loaded IR protocol module ir-jvc-decoder, but protocol jvc still not available Signed-off-by: Sean Young --- drivers/media/rc/rc-main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c

Re: Time for a v4l-utils 1.12 release

2017-01-19 Thread Sean Young
Hi Gregor, On Mon, Jan 16, 2017 at 09:00:40PM +0100, Gregor Jasny wrote: > On 16/01/2017 11:06, Sean Young wrote: > > On Mon, Jan 16, 2017 at 09:10:36AM +0100, Gregor Jasny wrote: > >> Hello, > >> > >> I'd like to do a new v4l-utils release before the Debi

Re: [PATCH v3 2/3] Documentation: devicetree: Add document bindings for mtk-cir

2017-01-18 Thread Sean Wang
On Wed, 2017-01-18 at 16:42 -0600, Rob Herring wrote: > On Wed, Jan 18, 2017 at 4:23 PM, Rob Herring wrote: > > On Fri, Jan 13, 2017 at 03:35:38PM +0800, sean.w...@mediatek.com wrote: > >> From: Sean Wang > >> > >> This patch adds documentation for devicetree

Re: [PATCH 1/5] [media] ir-rx51: port to rc-core

2017-01-16 Thread Sean Young
Hi Ivo, On Fri, Dec 30, 2016 at 03:50:42PM +0200, Ivaylo Dimitrov wrote: > On 30.12.2016 15:30, Sean Young wrote: > > > >On Fri, Dec 30, 2016 at 01:07:52PM +, Sean Young wrote: > >>Hi Ivo,, > >> > >>On Fri, Dec 30, 2016 at 01:30:01PM +0200, Ivayl

Re: Time for a v4l-utils 1.12 release

2017-01-16 Thread Sean Young
be merged. https://patchwork.linuxtv.org/patch/38830/ Thanks Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-11 Thread Sean Wang
okay, I will continue to work based on your changes unless someone else has concerns On Wed, 2017-01-11 at 07:45 +0900, Andi Shyti wrote: > Hi Sean, > > >include/linux/compiler.h:253:8: sparse: attribute 'no_sanitize_address': > > unknown attribute > > &g

Re: [PATCH v2 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-11 Thread Sean Wang
On Tue, 2017-01-10 at 17:23 +, Sean Young wrote: > Hi Sean, > > > > > > > The kernel guarantees that calls to the interrupt handler are serialised, > > > no need to disable the interrupt in the handler. > > > > agreed. I will sav

Re: [PATCH v2 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-10 Thread Sean Young
Hi Sean, The driver is looking very good, we are looking at minor details now. On Tue, Jan 10, 2017 at 09:59:49PM +0800, Sean Wang wrote: > On Tue, 2017-01-10 at 11:09 +0000, Sean Young wrote: > > > > +#include > > > +#include > > > +#include > > > +

Re: [PATCH v2 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-10 Thread Sean Wang
On Tue, 2017-01-10 at 11:09 +, Sean Young wrote: > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#define MTK_IR_DEV KBUILD_MODNAME > > You could remove this #define and just use KBUILD_

Re: [PATCH v2 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-10 Thread Sean Young
Hi Sean Some more review comments. On Tue, Jan 10, 2017 at 05:13:51PM +0800, sean.w...@mediatek.com wrote: > From: Sean Wang > > This patch adds driver for IR controller on MT7623 SoC. > and should also work on similar Mediatek SoC. Currently > testing successfully on NEC

Re: [PATCH 1/2] Documentation: devicetree: Add document bindings for mtk-cir

2017-01-09 Thread Sean Wang
Hi Rob, thanks for your effort for reviewing. I added comments inline. On Mon, 2017-01-09 at 12:32 -0600, Rob Herring wrote: > On Fri, Jan 06, 2017 at 12:06:23AM +0800, sean.w...@mediatek.com wrote: > > From: Sean Wang > > > > This patch adds documentation for de

Re: [PATCH 2/2] media: rc: add driver for IR remote receiver on MT7623 SoC

2017-01-09 Thread Sean Young
On Mon, Jan 09, 2017 at 11:13:21AM +0800, Sean Wang wrote: > I had another question. I found multiple and same IR messages being > received when using SONY remote controller. Should driver needs to > report each message or only one of these to the upper layer ? In general the driver shou

<    4   5   6   7   8   9   10   11   12   13   >