From: Andi Shyti
Because I will be leaving Samsung soon, update my e-mail to the
etezian.org mail.
CC: Mauro Carvalho Chehab
CC: Sean Young
Signed-off-by: Andi Shyti
---
Hi Sean,
thanks for the review and sorry for the late reply. Here is the
patch with my mail changed also in the
Because I will be leaving Samsung soon, update my e-mail to the
etezian.org mail.
CC: Mauro Carvalho Chehab
Signed-off-by: Andi Shyti
---
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
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
> Signed-off-by: Sean Young
Looks good to me.
Acked-by: Andi Shyti
Thanks,
Andi
encies. 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
feel free to add
Reviewed-by: Andi Shyti
Andi
Hi Philipp,
just a couple of small nitpicks.
> + u32 b_clk_freq;
[...]
> + /* Base clock frequency (optional) */
> + if (of_property_read_u32(dn, "clock-frequency", &b_clk_freq)) {
> + b_clk_freq = SUNXI_IR_BASE_CLK;
> + }
> +
how about you intialize 'b_clk_freq' to
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
---
drivers/media/rc/ir-spi.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers
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 @@
> -/*
> - * tm6000
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
Thanks, Sean!
Acked-by: Andi Shyti
Andi
> ---
> drivers/media/rc/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
&
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, ^915
't 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
P.S. I don't see in this V2 the changelog from V1. Next time,
please add the changelog.
ERS: add entry for MediaTek CIR driver
for the whole patchset:
Reviewed-by: Andi Shyti
Andi
s 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
Thanks for fixing it.
Reviewed-by: Andi Shyti
Andi
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 02:19:16AM
Signed-off-by: Andi Shyti
---
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/media/rc/ir-spi.c
@@ -58,7 +58,7
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':
>drivers/media/
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 = rc_a
been dropped and replaced with a new one
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 alloc
ice device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young
? */
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
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/rc/rc-main.c
index a6bbceb7147f..7c8411a40305
Document the ir-spi driver's binding which is a IR led driven
through the SPI line.
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
.../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ++
1 file changed, 29 insertions(+)
create mode 100644 Document
need to be
registered as raw devices.
Suggested-by: Sean Young
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
drivers/media/rc/rc-main.c | 42 +-
include/media/rc-core.h| 9 ++---
2 files changed, 31 insertions(+), 20 deletions(-)
diff
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
Reviewed-by: Sean Young
---
drivers/media/rc/rc-ir-raw.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a
urn -1;
val = 60;
ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &val);
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
Reviewe
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. So
ice device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young
Document the ir-spi driver's binding which is a IR led driven
through the SPI line.
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
.../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ++
1 file changed, 29 insertions(+)
create mode 100644 Document
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
Reviewed-by: Sean Young
---
drivers/media/rc/rc-ir-raw.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a
urn -1;
val = 60;
ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &val);
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
Reviewe
Move the input device allocation, map and protocol handling to
different functions.
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
drivers/media/rc/rc-main.c | 143 +
1 file changed, 81 insertions(+), 62 deletions(-)
diff --git a/drivers
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 and unregister functions
[media] rc-core: add support
ice device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young
need to be
registered as raw devices.
Suggested-by: Sean Young
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
drivers/media/rc/rc-main.c | 42 +-
include/media/rc-core.h| 9 ++---
2 files changed, 31 insertions(+), 20 deletions(-)
diff
> > + /* rc_open will be called here */
> > + rc = input_register_device(dev->input_dev);
> > + if (rc)
> > + goto out_table;
> > +
> > + dev->input_dev->dev.parent = &dev->dev;
> > + memcpy(&dev->input_dev->id, &dev->input_id, sizeof(dev->input_id));
> > + dev->input_dev->phy
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
Reviewed-by: Sean Young
---
drivers/media/rc/rc-ir-raw.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a
ice device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young
Move the input device allocation, map and protocol handling to
different functions.
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
drivers/media/rc/rc-main.c | 143 +
1 file changed, 81 insertions(+), 62 deletions(-)
diff --git a/drivers
ns [*] the binding has been placed under
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/li
need to be
registered as raw devices.
Suggested-by: Sean Young
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
drivers/media/rc/rc-main.c | 42 +-
include/media/rc-core.h| 9 ++---
2 files changed, 31 insertions(+), 20 deletions(-)
diff
Document the ir-spi driver's binding which is a IR led driven
through the SPI line.
Signed-off-by: Andi Shyti
Reviewed-by: Sean Young
---
.../devicetree/bindings/leds/irled/spi-ir-led.txt | 29 ++
1 file changed, 29 insertions(+)
create mode 100644 Document
urn -1;
val = 60;
ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &val);
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
Reviewe
Reviewed-by: Andi Shyti
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 change.
>
> Signed-off
Reviewed-by: Andi Shyti
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
> ---
> drivers/media/rc/mceusb.c | 4 ++--
> 1 file changed, 2 inser
> Since "273b902 [media] lirc_dev: use LIRC_CAN_REC() define" these
> ioctls no longer work.
>
> Signed-off-by: Sean Young
> Cc: Andi Shyti
> Cc: # v4.8+
mmhhh... yes, right! :)
Reviewed-by: Andi Shyti
Thanks,
Andi
> ---
> drivers/media/rc/lirc_d
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
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
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 ma
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.
> >
> > T
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 vers
Move the input device allocation, map and protocol handling to
different functions.
Signed-off-by: Andi Shyti
---
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
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
---
drivers/media/rc/rc-ir-raw.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/media/rc/rc-ir
Document the ir-spi driver's binding which is a IR led driven
through the SPI line.
Signed-off-by: Andi Shyti
---
.../devicetree/bindings/leds/spi-ir-led.txt| 29 ++
1 file changed, 29 insertions(+)
create mode 100644 Documentation/devicetree/bindings/leds/s
ice device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young
urn -1;
val = 60;
ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &val);
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
Reviewe
tch 6: fixed all 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
need to be
registered as raw devices.
Suggested-by: Sean Young
Signed-off-by: Andi Shyti
---
drivers/media/rc/rc-main.c | 42 +-
include/media/rc-core.h| 9 ++---
2 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/drivers/media/
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
> happ
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 course
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), kti
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), ktime_g
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)
> > +
Hi Rob,
> > Document the ir-spi driver's binding which is a IR led driven
> > through the SPI line.
> >
> > Signed-off-by: Andi Shyti
> > ---
> > Documentation/devicetree/bindings/media/spi-ir.txt | 26
> > ++
> > 1 f
> 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 mes
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 +481,
need to be
registered as raw devices.
Suggested-by: Sean Young
Signed-off-by: Andi Shyti
---
drivers/media/rc/rc-main.c | 39 +++
include/media/rc-core.h| 9 ++---
2 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/drivers/media/rc/rc-m
converts 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
Document the ir-spi driver's binding which is a IR led driven
through the SPI line.
Signed-off-by: Andi Shyti
---
Documentation/devicetree/bindings/media/spi-ir.txt | 26 ++
1 file changed, 26 insertions(+)
create mode 100644 Documentation/devicetree/bindings/medi
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
---
drivers/media/rc/rc-ir-raw.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/media/rc/rc-ir
urn -1;
val = 60;
ret = ioctl(fd, LIRC_SET_SEND_DUTY_CYCLE, &val);
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
---
d
ice device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young
Move the input device allocation, map and protocol handling to
different functions.
Signed-off-by: Andi Shyti
---
drivers/media/rc/rc-main.c | 144 +
1 file changed, 81 insertions(+), 63 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers
Transmitters do not need to wait until the data has been sent
(and of course received). Return before waiting.
Signed-off-by: Andi Shyti
---
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
Hi Sean,
> > > > + ret = regulator_enable(idata->regulator);
> > > > + if (ret)
> > > > + return ret;
> > > > +
> > > > + mutex_lock(&idata->mutex);
> > > > + idata->xfer.len = n;
> > > > + idata->xfer.tx_buf = buffer;
> > > > + mutex_unlock(&idata
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(&idata->mutex);
> > + idata->xfer.len = n;
>
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 provided
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 won
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
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
---
drivers/media/rc/ir-lirc-codec.c | 30 +++---
1 file changed, 19 inser
ice device.
Suggested-by: Sean Young
Signed-off-by: Andi Shyti
---
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-main.c
index 7dfc7c2..6403674 100644
--- a/dri
Move the input device allocation, map and protocol handling to
different functions.
Signed-off-by: Andi Shyti
---
drivers/media/rc/rc-main.c | 140 +
1 file changed, 77 insertions(+), 63 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers
< 0 || n != BUF_LEN)
ret = -1;
close(fd);
Signed-off-by: Andi Shyti
---
drivers/media/rc/Kconfig | 9
drivers/media/rc/Makefile | 1 +
drivers/media/rc/ir-spi.c | 133 ++
3 files changed, 143 insertions(+)
create mo
Document the ir-spi driver's binding which is a IR led driven
through the SPI line.
Signed-off-by: Andi Shyti
---
Documentation/devicetree/bindings/media/spi-ir.txt | 20
1 file changed, 20 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/spi-i
need to be
registered as raw devices.
Suggested-by: Sean Young
Signed-off-by: Andi Shyti
---
drivers/media/rc/rc-main.c | 35 +++
include/media/rc-core.h| 1 +
2 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/dr
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
---
drivers/media/rc/rc-ir-raw.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/media/rc/rc-ir
achieve "my" goal 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 improv
There is no need to check for CONFIG_COMPAT and consequently
assign the compat_ioctl.
Signed-off-by: Andi Shyti
---
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 71ff820..09bdd69 100644
--- a
Signed-off-by: Andi Shyti
---
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/drivers/media/rc/lirc_dev.c
During the driver registration, move the buffer allocation on a
separate function.
Signed-off-by: Andi Shyti
---
drivers/media/rc/lirc_dev.c | 57 +++--
1 file changed, 34 insertions(+), 23 deletions(-)
diff --git a/drivers/media/rc/lirc_dev.c b/drivers
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
---
drivers/media/rc/lirc_dev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/lirc_dev.c b/dr
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
---
drivers/med
,
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
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
---
drivers/media/rc/lirc_dev.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/media/rc/lirc_dev.c b
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
---
drivers/media/rc/lirc_dev.c
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
---
drivers/media/rc/lirc_dev.c | 8
1 file chang
, the system segfaults.
Check the pointer value before calling the above functions.
Signed-off-by: Andi Shyti
---
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/media/rc/lirc_dev.c
index c78fe2b
place the constant on the right side of the test
Signed-off-by: Andi Shyti
---
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 100644
--- a/drivers/media/rc/lirc_
The three if statements check the same thing, merge them in only
one statement.
Signed-off-by: Andi Shyti
---
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/media/rc/lirc_dev.c
index a8a5116
The code can be rearranged so that some goto paths can be removed
Signed-off-by: Andi Shyti
---
drivers/media/rc/lirc_dev.c | 34 --
1 file changed, 12 insertions(+), 22 deletions(-)
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index
... use "do .. while" instead.
Signed-off-by: Andi Shyti
---
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 100644
--- a/drivers/media/rc/lirc_d
Signed-off-by: Andi Shyti
---
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/media/rc/lirc_dev.c
@@ -687,7
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
---
drivers/media/rc/lirc_dev.c | 31 +++-
1 - 100 of 139 matches
Mail list logo