From patchwork Wed Jun 14 08:23:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 9785725 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 15EEB60325 for ; Wed, 14 Jun 2017 08:26:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F07DC26E1A for ; Wed, 14 Jun 2017 08:26:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4AA528385; Wed, 14 Jun 2017 08:26:25 +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 68B0026E1A for ; Wed, 14 Jun 2017 08:26:25 +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=ZTD5RXwZ9rm2aU5Zl4WwhPXHV2zq651rHRfpXQ9wNhI=; b=RBSe6d0q4KGk2Vpn3Cr7wJCWo+ xvwHX+ZODiZq8kqSv/G4oEBRZUw5NzAFIogjnoCQx9vnfdqMj0rEY5jdbGP0pJjduM61y3u+EgkLn /4K18HlWk2AtKoQGEQPH60Nf7BTMvoa5vanlYOCkulVAbRe49iQDnCZdaV6bLOjVuZwgIXF54Pckh XftYe63r+FLeSUYC0H13yGn3gVvXXvK4Wm2SuqIQRlCIrgs6A9HdZG/bSZyholnVBFgE2A0fgGrLY YOYccjUOiP12EOjraqgePmcoUd5NdRoyWhswSRCf9WNukEGof8VRj5kCNwnOou3/FSSBLz6+Qfb4t QHcq5HOw==; 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 1dL3dA-0005ZR-1H; Wed, 14 Jun 2017 08:26:24 +0000 Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dL3c3-0002rR-6Y for linux-arm-kernel@lists.infradead.org; Wed, 14 Jun 2017 08:25:45 +0000 Received: by mail-pg0-x230.google.com with SMTP id a70so72550883pge.3 for ; Wed, 14 Jun 2017 01:24:55 -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=X6/H86AoT9SYw5uZPqpjGBaeqytuolgQzVCEB6Bujm8=; b=es4v5Bw32N1KlD4l5FjYpj0iiB8Rq0ETEkcpkuWVmd1ynPFNbFuNNXK3RWRU9h5Pz/ StbCMUz+MVbZWoFLacKwPIRtxU8xgLDt+xuiiaoHkhVWbrlOpiAtBIKLAkVOk7tZu4DX GKKtqB7Hjopx/KwKkcvOKWgQiSzVT9eHKhb+I= 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=X6/H86AoT9SYw5uZPqpjGBaeqytuolgQzVCEB6Bujm8=; b=E5c28kxqyQTNpEXyTgTYy9G9yKH14FbbNwzsF6v+GGKPf2F154p8juQdM5xO1UMtA/ ZuON+sZhBecB4T9IV283oYcl7v3l3ZdN0m08X+OfB6lEPeZGmqpl919azx2RDyT8LUQx Kl2+hNVDFWbdZM2h4bMitwBfZu5SbfaZ0G+LmR4CHXutd5wooC3p8rB5Zem8sfwvPg4j ixLrIgFPAyg2hkDy8cATm4djpTIo0LS5lXv317uOzw7xuqw9kX3+aaVi0HJwboK4J426 GSJqiRuwPSo4cjjDek+B3VIn6joZQyYJ48Oy6KkgcKYtUxi6J21igEpn961Yg3dP++WS o6Fg== X-Gm-Message-State: AKS2vOxEXnPRFUblu8KeeupE/k4k1R5V3HP9E844fCZne8a8BCPdxlD9 Mvi1LeS5WnRYVgNK X-Received: by 10.84.238.129 with SMTP id v1mr3761439plk.102.1497428694713; Wed, 14 Jun 2017 01:24:54 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.56.159.99]) by smtp.gmail.com with ESMTPSA id h14sm766802pfh.71.2017.06.14.01.24.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 01:24:54 -0700 (PDT) From: Guodong Xu To: robh+dt@kernel.org, mark.rutland@arm.com, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, wangkefeng.wang@huawei.com, xuejiancheng@hisilicon.com, peter.griffin@linaro.org, puck.chen@hisilicon.com, lee.jones@linaro.org, ulf.hansson@linaro.org, bhelgaas@google.com, arnd@arndb.de Subject: [PATCH v3 10/21] arm64: dts: hi3660: add power key dts node Date: Wed, 14 Jun 2017 16:23:27 +0800 Message-Id: <20170614082338.15673-11-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170614082338.15673-1-guodong.xu@linaro.org> References: <20170614082338.15673-1-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170614_012516_164811_2C34643B X-CRM114-Status: UNSURE ( 8.76 ) 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: devicetree@vger.kernel.org, Guodong Xu , linux-pci@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, John Stultz , Chen Jun , zhangfei.gao@linaro.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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts index c25fff9..7aac35b 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"; @@ -34,6 +36,19 @@ /* rewrite this at bootloader */ reg = <0x0 0x0 0x0 0x0>; }; + + 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 {