Message ID | 20230324170214.3470675-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 b10csp785399vqo; Fri, 24 Mar 2023 10:14:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bCqkAHfXYp6Wbe2iPqT3Ht8Yhrv5aKZ2kmSvs8vDSm76tCB3c56LCUYpMGYxLkZ/7da8MM X-Received: by 2002:a17:902:e88a:b0:1a1:db10:7ba5 with SMTP id w10-20020a170902e88a00b001a1db107ba5mr3781902plg.41.1679678093621; Fri, 24 Mar 2023 10:14:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679678093; cv=none; d=google.com; s=arc-20160816; b=GXiGRFbEvpwsMMXlH1h5TfiUVJJKfyTnF/GOo3MR3T155Q54j8AGoF7Fkka//2a7ZK AGi68eukfQl+cJyjRwVpMdIuJoNitgZc7EPcCHwo5hbx0AIu+Tth4QL5iJ4b9rp7r+P/ FefTwd0yOje2oG1F0AJet7K5CpUBLbBLgGM9U6Z6IprF2UC2t/lM7x5LWbu9Ma8HEO6a hhZgBL2OzY/zdk/YTDarfYmtJvcweLbTnZqvWlcStQOSrQ366nHPlQjHoT13JfoG0DXQ Z+g53t3G+lB4tS5AWlEZc9ymmxYq69GW5N2tjVajTPai1Mj5FSuBmoujmaSiJVKsZfrq WBsA== 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=pPML6RTndY+ZSnax1dZqLmtDmDCil+ZsLU0h4HRtUj4veJB9d4eor0zVkxrFBZ5Eif rElnqsr0t5zJUuUnhXNjwPhH9ayn7TTdnUXSEwm6S3qslkHCMPsWcMls7tIeNWHNCotW Tp1IoPifks/UlCFYyydQj5OfqvaTN5q1+9a5FeOOZQNAw0o/B7TmZK+ChP0wKoxkQBK9 vJaASffyq8jG1AA/HfMGi9CRPw/dZQTNu+qz7f5EsAVAR0+z3cFPNS5PPjOjWAy5WVdD 1gz4MX95sw4WDHsC9xmb0CdMqPVqcj/fxGo0CI1hjlDLL5Q64wG4lqXwmFjU5uEaBLiN +gew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Cas8Gt9e; 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 k21-20020a170902761500b001a19248bfcfsi20559023pll.511.2023.03.24.10.14.41; Fri, 24 Mar 2023 10:14:53 -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=Cas8Gt9e; 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 S231933AbjCXRDH (ORCPT <rfc822;makky5685@gmail.com> + 99 others); Fri, 24 Mar 2023 13:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231899AbjCXRDC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 24 Mar 2023 13:03:02 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF4FC158; Fri, 24 Mar 2023 10:03:00 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id z10so1455912pgr.8; Fri, 24 Mar 2023 10:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679677379; 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=Cas8Gt9ektgQ2rcRR2JeaOYXS/1ps49r5/wx0KyMKgbqMR5bH0afftcvn5CtT8bPhf kPJ7JKJp8BIUceMpo9qfNqNAczsIXboLCUDqXQVJRE92ZqfwIAJQnnlhtYBilTjuwhrb Nko2PwaB6nHe2J6B4KqeRL1Iq42JQQaf3lRdM2f9GOSXvgG1pYn4LtsAeds/J6nmblls qpEdNyGRmYp8g1pMAv5cH8SnDwLBtyVQ0D7FNm+cK1LmhuMyWJory5Noczg2pKJNL61+ 38SGoEaFXnk+LzGn5Ec5B2k6X9Q0/DImArSzyKnVkNm3+Tq1RLhKOimwRylMmclspZQp 0TKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679677379; 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=3/JN8wot07q3RFUpuI2Q+5z5lzDXOaJhkMqeXUfXq8sfq6ABJIYypAj6fIs2VyVOtl fI4/vAYe1BhlwLPwsDApxqgbtxQGsM08KphJ1YFSd+v2W045OlsGW1XXYq0Nq5mDzZkw YxUvhRa/2YgV6kK69/wm53HFNw/GRVK3u4f2hLedSgFpQhDSCmNWWBM7icJCKzRf7OWe mDfLyeZiZ4ZOJ8AOCoCjzHrx+qQhBIAd5WfO/QNfVOrGvVd32Vbop/7v/aEWQlE46Ift mA5i5asHWHKGtKGDLimIjRv8DC95iADJ+PmBMHJbiasbR9q6hSjKaVIyQY6ObBWZgtyX vKuA== X-Gm-Message-State: AAQBX9eltAABKR5xGq6J7xatzG9SDvOzgNK/2/bGD/wMrMhcj1BXQelL J/B2UROAxVADJk+i9D0saCCOWqEcLvc= X-Received: by 2002:a62:5b04:0:b0:623:6131:66ca with SMTP id p4-20020a625b04000000b00623613166camr3283138pfb.32.1679677379543; Fri, 24 Mar 2023 10:02:59 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id h4-20020a62b404000000b005a8bfe3b241sm14019591pfn.167.2023.03.24.10.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 10:02:58 -0700 (PDT) From: Florian Fainelli <f.fainelli@gmail.com> To: linux-kernel@vger.kernel.org Cc: bcm-kernel-feedback-list@broadcom.com, 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 2/2] media: rc: gpio-ir-recv: Fix support for wake-up Date: Fri, 24 Mar 2023 10:02:14 -0700 Message-Id: <20230324170214.3470675-3-f.fainelli@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230324170214.3470675-1-f.fainelli@gmail.com> References: <20230324170214.3470675-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?1761270136488487695?= X-GMAIL-MSGID: =?utf-8?q?1761270136488487695?= |
Series |
Correct gpio-ir-recv wakeup capability
|
|
Commit Message
Florian Fainelli
March 24, 2023, 5:02 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) {