mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
media: rc: gpio-ir-recv: Fix support for wake-up
[ Upstream commit9c592f8ab1
] 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:fd0f6851eb
("[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>
This commit is contained in:
parent
4b1afffdd9
commit
2ed8f8c09d
1 changed files with 2 additions and 0 deletions
|
@ -107,6 +107,8 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
|
|||
rcdev->map_name = RC_MAP_EMPTY;
|
||||
|
||||
gpio_dev->rcdev = rcdev;
|
||||
if (of_property_read_bool(np, "wakeup-source"))
|
||||
device_init_wakeup(dev, true);
|
||||
|
||||
rc = devm_rc_register_device(dev, rcdev);
|
||||
if (rc < 0) {
|
||||
|
|
Loading…
Reference in a new issue