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: 65850 Delivered-To: patches@linaro.org Received: by 10.140.93.198 with SMTP id d64csp825393qge; Thu, 14 Apr 2016 14:07:34 -0700 (PDT) X-Received: by 10.66.246.165 with SMTP id xx5mr24289543pac.87.1460668053951; Thu, 14 Apr 2016 14:07:33 -0700 (PDT) Return-Path: Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com. [2607:f8b0:400e:c00::232]) by mx.google.com with ESMTPS id r64si4348444pfb.103.2016.04.14.14.07.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Apr 2016 14:07:33 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::232 as permitted sender) client-ip=2607:f8b0:400e:c00::232; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::232 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pf0-x232.google.com with SMTP id e128so49385365pfe.3 for ; Thu, 14 Apr 2016 14:07:33 -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=ZWQ0mzo5P78CY60XO7EFCYocTJ52ZsYLXr9Jpq+BVSb6mt9tOegfBoyTdQLgQmAQMT 4E7Q/iXY9GqyE7gNSSkhIo/jRTzNUGKBM+ddPNWygRoRwycrz+ZfUf8N0X1iP/3I69Nh THvqYTjoGdtK7yAuyG8mrdIjvkW0WLR0aNW7HSEeExEWbDcf5f4lXmbJzz7f0DrblE2l SKNRr7CE9HawVF/zgk65fniz/GQz4rNElknjhxe6LAHQ1Yt54WNN5ct3mDkjudXfQrdW fDOgU8NJLEYbEe+HqG1wK+FjvkKxXMXl0GuOYnpsY0D2g4xcWd5k5NtoqVulklFQjXm6 Wksw== X-Gm-Message-State: AOPr4FVo0l6Ug43lqpRwm3Xa1mWgtlJ3lCB9ZV60ymGskIPoBOkTPJW/6Y8diIu0mD47hMehwZg= X-Received: by 10.98.10.20 with SMTP id s20mr24515767pfi.109.1460668053439; Thu, 14 Apr 2016 14:07:33 -0700 (PDT) Return-Path: 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 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 --- 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(-) -- 1.9.1 Acked-by: Bjorn Andersson 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 = ;