aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/st_rc.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 11:13:27 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 11:13:27 -0200
commitc3152592e70bbf023ec106ee9ea271e9060bc09a (patch)
tree1297d10309d56c67eee12d82f8764c9cf3e8fc22 /drivers/media/rc/st_rc.c
parentLinux 4.4 (diff)
parent[media] rc: sunxi-cir: Initialize the spinlock properly (diff)
downloadlinux-dev-c3152592e70bbf023ec106ee9ea271e9060bc09a.tar.xz
linux-dev-c3152592e70bbf023ec106ee9ea271e9060bc09a.zip
Merge branch 'patchwork' into v4l_for_linus
* patchwork: (204 commits) [media] rc: sunxi-cir: Initialize the spinlock properly [media] rtl2832: do not filter out slave TS null packets [media] rtl2832: print reg number on error case [media] rtl28xxu: return demod reg page from driver cache [media] coda: enable MPEG-2 ES decoding [media] coda: don't start streaming without queued buffers [media] coda: hook up vidioc_prepare_buf [media] coda: relax coda_jpeg_check_buffer for trailing bytes [media] coda: make to_coda_video_device static [media] s5p-mfc: remove volatile attribute from MFC register addresses [media] s5p-mfc: merge together s5p_mfc_hw_call and s5p_mfc_hw_call_void [media] s5p-mfc: use spinlock to protect MFC context [media] s5p-mfc: remove unnecessary callbacks [media] s5p-mfc: make queue cleanup code common [media] s5p-mfc: use one implementation of s5p_mfc_get_new_ctx [media] s5p-mfc: constify s5p_mfc_codec_ops structures [media] au8522: Avoid memory leak for device config data [media] ir-lirc-codec.c: don't leak lirc->drv-rbuf [media] uvcvideo: small cleanup in uvc_video_clock_update() [media] uvcvideo: Fix reading the current exposure value of UVC ...
Diffstat (limited to 'drivers/media/rc/st_rc.c')
-rw-r--r--drivers/media/rc/st_rc.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c
index 37d040158dff..1fa0c9d1c508 100644
--- a/drivers/media/rc/st_rc.c
+++ b/drivers/media/rc/st_rc.c
@@ -16,6 +16,7 @@
#include <linux/reset.h>
#include <media/rc-core.h>
#include <linux/pinctrl/consumer.h>
+#include <linux/pm_wakeirq.h>
struct st_rc_device {
struct device *dev;
@@ -190,6 +191,9 @@ static void st_rc_hardware_init(struct st_rc_device *dev)
static int st_rc_remove(struct platform_device *pdev)
{
struct st_rc_device *rc_dev = platform_get_drvdata(pdev);
+
+ dev_pm_clear_wake_irq(&pdev->dev);
+ device_init_wakeup(&pdev->dev, false);
clk_disable_unprepare(rc_dev->sys_clock);
rc_unregister_device(rc_dev->rdev);
return 0;
@@ -298,22 +302,22 @@ static int st_rc_probe(struct platform_device *pdev)
rdev->map_name = RC_MAP_LIRC;
rdev->input_name = "ST Remote Control Receiver";
- /* enable wake via this device */
- device_set_wakeup_capable(dev, true);
- device_set_wakeup_enable(dev, true);
-
ret = rc_register_device(rdev);
if (ret < 0)
goto clkerr;
rc_dev->rdev = rdev;
if (devm_request_irq(dev, rc_dev->irq, st_rc_rx_interrupt,
- IRQF_NO_SUSPEND, IR_ST_NAME, rc_dev) < 0) {
+ 0, IR_ST_NAME, rc_dev) < 0) {
dev_err(dev, "IRQ %d register failed\n", rc_dev->irq);
ret = -EINVAL;
goto rcerr;
}
+ /* enable wake via this device */
+ device_init_wakeup(dev, true);
+ dev_pm_set_wake_irq(dev, rc_dev->irq);
+
/**
* for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW
* lircd expects a long space first before a signal train to sync.