From: Sebastian Reichel <sre@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Laxman Dewangan <ldewangan@nvidia.com>,
Martin Michlmayr <tbm@cyrius.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: reset: Add MAX77620 support
Date: Sun, 29 Jan 2017 23:43:52 +0100 [thread overview]
Message-ID: <20170129224352.awzvwt2pzitovapu@earth> (raw)
In-Reply-To: <0447204d-34c6-aa62-d82b-ee064f1e79bb@roeck-us.net>
[-- Attachment #1: Type: text/plain, Size: 2780 bytes --]
Hi,
On Sun, Jan 29, 2017 at 12:47:57PM -0800, Guenter Roeck wrote:
> On 01/29/2017 12:02 PM, Sebastian Reichel wrote:
>
> > >
> > > To keep things simple, I think it would be okay to allow only one of
> > > each type of controller in any running system. It's very unlikely that
> > > board designers would devise two different ways of powering off or
> > > restarting a system, while in a similar way an SoC or CPU would only
> > > ever provide one way to do so. Even if theoretically multiple
> > > possibilities exist, I think the board code should pick which ones are
> > > appropriate.
> >
> > Using that logic we may also advice, that board-code should only
> > register the board-level reset/poweroff and it's enough to have
> > a callback again... I wonder if that is really feasible.
> >
>
> FWIW, it is also not true.
It seems this was misunderstood. I do not expect this to work.
> There is a reason why many of the restart handlers used to have
> code saying "install restart handler, but only if none is
> installed yet". Which of course is racy, and gets more interesting
> if the restart handler installed first is unloaded at a later
> time, leaving the system with no restart handler. Or both are
> unloaded, leaving the system with a pointer to a no longer
> existing handler.
>
> One could then argue that anything implementing a restart handler must
> not unload. Which results in more restrictions. And drivers loaded
> on hardware which don't need it. And more corner cases to deal with.
> And more inconsistencies.
>
> In reality, many systems or system variants will have more than one means
> to restart it. Yes, board designers do devise multiple ways of powering off
> or restarting a system. There may be and likely are valid reasons for doing
> so; I would not want to claim or suggest that board designers would design
> such hardware without reason. Even "standard" PCs tend to have have more
> than one means to reset it. There _was_ a reason for introducing that
> framework; I didn't just do it for fun.
>
> However, as I had mentioned before, I am not really interested in this
> topic anymore. Just treat this as my final word of caution, or feel free
> to ignore it. I hope you'll find a much better solution than mine
> to implement "the board code should pick which ones are appropriate".
In case I was unclear: I'm fine with the current state of reboot
code using notifier chain and really thankful for the work. IMHO
it improved the status-quo a lot.
However I'm not fine with the current poweroff stuff and if somebody
offers to implement a solution compatible with Linus (and other people,
which disliked the notifier chain approach): Thanks, please do!
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-01-29 22:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 16:15 [PATCH] power: reset: Add MAX77620 support Thierry Reding
2017-01-12 16:36 ` Laxman Dewangan
2017-01-12 17:35 ` Thierry Reding
2017-01-12 17:35 ` Laxman Dewangan
2017-01-19 12:27 ` Thierry Reding
2017-01-13 3:44 ` Sebastian Reichel
2017-01-19 12:23 ` Thierry Reding
2017-01-19 23:00 ` Sebastian Reichel
2017-01-19 23:29 ` Guenter Roeck
2017-01-20 8:38 ` Thierry Reding
2017-01-20 17:53 ` Guenter Roeck
2017-01-29 20:02 ` Sebastian Reichel
2017-01-29 20:47 ` Guenter Roeck
2017-01-29 22:43 ` Sebastian Reichel [this message]
2017-01-20 12:44 ` Sebastian Reichel
2017-01-20 13:11 ` Thierry Reding
2017-01-20 13:47 ` Sebastian Reichel
2017-01-20 14:32 ` Guenter Roeck
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=20170129224352.awzvwt2pzitovapu@earth \
--to=sre@kernel.org \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=tbm@cyrius.com \
--cc=thierry.reding@gmail.com \
/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).