Skip to contentSkip to conversation

ite-cir: make IR receive work after resume

PATCH Superseded Jarod Wilson 1 participant 3 messages May 9, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ite-cir: make IR receive work after resume

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.

CC Juan Jesús García de Soria <[email protected]>
---
 drivers/media/rc/ite-cir.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/media/rc/ite-cir.c +2 -0
index 43908a7..8488e53 100644
@@ -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);
 	}
Signature · 1 line
1.7.1
#1 lore raw
Quoted 20 lines · Jarod Wilson

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.

CC Juan Jesús García de Soria<[email protected]>
---
  drivers/media/rc/ite-cir.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
drivers/media/rc/ite-cir.c +0 -0
index 43908a7..8488e53 100644

drivers/media/rc/ite-cir.c static int ite_resume(struct pnp_dev *pdev) · line 1690

Quoted 7 lines
drivers/media/rc/ite-cir.c +2 -0
@@ -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);

Gah. I've obviously screwed this one up. Tested a locally built version of the module on the machine itself, then did a copy/paste of the init_hardware line from elsewhere in the driver where struct ite_dev was called itdev instead of just dev. v2 momentarily.

Signature · 2 lines
Jarod Wilson
[email protected]
#2 lore raw

PATCH v2 1/1 ite-cir: make IR receive work after resume

In reply to Jarod Wilson

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.

CC Juan Jesús García de Soria <[email protected]>

---
v2: fix copy/paste thinko

 drivers/media/rc/ite-cir.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/media/rc/ite-cir.c +2 -0
index 43908a7..253837e 100644
@@ -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);
 	}
Signature · 1 line
1.7.1