* [PATCH] rc-core: fix winbond-cir issues
@ 2011-03-30 14:20 David Härdeman
2011-06-05 12:52 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 2+ messages in thread
From: David Härdeman @ 2011-03-30 14:20 UTC (permalink / raw)
To: linux-media; +Cc: mchehab, skandalfo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2116 bytes --]
The conversion of winbond-cir to use rc-core seems to have missed a
a few bits and pieces which were in my local tree. Kudos to
Juan Jesús GarcÃa de Soria Lucena <skandalfo@gmail.com> for noticing.
Signed-off-by: David Härdeman <david@hardeman.nu>
---
drivers/media/rc/winbond-cir.c | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 186de55..16f4178 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -7,7 +7,7 @@
* with minor modifications.
*
* Original Author: David Härdeman <david@hardeman.nu>
- * Copyright (C) 2009 - 2010 David Härdeman <david@hardeman.nu>
+ * Copyright (C) 2009 - 2011 David Härdeman <david@hardeman.nu>
*
* Dedicated to my daughter Matilda, without whose loving attention this
* driver would have been finished in half the time and with a fraction
@@ -629,18 +629,8 @@ wbcir_init_hw(struct wbcir_data *data)
/* prescaler 1.0, tx/rx fifo lvl 16 */
outb(0x30, data->sbase + WBCIR_REG_SP3_EXCR2);
- /* Set baud divisor to generate one byte per bit/cell */
- switch (protocol) {
- case IR_PROTOCOL_RC5:
- outb(0xA7, data->sbase + WBCIR_REG_SP3_BGDL);
- break;
- case IR_PROTOCOL_RC6:
- outb(0x53, data->sbase + WBCIR_REG_SP3_BGDL);
- break;
- case IR_PROTOCOL_NEC:
- outb(0x69, data->sbase + WBCIR_REG_SP3_BGDL);
- break;
- }
+ /* Set baud divisor to sample every 10 us */
+ outb(0x0F, data->sbase + WBCIR_REG_SP3_BGDL);
outb(0x00, data->sbase + WBCIR_REG_SP3_BGDH);
/* Set CEIR mode */
@@ -649,9 +639,9 @@ wbcir_init_hw(struct wbcir_data *data)
inb(data->sbase + WBCIR_REG_SP3_LSR); /* Clear LSR */
inb(data->sbase + WBCIR_REG_SP3_MSR); /* Clear MSR */
- /* Disable RX demod, run-length encoding/decoding, set freq span */
+ /* Disable RX demod, enable run-length enc/dec, set freq span */
wbcir_select_bank(data, WBCIR_BANK_7);
- outb(0x10, data->sbase + WBCIR_REG_SP3_RCCFG);
+ outb(0x90, data->sbase + WBCIR_REG_SP3_RCCFG);
/* Disable timer */
wbcir_select_bank(data, WBCIR_BANK_4);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rc-core: fix winbond-cir issues
2011-03-30 14:20 [PATCH] rc-core: fix winbond-cir issues David Härdeman
@ 2011-06-05 12:52 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2011-06-05 12:52 UTC (permalink / raw)
To: David Härdeman; +Cc: linux-media, skandalfo
Em 30-03-2011 11:20, David Härdeman escreveu:
> The conversion of winbond-cir to use rc-core seems to have missed a
> a few bits and pieces which were in my local tree. Kudos to
> Juan Jesús García de Soria Lucena <skandalfo@gmail.com> for noticing.
>
> Signed-off-by: David Härdeman <david@hardeman.nu>
Hi David,
This patch got missed by patchwork. I'm applying it right now on my tree.
Please check if is there anything else missed.
Thanks,
Mauro.
> ---
> drivers/media/rc/winbond-cir.c | 20 +++++---------------
> 1 files changed, 5 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
> index 186de55..16f4178 100644
> --- a/drivers/media/rc/winbond-cir.c
> +++ b/drivers/media/rc/winbond-cir.c
> @@ -7,7 +7,7 @@
> * with minor modifications.
> *
> * Original Author: David H�rdeman <david@hardeman.nu>
> - * Copyright (C) 2009 - 2010 David H�rdeman <david@hardeman.nu>
> + * Copyright (C) 2009 - 2011 David H�rdeman <david@hardeman.nu>
> *
> * Dedicated to my daughter Matilda, without whose loving attention this
> * driver would have been finished in half the time and with a fraction
> @@ -629,18 +629,8 @@ wbcir_init_hw(struct wbcir_data *data)
> /* prescaler 1.0, tx/rx fifo lvl 16 */
> outb(0x30, data->sbase + WBCIR_REG_SP3_EXCR2);
>
> - /* Set baud divisor to generate one byte per bit/cell */
> - switch (protocol) {
> - case IR_PROTOCOL_RC5:
> - outb(0xA7, data->sbase + WBCIR_REG_SP3_BGDL);
> - break;
> - case IR_PROTOCOL_RC6:
> - outb(0x53, data->sbase + WBCIR_REG_SP3_BGDL);
> - break;
> - case IR_PROTOCOL_NEC:
> - outb(0x69, data->sbase + WBCIR_REG_SP3_BGDL);
> - break;
> - }
> + /* Set baud divisor to sample every 10 us */
> + outb(0x0F, data->sbase + WBCIR_REG_SP3_BGDL);
> outb(0x00, data->sbase + WBCIR_REG_SP3_BGDH);
>
> /* Set CEIR mode */
> @@ -649,9 +639,9 @@ wbcir_init_hw(struct wbcir_data *data)
> inb(data->sbase + WBCIR_REG_SP3_LSR); /* Clear LSR */
> inb(data->sbase + WBCIR_REG_SP3_MSR); /* Clear MSR */
>
> - /* Disable RX demod, run-length encoding/decoding, set freq span */
> + /* Disable RX demod, enable run-length enc/dec, set freq span */
> wbcir_select_bank(data, WBCIR_BANK_7);
> - outb(0x10, data->sbase + WBCIR_REG_SP3_RCCFG);
> + outb(0x90, data->sbase + WBCIR_REG_SP3_RCCFG);
>
> /* Disable timer */
> wbcir_select_bank(data, WBCIR_BANK_4);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-05 12:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30 14:20 [PATCH] rc-core: fix winbond-cir issues David Härdeman
2011-06-05 12:52 ` Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox