[PATCH 2/4] ir-ctl: "ir-ctl -S rc6_mce:0x800f0410" does not work on 32-bit

2017-08-03 Thread Sean Young
0x800f0410 does not fit in 32-bit signed long. Signed-off-by: Sean Young --- utils/ir-ctl/ir-ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c index 3d66063a..562a05da 100644 --- a/utils/ir-ctl/ir-ctl.c +++ b/utils/ir-ctl/ir

[PATCH 4/4] ir-ctl: report LIRCCODE drivers even if we don't supported them

2017-08-03 Thread Sean Young
Signed-off-by: Sean Young --- utils/ir-ctl/ir-ctl.c | 4 1 file changed, 4 insertions(+) diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c index e7275989..544ad341 100644 --- a/utils/ir-ctl/ir-ctl.c +++ b/utils/ir-ctl/ir-ctl.c @@ -715,6 +715,8 @@ static void lirc_features(struct

[PATCH 1/4] ir-keytable: do not fail at the first transmit-only device

2017-08-03 Thread Sean Young
It is not possible to list all rc devices without this, since it fails when ir-keytable encounters an rc device without an input device (ie. IR transmitters). Note that IR transmitters are not listed, but they are of no interest to ir-keytable anyway. Signed-off-by: Sean Young --- utils

Re: [PATCH v1 0/4] media: rc: add support for IR receiver on MT7622 SoC

2017-08-02 Thread Sean Young
Hi Sean, On Wed, Aug 02, 2017 at 10:24:07AM +0800, Sean Wang wrote: > Hi, Mauro and Sean > > Just a gentle ping on the whole patchset porting MediaTek CIR to another > platform. I'm creating the rc-core pull request, should be done by the end of the week. Sean

Re: [PATCH v1 0/4] media: rc: add support for IR receiver on MT7622 SoC

2017-08-01 Thread Sean Wang
Hi, Mauro and Sean Just a gentle ping on the whole patchset porting MediaTek CIR to another platform. Sean On Tue, 2017-07-04 at 19:10 +0900, Andi Shyti wrote: > Hi Sean, > > > This patchset introduces Consumer IR (CIR) support for MT7622 SoC > > implements

Re: [PATCH 19/19] lirc_dev: consistent device registration printk

2017-08-01 Thread Sean Young
gging in an mceusb device (iguanair is a bit more obvious). Then again none of the other messages mention this, maybe it be added there. As it is the patch can't be applied. Maybe lirc_dev name can be changed to const char* so we avoid the strcpy and truncation. Sean > > Signed-off-b

Re: [PATCH v2 3/6] [media] rc: gpio-ir-tx: add new driver

2017-07-31 Thread Sean Young
Hi Matthias, On Fri, Jul 21, 2017 at 04:12:45PM +0200, Matthias Reichl wrote: > Hi Sean, > > On Fri, Jul 07, 2017 at 10:51:59AM +0100, Sean Young wrote: > > This is a simple bit-banging GPIO IR TX driver. > > thanks a lot for the driver, this is highly appreciated! &g

Re: ir-keytable question [Ubuntu 17.04]

2017-07-30 Thread Sean Young
On Sat, Jul 29, 2017 at 01:46:07PM +0200, Matthias Reichl wrote: > On Sat, Jul 29, 2017 at 11:23:22AM +0100, Sean Young wrote: > > Hi, > > > > On Sun, Jul 16, 2017 at 10:26:14PM -0700, Szabolcs Andrasi wrote: > > > Hi, > > > > > > I'm using U

Re: ir-keytable question [Ubuntu 17.04]

2017-07-29 Thread Sean Young
pful for the MCE Keyboard, or we could allow multiple keymaps which would be great for supporting different remotes at the same time. For now, you could add a udev rule to also enable the mce_kbd protocol. Sean

Re: [PATCH 2/2] rc: add zx-irdec remote control driver

2017-07-29 Thread Sean Young
Hi Shawn, The driver looks great! Just a minor point, see below. On Sat, Jul 29, 2017 at 02:31:42PM +0800, Shawn Guo wrote: > From: Shawn Guo > > It adds the remote control driver and corresponding keymap file for > IRDEC block found on ZTE ZX family SoCs. > > Signed-off-by: Shawn Guo > --- >

Re: rc-core: how to use hid (hardware) decoder?

2017-07-15 Thread Sean Young
ead and write the mapping from IR protocol + scancode to hid usage codes; you could then have an ir-keytable-like tool to change the keymap. Sean

Re: Query: IR remote over android

2017-07-12 Thread Sean Young
c-main.c causing remote decoder function to > fail. Is it some kind of bug. Or am i missing something. This just tells the input layer to handle autorepeat and is entirely unrelated; if the rc driver is not reporting pulse/space information correctly then the input layer never gets any key presses anyway. I would suspect that the connecting hdmi somehow does a few tricks with your gpio ports or there is a heisenbug. Sean

Re: Trying to use IR driver for my SoC

2017-07-12 Thread Sean Young
On Tue, Jul 11, 2017 at 11:51:02PM +0200, Mason wrote: > On 11/07/2017 20:35, Sean Young wrote: > > > Mason wrote: > > > >> Repeating the test (pressing '1' for one second) with ir-keytable: > >> > >> # ir-keytable -p all -t -v > >&g

Re: Infrared support on tango boards

2017-07-11 Thread Sean Young
On Tue, Jul 11, 2017 at 11:16:13PM +0200, Mason wrote: > On 11/07/2017 21:50, Sean Young wrote: > > > On Mon, Jul 10, 2017 at 11:44:08AM +0200, Mason wrote: > > > >> How does one know which decoder to use, out of > >> the dozen protocols available? > >

Re: Infrared support on tango boards

2017-07-11 Thread Sean Young
complicated to use two IR sources concurrently... > Wouldn't both receivers capture both sources? Yes, it would. > Back on topic: it seems to me that Linux supports many protocol > decoders, including the 3 supported by block A. I am also assuming > that IR signals are pretty low bandwidth? Thus, it would appear > to make sense to only use block B, to have the widest support. Absolutely right. That's what the winbond-cir driver does too. However, for wakeup from suspend the winbond-cir uses the hardware decoder. Sean

Re: Trying to use IR driver for my SoC

2017-07-11 Thread Sean Young
On Mon, Jul 10, 2017 at 10:40:04AM +0200, Mason wrote: > On 29/06/2017 21:44, Sean Young wrote: > > > On Thu, Jun 29, 2017 at 09:12:48PM +0200, Mason wrote: > > > >> On 29/06/2017 19:50, Sean Young wrote: > >> > >>> On Thu, Jun 29, 2017 at 06:25:55P

[PATCH v3] [media] dt-bindings: gpio-ir-tx: add support for GPIO IR Transmitter

2017-07-11 Thread Sean Young
Document the device tree bindings for the GPIO Bit Banging IR Transmitter. Signed-off-by: Sean Young --- .../devicetree/bindings/leds/irled/gpio-ir-tx.txt | 14 ++ 1 file changed, 14 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/irled/gpio-ir

[GIT FIXES FOR v4.13] RC fixes.

2017-07-11 Thread Sean Young
Hi Mauro, Since v4.12 we set the LIRC_CAN_GET_REC_RESOLUTION lirc feature, and as a result lircd uses the ioctl LIRC_GET_REC_RESOLUTION. That ioctl has always been broken in rc-core. I should have tested lirc decoding, I'll add it to my rc checklist. Sorry. Thanks, Sean The following ch

[PATCH] [media] lirc: LIRC_GET_REC_RESOLUTION should return microseconds

2017-07-11 Thread Sean Young
conds, but nanoseconds is returned. Cc: # v2.6.36+ Reported-by: Derek Tested-by: Derek 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-lirc-codec.c index a30af9

Re: [PATCH v2 5/6] [media] dt-bindings: gpio-ir-tx: add support for GPIO IR Transmitter

2017-07-10 Thread Sean Young
On Mon, Jul 10, 2017 at 10:05:38AM -0500, Rob Herring wrote: > On Fri, Jul 07, 2017 at 10:52:03AM +0100, Sean Young wrote: > > Document the device tree bindings for the GPIO Bit Banging IR > > Transmitter. > > > > Signed-off-by: Sean Young > > --- > >

[PATCH v2 5/6] [media] dt-bindings: gpio-ir-tx: add support for GPIO IR Transmitter

2017-07-07 Thread Sean Young
Document the device tree bindings for the GPIO Bit Banging IR Transmitter. Signed-off-by: Sean Young --- Documentation/devicetree/bindings/leds/irled/gpio-ir-tx.txt | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/irled/gpio-ir-tx.txt

[PATCH v2 6/6] [media] dt-bindings: pwm-ir-tx: Add support for PWM IR Transmitter

2017-07-07 Thread Sean Young
Document the device tree bindings for the PWM IR Transmitter. Signed-off-by: Sean Young --- Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.txt | 13 + 1 file changed, 13 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.txt diff --git

[PATCH v2 3/6] [media] rc: gpio-ir-tx: add new driver

2017-07-07 Thread Sean Young
This is a simple bit-banging GPIO IR TX driver. Signed-off-by: Sean Young --- MAINTAINERS | 6 ++ drivers/media/rc/Kconfig | 11 +++ drivers/media/rc/Makefile | 1 + drivers/media/rc/gpio-ir-tx.c | 189 ++ 4 files changed

[PATCH v2 4/6] [media] rc: pwm-ir-tx: add new driver

2017-07-07 Thread Sean Young
This is new driver which uses pwm, so it is more power-efficient than the bit banging gpio-ir-tx driver. Signed-off-by: Sean Young --- MAINTAINERS | 6 ++ drivers/media/rc/Kconfig | 12 drivers/media/rc/Makefile| 1 + drivers/media/rc/pwm-ir-tx.c | 138

[PATCH v2 2/6] [media] rc: mce kbd decoder not needed for IR TX drivers

2017-07-07 Thread Sean Young
Without this patch, an input device is created which is not necessary. Signed-off-by: Sean Young --- drivers/media/rc/ir-mce_kbd-decoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c index 6a4d58b..0e07442

[PATCH v2 1/6] [media] rc-core: rename input_name to device_name

2017-07-07 Thread Sean Young
river_name const char* so that no casts are needed anywhere. Now ir-spi reports: rc rc0: IR SPI as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0 Signed-off-by: Sean Young --- drivers/hid/hid-picolcd_cir.c | 2 +- drivers/media/cec/cec-core.c

[PATCH v2 0/6] Generic Raspberry Pi IR transmitters

2017-07-07 Thread Sean Young
ht be possible for the Nokia N900 to use the pwm-ir-tx driver, making ir-rx51 obsolete. The pwm-ir-tx driver is shorter and simpler. Changes since v2: - Removed pointless suspend handling from pwm-ir-tx - Split out device tree bindings to separate commits Sean Young (6): [media] rc-core: r

Re: [PATCH 4/4] [media] rc: pwm-ir-tx: add new driver

2017-07-04 Thread Sean Young
On Sun, Jul 02, 2017 at 12:06:13PM +0100, Sean Young wrote: > This is new driver which uses pwm, so it is more power-efficient > than the bit banging gpio-ir-tx driver. > > Signed-off-by: Sean Young > --- > .../devicetree/bindings/leds/irled/pwm-ir-tx.txt | 13 ++ > dri

[PATCH] [media] rc-core: do not depend on MEDIA_SUPPORT

2017-07-02 Thread Sean Young
There is no dependency between the two, so remove the dependency in Kconfig files. Signed-off-by: Sean Young --- arch/arm/configs/imx_v6_v7_defconfig | 2 +- arch/arm/configs/omap2plus_defconfig | 2 +- arch/arm/configs/sunxi_defconfig | 2 +- arch/mips/configs/pistachio_defconfig

[PATCH 4/4] [media] rc: pwm-ir-tx: add new driver

2017-07-02 Thread Sean Young
This is new driver which uses pwm, so it is more power-efficient than the bit banging gpio-ir-tx driver. Signed-off-by: Sean Young --- .../devicetree/bindings/leds/irled/pwm-ir-tx.txt | 13 ++ drivers/media/rc/Kconfig | 12 ++ drivers/media/rc/Makefile

[PATCH 1/4] [media] rc-core: rename input_name to device_name

2017-07-02 Thread Sean Young
river_name const char* so that no casts are needed anywhere. Now ir-spi reports: rc rc0: IR SPI as /devices/platform/soc/3f215080.spi/spi_master/spi32766/spi32766.128/rc/rc0 Signed-off-by: Sean Young --- drivers/media/cec/cec-core.c| 4 ++-- drivers/media/common/sia

[PATCH 2/4] [media] rc: mce kbd decoder not needed for IR TX drivers

2017-07-02 Thread Sean Young
Without this patch, an input device is created which is not necessary. Signed-off-by: Sean Young --- drivers/media/rc/ir-mce_kbd-decoder.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c index 6a4d58b..0e07442

[PATCH 0/4] Generic Raspberry Pi IR transmitters

2017-07-02 Thread Sean Young
is either a problem or how it could be solved. With this in place, there is no reason to use the lirc_rpi any more. Also note that it might be possible for the Nokia N900 to use the pwm-ir-tx driver, making ir-rx51 obsolete. The pwm-ir-tx driver is shorter and simpler. Sean Young (4): [medi

[PATCH 3/4] [media] rc: gpio-ir-tx: add new driver

2017-07-02 Thread Sean Young
This is a simple bit-banging GPIO IR TX driver. Signed-off-by: Sean Young --- .../devicetree/bindings/leds/irled/gpio-ir-tx.txt | 11 ++ drivers/media/rc/Kconfig | 11 ++ drivers/media/rc/Makefile | 1 + drivers/media/rc/gpio-ir-tx.c

Re: [PATCH 2/2] rc-main: remove input events for repeat messages

2017-07-01 Thread Sean Young
goto out; > - > - input_event(dev->input_dev, EV_MSC, MSC_SCAN, dev->last_scancode); > - input_sync(dev->input_dev); I don't agree with this. It's good to see something in user space when a repeat received. This is useful for debugging purposes. Sean > - >

Re: Trying to use IR driver for my SoC

2017-06-29 Thread Sean Young
On Thu, Jun 29, 2017 at 09:12:48PM +0200, Mason wrote: > On 29/06/2017 19:50, Sean Young wrote: > > > On Thu, Jun 29, 2017 at 06:25:55PM +0200, Mason wrote: > > > >> $ ir-keytable -v -t > >> Found device /sys/class/rc/rc0/ > >> Input sysfs node is /s

Re: Trying to use IR driver for my SoC

2017-06-29 Thread Sean Young
On Thu, Jun 29, 2017 at 06:25:55PM +0200, Mason wrote: > On 29/06/2017 17:55, Sean Young wrote: > > > On Thu, Jun 29, 2017 at 05:29:01PM +0200, Mason wrote: > > > >> I'm trying to use an IR driver written for my SoC: > >> https://github.com/mansr/linux-t

Re: Trying to use IR driver for my SoC

2017-06-29 Thread Sean Young
SC=10 > MODALIAS=input:bvpe-e0,1,4,14,k98,ram4,lsfw > > > The IR interrupt count remains at 0, even I use the RC nearby. > (It works in a legacy system, using a different driver.) By opening the /dev/input/event0 device, tango_ir_open() gets called which presumably enables interrupts or IR decoding for the device. It's hard to say without knowing anything about the soc. It would be nice to see this driver merged to mainline. Sean

Re: [PATCH] dma-buf/sw_sync: Fix timeline/pt overflow cases

2017-06-28 Thread Sean Paul
On Wed, Jun 28, 2017 at 08:45:55PM +0100, Chris Wilson wrote: > Quoting Sean Paul (2017-06-28 17:47:24) > > On Wed, Jun 28, 2017 at 05:00:20PM +0100, Chris Wilson wrote: > > > Quoting Sean Paul (2017-06-28 16:51:11) > > > > Protect against long-running processes

Re: [PATCH] dma-buf/sw_sync: Fix timeline/pt overflow cases

2017-06-28 Thread Sean Paul
On Wed, Jun 28, 2017 at 05:00:20PM +0100, Chris Wilson wrote: > Quoting Sean Paul (2017-06-28 16:51:11) > > Protect against long-running processes from overflowing the timeline > > and creating fences that go back in time. While we're at it, avoid > > overflowing wh

[PATCH] dma-buf/sw_sync: Fix timeline/pt overflow cases

2017-06-28 Thread Sean Paul
Protect against long-running processes from overflowing the timeline and creating fences that go back in time. While we're at it, avoid overflowing while we're incrementing the timeline. Signed-off-by: Sean Paul --- drivers/dma-buf/sw_sync.c | 7 ++- 1 file changed, 6 insert

Re: [PATCH 6/6] rc-core: add protocol to EVIOC[GS]KEYCODE_V2 ioctl

2017-06-11 Thread Sean Young
set to RC_BIT_ALL. I can't think of anything what would break with this scheme. Thanks Sean

Re: [PATCH 3/7] rc-core: img-nec-decoder - leave the internals of rc_dev alone

2017-06-11 Thread Sean Young
On Sun, May 28, 2017 at 10:28:44AM +0200, David Härdeman wrote: > On Mon, May 22, 2017 at 09:40:30PM +0100, Sean Young wrote: > >On Mon, May 01, 2017 at 06:10:06PM +0200, David Härdeman wrote: > >> Obvious fix, leave repeat handling to rc-core > >> > &g

[GIT PULL FOR v4.13] RC fixes

2017-06-09 Thread Sean Young
Hi Mauro, Here is the fixed sir_ir mod param change and a change to remove an unnecessary rc_dev member. This could not be merged earlier due to conflicts with late v4.12 fixes. Thanks Sean The following changes since commit 47f910f0e0deb880c2114811f7ea1ec115a19ee4: [media] v4l: subdev

Re: [PATCH] [media] sir_ir: annotate hardware config module parameters

2017-06-07 Thread Sean Young
On Wed, Jun 07, 2017 at 09:38:57AM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 6 Jun 2017 16:18:19 +0100 > Sean Young escreveu: > > > This module was merged after commit 5a8fc6a3cebb ("Annotate hardware > > config module parameters in drivers/media/"), so a

Re: [PATCH] [media] rc-core: simplify ir_raw_event_store_edge()

2017-06-06 Thread Sean Young
On Sun, May 28, 2017 at 05:49:27PM +0100, Sean Young wrote: > There is no need to called ir_raw_event_reset() either after a long > space or on startup. Many rc drivers never do this. > > Signed-off-by: Sean Young > --- > drivers/media/pci/saa7134/saa7134-input.c | 2 +- &

[GIT PULL FOR v4.13] Various RC fixes

2017-06-06 Thread Sean Young
Hi Mauro, Some minor fixes that just missed the first pull request, that would be nice to have in v4.13. Thank you Sean The following changes since commit 9e9e6a78143bbb6cb9cffd29ab48d5f32def4e20: [media] Doc*/media/uapi: fix control name (2017-06-06 16:49:46 -0300) are available in the

[PATCH] [media] sir_ir: annotate hardware config module parameters

2017-06-06 Thread Sean Young
This module was merged after commit 5a8fc6a3cebb ("Annotate hardware config module parameters in drivers/media/"), so add add the missing hardware annotations. Signed-off-by: Sean Young --- drivers/media/rc/sir_ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[GIT PULL FOR v4.12] RC race condition

2017-05-30 Thread Sean Young
Hi Mauro, Just a fix for an issue which the 0day robot found. I think the bug has always been present. Thanks Sean The following changes since commit dd8245f445f5e751b38126140b6ba1723f06c60b: [media] atomisp: don't treat warnings as errors (2017-05-18 05:44:00 -0300) are available i

[GIT PULL FOR v4.13] RC fixes

2017-05-28 Thread Sean Young
Hi Mauro, Just minor cleanups and fixes this time round. Thanks, Sean The following changes since commit 36bcba973ad478042d1ffc6e89afd92e8bd17030: [media] mtk_vcodec_dec: return error at mtk_vdec_pic_info_update() (2017-05-19 07:12:05 -0300) are available in the git repository at: git

[PATCH] [media] rc-core: simplify ir_raw_event_store_edge()

2017-05-28 Thread Sean Young
There is no need to called ir_raw_event_reset() either after a long space or on startup. Many rc drivers never do this. Signed-off-by: Sean Young --- drivers/media/pci/saa7134/saa7134-input.c | 2 +- drivers/media/rc/gpio-ir-recv.c | 6 +++--- drivers/media/rc/img-ir/img-ir-raw.c

Re: [PATCH 13/16] lirc_dev: use an ida instead of a hand-rolled array to keep track of minors

2017-05-28 Thread Sean Young
On Sun, May 28, 2017 at 10:26:59AM +0200, David Härdeman wrote: > On Mon, May 22, 2017 at 09:09:42PM +0100, Sean Young wrote: > >On Mon, May 01, 2017 at 06:04:42PM +0200, David Härdeman wrote: > >> Using the kernel ida facilities, we can avoid a lot of unnecessary code &g

Re: [PATCH 03/16] lirc_dev: correct error handling

2017-05-28 Thread Sean Young
On Sun, May 28, 2017 at 10:23:37AM +0200, David Härdeman wrote: > On Sun, May 21, 2017 at 09:57:13AM +0100, Sean Young wrote: > >On Mon, May 01, 2017 at 06:03:51PM +0200, David Härdeman wrote: > >> If an error is generated, nonseekable_open() shouldn't be called. > > &

[PATCH] [media] rc-core: race condition before rc_register_device()

2017-05-24 Thread Sean Young
A rc device can call ir_raw_event_handle() after rc_allocate_device(), but before rc_register_device() has completed. This is racey because rcdev->raw is set before rcdev->raw->thread has a valid value. Reported-by: kbuild test robot Signed-off-by: Sean Young --- drivers/media/rc/rc

Re: [[media] sir_ir] 592ddc9f7d: BUG: unable to handle kernel NULL pointer dereference at 00000000000005b8

2017-05-23 Thread Sean Young
bf9ffdfd93d8d5d548e48 > Author: Sean Young > AuthorDate: Tue May 16 04:56:14 2017 -0300 > Commit: Mauro Carvalho Chehab > CommitDate: Thu May 18 06:16:41 2017 -0300 > > [media] sir_ir: infinite loop in interrupt handler > > Since this driver does no detecti

Re: [PATCH 5/7] rc-core: ir-raw - leave the internals of rc_dev alone

2017-05-23 Thread Sean Young
> type |= IR_START_EVENT; So this is just a fail-safe to ensure that the IR decoders are reset after a period of IR silence. The decoders should reset themselves anyway if they receive a long space, so it's just belt and braces. Why is a static value better? At least REP_DELAY can be changed from user space. Maybe we should do away with it. Sean > else > ev.duration = delta;

Re: [PATCH 4/7] rc-core: sanyo - leave the internals of rc_dev alone

2017-05-22 Thread Sean Young
On Mon, May 01, 2017 at 06:10:12PM +0200, David Härdeman wrote: > Leave repeat handling to rc-core. > > Signed-off-by: David Härdeman > --- > drivers/media/rc/ir-sanyo-decoder.c | 10 +++--- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/media/rc/ir-sanyo-decod

Re: [PATCH 3/7] rc-core: img-nec-decoder - leave the internals of rc_dev alone

2017-05-22 Thread Sean Young
On Mon, May 01, 2017 at 06:10:06PM +0200, David Härdeman wrote: > Obvious fix, leave repeat handling to rc-core > > Signed-off-by: David Härdeman > --- > drivers/media/rc/ir-nec-decoder.c | 10 +++--- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/media/rc/ir-n

Re: [PATCH 13/16] lirc_dev: use an ida instead of a hand-rolled array to keep track of minors

2017-05-22 Thread Sean Young
> if (retval) { > class_destroy(lirc_class); > @@ -613,7 +561,7 @@ static int __init lirc_dev_init(void) > static void __exit lirc_dev_exit(void) > { > class_destroy(lirc_class); > - unregister_chrdev_region(lirc_base_dev, MAX_IRCTL_DEVICES); > +

Re: [PATCH 03/16] lirc_dev: correct error handling

2017-05-21 Thread Sean Young
On Mon, May 01, 2017 at 06:03:51PM +0200, David Härdeman wrote: > If an error is generated, nonseekable_open() shouldn't be called. There is no harm in calling nonseekable_open(), so this commit is misleading. Sean > > Signed-off-by: David Härdeman > --- > drivers/media/

Re: [PATCH] rc-core: cleanup rc_register_device (v2)

2017-05-21 Thread Sean Young
On Sun, May 21, 2017 at 08:45:09AM +0200, David Härdeman wrote: > On Sat, May 20, 2017 at 12:10:40PM +0100, Sean Young wrote: > >On Wed, May 03, 2017 at 12:04:00PM +0200, David Härdeman wrote: > >> The device core infrastructure is based on the presumption that > >> onc

Re: [PATCH] rc-core: cleanup rc_register_device (v2)

2017-05-20 Thread Sean Young
On Wed, May 03, 2017 at 12:04:00PM +0200, David Härdeman wrote: > The device core infrastructure is based on the presumption that > once a driver calls device_add(), it must be ready to accept > userspace interaction. > > This requires splitting rc_setup_rx_device() into two functions > and reorga

Re: [PATCH 14/16] lirc_dev: cleanup includes

2017-05-19 Thread Sean Young
base_dev, 0, LIRC_MAX_DEVICES, > - IRCTL_DEV_NAME); > + "BaseRemoteCtl"); This has always surprised/annoyed me. Why is this called BaseRemoteCtl? As far as I know, this is only used for /proc/devices, where it says: $ grep 239 /proc/devices 239 BaseRemoteCtl And not lirc, as you would expect. Sean

Re: [PATCH 2/4] [media] imon: better code the pad_mouse toggling

2017-05-18 Thread Sean Young
^ >! > > Rewrite it to be clearer for both code reviewers and gcc. This was already spotted by Arnd. https://patchwork.linuxtv.org/patch/41270/ Thanks Sean

Re: [PATCH] rc-core: cleanup rc_register_device (v2)

2017-05-18 Thread Sean Young
On Thu, May 18, 2017 at 09:55:14AM +0200, David Härdeman wrote: > On Wed, May 17, 2017 at 09:09:57PM +0100, Sean Young wrote: > >Hi David, > > > >On Wed, May 03, 2017 at 12:04:00PM +0200, David Härdeman wrote: > >> The device core infrastructure is based on the presu

Re: [PATCH] rc-core: cleanup rc_register_device (v2)

2017-05-17 Thread Sean Young
ts called before device_add(). I've looked at this patch and I don't see what problem it solves; what user-space interaction is problematic? Sean > > Signed-off-by: David Härdeman > --- > drivers/media/rc/rc-core-priv.h |2 + > drivers/media/rc/rc-ir-raw.c| 34

[PATCH 2/5] [media] sir_ir: use dev managed resources

2017-05-17 Thread Sean Young
Several error paths do not free up resources. This simplifies the code and fixes this. Signed-off-by: Sean Young --- drivers/media/rc/sir_ir.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/media/rc/sir_ir.c b/drivers/media/rc/sir_ir.c index c27d6b4

[PATCH 5/5] [media] staging: remove todo and replace with lirc_zilog todo

2017-05-17 Thread Sean Young
The lirc_zilog driver is the last remaining lirc driver, so the existing todo is no longer relevant. Signed-off-by: Sean Young --- drivers/staging/media/lirc/TODO| 47 ++ drivers/staging/media/lirc/TODO.lirc_zilog | 36 --- 2 files

[PATCH 0/5] sir_ir fixes and update todo

2017-05-17 Thread Sean Young
Just some minor cleanups. Sean Young (5): [media] sir_ir: attempt to free already free_irq [media] sir_ir: use dev managed resources [media] sir_ir: remove init_port and drop_port functions [media] sir_ir: remove init_chrdev and init_sir_ir functions [media] staging: remove todo and

[PATCH 1/5] [media] sir_ir: attempt to free already free_irq

2017-05-17 Thread Sean Young
If the probe fails (e.g. port already in use), rmmod causes null deref. Signed-off-by: Sean Young --- drivers/media/rc/sir_ir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/sir_ir.c b/drivers/media/rc/sir_ir.c index 90a5f8f..c27d6b4 100644 --- a

[PATCH 3/5] [media] sir_ir: remove init_port and drop_port functions

2017-05-17 Thread Sean Young
These functions are too short and removing them makes the code more readable. Signed-off-by: Sean Young --- drivers/media/rc/sir_ir.c | 27 +-- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/drivers/media/rc/sir_ir.c b/drivers/media/rc/sir_ir.c index

[PATCH 4/5] [media] sir_ir: remove init_chrdev and init_sir_ir functions

2017-05-17 Thread Sean Young
Inlining these functions into the probe function makes it much more readable. Signed-off-by: Sean Young --- drivers/media/rc/sir_ir.c | 58 ++- 1 file changed, 22 insertions(+), 36 deletions(-) diff --git a/drivers/media/rc/sir_ir.c b/drivers/media

[GIT PULL FOR v4.12] Hang in sir_ir

2017-05-17 Thread Sean Young
Hi Mauro, 0day found an issue which causes an infinite loop in the interrupt handler. Thanks, Sean The following changes since commit 3622d3e77ecef090b5111e3c5423313f11711dfa: [media] ov2640: print error if devm_*_optional*() fails (2017-04-25 07:08:21 -0300) are available in the git

[PATCH] [media] sir_ir: infinite loop in interrupt handler

2017-05-16 Thread Sean Young
Since this driver does no detection of hardware, it might be used with a non-sir port. Escape out if we are spinning. Signed-off-by: Sean Young --- drivers/media/rc/sir_ir.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/rc/sir_ir.c b/drivers/media/rc/sir_ir.c index

Re: [[media] rc] e662671619: BUG: kernel hang in test stage

2017-05-16 Thread Sean Young
756b4e17f2f2f82b9f842 > Author: Sean Young > AuthorDate: Tue Mar 7 17:07:59 2017 -0300 > Commit: Mauro Carvalho Chehab > CommitDate: Wed Apr 5 14:50:57 2017 -0300 > > [media] rc: promote lirc_sir out of staging > > Rename lirc_sir to sir_ir in the pr

Re: [PATCH 2/6] rc-core: cleanup rc_register_device

2017-05-02 Thread Sean Young
On Tue, May 02, 2017 at 08:53:02PM +0200, David Härdeman wrote: > On Mon, May 01, 2017 at 07:47:25PM +0200, David Härdeman wrote: > >On Mon, May 01, 2017 at 05:49:53PM +0100, Sean Young wrote: > >>On Thu, Apr 27, 2017 at 10:34:03PM +0200, David Härdeman wrote: > >>>

Re: [PATCH 15/16] lirc_dev: remove name from struct lirc_driver

2017-05-02 Thread Sean Young
"lirc_dev: driver %s registered at minor = %d\n", > - ir->d.name, ir->d.minor); > + dev_info(ir->d.dev, "lirc device registered as lirc%d\n", minor); I'm not so sure this is a good idea. First of all, the documentation says you can use &quo

[GIT PULL FOR v4.12] RC bugfixes

2017-05-02 Thread Sean Young
;, so it's not for stable). Thanks, Sean The following changes since commit 3622d3e77ecef090b5111e3c5423313f11711dfa: [media] ov2640: print error if devm_*_optional*() fails (2017-04-25 07:08:21 -0300) are available in the git repository at: git://linuxtv.org/syoung/media_tree.git for-

Re: [PATCH] [RFC] rc-core: report protocol information to userspace

2017-05-01 Thread Sean Young
On Mon, May 01, 2017 at 02:49:57PM +0200, David Härdeman wrote: > On Mon, May 01, 2017 at 11:38:30AM +0100, Sean Young wrote: > >On Sat, Apr 29, 2017 at 12:52:12PM +0200, David Härdeman wrote: > >> Whether we decide to go for any new keytable ioctl():s or not in rc-core, &

Re: [PATCH 2/6] rc-core: cleanup rc_register_device

2017-05-01 Thread Sean Young
r them meticulously because I cannot assume you've tested them. Thanks Sean > Signed-off-by: David Härdeman > --- > drivers/media/rc/rc-core-priv.h |2 + > drivers/media/rc/rc-ir-raw.c| 34 -- > drivers/media/rc/rc-main.c | 75 > ++

Re: [PATCH] ir-lirc-codec: let lirc_dev handle the lirc_buffer (v3)

2017-05-01 Thread Sean Young
et chunk_size and buffer_size in ir-lirc-codec. Great, this version works fine. > CC: sta...@vger.kernel.org I don't think this change make sense before "74c839b [media] lirc: use refcounting for lirc devices", so I've removed the stable cc. Thanks, Sean > Signed-off-by: Davi

Re: [PATCH] ir-lirc-codec: let lirc_dev handle the lirc_buffer (v2)

2017-05-01 Thread Sean Young
freed too early. Good catch! I missed this one. However, when I test your patch it does not work. [sean@bigcore bin]$ ./ir-ctl -d /dev/lirc1 -r /dev/lirc1: read returned 2 bytes The lirc_buffer is no longer has a chunk size of 4. Thanks, Sean > > The minimalistic fix is to let lirc_dev cre

Re: [PATCH] [RFC] rc-core: report protocol information to userspace

2017-05-01 Thread Sean Young
On Sat, Apr 29, 2017 at 12:52:12PM +0200, David Härdeman wrote: > Whether we decide to go for any new keytable ioctl():s or not in rc-core, we > should provide the protocol information of keypresses to userspace. > > Note that this means that the RC_TYPE_* definitions become part of the > userspac

Re: [PATCH] rc-core: export the hardware type to sysfs

2017-05-01 Thread Sean Young
irc features (LIRC_GET_FEATURES ioctl); the one exception is that the scancode-only devices which have no lirc device, but there are patches which change that. https://patchwork.linuxtv.org/patch/39593/ Sean > > Note that the size of sysfs_groups[] in struct rc_dev is not changed > by this patch b

Re: [PATCH 6/6] rc-core: add protocol to EVIOC[GS]KEYCODE_V2 ioctl

2017-04-28 Thread Sean Young
solve actually? Looking at the keymaps we have already, there are many scancodes which overlap and only a few of them use a different protocol. So having this feature will not suddenly make it possible to load all our keymaps, it will just make it possible to simultaneously load a few more. > >No userspace breakages are allowed. > > That's a gross oversimplification. This can be implemented without breaking userspace. Sean

Re: [PATCH 5/6] rc-core: use the full 32 bits for NEC scancodes

2017-04-28 Thread Sean Young
tated before about nec being "ambiguous", even though the protocol variant is different. Sean

Re: [PATCH 6/6] rc-core: add protocol to EVIOC[GS]KEYCODE_V2 ioctl

2017-04-28 Thread Sean Young
On Thu, Apr 27, 2017 at 10:34:23PM +0200, David Härdeman wrote: > It is currently impossible to distinguish between scancodes which have > been generated using different protocols (and scancodes can, and will, > overlap). > > For example: > RC5 message to address 0x00, command 0x03 has scancode 0x

Re: [PATCH v2] [media] mceusb: TX -EPIPE (urb status = -32) lockup fix

2017-04-27 Thread Sean Young
On Thu, Apr 13, 2017 at 04:06:47AM -0400, A Sun wrote: > > fix previous v1 patch error; incorrect location of "ir->pipe_in = pipe;" > caused null pointer dereference > > Bug: > > Once IR blasting or mceusb device commands fail with mce_async_callback() TX > -EPIPE error, all subsequent TX to de

Re: [PATCH] rc-core: use the full 32 bits for NEC scancodes

2017-04-26 Thread Sean Young
On Tue, Apr 25, 2017 at 07:58:09AM +, David Härdeman wrote: > April 24, 2017 5:58 PM, "Sean Young" wrote: > > On Tue, Apr 18, 2017 at 05:50:27PM +0200, David Härdeman wrote: > >> Using the full 32 bits for all kinds of NEC scancodes simplifies rc-core > >>

Re: [PATCH] rc-core: use the full 32 bits for NEC scancodes in wakefilters

2017-04-24 Thread Sean Young
On Tue, Apr 18, 2017 at 10:31:04PM +0200, David Härdeman wrote: > The new sysfs wakefilter API will expose the difference between the NEC > protocols to userspace for no good reason and once exposed, it will be much > more difficult to change the logic. > > By only allowing full NEC32 scancodes to

Re: [PATCH] rc-core: use the full 32 bits for NEC scancodes

2017-04-24 Thread Sean Young
On Tue, Apr 18, 2017 at 05:50:27PM +0200, David Härdeman wrote: > Using the full 32 bits for all kinds of NEC scancodes simplifies rc-core > and the nec decoder without any loss of functionality. At the same time > it ensures that scancodes for NEC16/NEC24/NEC32 do not overlap and > removes lots of

Re: [PATCH 1/5] media: rc: meson-ir: remove irq from struct meson_ir

2017-04-11 Thread Sean Young
, 0, "ir-meson", ir); > > if (ret) { > > dev_err(dev, "failed to request irq\n"); > > goto out_unreg; > > > > Hi Heiner, > > I'm not really convinced this is useful, if somehow for future enhancements > we need the IRQ > number, this will need to be reverted... It's bad form having unused members in a struct, and if it really is needed in some future enhancement, it is easily reintroduced in that future enhancement patch. Sean

[PULL] Synopsys Media Formats

2017-04-03 Thread Sean Paul
Hi Mauro, Here's the pull for Neil's new media formats. We're using a topic branch in drm-misc, so it will not change. Once you have acked, we'll pull this in and apply the rest of Neil's set. Thanks, Sean The following changes since commit a71c9a1c779f2499fb2afc055

Re: [PATCH 1/3] [media] mceusb: RX -EPIPE (urb status = -32) lockup failure fix

2017-03-30 Thread Sean Young
On Wed, Mar 29, 2017 at 06:04:58PM -0400, A Sun wrote: > On 3/29/2017 5:06 PM, Sean Young wrote: > > > > > Anyway, you're right and this patch looks ok. It would be nice to have the > > tx case handled too though. > > > > Thanks > > Sean > >

Re: [PATCH 1/3] [media] mceusb: RX -EPIPE (urb status = -32) lockup failure fix

2017-03-29 Thread Sean Young
On Tue, Mar 28, 2017 at 09:40:05PM -0400, A Sun wrote: > On 3/28/2017 4:25 PM, Sean Young wrote: > > > > >> The unused EVENT_TX_HALT and the apparently extra _kevent functions and > >> kevent_flags are necessary for a later: > >> [PATCH] [media] mceus

Re: [PATCH 1/3] [media] mceusb: RX -EPIPE (urb status = -32) lockup failure fix

2017-03-28 Thread Sean Young
On Mon, Mar 27, 2017 at 04:18:33AM -0400, A Sun wrote: > On 3/26/2017 4:31 PM, Sean Young wrote: > > On Sun, Mar 26, 2017 at 02:28:08PM -0400, A Sun wrote: > >> commit > >> https://github.com/asunxx/linux/commit/17fe3b51f4ad5202a876ea4c92b5d99d4e166823 > >> Aut

Re: [PATCH 1/3] [media] mceusb: RX -EPIPE (urb status = -32) lockup failure fix

2017-03-26 Thread Sean Young
On Sun, Mar 26, 2017 at 02:28:08PM -0400, A Sun wrote: > commit > https://github.com/asunxx/linux/commit/17fe3b51f4ad5202a876ea4c92b5d99d4e166823 > Author: A Sun > Date: Sun, 26 Mar 2017 13:24:18 -0400 Please don't include this. > > Bug: > > RX -EPIPE failure with infinite loop and floodin

Re: [PATCH] mceusb: RX -EPIPE lockup fault and more

2017-03-26 Thread Sean Young
@ static int mceusb_dev_probe(struct usb_interface > *intf, > if (!ir->rc) > goto rc_dev_fail; > > + ir->pipe_in = pipe; > + INIT_WORK(&ir->kevent, mceusb_deferred_kevent); > + > /* wire up inbound data handler */ > - usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in, maxp, > + if (usb_endpoint_xfer_int(ep_in)) { > + usb_fill_int_urb(ir->urb_in, dev, pipe, ir->buf_in, maxp, > mceusb_dev_recv, ir, ep_in->bInterval); > + } else { > + usb_fill_bulk_urb(ir->urb_in, dev, pipe, ir->buf_in, maxp, > + mceusb_dev_recv, ir); > + } > ir->urb_in->transfer_dma = ir->dma_in; > ir->urb_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; > > /* flush buffers on the device */ > - dev_dbg(&intf->dev, "Flushing receive buffers\n"); > + dev_dbg(&intf->dev, "Flushing receive buffers"); > res = usb_submit_urb(ir->urb_in, GFP_KERNEL); > if (res) > - dev_err(&intf->dev, "failed to flush buffers: %d\n", res); > + dev_err(&intf->dev, "failed to flush buffers: %d", res); > > /* figure out which firmware/emulator version this hardware has */ > mceusb_get_emulator_version(ir); > @@ -1405,7 +1475,9 @@ static void mceusb_dev_disconnect(struct usb_interface > *intf) > return; > > ir->usbdev = NULL; > + cancel_work_sync(&ir->kevent); > rc_unregister_device(ir->rc); > + rc_free_device(ir->rc); That change is wrong and will cause a double free. > usb_kill_urb(ir->urb_in); > usb_free_urb(ir->urb_in); > usb_free_coherent(dev, ir->len_in, ir->buf_in, ir->dma_in); Would you be able to split this into multiple commits please? Thanks, Sean

[PATCH] BIT_ULL macro change in 3.13

2017-03-26 Thread Sean Young
Signed-off-by: Sean Young --- backports/backports.txt | 1 + backports/v3.12_bit_ull.patch | 70 +++ 2 files changed, 71 insertions(+) create mode 100644 backports/v3.12_bit_ull.patch diff --git a/backports/backports.txt b/backports/backports.txt

[GIT PULL for v4.12] Staging lirc cleanup

2017-03-25 Thread Sean Young
Hi Mauro, This pull 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 lirc_zilog until that work completes. Thanks Sean The following changes since c

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