From: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
Jamie Lentin <jm@lentin.co.uk>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Igor Opaniuk <igor.opaniuk@toradex.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 0/2] This patch introduces a feature to force gpio-poweroff module
Date: Mon, 30 Sep 2019 14:11:59 +0000 [thread overview]
Message-ID: <CAGgjyvEx_F0C2XHDGxf3F0Z8iHF1vQZkoPft3_ZbTswVFv=SJA@mail.gmail.com> (raw)
In-Reply-To: <20190930121440.GC13301@lunn.ch>
Hi Andrew,
On Mon, Sep 30, 2019 at 3:16 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Mon, Sep 30, 2019 at 10:35:36AM +0000, Oleksandr Suvorov wrote:
> > to register its own pm_power_off handler even if someone has registered
> > this handler earlier.
> > Useful to change a way to power off the system using DT files.
>
> Hi Oleksandr
>
> I'm not sure this is a good idea. What happens when there are two
> drivers using forced mode? You then get which ever is register last.
> Non deterministic behaviour.
You're right, we have to handle a case when gpio-poweroff fails to
power the system off. Please look at the
2nd version of the patchset.
There are 3 only drivers that forcibly register its own pm_power_off
handler even if it has been registered before.
drivers/firmware/efi/reboot.c - supports chained call of next
pm_power_off handler if its own handler fails.
arch/x86/platform/iris/iris.c, drivers/char/ipmi/ipmi_poweroff.c -
don't support calling of next pm_power_off handler.
Looks like these drivers should be fixed too.
All other drivers don't change already initialized pm_power_off handler.
> What is the other driver which is causing you problems? How is it
> getting probed? DT?
There are several PMUs, RTCs, watchdogs that register their own pm_power_off.
Most of them, probably not all, are probed from DT.
>
> Thanks
> Andrew
--
Best regards
Oleksandr Suvorov
Toradex AG
Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500
4800 (main line)
next prev parent reply other threads:[~2019-09-30 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 10:35 [PATCH 0/2] This patch introduces a feature to force gpio-poweroff module Oleksandr Suvorov
2019-09-30 10:35 ` [PATCH 1/2] power: reset: gpio-poweroff: add force mode Oleksandr Suvorov
2019-09-30 10:35 ` [PATCH 2/2] dt-bindings: power: reset: gpio-poweroff: Add 'force-mode' property Oleksandr Suvorov
2019-09-30 12:14 ` [PATCH 0/2] This patch introduces a feature to force gpio-poweroff module Andrew Lunn
2019-09-30 14:11 ` Oleksandr Suvorov [this message]
2019-09-30 16:32 ` Andrew Lunn
2019-09-30 19:42 ` Jamie Lentin
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='CAGgjyvEx_F0C2XHDGxf3F0Z8iHF1vQZkoPft3_ZbTswVFv=SJA@mail.gmail.com' \
--to=oleksandr.suvorov@toradex.com \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=igor.opaniuk@toradex.com \
--cc=jm@lentin.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=marcel.ziswiler@toradex.com \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.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).