[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ED8E3B22081A4459DAC7699F3695FB7014B22C7FB@SW-EX-MBX02.diasemi.com>
Date: Wed, 20 May 2015 14:27:27 +0000
From: "Opensource [Steve Twiss]" <stwiss.opensource@...semi.com>
To: Rob Herring <robherring2@...il.com>
CC: Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Lee Jones <lee.jones@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Pawel Moll <pawel.moll@....com>,
Rob Herring <robh+dt@...nel.org>,
DT <devicetree@...r.kernel.org>,
David Dajun Chen <david.chen@...semi.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
INPUT <linux-input@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
"Samuel Ortiz" <sameo@...ux.intel.com>,
Support Opensource <Support.Opensource@...semi.com>
Subject: RE: [RESEND PATCH V4 2/3] devicetree: Add bindings for DA9063 OnKey
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
> <stwiss.opensource@...semi.com> wrote:
> > From: Steve Twiss <stwiss.opensource@...semi.com>
> >
> > Add device tree bindings for the DA9063 OnKey driver
> >
> > Acked-by: Lee Jones <lee.jones@...aro.org>
> >
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
Powered by blists - more mailing lists