[media] au0828: handle IR int during suspend/resume
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 8 Aug 2014 10:28:01 +0000 (07:28 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 03:00:26 +0000 (12:00 +0900)
It doesn't make sense to handle an IR code given before
suspending after the device resume. So, turn off IR
int while suspending.

Change-Id: I2c5fa1af97e631ab5f38dd0afc8353482e0c1aa8
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/au0828/au0828-input.c

index 7e6f4ab..c57af41 100644 (file)
@@ -380,6 +380,9 @@ int au0828_rc_suspend(struct au0828_dev *dev)
 
        cancel_delayed_work_sync(&ir->work);
 
+       /* Disable IR */
+       au8522_rc_clear(ir, 0xe0, 1 << 4);
+
        return 0;
 }
 
@@ -390,6 +393,9 @@ int au0828_rc_resume(struct au0828_dev *dev)
        if (!ir)
                return 0;
 
+       /* Enable IR */
+       au8522_rc_set(ir, 0xe0, 1 << 4);
+
        schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling));
 
        return 0;