Changing available_protocols to atomic64_t allows to get rid of the
mutex protecting access to the variable. This helps to simplify
the code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-ir-raw.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a
rc_register_device and
normal version of rc_allocate_device.
In addition devm_rc_allocate_device sets rc->dev.parent as having a
reference to the parent device might be useful for future extensions.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-main.c |
Simplify the remove function and the error path in the probe function by
using the managed versions of rc_allocate_device and rc_register_device.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 50 +-
1 file changed, 20 insertions
ff-by: Heiner Kallweit
---
include/media/rc-core.h | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index f649470..91c6633 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -226,13 +226,7 @@ s
The two EFM ioports are accessed by drivers for other parts of the Nuvoton
Super-IO chips too. Therefore access to these ioports needs to be
protected by using request_muxed_region (like it's implemented e.g. in
hwmon/nct6775 already).
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nu
Heiner Kallweit (16):
media: rc: nuvoton-cir: use request_muxed_region for accessing EFM registers
media: rc: nuvoton-cir: simplify nvt_select_logical_ dev
media: rc: nuvoton-cir: simplify nvt_cir_tx_inactive
media: rc: nuvoton-cir: factor out logical device disabling
media: rc: nuvoton
Factor out enabling of a logical device.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index ceb6b95..8ed8011 100644
Switch to using the recently introduced IR default timeout value
(IR_DEFAULT_TIMEOUT) and consider the value of SAMPLE_PERIOD
when calculating the limit count register value.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
Use nvt_cr_write to simplify nvt_select_logical_ dev.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 62c82c5..2539d4f 100644
--- a
t.
If needed the caller of nvt_clear_cir_wake_fifo has to take care
of locking.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 8e
Simplify nvt_cir_tx_inactive.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 2539d4f..f661eff 100644
--- a/drivers/media/rc/nuvoton
Factor out disabling of a logical device.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index f661eff..ceb6b95 100644
Selecting the logical device in the interrupt handler is not needed
as no configuration register is accessed.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
Calling nvt_set_cir_iren separately is not needed as this is done
by nvt_cir_regs_init.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index e01fdc8..252804d
Only enable the logical devices after the registers have been initialized.
The call to nvt_enable_logical_dev in nvt_resume is not needed as this is
done implicitely by nvt_cir_regs_init now.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 21 -
1 file
Check for the case that no Nuvoton chip is found on either EFM port.
Also move the position of nvt_efm_disable to reduce the time the
EFM ports are locked.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 17 +
drivers/media/rc/nuvoton-cir.h | 3 ++-
2 files
.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 29 -
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index c3294fb..c0bee1e 100644
--- a/drivers/media/rc/nuvoton
Extend the locking to protect more critical actions like register accesses
in the interrupt handlers.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b
Add locking to nvt_enable_wake calls.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 252804d..c3294fb 100644
--- a
Most likely a copy & paste error.
The wakeup interrupt supports less triggering events.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.h | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
i
evice.
And the change should be generic enough to not break the driver for
other chips (however due to lack of appropriate hardware I wasn't
able to test this).
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 22 ++
1 file changed, 18 insertions(+), 4
eup
> sequence via sysfs
> Author: Heiner Kallweit
> Date:Mon Feb 8 17:25:59 2016 -0200
>
> This patch adds a binary attribute /sys/class/rc/rc?/wakeup_data which
> allows to read / write the wakeup sequence.
>
When working on another module I was reminded not to f
Am 03.03.2016 um 19:52 schrieb Mauro Carvalho Chehab:
> Em Thu, 03 Mar 2016 19:18:17 +0100
> Heiner Kallweit escreveu:
>
>> Am 03.03.2016 um 12:28 schrieb Mauro Carvalho Chehab:
>>> This is an automatic generated email to let you know that the following
>>> p
Am 03.03.2016 um 21:56 schrieb Mauro Carvalho Chehab:
> Em Thu, 03 Mar 2016 20:22:35 +0100
> Heiner Kallweit escreveu:
>
>> Am 03.03.2016 um 19:52 schrieb Mauro Carvalho Chehab:
>>> Em Thu, 03 Mar 2016 19:18:17 +0100
>>> Heiner Kallweit escreveu:
>>>
the setting of
SAMPLE_PERIOD in the driver.
In addition document the new sysfs attribute in
Documentation/ABI/testing/sysfs-class-rc-nuvoton.
Signed-off-by: Heiner Kallweit
---
Documentation/ABI/testing/sysfs-class-rc-nuvoton | 15 +
drivers/media/rc/nuvoton-cir.c | 85
also depend on system performance.
Therefore make the fifo size a module parameter with the current value
of 512 being the default.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-core-priv.h | 2 +-
drivers/media/rc/rc-ir-raw.c| 20 +---
2 files changed, 18 insertions
Am 16.03.2016 um 23:28 schrieb Sean Young:
> On Wed, Mar 16, 2016 at 10:18:38PM +0100, Heiner Kallweit wrote:
>> struct ir_raw_event currently has a size of 12 bytes on most (all?)
>> architectures. This can be reduced to 8 bytes whilst maintaining
>> full backwards compati
ir_raw_event with a single 64 bit operation.
Successfully tested with the Nuvoton driver and successfully
compile-tested with the ene_ir driver (as it uses the carrier /
duty_cycle elements).
Signed-off-by: Heiner Kallweit
---
v2:
- don't change type of bit field members
---
include/med
Access to dev->initialized is atomic and dev->initialized isn't
accessed in any other code protected by this mutex.
Therefore we don't need to get the mutex here.
Signed-off-by: Heiner Kallweit
---
v2:
- corrected commit message
---
drivers/media/rc/rc-main.c | 2 --
1 file chan
Am 17.03.2016 um 11:53 schrieb Sean Young:
> On Thu, Mar 17, 2016 at 07:40:59AM +0100, Heiner Kallweit wrote:
>> Am 16.03.2016 um 23:28 schrieb Sean Young:
>>> On Wed, Mar 16, 2016 at 10:18:38PM +0100, Heiner Kallweit wrote:
>>>> + u8 pulse:1;
&
Access to dev->initialized is atomic, therefore we don't have to
protect it with a mutex.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 4e9bbe7..68541b
ir_raw_event with a single 64 bit operation.
Successfully tested with the Nuvoton driver and successfully
compile-tested with the ene_ir driver (as it uses the carrier /
duty_cycle elements).
Signed-off-by: Heiner Kallweit
---
include/media/rc-core.h | 26 --
1 file
Am 16.03.2016 um 20:33 schrieb Vladimir Zapolskiy:
> On 16.03.2016 20:53, Heiner Kallweit wrote:
>> Access to dev->initialized is atomic, therefore we don't have to
>> protect it with a mutex.
>
> Mutexes are used to split the code to mutually exclusive execution b
his driver.
To facilitate maintenance of the driver I'd propose to remove the
rudimentary transmit support.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 114 ++---
drivers/media/rc/nuvoton-cir.h | 24 -
2 files changed,
Am 02.08.2016 um 07:44 schrieb Heiner Kallweit:
> I think we can get rid of the spinlock protecting the kthread from being
> interrupted by a wakeup in certain parts.
> Even with the current implementation of the kthread the only lost wakeup
> scenario could happen if the wakeup occurs
2c
[ 432.485980] x86_64_start_kernel+0x178/0x18b
[ 432.488222] start_cpu+0x14/0x14
[ 432.490453] ? start_cpu+0x14/0x14
Fixes: 97c129747af5 "[media] rc: nuvoton-cir: Add support wakeup via sysfs
filter callback"
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-c
This series includes smaller improvements for the meson-ir driver.
Tested on a Odroid C2.
Heiner Kallweit (5):
media: rc: meson-ir: remove irq from struct meson_ir
media: rc: meson-ir: make use of the bitfield macros
media: rc: meson-ir: switch to managed rc device allocation / registration
Switch to the managed versions of rc_allocate_device/rc_register_device,
thus simplifying the code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/meson-ir.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/media/rc/meson-ir.c b/drivers/media
Make use of the bitfield macros thus partially hiding the complexity
of dealing with bitfields.
The patch also includes a minor fix to REG0_RATE_MASK, so far it was
set to bit 0..10, but according to the spec it's bit 0..11.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/meson-ir.c
The irq number is used in the probe function only, therefore just use
a local variable.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/meson-ir.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index
We don't need the memory barriers here and an interrupt handler should
be as fast as possible. Therefore switch to readl_relaxed.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/meson-ir.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/rc/meson
Switch the interrupt description to the default which is the of node
name. This is more in line with the interrupt descriptions in
other meson drivers.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/meson-ir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
This series includes smaller improvements for the meson-ir driver.
Tested on a Odroid C2.
v2:
- minor change to patch 2
- added Reviewed-by to patch 2, 3, 4
Heiner Kallweit (5):
media: rc: meson-ir: remove irq from struct meson_ir
media: rc: meson-ir: make use of the bitfield macros
media
The irq number is used in the probe function only, therefore just use
a local variable.
Signed-off-by: Heiner Kallweit
---
v2:
- no changes
---
drivers/media/rc/meson-ir.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/media/rc/meson-ir.c b/drivers/media
Switch to the managed versions of rc_allocate_device/rc_register_device,
thus simplifying the code.
Signed-off-by: Heiner Kallweit
Reviewed-by: Neil Armstrong
---
v2:
- added R-b
---
drivers/media/rc/meson-ir.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff
Switch the interrupt description to the default which is the of node
name. This is more in line with the interrupt descriptions in
other meson drivers.
Signed-off-by: Heiner Kallweit
---
v2:
- no changes
---
drivers/media/rc/meson-ir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Make use of the bitfield macros thus partially hiding the complexity
of dealing with bitfields.
The patch also includes a minor fix to REG0_RATE_MASK, so far it was
set to bit 0..10, but according to the spec it's bit 0..11.
Signed-off-by: Heiner Kallweit
Reviewed-by: Neil Armstrong
-
We don't need the memory barriers here and an interrupt handler should
be as fast as possible. Therefore switch to readl_relaxed.
Signed-off-by: Heiner Kallweit
Reviewed-by: Neil Armstrong
---
v2:
- added R-b
---
drivers/media/rc/meson-ir.c | 7 ---
1 file changed, 4 insertions(
raw_fifo_size to struct rc_dev to
allow configuring the fifo size. If not set the current default
MAX_IR_EVENT_SIZE is used.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-core-priv.h | 2 +-
drivers/media/rc/rc-ir-raw.c| 11 +--
include/media/rc-core.h | 2 ++
3 files
This chip has a 32 byte HW FIFO only. Therefore the default fifo size
of 512 raw events is not needed and can be significantly decreased.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/rc/nuvoton-cir.c b
This chip has a 32 byte HW FIFO only. Therefore the default fifo size
of 512 raw events is not needed and can be significantly decreased.
Signed-off-by: Heiner Kallweit
---
v2:
- make patch part of a series
---
drivers/media/rc/nuvoton-cir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a
raw_fifo_size to struct rc_dev to
allow configuring the fifo size. If not set the current default
MAX_IR_EVENT_SIZE is used.
Signed-off-by: Heiner Kallweit
---
v2:
- access dev->raw_fifo_size only after check for !dev
---
drivers/media/rc/rc-core-priv.h | 2 +-
drivers/media/rc/rc-ir-raw.c|
To detect a rx fifo overrun it's checked whether the number of elements
in the chip fifo exceeds the fifo size. This check can never return true
and is wrong.
Instead we should generate an interrupt if the fifo overruns.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c
This patch set for the nuvoton-cir driver includes several
clean-ups and removes dead code.
Heiner Kallweit (9):
media: rc: nuvoton: remove interrupt handling for wakeup
media: rc: nuvoton: clean up initialization of wakeup registers
media: rc: nuvoton: remove wake states
media: rc
If the logical device is disabled then it can not generate interrupts.
Therefore this check is not needed.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
The definition of rawir includes the initialization already.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 1d99f10..9d9717d 100644
--- a/drivers/media
Simplify a few functions.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index c405c83..1d99f10 100644
--- a/drivers/media/rc
Study states have never been used and are not needed. Remove them.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 11 +--
drivers/media/rc/nuvoton-cir.h | 13 -
2 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c
Simplify interupt handling code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 5ce0238..180f589 100644
--- a/drivers/media/rc
Wake states have never been in use and now that we can set the
wakeup sequence via sysfs there's in general no need for them.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 1 -
drivers/media/rc/nuvoton-cir.h | 7 ---
2 files changed, 8 deletions(-)
diff --
The registers defining wakeup sequence handling are set when the
wakeup sequence is set via sysfs. There's no need to initialize them
otherwise.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 25 +++--
1 file changed, 3 insertions(+), 22 dele
These two fields are not used and can be removed.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.h | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h
index 65324ef..acf735f 100644
--- a/drivers/media/rc/nuvoton
ff-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 58 ++
drivers/media/rc/nuvoton-cir.h | 1 -
2 files changed, 2 insertions(+), 57 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 4a8f79c..b32f3bf 1
Am 04.07.2016 um 22:13 schrieb Sean Young:
> On Wed, May 18, 2016 at 10:29:41PM +0200, Heiner Kallweit wrote:
>> This chip has a 32 byte HW FIFO only. Therefore the default fifo size
>> of 512 raw events is not needed and can be significantly decreased.
>>
>> Sig
Am 04.07.2016 um 22:36 schrieb James Bottomley:
> This looks to be a problem with the rc subsystem. The IR controller in
> question is part of a cx8800 atsc card. In the 4.4 kernel, where it
> works, this is what ir-keytable says:
>
> Found /sys/class/rc/rc0/ (/dev/input/event12) with:
> Dr
Am 04.07.2016 um 23:18 schrieb James Bottomley:
> On Mon, 2016-07-04 at 23:08 +0200, Heiner Kallweit wrote:
>> Am 04.07.2016 um 22:36 schrieb James Bottomley:
>>> This looks to be a problem with the rc subsystem. The IR
>>> controller in question is part of a c
Am 04.07.2016 um 23:06 schrieb Sean Young:
> On Mon, Jul 04, 2016 at 10:51:50PM +0200, Heiner Kallweit wrote:
>> Am 04.07.2016 um 22:13 schrieb Sean Young:
>>> On Wed, May 18, 2016 at 10:29:41PM +0200, Heiner Kallweit wrote:
>>>> This chip has a 32 byte HW FIFO on
Am 05.07.2016 um 11:17 schrieb Sean Young:
> On Tue, Jul 05, 2016 at 08:05:16AM +0200, Heiner Kallweit wrote:
>> Am 04.07.2016 um 23:06 schrieb Sean Young:
>>> On Mon, Jul 04, 2016 at 10:51:50PM +0200, Heiner Kallweit wrote:
>>>> Am 04.07.2016 um 22:13 schrieb Se
Am 06.07.2016 um 08:51 schrieb Antti Seppälä:
> Hello.
>
> I recently updated my kernel to a newer version but couldn't boot it
> because it hangs.
>
> It turns out that your patch[1] to nuvoton-cir has really bad
> side-effects when it interacts with nct6775 module. It could be that
> one of the
after the nuvoton-cir driver.
This was reported for the nct6775 hwmon driver.
Fix this by properly releasing the region after probing CR_EFIR.
This regression was introduced with kernel 4.6 so cc it to stable.
Reported-by: Antti Seppälä
Signed-off-by: Heiner Kallweit
Tested-by: Antti Seppälä
Cc
unctions can be removed.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 35 ---
1 file changed, 35 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 3df3bd9..37fce7b 100644
--- a/drivers/media/rc/nuvo
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 27 ++-
drivers/media/rc/nuvoton-cir.h | 1 -
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 37fce7b..a583066 100644
Spinlock nvt_lock is a member of struct nvt_dev and there's no need
to prefix it with nvt_. So remove this prefix.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 40
drivers/media/rc/nuvoton-cir.h | 2 +-
2 files change
Using a separate spinlock to protect access to substruct tx of struct
nvt_dev doesn't provide any actual benefit. We can use spinlock
nvt_lock to protect all access to struct nvt_dev and get rid of
nvt->tx.lock.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-ci
Kernel takes care that interrupts from one source are serialized.
So there's no need to use spinlock_irq_save.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/dr
Am 02.11.2016 um 11:40 schrieb Andi Shyti:
> Hi,
>
> The main goal is to add support in the rc framework for IR
> transmitters, which currently is only supported by lirc but that
> is not the preferred way.
>
> The last patch adds support for an IR transmitter driven by
> the MOSI line of an SPI
]
[] mutex_lock_nested+0x5f/0x360
[] ? ir_raw_handler_unregister+0x77/0xd0 [rc_core]
[] ? trace_hardirqs_on_caller+0xee/0x1b0
[] ir_raw_handler_unregister+0x77/0xd0 [rc_core]
[] ir_lirc_codec_exit+0x10/0x12 [ir_lirc_codec]
[] SyS_delete_module+0x168/0x220
[] entry_SYSCALL_64_fastpath+0x18/0xa8
Signed-off
mistakenly interpreted as being set.
Fix this by ignoring interrupts when interrupt source and status register
reads return 0xff.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers
ggers processing after writing the content of a hw fifo to the kfifo.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-core-priv.h | 2 --
drivers/media/rc/rc-ir-raw.c| 46 +++--
2 files changed, 17 insertions(+), 31 deletions(-)
diff --git a/drivers/
Simplify the code a little.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index fc462f6..04fedaa 100644
--- a/drivers/media/rc/nuvoton
fy the code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index e4158a9..fc462f6 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/d
b_idx.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 0c69536..e4158a9 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/dr
Denon also uses the Sharp protocol, however with different check bits.
It would have been also possible to add this as a separate protocol
but this may not be worth the effort.
Successfully tested with a Denon RC-1002 remote control.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/Kconfig
Using IRQ_RETVAL is unneeded here. IRQ_NONE / IRQ_HANDLED can be
returned directly.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
Switch to managed resource handling using the devm_ functions.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 36 +++-
1 file changed, 11 insertions(+), 25 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton
chip_major / chip_minor are accessed sequentially in probe only.
Therefore no lock is needed.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 3d9a4cf
are masked)
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 81 +-
drivers/media/rc/nuvoton-cir.h | 24 -
2 files changed, 56 insertions(+), 49 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-ci
nvt_hw_detect always returns 0, therefore make it return void.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index c5c238b..df4b9cb
Add support for the NCT6779D. It's found e.g. on the Zotac CI321 mini-pc
and I successfully tested it on this device.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 1 +
drivers/media/rc/nuvoton-cir.h | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --
Replace nvt_pr with the respective dev_ functions thus slightly
simplifying the code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 15 ---
drivers/media/rc/nuvoton-cir.h | 3 ---
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/media/rc
Instead of explicitely checking debug use nvt_dbg like in other parts
of the driver thus simplifying the code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers
Switch the info about the detected chip type from debug to info level
as it might be useful not only for debugging purposes.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/nuvoton-cir.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/nuvoton-cir.c
Simplify the logging.
I had some doubts about using the elvis operator as it's GNU extension.
However GNU extensions are explicitely allowed and this operator is
used at several places in the kernel code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-main.c | 6 ++
1 file ch
The RC_BIT_ constants are used in 64-bit bitmaps.
In case of > 32 RC_BIT_ constants the current code will fail
on 32-bit systems.
Therefore define the RC_BIT_ constants as unsigned long long.
Signed-off-by: Heiner Kallweit
---
include/media/rc-map.h |
Declare struct proto_names and its member name as const.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index cede8bc..f2d5c50 100644
--- a/drivers
Introduce a protocol bit for lirc and treat it like any other protocol.
This allows to get rid of all the lirc-specific code.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/ir-lirc-codec.c | 2 +-
drivers/media/rc/rc-core-priv.h | 16 ++--
drivers/media/rc/rc-ir-raw.c
Checking whether a protocol is enabled and calling the related decoder
functions should be done by the rc core, not the protocol handlers.
Properly handle lirc considering that no protocol bit is set for lirc.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/ir-jvc-decoder.c | 3
Remove code for unconditional decoder module loading (except lirc).
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-core-priv.h | 64 -
drivers/media/rc/rc-ir-raw.c| 10 ---
2 files changed, 74 deletions(-)
diff --git a/drivers/media/rc/rc
Currently, if a decoder module is unloadad, the respective protocol
is still shown as enabled (if it was enabled before).
Fix this by resetting the respective protocol bits if a decoder
module is unloaded.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-ir-raw.c | 17 ++---
1
impact if bits for not (yet) defined protocols
are set.
Signed-off-by: Heiner Kallweit
---
drivers/media/rc/rc-main.c | 1 -
include/media/rc-map.h | 10 +-
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index
1 - 100 of 111 matches
Mail list logo