Message ID | 20230324203833.3540187-3-f.fainelli@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp12942vqo; Fri, 24 Mar 2023 13:55:15 -0700 (PDT) X-Google-Smtp-Source: AKy350Y1FmbmgMUctrdiMmQWKPDQsIcfabLcVBsaJsXrIgz/Yd0GOlbkG0pPEwaDCY4C9QBlR021 X-Received: by 2002:a17:906:ccc2:b0:927:dfc6:51e6 with SMTP id ot2-20020a170906ccc200b00927dfc651e6mr4211573ejb.6.1679691314987; Fri, 24 Mar 2023 13:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679691314; cv=none; d=google.com; s=arc-20160816; b=QwrLDf37mbXV5sq5zi4EGifb0PYEb0LR+RIFH280A7Ht/PIfe2gkKxv6RwHdgbPi+D 0jtL72/KxxwIIvOeo/Mg+fqVsSIhSN12f/6gXSYqb1H0c6pkHEcqAXjuu4t8tCjaN9Ek OFnu0VIzH/PmPJoPtMMgeXIGbnfxxR1TGtWlRZovg/Pu88E4TYd4075h9vMyk679XEJC K7qYQQocGg1+IWxECcRDO+JBcKDYB2B051l1eI10A9AAUfBOrE4MOITtBoWFARmhuxtQ qQG/TSZVYHOigM2FUO4khamp4Aw1/HO3TB5cWLseWUaTMbYjd1ybh/MbR1tALK6CIX4O pnpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=N5G/syVam4SknjFsEw80vzFCuD6BG5cs1b0YrLZ+gNk=; b=Y6+jdQ0sTmaFUy6a0qQHfUOC/Dl+QXSmLi9Butbhq9M+c3dl/22aMuBOuNnvwtjZvH HGJMIzaGwPJYBF080+7LQLRNkIpLzS3LW3zIwUUbMU59jaQ+wcicqe6z8nO59hpN56wo oyQ/zoe6glreRdczs4e5yz6HaekO8EzEEpMFiyezQQaiR9SMLt2Am5pSNP3Iu7wjDcNg KCh9fRsZ/W68mYQ143AUo5Ox46hTIrTNvHBUPVnCePUkCfL4FtrOLyIUD0ZWoJttIg+Q FWHdiHrhq5N40B887OY9DYCKaRTvQjx6dQCTXHM1vZUnh5zAetZcCmeKiIysMA/FD8RM 27eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Qszr7DLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a170906394800b009228af19a8csi21174217eje.506.2023.03.24.13.54.50; Fri, 24 Mar 2023 13:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Qszr7DLV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232178AbjCXUip (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Fri, 24 Mar 2023 16:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232141AbjCXUil (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Mar 2023 16:38:41 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15CD31E1D5; Fri, 24 Mar 2023 13:38:41 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so2781327pjz.1; Fri, 24 Mar 2023 13:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679690320; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N5G/syVam4SknjFsEw80vzFCuD6BG5cs1b0YrLZ+gNk=; b=Qszr7DLVXSvWv7inbHD/oLNYm+jkkEndHv5jZjZ1JN2QZtmnnYUMaN7SIit905jKth /BY1QWiJtMJQoKUekclBnpaxN2Xaogq4ZhxUCS4g3M1TsjvkjTxR6CGheH5nCIdpTSI8 4aBMEACUlkyn3IVVgCADf9JiPEQd2G4JNbs7tRSJrLQ3TgVlG0Nso9zPQAAfaR7XLJTN kbqiWuVPaEyBZYFi8ItKvBr+hg9POkkTrChKWNFM20EVn245JbJMhk/zM0utkwROuCEP Xu8SUw2TVZZjV2hOEEVaHhTA48dWf+vlBGCSYZjDgI2CORx6M2xjDLlC16HhHzcYwWmD 4PfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679690320; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N5G/syVam4SknjFsEw80vzFCuD6BG5cs1b0YrLZ+gNk=; b=Fkca0FAQ4AtqliZw8qJB2+60JK/w17QHF9IcJd/9UVm5d+HBd0WbUjx+/XZNZUxvcO VFr39C2ZAHJRnaRzjDrsJP/McaQnzqzbkROGOeVr2jhpOuy5kV8bmfQr8lc3HGuDoC1q GxsZtuEpeeZEnz7W3Zh/4wrBcjtiMD3UYiYEK8gVKG+TM0v1NzybT6E54G5aIVN11PN3 9OFB0nuAJQMfovuGV5JIy0kGW1v9/fUj7WvZlAQV21yonaU/7JEC8E8Hab8V+O4GmN4o KATn8+3PCT5SkMeRajUkzIJ0ww9pIaHTLCSasfv1RBSksdUeF6GdmzKGKSpKmkH2pK3q 74uA== X-Gm-Message-State: AAQBX9fXXhqeNOc0iJ5ruNOmYQ1ZGhP8JXBhcba5L3cyGN0/Ty3sHHAw 5ZXYpKzQITk398TxVhv+/pXUNKIM/bg= X-Received: by 2002:a17:902:c949:b0:1a1:adb0:ed72 with SMTP id i9-20020a170902c94900b001a1adb0ed72mr4729285pla.4.1679690320097; Fri, 24 Mar 2023 13:38:40 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id f17-20020a170902ab9100b001966d94cb2esm14503431plr.288.2023.03.24.13.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:38:39 -0700 (PDT) From: Florian Fainelli <f.fainelli@gmail.com> To: linux-kernel@vger.kernel.org Cc: Florian Fainelli <f.fainelli@gmail.com>, Matthew Lear <matthew.lear@broadcom.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Sean Young <sean@mess.org>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Ravi Kumar V <kumarrav@codeaurora.org>, linux-media@vger.kernel.org (open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB)), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS) Subject: [PATCH v2 2/2] media: rc: gpio-ir-recv: Fix support for wake-up Date: Fri, 24 Mar 2023 13:38:33 -0700 Message-Id: <20230324203833.3540187-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230324203833.3540187-1-f.fainelli@gmail.com> References: <20230324203833.3540187-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761284000408776925?= X-GMAIL-MSGID: =?utf-8?q?1761284000408776925?= |
Series |
Correct gpio-ir-recv wakeup capability
|
|
Commit Message
Florian Fainelli
March 24, 2023, 8:38 p.m. UTC
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: fd0f6851eb46 ("[media] rc: Add support for GPIO based IR Receiver driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/media/rc/gpio-ir-recv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index 8dbe780dae4e..41ef8cdba28c 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@ -103,6 +103,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) {