At this point of the execution in the function cx24117_attach()
demod cannot be '0'. In that case the function returns earlier
with an error value ('NULL'). Remove the if statement.
This error has been reported by scan.coverity.com
Signed-off-by: Andi Shyti a...@etezian.org
---
drivers/media
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);
> >
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
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
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
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;
> > +
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
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(-)
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
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
; 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
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 +++---
.
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-
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
Hi Rob,
> > The ir-spi is a simple device driver which supports the
> > connection between an IR LED and the MOSI line of an SPI device.
>
> Please split the binding from the driver.
OK!
> > +Device tree bindings for IR LED connected through SPI bus which is used as
> > +remote controller.
>
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
... 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
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
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
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
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
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
, 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
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
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
,
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
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
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.
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
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
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
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
Some drivers don't necessarily need to have a FIFO managed buffer
for their transfers. Drivers now should call
lirc_register_bufferless_driver in order to handle the buffer
themselves.
The function works exaclty like lirc_register_driver except of
the buffer allocation.
Signed-off-by: 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 fa562a3..ee997ab 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/d
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
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 99d1f98..4b3efcf 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/me
... 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 0d988c9..da1777c 1006
nks,
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
[me
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
, 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
Added the get length command to allow userspace users to check on
the data length.
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
include/uapi/linux/lirc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h
index 4b3ab29..8
There is no need to check in precompilation whether the ioctl is
compat or unlocked, depending on the configuration it will be
called the correct one.
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
drivers/media/rc/lirc_dev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/d
close(fd);
The driver supports multi task access, but all the processes
which hold the driver should use the same length and frequency
parameters.
Change-Id: I323d7dd4a56d6dcf48f2c695293822eb04bdb85f
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
Documentatio
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
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
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
If ioctl is called, it cannot be a case of invalid system call
number (ENOSYS), that is an operation not permitted (EPERM).
Replace ENOSYS with EPERM.
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
drivers/media/rc/lirc_dev.c | 8
1 file changed, 4 insertions(+), 4 del
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 16cca46..689e369
Hi Sean,
> > The ir-spi is a simple device driver which supports the
> > connection between an IR LED and the MOSI line of an SPI device.
> >
> > The driver, indeed, uses the SPI framework to stream the raw data
> > provided by userspace through a character device. The chardev is
> > handled by
Hi Sean,
> > > Also I don't see what justifies this new interface. This can be
> > > implemented in rc-core in less lines of code and it will be entirely
> > > compatible with existing user-space.
> >
> > Also here I'm getting a bit confused. When I started writing
> > this, I didn't even know
If ioctl is called, it cannot be a case of invalid system call
number (ENOSYS), that is an operation not permitted (EPERM).
Replace ENOSYS with EPERM.
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
drivers/media/rc/lirc_dev.c | 8
1 file changed, 4 insertions(+), 4 del
, 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
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
There is no need to check in precompilation whether the ioctl is
compat or unlocked, depending on the configuration it will be
called the correct one.
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
drivers/media/rc/lirc_dev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/d
of the used frequency and
length.
Add the LIRC_SET_LENGTH, LIRC_GET_FREQUENCY and
LIRC_SET_FREQUENCY ioctl commands in order to allow the above
mentioned operations.
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
include/uapi/linux/lirc.h | 4
1 file changed, 4 insertions(+)
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
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
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 6f3402c..0a3d65d 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/me
them
anyway because I was on fire.
Patch 14 is a segfault fix, while the last patch adds the
possibility to send to ioctl the set frequency, get frequency and
set length command.
Thanks,
Andi
Andi Shyti (15):
lirc_dev: place buffer allocation on separate function
lirc_dev: allow bufferless
... use "do .. while" instead.
Signed-off-by: Andi Shyti <andi.sh...@samsung.com>
---
drivers/media/rc/lirc_dev.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index 400ab80..cc00b9a 1006
Some drivers don't necessarily need to have a FIFO managed buffer
for their transfers. Drivers now should call
lirc_register_bufferless_driver in order to handle the buffer
themselves.
The function works exaclty like lirc_register_driver except of
the buffer allocation.
Signed-off-by: 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 fa562a3..ee997ab 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/d
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 c11cfc0..7e5cb85
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
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
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
Hi Sean,
> > For that we need to have more control on the device frequency to
> > set (which is a new concept fro LIRC) and we also need to provide
> > to userspace, as feedback, the values of the used frequency and
> > length.
>
> Please can you elaborate on what exactly you mean by frequency
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
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
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
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
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
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(+),
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
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
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
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
> > +
> 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
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
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 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
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
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
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
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
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>
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
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(+),
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),
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 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),
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
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.
> >
> >
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
>
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
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
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
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
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>
1 - 100 of 138 matches
Mail list logo