From patchwork Thu Apr 14 21:07:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 8843091 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 731A79F71A for ; Thu, 14 Apr 2016 21:08:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC02C20125 for ; Thu, 14 Apr 2016 21:08:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE1A82010B for ; Thu, 14 Apr 2016 21:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750936AbcDNVHf (ORCPT ); Thu, 14 Apr 2016 17:07:35 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:35651 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751384AbcDNVHe (ORCPT ); Thu, 14 Apr 2016 17:07:34 -0400 Received: by mail-pf0-f179.google.com with SMTP id n1so49525830pfn.2 for ; Thu, 14 Apr 2016 14:07:34 -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; bh=VWi6pkXgkxxM8bTdtsA7ooChpC9g5CeyK4oyiC0E83E=; b=gLU+mH2sEGfzuB7werzz3Rjo27JZZgB2jbr/+iRg5wzP1eNXX/0gGCgfrHjNwK74Gh Zs3Y+sbzkg/TNN38PlNJdKHywN3Sd0Tq/In74/XOSxUdhRIdtTatrGjyyJ6XhC6mWCuP zY6xrBO0Tv/n3tRwOjmxJg5I4gDmP5GZ5O4PQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VWi6pkXgkxxM8bTdtsA7ooChpC9g5CeyK4oyiC0E83E=; b=GYqUCTOH2qC6eNPH1euSBTA5NuA3aB5fXHZfEcUrJa3T92ViL/MnOepJ6zV1d+h6vV u+Gzr3A9s612Gn49i2CwZsMzmzq2Xb/zUFPrl3GhNDP9vzX5FD09BgYVXSVSvtMPHOXJ hKFvZC3TqCRK03a+FfeqGI2Zfwf/zKOPdFekVv5iT9OSk5oC+H6QDyvJsH5Rhc+2BAxy BQ7k+xl33w7VZ/wJB/BskHwVbG218VUMAqarllWdFLeiXFBvSy3oplTzYHV9LekQ4wRV OmO9si95q6Nf4Nq9WeP/I2ZEP/FGxA40ifSZt68mFPHoGk3NpV4aDhayIM/gZnr8c5Su UKbw== X-Gm-Message-State: AOPr4FWtkNfm9OWWi8VEQ17ifpyLd73xTa/KRor/7ygH0jx7vNbetu+WZnDpjYXQXBoK26WH X-Received: by 10.98.10.20 with SMTP id s20mr24515767pfi.109.1460668053439; Thu, 14 Apr 2016 14:07:33 -0700 (PDT) Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id wi5sm33221357pab.8.2016.04.14.14.07.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Apr 2016 14:07:32 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Rob Herring , Arnd Bergmann , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Andy Gross , Vinay Simha BN , Bjorn Andersson , Stephen Boyd , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/2 v2] device-tree: nexus7-flo: Remove power gpio key entry and use pmic8xxx-pwrkey Date: Thu, 14 Apr 2016 14:07:10 -0700 Message-Id: <1460668031-12384-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,TVD_SUBJ_WIPE_DEBT,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the pmic8xxx-pwrkey driver is already supported in the qcom-apq8064.dtsi, and the pmic8xxx-pwrkey supports logic to configure proper device shutdown when ps_hold goes low, it is better to use that driver then a generic gpio button. Thus this patch remove the gpio power key entry here, so we don't get double input events from having two drivers enabled. The one gotcha with the pmic8xxx-pwrkey is it has a fairly long debounce delay, which we shorten here to make the button behave as expected. Cc: Rob Herring Cc: Arnd Bergmann Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: Andy Gross Cc: Vinay Simha BN Cc: Bjorn Andersson Cc: Stephen Boyd Cc: linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz Acked-by: Rob Herring --- v2: - Add wakeup-source entry as suggested by Sudeep Holla arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts index c535b3f..15da084 100644 --- a/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts +++ b/arch/arm/boot/dts/qcom-apq8064-asus-nexus7-flo.dts @@ -29,12 +29,6 @@ gpio-keys { compatible = "gpio-keys"; - power { - label = "Power"; - gpios = <&tlmm_pinmux 26 GPIO_ACTIVE_LOW>; - linux,code = ; - gpio-key,wakeup; - }; volume_up { label = "Volume Up"; gpios = <&pm8921_gpio 4 GPIO_ACTIVE_HIGH>; @@ -190,6 +184,16 @@ }; }; + /* override default debounce for power-key */ + qcom,ssbi@500000 { + pmic@0 { + pwrkey@1c { + debounce = <1>; + wakeup-source; + }; + }; + }; + gsbi@16200000 { status = "okay"; qcom,mode = ;