]> git.baikalelectronics.ru Git - kernel.git/commit
media: rc: gpio-ir-recv: Fix support for wake-up
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 24 Mar 2023 20:38:33 +0000 (13:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:38 +0000 (11:35 +0200)
commit60a79d308495923ee70f2b3f74ab8e8946891198
treeb9f8ec95763a831f80b760e32e2d2659a43ca960
parente7e7a3193d4e010e89df245a69fbee1976591947
media: rc: gpio-ir-recv: Fix support for wake-up

[ Upstream commit 9c592f8ab114875fdb3b2040f01818e53de44991 ]

The driver was intended from the start to be a wake-up source for the
system, however due to the absence of a suitable call to
device_set_wakeup_capable(), the device_may_wakeup() call used to decide
whether to enable the GPIO interrupt as a wake-up source would never
happen. Lookup the DT standard "wakeup-source" property and call
device_init_wakeup() to ensure the device is flagged as being wakeup
capable.

Reported-by: Matthew Lear <matthew.lear@broadcom.com>
Fixes: 885ab7621d54 ("[media] rc: Add support for GPIO based IR Receiver driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/rc/gpio-ir-recv.c