[PATCH v2] media: ir-spi: update Andi's e-mail

2018-04-13 Thread Andi Shyti
From: Andi Shyti <andi.sh...@samsung.com> Because I will be leaving Samsung soon, update my e-mail to the etezian.org mail. CC: Mauro Carvalho Chehab <mche...@kernel.org> CC: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- Hi Sean

[PATCH] media: ir-spi: update Andi's e-mail

2018-03-28 Thread Andi Shyti
Because I will be leaving Samsung soon, update my e-mail to the etezian.org mail. CC: Mauro Carvalho Chehab <mche...@kernel.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/ir-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

Re: [PATCH] media: rc: ir-spi: fix duty cycle

2018-01-29 Thread Andi Shyti
Hi Sean, On Sat, Jan 27, 2018 at 02:05:37PM +, Sean Young wrote: > Calculate the pulse rather than having a few preset values. > > Cc: Andi Shyti <andi.sh...@samsung.com> > Signed-off-by: Sean Young <s...@mess.org> Looks good to me. Acked-by: Andi Shyti <andi

Re: [PATCH v3 1/6] media: rc: update sunxi-ir driver to get base clock frequency from devicetree

2017-12-20 Thread Andi Shyti
frequencies. So this value could be > set if the attached ir receiver needs a different base clock frequency, > than the default 8 MHz. > > Signed-off-by: Philipp Rossak <embe...@gmail.com> feel free to add Reviewed-by: Andi Shyti <andi.sh...@samsung.com> Andi

Re: [PATCH 1/5] media: rc: update sunxi-ir driver to get base clock frequency from devicetree

2017-12-17 Thread Andi Shyti
Hi Philipp, just a couple of small nitpicks. > + u32 b_clk_freq; [...] > + /* Base clock frequency (optional) */ > + if (of_property_read_u32(dn, "clock-frequency", _clk_freq)) { > + b_clk_freq = SUNXI_IR_BASE_CLK; > + } > + how about you intialize 'b_clk_freq' to

[PATCH] [media] ir-spi: add SPDX identifier

2017-12-11 Thread Andi Shyti
Replace the original license statement with the SPDX identifier. Update also the copyright owner adding myself as co-owner of the copyright. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/ir-spi.c | 15 +-- 1 file changed, 5 insertions(+), 10 del

Re: [PATCH v2 4/7] media: usb: add SPDX identifiers to some code I wrote

2017-12-11 Thread Andi Shyti
Hi Mauro, > diff --git a/drivers/media/usb/tm6000/tm6000-usb-isoc.h > b/drivers/media/usb/tm6000/tm6000-usb-isoc.h > index 6a13a27c55d7..e69f5cf8fe9f 100644 > --- a/drivers/media/usb/tm6000/tm6000-usb-isoc.h > +++ b/drivers/media/usb/tm6000/tm6000-usb-isoc.h > @@ -1,17 +1,7 @@ > -/* > - *

Re: [PATCH] media: rc: ir-spi needs OF

2017-10-10 Thread Andi Shyti
On Mon, Oct 09, 2017 at 09:46:50AM +0100, Sean Young wrote: > Without device tree, there is no way to use this driver. > > Signed-off-by: Sean Young <s...@mess.org> Thanks, Sean! Acked-by: Andi Shyti <andi.sh...@samsung.com> Andi > --- > drivers/media/rc/Kconfig

Re: [PATCH v2 00/10] media: rc: gpio-ir-recv: driver update

2017-09-10 Thread Andi Shyti
Hi Ladislav, > > > Serie was rebased on top of current linux.git, but something > > > happened there and my userspace decoder no longer works: driver > > > reports completely bogus timing such as (rc-5): > > > ^427, _1342, ^945, _183, ^1128, _671, ^1586, _91, ^1189, _1525, > > > ^1738, _1433,

Re: [PATCH v2 00/10] media: rc: gpio-ir-recv: driver update

2017-09-07 Thread Andi Shyti
see much use if patch 1/10 as it doesn't simplify much, but the rest (from 2 to 10) looks good to me. Once it's tested you can add Acked-by: Andi Shyti <andi.sh...@samsung.com> Andi P.S. I don't see in this V2 the changelog from V1. Next time, please add the changelog.

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

2017-07-04 Thread Andi Shyti
add entry for MediaTek CIR driver for the whole patchset: Reviewed-by: Andi Shyti <andi.sh...@samsung.com> Andi

Re: [PATCH] [media] ir-spi: Fix issues with lirc API

2017-06-12 Thread Andi Shyti
reats > them as cycles of the carrier. Similar to other lirc drivers, do the > conversion with DIV_ROUND_CLOSEST(). > > Fixes: fe052da49201 ("[media] rc: add support for IR LEDs driven through SPI") > Cc: sta...@vger.kernel.org > Signed-off-by: Anton Blanchard <an...@samba.org> Thanks for fixing it. Reviewed-by: Andi Shyti <andi.sh...@samsung.com> Andi

Re: [PATCH] [media] lirc_dev: fix regression in feature check logic in ioctl

2017-04-03 Thread Andi Shyti
Hi Alexey, this has been already fixed in commit bd291208d7f5 ("[media] lirc_dev: LIRC_{G,S}ET_REC_MODE do not work") by Sean. You need to update your kernel or cherry-pick this patch. In any case, for future patches of this kind, some notes through the lines: On Tue, Apr 04, 2017 at

[PATCH] [media] rc: ir-spi: remove unnecessary initialization

2017-03-27 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/ir-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/ir-spi.c b/drivers/media/rc/ir-spi.c index c8863f36686a..4ca43383a8e8 100644 --- a/drivers/media/rc/ir-spi.c +++ b/drivers/me

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

2017-01-10 Thread Andi Shyti
Hi Sean, >include/linux/compiler.h:253:8: sparse: attribute 'no_sanitize_address': > unknown attribute > >> drivers/media/rc/mtk-cir.c:215:41: sparse: too many arguments for function > >> devm_rc_allocate_device >drivers/media/rc/mtk-cir.c: In function 'mtk_ir_probe': >

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

2017-01-05 Thread Andi Shyti
Hi Sean, > + ir->rc = rc_allocate_device(); Yes, you should use devm_rc_allocate_device(...) Besides, standing to this patch which is not in yet: https://lkml.org/lkml/2016/12/18/39 rc_allocate_device should provide the driver type during allocation, so it should be: ir->rc =

[PATCH v6 0/6] Add support for IR transmitters

2016-12-18 Thread Andi Shyti
which avoids waiting for transmitters. patch 6: added new properties to the dts specification patch 7: the driver uses the pulse/space input and converts it to a bit stream. Andi Shyti (6): [media] rc-main: assign driver type during allocation [media] rc-main: split setup

[PATCH v6 1/6] [media] rc-main: assign driver type during allocation

2016-12-18 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/hid/hid-picolcd_cir.c | 3 +-- drivers/media/cec/cec-core.c| 3 +-- drivers/media/common/siano/smsir.c | 3 +-- drivers/media/i2c/ir-kbd-i2c.c

[PATCH v6 2/6] [media] rc-main: split setup and unregister functions

2016-12-18 Thread Andi Shyti
? */ Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-main.c | 143 + 1 file changed, 81 insertions(+), 62 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media/

[PATCH v6 5/6] Documentation: bindings: add documentation for ir-spi device driver

2016-12-18 Thread Andi Shyti
Document the ir-spi driver's binding which is a IR led driven through the SPI line. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- .../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ++ 1 file changed, 2

[PATCH v6 3/6] [media] rc-core: add support for IR raw transmitters

2016-12-18 Thread Andi Shyti
to be registered as raw devices. Suggested-by: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-main.c | 42 +- include/media/rc-core.h| 9

[PATCH v6 4/6] [media] rc-ir-raw: do not generate any receiving thread for raw transmitters

2016-12-18 Thread Andi Shyti
Raw IR transmitters do not need any thread listening for occurring events. Check the driver type before running the thread. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-ir-raw.c | 17 - 1 file

[PATCH v6 6/6] [media] rc: add support for IR LEDs driven through SPI

2016-12-18 Thread Andi Shyti
val = 60; ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, ); if (ret < 0) return -1; n = write(fd, buffer, BUF_LEN); if (n < 0 || n != BUF_LEN) ret = -1; close(fd); Signed-off-by: Andi Shyti <andi.sh...@samsung.com>

Re: [PATCH v5 2/6] [media] rc-main: split setup and unregister functions

2016-12-18 Thread Andi Shyti
Hi Sean, > On Fri, Dec 16, 2016 at 12:10:26PM +, Sean Young wrote: > > Sorry to add to your woes, but there are some checkpatch warnings and > > errors. Please can you correct these. One is below. > > Actually, the changes are pretty minor, I can fix them up before sending > them to Mauro.

[PATCH v6 1/6] [media] rc-main: assign driver type during allocation

2016-12-16 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- Hi, Sorry for further spamming, but these drivers change so fast and I'm taking too long to finalize this patch series. This is the correct patch which fixes the compile error from the

[PATCH v5 4/6] [media] rc-ir-raw: do not generate any receiving thread for raw transmitters

2016-12-15 Thread Andi Shyti
Raw IR transmitters do not need any thread listening for occurring events. Check the driver type before running the thread. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-ir-raw.c | 17 - 1 file

[PATCH v5 5/6] Documentation: bindings: add documentation for ir-spi device driver

2016-12-15 Thread Andi Shyti
Document the ir-spi driver's binding which is a IR led driven through the SPI line. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- .../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ++ 1 file changed, 2

[PATCH v5 6/6] [media] rc: add support for IR LEDs driven through SPI

2016-12-15 Thread Andi Shyti
val = 60; ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, ); if (ret < 0) return -1; n = write(fd, buffer, BUF_LEN); if (n < 0 || n != BUF_LEN) ret = -1; close(fd); Signed-off-by: Andi Shyti <andi.sh...@samsung.com>

[PATCH v5 2/6] [media] rc-main: split setup and unregister functions

2016-12-15 Thread Andi Shyti
Move the input device allocation, map and protocol handling to different functions. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-main.c | 143 + 1 file changed, 81 inser

[PATCH v5 0/6] Add support for IR transmitters

2016-12-15 Thread Andi Shyti
specification patch 7: the driver uses the pulse/space input and converts it to a bit stream. Andi Shyti (6): [media] rc-main: assign driver type during allocation [media] rc-main: split setup and unregister functions [media] rc-core: add support for IR raw transmitters [media] rc-ir

[PATCH v5 1/6] [media] rc-main: assign driver type during allocation

2016-12-15 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/hid/hid-picolcd_cir.c | 3 +-- drivers/media/cec/cec-core.c| 4 ++-- drivers/media/common/siano/smsir.c | 3 +-- drivers/media/i2c/ir-kbd-i2c.c

[PATCH v5 3/6] [media] rc-core: add support for IR raw transmitters

2016-12-15 Thread Andi Shyti
to be registered as raw devices. Suggested-by: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-main.c | 42 +- include/media/rc-core.h| 9

Re: [PATCH v4 2/6] [media] rc-main: split setup and unregister functions

2016-12-15 Thread Andi Shyti
> > + /* rc_open will be called here */ > > + rc = input_register_device(dev->input_dev); > > + if (rc) > > + goto out_table; > > + > > + dev->input_dev->dev.parent = >dev; > > + memcpy(>input_dev->id, >input_id, sizeof(dev->input_id)); > > + dev->input_dev->phys =

[PATCH v4 4/6] [media] rc-ir-raw: do not generate any receiving thread for raw transmitters

2016-12-14 Thread Andi Shyti
Raw IR transmitters do not need any thread listening for occurring events. Check the driver type before running the thread. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-ir-raw.c | 17 - 1 file

[PATCH v4 1/6] [media] rc-main: assign driver type during allocation

2016-12-14 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/hid/hid-picolcd_cir.c | 3 +-- drivers/media/cec/cec-core.c| 3 +-- drivers/media/common/siano/smsir.c | 3 +-- drivers/media/i2c/ir-kbd-i2c.c

[PATCH v4 2/6] [media] rc-main: split setup and unregister functions

2016-12-14 Thread Andi Shyti
Move the input device allocation, map and protocol handling to different functions. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-main.c | 143 + 1 file changed, 81 inser

[PATCH v4 0/6] Add support for IR transmitters

2016-12-14 Thread Andi Shyti
leds/irled/spi-ir-led.txt patch 6: uses the new devm_* allocation and registration rc functions [*] https://www.spinics.net/lists/linux-leds/msg07062.html https://www.spinics.net/lists/linux-leds/msg07164.html https://www.spinics.net/lists/linux-leds/msg07167.html Andi Shyti

[PATCH v4 3/6] [media] rc-core: add support for IR raw transmitters

2016-12-14 Thread Andi Shyti
to be registered as raw devices. Suggested-by: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- drivers/media/rc/rc-main.c | 42 +- include/media/rc-core.h| 9

[PATCH v4 5/6] Documentation: bindings: add documentation for ir-spi device driver

2016-12-14 Thread Andi Shyti
Document the ir-spi driver's binding which is a IR led driven through the SPI line. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> Reviewed-by: Sean Young <s...@mess.org> --- .../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ++ 1 file changed, 2

[PATCH v4 6/6] [media] rc: add support for IR LEDs driven through SPI

2016-12-14 Thread Andi Shyti
val = 60; ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, ); if (ret < 0) return -1; n = write(fd, buffer, BUF_LEN); if (n < 0 || n != BUF_LEN) ret = -1; close(fd); Signed-off-by: Andi Shyti <andi.sh...@samsung.com>

Re: [PATCH 3/8] [media] lirc: LIRC_{G,S}ET_SEND_MODE fail if device cannot transmit

2016-12-06 Thread Andi Shyti
Reviewed-by: Andi Shyti <andi.sh...@samsung.com> On Fri, Dec 02, 2016 at 05:16:09PM +, Sean Young wrote: > These ioctls should not succeed if the device cannot send. Also make it > clear that these ioctls should return the lirc mode, although the actual > value does not chan

Re: [PATCH 1/8] [media] mceusb: LIRC_SET_SEND_CARRIER returns 0 on success

2016-12-06 Thread Andi Shyti
Reviewed-by: Andi Shyti <andi.sh...@samsung.com> On Fri, Dec 02, 2016 at 05:16:07PM +, Sean Young wrote: > LIRC_SET_SEND_CARRIER ioctl should not return the carrier used, it > should return 0. > > Signed-off-by: Sean Young <s...@mess.org> > --- > drivers/media/

Re: [PATCH 2/8] [media] lirc_dev: LIRC_{G,S}ET_REC_MODE do not work

2016-12-06 Thread Andi Shyti
> Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these > ioctls no longer work. > > Signed-off-by: Sean Young <s...@mess.org> > Cc: Andi Shyti <andi.sh...@samsung.com> > Cc: <sta...@vger.kernel.org> # v4.8+ mmhhh... yes, right! :) R

Re: [RFC] Documentation: media, leds: move IR LED remote controllers from media to LED

2016-11-22 Thread Andi Shyti
Hi Mauro, > > this is purely a request for comments after a discussion had with > > Rob and Jacek [*] about where to place the ir leds binding. Rob wants > > the binding to be under led, while Jacek wants it in media... > > "Ubi maior minor cessat": it goes to LED and they can be organized > > in

[RFC] Documentation: media, leds: move IR LED remote controllers from media to LED

2016-11-10 Thread Andi Shyti
Hi, this is purely a request for comments after a discussion had with Rob and Jacek [*] about where to place the ir leds binding. Rob wants the binding to be under led, while Jacek wants it in media... "Ubi maior minor cessat": it goes to LED and they can be organized in a subdirectory. Standing

Re: [PATCH v3 5/6] Documentation: bindings: add documentation for ir-spi device driver

2016-11-10 Thread Andi Shyti
Hi Jacek, > > > > > Only DT bindings of LED class drivers should be placed in > > > > > Documentation/devicetree/bindings/leds. Please move it to the > > > > > media bindings. > > > > > > > > that's where I placed it first, but Rob asked me to put it in the > > > > LED directory and Cc the LED

Re: [PATCH v3 5/6] Documentation: bindings: add documentation for ir-spi device driver

2016-11-03 Thread Andi Shyti
Hi Jacek, > > > Only DT bindings of LED class drivers should be placed in > > > Documentation/devicetree/bindings/leds. Please move it to the > > > media bindings. > > > > that's where I placed it first, but Rob asked me to put it in the > > LED directory and Cc the LED mailining list. > > > >

Re: [PATCH v3 5/6] Documentation: bindings: add documentation for ir-spi device driver

2016-11-03 Thread Andi Shyti
Hi Jacek, > Only DT bindings of LED class drivers should be placed in > Documentation/devicetree/bindings/leds. Please move it to the > media bindings. that's where I placed it first, but Rob asked me to put it in the LED directory and Cc the LED mailining list. That's the discussion of the

[PATCH v3 2/6] [media] rc-main: split setup and unregister functions

2016-11-02 Thread Andi Shyti
Move the input device allocation, map and protocol handling to different functions. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-main.c | 143 + 1 file changed, 81 insertions(+), 62 deletions(-) diff --git a/drivers

[PATCH v3 4/6] [media] rc-ir-raw: do not generate any receiving thread for raw transmitters

2016-11-02 Thread Andi Shyti
Raw IR transmitters do not need any thread listening for occurring events. Check the driver type before running the thread. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-ir-raw.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff

[PATCH v3 5/6] Documentation: bindings: add documentation for ir-spi device driver

2016-11-02 Thread Andi Shyti
Document the ir-spi driver's binding which is a IR led driven through the SPI line. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- .../devicetree/bindings/leds/spi-ir-led.txt| 29 ++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devi

[PATCH v3 1/6] [media] rc-main: assign driver type during allocation

2016-11-02 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/hid/hid-picolcd_cir.c | 3 +-- drivers/media/common/siano/smsir.c | 3 +-- drivers/media/i2c/ir-kbd-i2c.c | 2 +- drivers/media/pci/bt8xx/bttv-input.c| 2 +- drivers/media/pci/cx2

[PATCH v3 6/6] [media] rc: add support for IR LEDs driven through SPI

2016-11-02 Thread Andi Shyti
val = 60; ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, ); if (ret < 0) return -1; n = write(fd, buffer, BUF_LEN); if (n < 0 || n != BUF_LEN) ret = -1; close(fd); Signed-off-by: Andi Shyti <andi.sh...@samsung.com>

[PATCH v3 0/6] Add support for IR transmitters

2016-11-02 Thread Andi Shyti
the comments from Sean added also Sean's review. Andi Shyti (6): [media] rc-main: assign driver type during allocation [media] rc-main: split setup and unregister functions [media] rc-core: add support for IR raw transmitters [media] rc-ir-raw: do not generate any receiving thread

[PATCH v3 3/6] [media] rc-core: add support for IR raw transmitters

2016-11-02 Thread Andi Shyti
to be registered as raw devices. Suggested-by: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-main.c | 42 +- include/media/rc-core.h| 9 ++--- 2 files changed, 31 insertions(+),

Re: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-11-01 Thread Andi Shyti
Hi Sean, > > > Andi, it would be good to know what the use-case for the original change > > > is. > > > > the use case is the ir-spi itself which doesn't need the lirc to > > perform any waiting on its behalf. > > Here is the crux of the problem: in the ir-spi case no wait will actually >

Re: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-11-01 Thread Andi Shyti
Hi Sean, > Andi, it would be good to know what the use-case for the original change is. the use case is the ir-spi itself which doesn't need the lirc to perform any waiting on its behalf. To me it just doesn't look right to simulate a fake transmission period and wait unnecessary time. Of

Re: [PATCH] [media] lirc: introduce LIRC_SET_TRANSMITTER_WAIT ioctl

2016-10-31 Thread Andi Shyti
Hi Sean. > > > ret *= sizeof(unsigned int); > > > > > > - /* > > > - * The lircd gap calculation expects the write function to > > > - * wait for the actual IR signal to be transmitted before > > > - * returning. > > > - */ > > > - towait = ktime_us_delta(ktime_add_us(start, duration),

Re: [PATCH] [media] lirc: introduce LIRC_SET_TRANSMITTER_WAIT ioctl

2016-10-28 Thread Andi Shyti
Hi Sean, > ret *= sizeof(unsigned int); > > - /* > - * The lircd gap calculation expects the write function to > - * wait for the actual IR signal to be transmitted before > - * returning. > - */ > - towait = ktime_us_delta(ktime_add_us(start, duration),

Re: [PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-10-27 Thread Andi Shyti
Hi Sean, it's been a while :) I was going through your review fixing what needs to be fixed, but... > > @@ -153,7 +153,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, > > const char __user *buf, > > } > > > > ret = dev->tx_ir(dev, txbuf, count); > > - if (ret < 0) > > +

Re: [PATCH v2 6/7] Documentation: bindings: add documentation for ir-spi device driver

2016-09-01 Thread Andi Shyti
Hi Rob, > > Document the ir-spi driver's binding which is a IR led driven > > through the SPI line. > > > > Signed-off-by: Andi Shyti <andi.sh...@samsung.com> > > --- > > Documentation/devicetree/bindings/media/spi-ir.txt | 26 > > +

Re: [PATCH v2 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-09-01 Thread Andi Shyti
> Thanks Andi, this is looking great! Thanks Sean! With your reviews the whole thing looks much better now :) I agree with all your points here, I will fix them. Can I add your reviewd-by? Thanks, Andi -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a

Re: [PATCH v2 1/7] [media] rc-main: assign driver type during allocation

2016-09-01 Thread Andi Shyti
Hi Sean, > > ir = kzalloc(sizeof(*ir), GFP_KERNEL); > > - dev = rc_allocate_device(); > > + dev = rc_allocate_device(RC_DRIVER_IR_RAW); > > if (!ir || !dev) > > goto err_out_free; > > > > If ir->sampling = 0 then it should be RC_DRIVER_SCANCODE. > > > > @@ -481,7

[PATCH v2 3/7] [media] rc-core: add support for IR raw transmitters

2016-09-01 Thread Andi Shyti
to be registered as raw devices. Suggested-by: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-main.c | 39 +++ include/media/rc-core.h| 9 ++--- 2 files changed, 29 insertions(+),

[PATCH v2 0/7] Add support for IR transmitters

2016-09-01 Thread Andi Shyti
it to a bit stream. Thanks, Andi Andi Shyti (7): [media] rc-main: assign driver type during allocation [media] rc-main: split setup and unregister functions [media] rc-core: add support for IR raw transmitters [media] rc-ir-raw: do not generate any receiving thread for raw

[PATCH v2 6/7] Documentation: bindings: add documentation for ir-spi device driver

2016-09-01 Thread Andi Shyti
Document the ir-spi driver's binding which is a IR led driven through the SPI line. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- Documentation/devicetree/bindings/media/spi-ir.txt | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 Documentation/devi

[PATCH v2 4/7] [media] rc-ir-raw: do not generate any receiving thread for raw transmitters

2016-09-01 Thread Andi Shyti
Raw IR transmitters do not need any thread listening for occurring events. Check the driver type before running the thread. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-ir-raw.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff

[PATCH v2 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-09-01 Thread Andi Shyti
val = 60; ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, ); if (ret < 0) return -1; n = write(fd, buffer, BUF_LEN); if (n < 0 || n != BUF_LEN) ret = -1; close(fd); Signed-off-by: Andi Shyti <andi.sh...@samsung.c

[PATCH v2 1/7] [media] rc-main: assign driver type during allocation

2016-09-01 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/hid/hid-picolcd_cir.c | 3 +-- drivers/media/common/siano/smsir.c | 3 +-- drivers/media/i2c/ir-kbd-i2c.c | 2 +- drivers/media/pci/bt8xx/bttv-input.c| 2 +- drivers/media/pci/cx2

[PATCH v2 5/7] [media] ir-lirc-codec: don't wait any transmitting time for tx only devices

2016-09-01 Thread Andi Shyti
Transmitters do not need to wait until the data has been sent (and of course received). Return before waiting. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/ir-lirc-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/i

[PATCH v2 2/7] [media] rc-main: split setup and unregister functions

2016-09-01 Thread Andi Shyti
Move the input device allocation, map and protocol handling to different functions. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-main.c | 144 + 1 file changed, 81 insertions(+), 63 deletions(-) diff --git a/drivers

Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-21 Thread Andi Shyti
Hi Sean, > > > > + ret = regulator_enable(idata->regulator); > > > > + if (ret) > > > > + return ret; > > > > + > > > > + mutex_lock(>mutex); > > > > + idata->xfer.len = n; > > > > + idata->xfer.tx_buf = buffer; > > > > + mutex_unlock(>mutex); > >

Re: [RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-20 Thread Andi Shyti
Hi Sean, > > + int ret; > > + struct ir_spi_data *idata = (struct ir_spi_data *) dev->priv; > > No cast needed. yes, thanks. > > + ret = regulator_enable(idata->regulator); > > + if (ret) > > + return ret; > > + > > + mutex_lock(>mutex); > > + idata->xfer.len = n; > > +

Re: [RFC 5/7] [media] ir-lirc-codec: do not handle any buffer for raw transmitters

2016-07-20 Thread Andi Shyti
Hi Sean, > > Raw transmitters receive the data which need to be sent to > > receivers from userspace as stream of bits, they don't require > > any handling from the lirc framework. > > No drivers of type RC_DRIVER_IR_RAW_TX should handle tx just like any > other device, so data should be

Re: [RFC 3/7] [media] rc-core: add support for IR raw transmitters

2016-07-20 Thread Andi Shyti
Hi Sean, > > + if (dev->driver_type == RC_DRIVER_IR_RAW || > > + dev->driver_type == RC_DRIVER_IR_RAW_TX) { > > Here the if is wrong. It should be > "if (dev->driver_type != RC_DRIVER_IR_RAW_TX)". Note that as result > the decoder thread is not started, so patch 4

Re: [RFC 1/7] [media] rc-main: assign driver type during allocation

2016-07-20 Thread Andi Shyti
Hi Sean, > > The driver type can be assigned immediately when an RC device > > requests to the framework to allocate the device. > > > > This is an 'enum rc_driver_type' data type and specifies whether > > the device is a raw receiver or scancode receiver. The type will > > be given as parameter

[RFC 5/7] [media] ir-lirc-codec: do not handle any buffer for raw transmitters

2016-07-19 Thread Andi Shyti
Raw transmitters receive the data which need to be sent to receivers from userspace as stream of bits, they don't require any handling from the lirc framework. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/ir-lirc-codec.c | 30 +++---

[RFC 2/7] [media] rc-main: split setup and unregister functions

2016-07-19 Thread Andi Shyti
Move the input device allocation, map and protocol handling to different functions. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-main.c | 140 + 1 file changed, 77 insertions(+), 63 deletions(-) diff --git a/drivers

[RFC 7/7] [media] rc: add support for IR LEDs driven through SPI

2016-07-19 Thread Andi Shyti
; 0 || n != BUF_LEN) ret = -1; close(fd); Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/Kconfig | 9 drivers/media/rc/Makefile | 1 + drivers/media/rc/ir-spi.c | 133 ++ 3 files changed, 143 i

[RFC 1/7] [media] rc-main: assign driver type during allocation

2016-07-19 Thread Andi Shyti
. Suggested-by: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-main.c | 4 +++- include/media/rc-core.h| 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-

[RFC 6/7] Documentation: bindings: add documentation for ir-spi device driver

2016-07-19 Thread Andi Shyti
Document the ir-spi driver's binding which is a IR led driven through the SPI line. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- Documentation/devicetree/bindings/media/spi-ir.txt | 20 1 file changed, 20 insertions(+) create mode 100644 Documentation/devi

[RFC 3/7] [media] rc-core: add support for IR raw transmitters

2016-07-19 Thread Andi Shyti
to be registered as raw devices. Suggested-by: Sean Young <s...@mess.org> Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-main.c | 35 +++ include/media/rc-core.h| 1 + 2 files changed, 24 insertions(+), 12 deletions(-)

[RFC 4/7] [media] rc-ir-raw: do not generate any receiving thread for raw transmitters

2016-07-19 Thread Andi Shyti
Raw IR transmitters do not need any thread listening for occurring events. Check the driver type before running the thread. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/rc-ir-raw.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff

[RFC 0/7] Add support for IR transmitters

2016-07-19 Thread Andi Shyti
by abusing on the driver type check. The last rfc-patch adds support for an IR transmitter driven by the MOSI line of an SPI controller, it's the case of the Samsung TM2(e) board which support is going to come soon. Please let me know if there is anything to improve. Thanks, Andi Andi Shyti (7): [medi

[PATCH v3 10/15] [media] lirc_dev: remove compat_ioctl assignment

2016-07-06 Thread Andi Shyti
There is no need to check for CONFIG_COMPAT and consequently assign the compat_ioctl. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 7

[PATCH v3 03/15] [media] lirc_dev: remove unnecessary debug prints

2016-07-06 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 25 - 1 file changed, 25 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 154e553..9f20f94 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/d

[PATCH v3 01/15] [media] lirc_dev: place buffer allocation on separate function

2016-07-06 Thread Andi Shyti
During the driver registration, move the buffer allocation on a separate function. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 57 +++-- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/drivers

[PATCH v3 15/15] [media] lirc_dev: use LIRC_CAN_REC() define to check if the device can receive

2016-07-06 Thread Andi 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.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/m

[PATCH v3 02/15] [media] lirc_dev: allow bufferless driver registration

2016-07-06 Thread Andi 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.sh...@samsung.

[PATCH v3 00/15] lirc_dev fixes and beautification

2016-07-06 Thread Andi Shyti
, Andi Andi Shyti (15): [media] lirc_dev: place buffer allocation on separate function [media] lirc_dev: allow bufferless driver registration [media] lirc_dev: remove unnecessary debug prints [media] lirc_dev: replace printk with pr_* or dev_* [media] lirc_dev: simplify goto paths

[PATCH v3 08/15] [media] lirc_dev: remove double if ... else statement

2016-07-06 Thread Andi 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.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/d

[PATCH v3 04/15] [media] lirc_dev: replace printk with pr_* or dev_*

2016-07-06 Thread 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.sh...@samsung.com> --- d

[PATCH v3 12/15] [media] lirc_dev: fix error return value

2016-07-06 Thread Andi 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. Replace ENOSYS with EPERM. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev

[PATCH v3 14/15] [media] lirc_dev: fix potential segfault

2016-07-06 Thread Andi Shyti
, the system segfaults. Check the pointer value before calling the above functions. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/me

[PATCH v3 11/15] [media] lirc_dev: fix variable constant comparisons

2016-07-06 Thread Andi Shyti
the constant on the right side of the test Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index 09bdd69..c2b32e0

[PATCH v3 09/15] [media] lirc_dev: merge three if statements in only one

2016-07-06 Thread Andi Shyti
The three if statements check the same thing, merge them in only one statement. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/me

[PATCH v3 05/15] [media] lirc_dev: simplify goto paths

2016-07-06 Thread Andi Shyti
The code can be rearranged so that some goto paths can be removed Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/d

[PATCH v3 06/15] [media] lirc_dev: do not use goto to create loops

2016-07-06 Thread Andi Shyti
... use "do .. while" instead. Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index b11d026..cfa6031 1006

[PATCH v3 13/15] [media] lirc_dev: extremely trivial comment style fix

2016-07-06 Thread Andi Shyti
Signed-off-by: Andi Shyti <andi.sh...@samsung.com> --- drivers/media/rc/lirc_dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c index ac00433..c78fe2b 100644 --- a/drivers/media/rc/lirc_dev.c +++ b/drivers/me

[PATCH v3 07/15] [media] lirc_dev: simplify if statement in lirc_add_to_buf

2016-07-06 Thread Andi 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.sh...@samsung.com> --- drivers/media

  1   2   >