Received: by 10.192.165.148 with SMTP id m20csp3408517imm; Mon, 7 May 2018 11:46:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZptdwHPYsWS2WQpCv7IbPPx5E+mrV+rDwdI0eOevOlDbcvyA/N3XX7OSFECnWwMC2rv9hU0 X-Received: by 2002:a24:3017:: with SMTP id q23-v6mr2495187itq.99.1525718793573; Mon, 07 May 2018 11:46:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525718793; cv=none; d=google.com; s=arc-20160816; b=n+34TBz/wbL1KRm1fEJwX3Kds13+sXFs2qKB91+u/dOnzj3bmZTLh8nSWMwCDmbgXe uyJ8zm123BLPei88vVBhTCv14BSasuqydGL+q13bk169ygQ4NdLHW2vii7j4VkmHslFX +ljYKKcA3N+9/5r0/4ZxJ2251XaJKcAuyOFsqVwFe/6QqUm+F3llakpxpX9T79WSSIZh q7BlHEcY/AGhzDbojPfmp7PJIAazfdHHZ/WeVF/ZHDS6LIFaS8LOTnQUHh/b3TBzMoOJ yTyxt51qSjbgiqa16ugzDUovIcTWsrTsi53QPOKUEUpLu4apgVBwbbaqXkomcjxbnzaJ vWvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=aS1j4BR5x5OPycGANL7ogClZKITBroV1oz2a2lpHW8c=; b=cv+zrOpRElkhpMgRavKRjdKAoygPkbcxNfwejEGFTufwx1Tt937485NbwGTSOf2h8u jGLvjZ6TxkB73p5P+YLxESZ5rLLE6yeen4odlqN9klTHS20RQVzKbprXSHhWYDfT2Kpq Cx9GyBSmcvH/82UC70ZDaES0ZG/nqh6fNraPZMP4buQVxMLUjsnv5Sbyjnn10wGcIbXg xERHRqfhV0K4gDTs4Rb/RzggzDKPwaQcQ2MFUEbMqUr5qrxFV3njwMGDBKkE88/Zx+10 zGTLijhaTD2wkl+CDVbE5nosqwVj43jf7et75BuQ1t8bTANP7B1/tMCnWzWfAA4KMcDN V5AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KjRsZJHt; 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 v74-v6si8102595ita.13.2018.05.07.11.46.20; Mon, 07 May 2018 11:46:33 -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.s=google header.b=KjRsZJHt; 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 S1752789AbeEGSpj (ORCPT + 99 others); Mon, 7 May 2018 14:45:39 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:46969 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752656AbeEGSph (ORCPT ); Mon, 7 May 2018 14:45:37 -0400 Received: by mail-pl0-f65.google.com with SMTP id 59-v6so334275plc.13 for ; Mon, 07 May 2018 11:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=aS1j4BR5x5OPycGANL7ogClZKITBroV1oz2a2lpHW8c=; b=KjRsZJHt2/jrHEeD/jgT0vpnX6eM8u4kRwO4I0lyJQHIZvNw9VGinjpqGwfr5zyh0y ciLzgf5VKHtri1EL+GwW6oDQ9yh1PikDIjBVhRMTkzEu/lZKWpjF38VxdCviBLVYbyhc eKfCfYduVjaQnSpIuI35UQTacOuq6SC0j3DKc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=aS1j4BR5x5OPycGANL7ogClZKITBroV1oz2a2lpHW8c=; b=uD+rI98KugCpUUMHHynQoTeT6Ifb4kps3GfBVo3uYkAWdztRiW1zBpoMc55ysmzeQH d+iPlVf2NxlzZZNMQ/+CcIkevr66Y9Oj3L20nrw/g+oDAkbUwgByARPSuAC6qtmtXF6G HLUk4hN8G5RiL005dmZo82GbH6DLITyyBoDaqHcsTaN3VKIacUKKRaImXsJrkl0FfSSQ F024PWU3pYXUSl/Y0PHvcoj+DNhtjTMC+/bQBbzdI9O5cBKSTYvuCHJ/XQdlLWUtHUUw 4hfqcYA+7fpi5hIoI9wHBbLJn3CyZDtT+oW3ge/U5KDH4dRi3vfH+PuCwFW8lOsAokxd YzbA== X-Gm-Message-State: ALQs6tAdw9Qxfxk8UZMGXE1kyP3G0pJXmmp1e0EzADJRirQYTomJ9kW0 A1tu2OEqp8KBWFiZSwQX470ngw== X-Received: by 2002:a65:65c4:: with SMTP id y4-v6mr25985429pgv.369.1525718736804; Mon, 07 May 2018 11:45:36 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id p1sm8415167pfp.137.2018.05.07.11.45.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 May 2018 11:45:36 -0700 (PDT) Date: Mon, 7 May 2018 11:46:59 -0700 From: Bjorn Andersson To: Dmitry Torokhov Cc: Tirupathi Reddy , robh+dt@kernel.org, mark.rutland@arm.com, linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V3] Input: pm8941-pwrkey: add resin key capabilities Message-ID: <20180507184659.GG2259@tuxbook-pro> References: <1521786192-19487-1-git-send-email-tirupath@codeaurora.org> <20180505001039.GA112416@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180505001039.GA112416@dtor-ws> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 04 May 17:10 PDT 2018, Dmitry Torokhov wrote: > Hi Tirupathi, > > On Fri, Mar 23, 2018 at 11:53:12AM +0530, Tirupathi Reddy wrote: > > Add resin key support to handle different types of key events > > defined in different platforms. > > > > Signed-off-by: Tirupathi Reddy > > --- > > .../bindings/input/qcom,pm8941-pwrkey.txt | 32 +++++++++ > > drivers/input/misc/pm8941-pwrkey.c | 81 ++++++++++++++++++++++ > > 2 files changed, 113 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt b/Documentation/devicetree/bindings/input/qcom,pm8941-pwrkey.txt [..] > > EXAMPLE > > > > pwrkey@800 { > > @@ -40,4 +66,10 @@ EXAMPLE > > interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; > > debounce = <15625>; > > bias-pull-up; > > + > > + resin { > > + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; > > + linux,code = ; > > + bias-pull-up; > > + }; > > }; > > The new key and power key bindings are very similar, I would prefer if > we shared the parsing code and our new DTS looked like: > > power { > ... > }; > > resin { > ... > }; > > (we can easily keep backward compatibility with power properties being > in device node). > As discussed here https://patchwork.kernel.org/patch/9751627/ the PON block does, in addition to providing power and resin key support also handle the restart reason ("reboot bootloader" in Android). My interpretation of our conclusion was to come up with a new binding for the "pon" and a driver for this block that instantiates the power key device. It seems reasonable for such binding to describe the two keys, as you propose here Dmitry, and instantiates the two input devices based on this. Regards, Bjorn