From patchwork Thu Jun 15 03:04:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 105619 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp595605qgd; Wed, 14 Jun 2017 20:06:32 -0700 (PDT) X-Received: by 10.84.139.67 with SMTP id 61mr3557751plq.19.1497495992787; Wed, 14 Jun 2017 20:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497495992; cv=none; d=google.com; s=arc-20160816; b=D+675jgzPi6YlGDyg/w+orqQFeccvlUJ9PxVK6ymVjpbqnG5+XKvneil36+y4pVAwG NIC1mQ2Xi6aOBimZgt36X8jufdG/wYMuepLQ//3S84JTLsKn3FoZ0ik7g1NC6R7B7w2u ny3i0OziDGrC5WqKs1LhOVPTdPOewFIe26chSUkWwq6ln7S+hI5wz+wCY1o8wY1K/LoZ sfCtwkXi83jM05ajxddrwERy9pHp1WUtLSXbRRtYzc72UW26KH1hwQHxRmlOpyuFl/lR CdUI1C9trBQCA995S6y1BD5nslg0IW/NpH/7VS9VRHGw4oFILP8qGnu2B43nVCethWH9 Ya6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=X6/H86AoT9SYw5uZPqpjGBaeqytuolgQzVCEB6Bujm8=; b=c11vz/9O0OpsV+EmKiwuwp8zEF0dhnsHorDPGmcvY/BTYVm++1mNw74HYUN6rVk5TZ SWXVfT13ZuSS4PkA38Dl0LMhdy/cdSChgkTot8Yk99K33ZYEhUSaoKs3UwVfYrd8bFF7 cTTd8x5nOLAUoBFh8nbv7FPaLOMFW+PMtSgGtB2dGsVfrdx4IZPYvtak/+S1TV2EYRPC b/+xRHNbZuMOwCpr48z+5OIftgG/iJAPRvAUhJ9eddJGWN18MWMx1FvefAgjnswqh1kJ +ZL+yAbyO9Lnsu0I5yYOqHRCrF6dd7d42Msu/4k1q3PSbS6mtJZuT2DpASzagvTICw0T 8rFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=BNJq6Mr5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f32si1334027plf.393.2017.06.14.20.06.32; Wed, 14 Jun 2017 20:06:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=BNJq6Mr5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbdFODG0 (ORCPT + 25 others); Wed, 14 Jun 2017 23:06:26 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:34993 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752094AbdFODGY (ORCPT ); Wed, 14 Jun 2017 23:06:24 -0400 Received: by mail-pf0-f170.google.com with SMTP id l89so1389366pfi.2 for ; Wed, 14 Jun 2017 20:06:24 -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=BNJq6Mr51UzTg0P2x8AfQ8aqxnzQttgO+vFAVokynyQGygpv03lqah52WBnqueawXh K6c7GnJUmAs1bKB9fSoySdkKUTdqkcB9r7lLNqyNZP8ExdPI51FEXTpXZXwR/wpiy7HX CYaiIPXvKxBm/Rcd+KArItIZ3u+RHPxfpSy+U= 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=Wr3CYZ2ws+MH+T4LGf9ip2DJ5mm5IrCXLw0EfZaw9nyQ5DT5r7UnAMtRH0zysEumqc DIkexVrf3GZ6AboDaJTCQKVykHK0sQxeEtleYHh1lduPxg6sflw10Dtlhf2REyAoffRa rWr/3OSiJrtIbGH6UkNvxc3mnc9zhoEu4ewr3rS66kUdFgkPIuqXqcLtWZWKW4pAxHCc 7a1Unzthznr0wHnzwrI7fwtMWjFmvtTXqP+FTVcWYW8avg999yrwyTpokUWXsSW7/U9d XRh4idF6t0FDbz4J+IvkUwM/2m5sCEYwsK4qM7gPcQghV8/l1irMmWfO/NdNWM/Sjej8 2+JA== X-Gm-Message-State: AKS2vOznPZBhflLy0Kp+9tmnnRkIUt4AaeqVf5BtcQNzBr46JQydQcLw NIKCFo6dBpfbaO6S X-Received: by 10.84.175.65 with SMTP id s59mr3604413plb.20.1497495983759; Wed, 14 Jun 2017 20:06:23 -0700 (PDT) Received: from localhost.localdomain ([45.56.159.17]) by smtp.gmail.com with ESMTPSA id y65sm2156656pgd.33.2017.06.14.20.06.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 20:06:23 -0700 (PDT) From: Guodong Xu To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, lgirdwood@gmail.com, broonie@kernel.org, khilman@baylibre.com, arnd@arndb.de, gregory.clement@free-electrons.com, horms+renesas@verge.net.au, olof@lixom.net, thomas.petazzoni@free-electrons.com, yamada.masahiro@socionext.com, riku.voipio@linaro.org, treding@nvidia.com, krzk@kernel.org, eric@anholt.net, damm+renesas@opensource.se, ard.biesheuvel@linaro.org, linus.walleij@linaro.org, geert+renesas@glider.be Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, hw.wangxiaoyin@hisilicon.com, Chen Jun , John Stultz , Guodong Xu Subject: [PATCH v4 10/20] arm64: dts: hi3660: add power key dts node Date: Thu, 15 Jun 2017 11:04:07 +0800 Message-Id: <20170615030417.14059-11-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170615030417.14059-1-guodong.xu@linaro.org> References: <20170615030417.14059-1-guodong.xu@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.10.2 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 {