public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [media] ite-cir: make IR receive work after resume
@ 2011-05-09 15:08 Jarod Wilson
  2011-05-09 18:25 ` Jarod Wilson
  2011-05-09 18:28 ` [PATCH v2] " Jarod Wilson
  0 siblings, 2 replies; 6+ messages in thread
From: Jarod Wilson @ 2011-05-09 15:08 UTC (permalink / raw)
  To: linux-media; +Cc: Jarod Wilson, Juan Jesús García de Soria

Just recently acquired an Asus Eee Box PC with an onboard IR receiver
driven by ite-cir (ITE8713 sub-variant). Works out of the box with the
ite-cir driver in 2.6.39, but stops working after a suspend/resume
cycle. Its fixed by simply reinitializing registers after resume,
similar to what's done in the nuvoton-cir driver. I've not tested with
any other ITE variant, but code inspection suggests this should be safe
on all variants.

Reported-by: Stephan Raue <sraue@openelec.tv>
CC: Juan Jesús García de Soria <skandalfo@gmail.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
 drivers/media/rc/ite-cir.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 43908a7..8488e53 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/rc/ite-cir.c
@@ -1684,6 +1684,8 @@ static int ite_resume(struct pnp_dev *pdev)
 		/* wake up the transmitter */
 		wake_up_interruptible(&dev->tx_queue);
 	} else {
+		/* reinitialize hardware config registers */
+		itdev->params.init_hardware(itdev);
 		/* enable the receiver */
 		dev->params.enable_rx(dev);
 	}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread
* Re: [PATCH] [media] ite-cir: make IR receive work after resume
@ 2011-05-09 18:57 Juan Jesús García de Soria Lucena
  2011-05-09 19:45 ` Jarod Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Juan Jesús García de Soria Lucena @ 2011-05-09 18:57 UTC (permalink / raw)
  To: Jarod Wilson, linux-media

Hi Jarod, and thanks for looking at this.

El 09/05/2011 20:28, "Jarod Wilson" <jarod@redhat.com> escribió:
> --- a/drivers/media/rc/ite-cir.c
> +++ b/drivers/media/rc/ite-cir.c
> @@ -1684,6 +1684,8 @@ static int ite_resume(struct pnp_dev *pdev)
>                /* wake up the transmitter */
>                wake_up_interruptible(&dev->tx_queue);
>        } else {
> +               /* reinitialize hardware config registers */
> +               dev->params.init_hardware(dev);
>                /* enable the receiver */
>                dev->params.enable_rx(dev);
>        }
> --
> 1.7.1
>

But... wouldn't the hardware initialization be required too if the hardware got suspended while doing TX? I mean, probably the call to init_hardware() should be done in any case, just before the if... (forgive me if I'm off target; I'm looking at the code as I remember it, since I don't have it before me right now).

Best regards,

   Juan Jesús.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-09 20:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 15:08 [PATCH] [media] ite-cir: make IR receive work after resume Jarod Wilson
2011-05-09 18:25 ` Jarod Wilson
2011-05-09 18:28 ` [PATCH v2] " Jarod Wilson
  -- strict thread matches above, loose matches on Subject: below --
2011-05-09 18:57 [PATCH] " Juan Jesús García de Soria Lucena
2011-05-09 19:45 ` Jarod Wilson
2011-05-09 20:00   ` Juan Jesús García de Soria Lucena

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox