Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753262AbbETO1j (ORCPT ); Wed, 20 May 2015 10:27:39 -0400 Received: from mail1.bemta14.messagelabs.com ([193.109.254.106]:12859 "EHLO mail1.bemta14.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752324AbbETO1g (ORCPT ); Wed, 20 May 2015 10:27:36 -0400 X-Env-Sender: stwiss.opensource@diasemi.com X-Msg-Ref: server-5.tower-194.messagelabs.com!1432132048!19302387!1 X-Originating-IP: [94.185.165.51] X-StarScan-Received: X-StarScan-Version: 6.13.15; banners=-,-,- X-VirusChecked: Checked From: "Opensource [Steve Twiss]" To: Rob Herring CC: Ian Campbell , Kumar Gala , Lee Jones , Mark Rutland , Pawel Moll , Rob Herring , DT , David Dajun Chen , Dmitry Torokhov , INPUT , LKML , "Samuel Ortiz" , Support Opensource Subject: RE: [RESEND PATCH V4 2/3] devicetree: Add bindings for DA9063 OnKey Thread-Topic: [RESEND PATCH V4 2/3] devicetree: Add bindings for DA9063 OnKey Thread-Index: AQHQkh9/JTIHNNSGbEmiPyLF930za52E0Q6AgAAW3uA= Date: Wed, 20 May 2015 14:27:27 +0000 Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7014B22C7FB@SW-EX-MBX02.diasemi.com> References: <72933a3c053b445e7998c818b7a73317fa1e2d8a.1432031565.git.stwiss.opensource@diasemi.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.20.26.77] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t4KERixa011627 Content-Length: 2556 Lines: 66 On 20 May 2015 14:44 Rob Herring wrote: > To: Opensource [Steve Twiss] > Cc: Ian Campbell; Kumar Gala; Lee Jones; Mark Rutland; Pawel Moll; Rob > Herring; DT; David Dajun Chen; Dmitry Torokhov; INPUT; LKML; Samuel Ortiz; > Support Opensource > Subject: Re: [RESEND PATCH V4 2/3] devicetree: Add bindings for DA9063 > OnKey > > On Tue, May 19, 2015 at 5:32 AM, S Twiss > wrote: > > From: Steve Twiss > > > > Add device tree bindings for the DA9063 OnKey driver > > > > Acked-by: Lee Jones > > Hi Rob, Thanks for the Ack. > I would think a long key press would be a h/w powerdown rather than a > key event as how do you poweroff/reset a hung system? That doesn't > really affect the binding though, so: yep.. That H/W controlled shutdown is not covered in the device driver because it is defaulted by the hardware PMIC. The DA9063 OnKey has are four modes of operation -- and one of them is a H/W controlled shutdown (to reset a hung system). Holding down the OnKey for a "long-long" key-press, if there is no software intervention, then the PMIC will chop the power. The other three modes are ... (a) Short key press (b) Long-key press (c) Long-long key press These modes *are* handled by the S/W driver. (a) The short key-press being the usual sleep/suspend. (b) Long key press is the KEY_POWER (bringing up a dialog on Android to ask if the user wants to shutdown the device) -- this is the one that can be disabled by the device tree binding. (c) Long-long key press -- this is the software equivalent to the H/W shutdown for a hung system. Instead of the hardware pulling the plug, the software sends a command to tell the PMIC to pull the plug. If that last one sounds like a repeat of the H/W shutdown, then that is because it almost is. It covers the use case when the user decides to shutdown their device by doing a long-long key press. The difference here is that the software is still able to respond, and so there is space for any important house-keeping (say to save important data) before the software sends a command to tell the PMIC to pull the plug. The fail-safe at this point is: if the S/W really isn't responding, then the hardware monitors the long-long key-press and if there is no intervention by software, the PMIC pulls the power plug 1 second later. Regards, Steve ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?