From patchwork Wed May 17 08:37:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 9730469 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 8DCC260138 for ; Wed, 17 May 2017 08:46:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C34F28654 for ; Wed, 17 May 2017 08:46:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 710E8286E7; Wed, 17 May 2017 08:46:58 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 0293C28654 for ; Wed, 17 May 2017 08:46:58 +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=5wEfOLLpN4sXwzCFpZh1u9QN7ocKkKzSTJNq6sDZtME=; b=tBmNSdkPPsOVzc4wHoB3jKiJge WwgoIovhg5fOSdEqSVGoasIfgHVwSIzpwDlzTVbfZPE2dBDVdb8xe2U/HqAYZq0lCxVEby4rp0B8G vo3QkP0zYT2p2zsBwwkCGxzBcKXxYqLUbSxuPFqXFIFB6Jw8QPoJIDjQiflsSOf7Vy9oiCdF6qXHH vGEXVNpwga2vSGLazP7Vy522nzJYtnQG6EjawRkv2nWHSJPET38Syp7aw7xrqMm1P9T0IK0uemRws zuo6uox0SslyKVrBc8OS/m6hbUHtj5Shsl9p80BYKNEZFuYINYbnk+opLUPXB6iQkkiXBluqHZqit Cc7aVoRA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dAubg-00065A-L8; Wed, 17 May 2017 08:46:56 +0000 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dAuUO-0000rZ-Td for linux-arm-kernel@lists.infradead.org; Wed, 17 May 2017 08:39:31 +0000 Received: by mail-pf0-x22e.google.com with SMTP id n23so3962324pfb.2 for ; Wed, 17 May 2017 01:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F6OLmxIzmdyqckKq3Xddnw9jIsLgpUabHF1SQLJRRI4=; b=EcAqdmqIvomS2Vm/kLcYUbhmAVNt6StR8uWi+E4cC9AvhgYaiMzLGagzAqClPCA1zv 6gVZQrx9QMq/zxx8l+TmctX+VY59oqwdK7X9zNebHJKjCV3k2RR5bndu+N++wCMRouCf XRqUqyyQ6iTOkaXVaQtt7qG18Y6R/KhSIYGoo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F6OLmxIzmdyqckKq3Xddnw9jIsLgpUabHF1SQLJRRI4=; b=VDJceWrAk9nFM6A+nM3jTg4kyaBnlt6HuZkL5hIYTxjm4hor5OLq6+V2d75hCRJQoj EZ1L20Ue4BOHT/+a6TNXn6zW5LNQpPQckgjv5RuLwkwp9KBunkqxdAM1veN8TDIhImRG HQ7CITOlOJfB+eJzqjnCNSXZDA+eQrxQhNPgIUGmD11ESLTqzf86ANlTIKRnu0kaBMg0 hVKFT7G9GejSP4rQl+zX9QycjQhzRFNDF8FBfwtlYLhAQ5PsLDsQ0jnZ7kYsoAMHb5zQ 3TrojedK7y5EeQvRQ90grzSOKzNx/+EmDuNozR1KErDmuBUI0KCA/GFy9DXKTF8eSWT1 PFxA== X-Gm-Message-State: AODbwcCR3rEPrg+Soxp9wsTMpWVPq6+aL15ZFu+gXJUlmEMP6asixneK c73POJDBAu+7cb8j X-Received: by 10.99.127.73 with SMTP id p9mr2531878pgn.169.1495010344061; Wed, 17 May 2017 01:39:04 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.56.159.164]) by smtp.gmail.com with ESMTPSA id u9sm3029519pgn.55.2017.05.17.01.38.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 May 2017 01:39:03 -0700 (PDT) From: Guodong Xu To: robh+dt@kernel.org, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, wangkefeng.wang@huawei.com, puck.chen@hisilicon.com, xuejiancheng@hisilicon.com, devicetree@vger.kernel.org Subject: [PATCH 11/12] arm64: dts: hi3660: add power key dts node Date: Wed, 17 May 2017 16:37:44 +0800 Message-Id: <20170517083745.24479-12-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170517083745.24479-1-guodong.xu@linaro.org> References: <20170517083745.24479-1-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170517_013925_627418_EF6B0542 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. 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: Guodong Xu , Chen Jun , John Stultz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 From: Chen Jun We use gpio_034 as power key on hikey960, and set gpio with pull-up state, when key press the voltage on the gpio will come to lower, and power key event will be reported. Signed-off-by: Chen Jun Signed-off-by: John Stultz Signed-off-by: Guodong Xu --- arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts index 79735ee..6de86c0 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts @@ -10,6 +10,8 @@ #include "hi3660.dtsi" #include "hikey960-pinctrl.dtsi" #include +#include +#include / { model = "HiKey960"; @@ -32,6 +34,21 @@ /* rewrite this at bootloader */ reg = <0x0 0x0 0x0 0x0>; }; + + soc { + keys: gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>; + + power { + wakeup-source; + gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; + label = "GPIO Power"; + linux,code = ; + }; + }; + }; }; &i2c0 {