linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nm@ti.com (Nishanth Menon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 2/2] power: twl4030_charger: attempt to power off in case of critical events
Date: Sat, 14 Jun 2014 17:28:51 -0500	[thread overview]
Message-ID: <CAGo_u6oLuf=tM-jtGrhm_31sAfLd9BfVoLyXC8O280WJ+LQqPA@mail.gmail.com> (raw)
In-Reply-To: <20140614222122.GA1389@xo-6d-61-c0.localdomain>

On Sat, Jun 14, 2014 at 5:21 PM, Pavel Machek <pavel@ucw.cz> wrote:
>
>
> Userland can make orderly_poweroff take long time, or even forever. (Think disconnected
> network with nfsroot).
>
> Should we do something more forceful here? Userland has to handle sudden poweroffs, anyway...
>
> (You could invent new function "give userland 5 seconds to shut system down" if you
> really wanted...)


Or how about:

 /* If we have Power OFF ability, use it, else try restarting */
 if (pm_power_off) {
         kernel_power_off();
 } else {
         WARN(1, "FIXME: NO pm_power_off!!! trying restart\n");
         kernel_restart("Charger triggered emergency restart");
 }


-- 
---
Regards,
Nishanth Menon

      reply	other threads:[~2014-06-14 22:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 21:46 [PATCH V2 0/2] power: twl4030_charger: cleanup to handle various battery handling error conditions Nishanth Menon
2014-05-28 21:46 ` [PATCH V2 1/2] power: twl4030_charger: detect battery presence prior to enabling charger Nishanth Menon
2014-07-23  9:24   ` Tony Lindgren
2014-07-23 12:03     ` Sebastian Reichel
2014-07-24  6:32       ` Tony Lindgren
2014-05-28 21:46 ` [PATCH V2 2/2] power: twl4030_charger: attempt to power off in case of critical events Nishanth Menon
2014-06-04 10:04   ` Grazvydas Ignotas
2014-06-04 13:01     ` Nishanth Menon
2014-06-04 22:30       ` Grazvydas Ignotas
2014-06-05 17:06         ` Nishanth Menon
2014-06-14 22:26         ` Pavel Machek
2014-06-14 22:21   ` Pavel Machek
2014-06-14 22:28     ` Nishanth Menon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGo_u6oLuf=tM-jtGrhm_31sAfLd9BfVoLyXC8O280WJ+LQqPA@mail.gmail.com' \
    --to=nm@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).