From patchwork Fri Jun 22 16:06:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 10482669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70A5160388 for ; Fri, 22 Jun 2018 16:16:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64B5128E5D for ; Fri, 22 Jun 2018 16:16:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 58E3E28E61; Fri, 22 Jun 2018 16:16:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0394228E5D for ; Fri, 22 Jun 2018 16:16:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=U3VyZquOjXncAu/DfpQC4ReFjDYwMo/PThQOiQKvZc4=; b=jfiM4RcbGtMc4omMNCXQ1MOkRJ MwTVnkyNp9C6PN9rcN8c8Wbh4JHejsHtQMOm/OfbodImk7xwg8nPt6uvkrTukbEH8qYBCyHfIFctU 0P8iXGgxiNF38mEsm44KSBsJKgMb0c8QK5WUwv2PVipQPGKxeguvpHqJHqp3cBfW0LWpnqmBGduNw UiAOCL/7kcbnsiGQOtXJvKpP7ywZvBV/49sC1xGb09Otd0nJRr+sPuLY+zhaS3VLv4IqzN47q+4Yd ic4w3UXd0xq9T6lE1hPlNYYGqvkNPoGpAYrcwPR3qh5HQthRnSiQzqSWR1K0Mg7k2sGsm57IVB5RS ff1pTAPA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWOjo-00030q-ID; Fri, 22 Jun 2018 16:16:40 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWOjm-0002uS-7Y for linux-arm-kernel@bombadil.infradead.org; Fri, 22 Jun 2018 16:16:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sBewn6wrfXVUP++3iRfKSmRlDzYoWixAs3z3jffX7aI=; b=Oabl+YLh9OEFp6YDHHt1bwgUh 0AgpC0AYQN8eZ/mphJrEQqJvYerMyTdZDZuqhOAYyksyvYsHUolAHJnhdZkd3G8kblJvW8hW20a2o kjWOZ6WnCrm2swRTzmJbPgmEpzRW4vHJB+8HAmdwTgWkXCAFtmY/ovJza9EscdsN3PKTbxlwVWzvM sB0tZJxrjLSJxRSVd4814+LUksmuI1dAxWigZ+pgnSsxWI+kX1suLmNMaelorlt1g+pJudJ9NdmaV bDkP7yXl0j0/jUSgalSumWP1izItPbV34HImEJtkRZNxYN4W/AXXqoDea4++rgTC7PO7rYbxz1DLU s0306XBIA==; Received: from giraffe.birch.relay.mailchannels.net ([23.83.209.69]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWOc2-0001mF-6m for linux-arm-kernel@lists.infradead.org; Fri, 22 Jun 2018 16:08:40 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 979475C243D; Fri, 22 Jun 2018 16:08:17 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.33.46]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id EFF6F5C2FA5; Fri, 22 Jun 2018 16:08:16 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.18.41.110]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.15.2); Fri, 22 Jun 2018 16:08:17 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Arch-Turn: 30c786bc53ddda87_1529683697435_3498745610 X-MC-Loop-Signature: 1529683697435:3048804225 X-MC-Ingress-Time: 1529683697435 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 099A9630E0; Fri, 22 Jun 2018 16:07:47 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai Subject: [PATCH 2/2] arm64: allwinner: a64: allow laptops to wake up from lid Date: Sat, 23 Jun 2018 00:06:31 +0800 Message-Id: <20180622160631.8578-2-icenowy@aosc.io> In-Reply-To: <20180622160631.8578-1-icenowy@aosc.io> References: <20180622160631.8578-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180622_170838_534338_A10BBB1C X-CRM114-Status: GOOD ( 16.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently all ARM kernels will have s2idle enabled if CONFIG_SUSPEND is present. In this case if the lid is closed, systemd-logind will enter s2idle mode by default; however there's no possible wakeup source defined, so the system will enter a forever idle. Add the lid itself as a wakeup source, thus the system can wakeup when the lid is opened. Signed-off-by: Icenowy Zheng --- This patch is not related with the first patch, and have no dependency. arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 1 + arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts index 58253d6f9be1..e6e5bf11b759 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts @@ -49,6 +49,7 @@ linux,input-type = ; linux,code = ; linux,can-disable; + wakeup-source; }; }; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts index 02fecc42440c..33f78e745815 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts @@ -38,6 +38,7 @@ gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ linux,input-type = ; linux,code = ; + wakeup-source; }; };