RE: [RESEND PATCH V4 2/3] devicetree: Add bindings for DA9063 OnKey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxx> wrote:
> > From: Steve Twiss <stwiss.opensource@xxxxxxxxxxx>
> >
> > Add device tree bindings for the DA9063 OnKey driver
> >
> > Acked-by: Lee Jones <lee.jones@xxxxxxxxxx>
> >

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����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux